1 2007-06-12 Zoltan Varga <vargaz@gmail.com>
3 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
5 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
7 2007-06-12 Raja R Harinath <rharinath@novell.com>
9 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
12 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
14 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
16 2007-06-11 Raja R Harinath <harinath@gmail.com>
18 MonoGenericMethod on a diet
19 * class-internals.h (_MonoMethodInflated::reflection_info): Move
21 (_MonoGenericMethod::reflection_info): ... from here.
22 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
24 * reflection.c (inflate_mono_method): Likewise.
25 (mono_reflection_bind_generic_method_parameters): Likewise.
27 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
29 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
30 *verify.c: factored long ldarg forms to share code with short forms
32 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
34 *verify.c: fixed code formating factored some duplicate code
37 *verify.h: fixed binary incompatibility introduced earlier
39 *pedump.c: fixed formating
41 2007-06-11 Raja R Harinath <harinath@gmail.com>
43 Fix assertion when disassembling Mono.C5.dll
44 * loader.c (method_from_methodspec): Avoid inflating a method
45 twice with the same context. If the methodref is inflated, use
46 the declaring method instead.
48 * class.c (mono_class_from_generic_parameter): Fix case similar to
49 bug #81830 handled below, but for method containers.
51 2007-06-10 Raja R Harinath <harinath@gmail.com>
53 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
54 get_shared_generic_class. Directly inflate the instance.
55 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
56 (inflate_generic_class): Delete.
57 (get_shared_generic_class): Delete. Move setting of
58 'cached_class' and 'cached_context' ...
59 * metadata.c (mono_metadata_lookup_generic_class): ... here.
61 * metadata.c (mono_metadata_lookup_generic_class): Change
62 signature to take the components of a MonoGenericClass rather than
63 an allocated MonoGenericClass. Change semantics to be intern-like.
64 * reflection.c (mono_class_bind_generic_parameters): Update to
65 changes. Make locking region tighter.
66 * class.c (inflate_generic_class): Update to changes.
67 (get_shared_generic_class): Likewise.
68 * metadata-internals.h: Likewise.
70 * reflection.c (mono_class_bind_generic_parameters): Take and
71 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
72 (mono_reflection_bind_generic_parameters): Use
73 'mono_class_bind_generic_parameters' rather than duplicate the code.
74 * class.c (mono_bounded_array_class_get): Update to changes.
75 * object-internals.h: Likewise.
77 * reflection.c (mono_class_bind_generic_parameters): Only support
78 parameterizing generic type definitions. Remove support for other
81 2007-06-08 Zoltan Varga <vargaz@gmail.com>
83 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
85 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
88 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
90 * threads.c: When cleaning up thread, reset the Background bit.
93 2007-06-08 Jonathan Chambers <joncham@gmail.com>
95 * metadata.c: Move variable declarations to top of scope.
96 * verify.c: Move variable declarations to top of scope.
98 Code is contributed under MIT/X11 license.
100 2007-06-08 Raja R Harinath <rharinath@novell.com>
102 * reflection.c (mono_class_bind_generic_parameters): Replace
103 open-coded loop with mono_metadata_inflate_generic_inst.
105 * class.c (get_shared_generic_class): Don't call
106 mono_get_shared_generic_inst. Use the container's own
109 * metadata.c (mono_metadata_load_generic_params): Move
110 initialization of 'context' field here from ...
111 * class.c (mono_class_create_from_typedef): ... here, and ...
112 * loader.c (mono_get_method_from_token): ... here.
114 * class.c (get_shared_generic_class): Rename from
115 mono_get_shared_generic_class and make static.
116 (mono_get_shared_generic_inst): Move to metadata.c.
117 * loader.c (mono_get_shared_generic_method): Likewise.
118 * class-internals.h, metadata-internals.h: Update to changes.
121 * class.c (mono_class_from_generic_parameter): Don't assume a
122 generic container owner exists. Generic containers from monodis
125 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
127 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
128 * verify.h: new typedefs to returns the non-verifiable status
129 * verify.c: initial implementation of generics, stack merging and object compatibility check
131 2007-06-06 Mark Probst <mark.probst@gmail.com>
133 * class.c, image.c, class-internals.h (MonoImage): class_cache is
134 a MonoInternalHashTable again (fixed bug in internal hash table
137 2007-06-06 Mark Probst <mark.probst@gmail.com>
139 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
140 MonoInternalHashTable again (fixed bug in internal hash table
143 2007-06-06 Mark Probst <mark.probst@gmail.com>
145 * class.c, image.c, class-internals.h, domain.c,
146 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
147 changes. Have to figure out what makes them break the SWF
150 2007-06-04 Mark Probst <mark.probst@gmail.com>
152 * class.c, image.c, class-internals.h (MonoImage): class_cache is
153 a MonoInternalHashTable now.
155 2007-06-04 Mark Probst <mark.probst@gmail.com>
157 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
158 MonoInternalHashTable now.
160 2007-05-31 Zoltan Varga <vargaz@gmail.com>
162 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
165 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
167 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
168 dependent trampoline.
170 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
172 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
174 2007-05-29 Robert Jordan <robertj@gmx.net>
176 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
178 2007-05-28 Zoltan Varga <vargaz@gmail.com>
180 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
182 2007-05-25 Jonathan Chambers <joncham@gmail.com>
184 * marshal.c: Fix interface lookup loops for
185 cominterop_get_com_slot_for_method and
186 cominterop_get_method_interface. Only need to lookup
187 if type is a class, else use interface type method is on.
189 Code is contributed under MIT/X11 license.
191 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
193 * reflection.c: HasSecurity can be present even if no specially
194 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
195 SecurityAttribute). Fix CAS regression tests on buildbot.
197 2007-05-24 Jonathan Chambers <joncham@gmail.com>
199 * appdomain.c: Add configure checks for header files.
200 * image.c: Add configure checks for header files.
201 * file-io.c: Add configure checks for header files.
202 * debug-mono-symfile.c: Add configure checks for header files.
203 * threadpool.c: Add configure checks for header files.
204 * console-io.c: Add configure checks for header files.
205 * profiler.c: Add configure checks for header files.
206 * rawbuffer.c: Add configure checks for header files.
207 * icall.c: Add configure checks for header files.
208 * rand.c: Add configure checks for header files.
209 * socket-io.c: Add configure checks for header files.
211 Code is contributed under MIT/X11 license.
213 2007-05-24 Zoltan Varga <vargaz@gmail.com>
215 * reflection.c (mono_custom_attrs_from_builders): Remove the
216 assertion as it breaks the build.
218 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
220 * reflection.c (lookup_custom_attr): Make a copy here too.
222 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
225 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
228 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
231 2007-05-22 Zoltan Varga <vargaz@gmail.com>
233 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
234 (load_cattr_value): Ditto.
236 2007-05-20 Zoltan Varga <vargaz@gmail.com>
238 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
240 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
242 * threads.c: In "start_wrapper", set apartment_state to MTA if
243 apartment_state is Unknown and we're running on 2.0 profile or
245 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
246 to main method, then set apartment_state to Unknown on 1.0 profile,
247 and MTA on 2.0 profile.
249 2007-05-16 Jb Evain <jb@nurv.fr>
251 * class-internals.h (MonoDefaults): Add an attribute_class and
252 customattribute_data_class.
253 * domain.c (mono_init_internal): Populate them.
254 * reflection.c: Use them to remove duplicates. Make a vew
255 MonoClass variables `static'.
257 2007-05-15 Massimiliano Mantione <massi@ximian.com>
259 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
260 step in implementing IMT, so that all isinst checks now can go
262 This was needed because vtables for TransparentProxy need to look
263 like the vtable of the "target" class, so they need to point to
264 its interface bitmap directly.
266 * object.c: inside "mono_class_create_runtime_vtable" and
267 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
269 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
272 culture-info.h : added territory field in MonoCulture and
273 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
274 * locales.c : fill territory field above too.
275 * culture-info-table.h : regenerated.
277 2007-05-12 Zoltan Varga <vargaz@gmail.com>
279 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
282 2007-05-11 Jonathan Chambers <joncham@gmail.com>
284 * object.c: Always initialize apartment, even if
285 there is no custom attributes on entry point.
287 Code is contributed under MIT/X11 license.
289 2007-05-10 Jonathan Chambers <joncham@gmail.com>
291 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
292 * metadata.c: If no encoding is set, check for unicode
295 Code is contributed under MIT/X11 license.
297 2007-05-09 Jonathan Chambers <joncham@gmail.com>
299 * threads.c: Handle if mono_thread_current returns NULL
301 Code is contributed under MIT/X11 license.
303 2007-05-09 Jonathan Chambers <joncham@gmail.com>
305 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
306 in start_wrapper. Added mono_thread_init_apartment_state and
307 mono_thread_cleanup_apartment_state.
308 * object.c: Initialize thread apartment state on main thread
309 by checking for STAThreadAttribute on entry point.
310 * object-internals.h: Add apartment_state field to MonoThread.
311 * threads-types.h: Add unmanaged definition of
312 System.Threading.ApartmentState, MonoThreadApartmentState.
314 Code is contributed under MIT/X11 license.
316 2007-05-08 Jonathan Chambers <joncham@gmail.com>
318 * class.c: Fix windows build.
319 * class-internals.h: Fix windows build.
321 Code is contributed under MIT/X11 license.
323 2007-05-08 Robert Jordan <robertj@gmx.net>
325 * process.c (CreateProcess_internal):
326 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
327 .CreateNoWindow was specified. Fixes #81496.
329 2007-05-08 Massimiliano Mantione <massi@ximian.com>
331 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
332 step in implementing IMT, replaced it with two compact arrays
333 (interfaces_packed and interface_offsets_packed) and a bitmap that
334 is used for isinst checks (interface_bitmap).
336 * class.c: (compare_interface_ids): compare function to pass to
337 bsearch when looking for an interface with a given id.
338 (mono_class_interface_offset): reimplemented using bsearch on
339 interfaces_packed, getting the offset from interface_offsets_packed.
340 (print_implemented_interfaces): utility debugging function.
341 (setup_interface_offsets): reworked to initialize interfaces_packed,
342 interface_offsets_packed and interface_bitmap.
344 * object.c: replaced all accesses to "MonoClass.interface_offsets"
345 with uses of interfaces_packed and interface_offsets_packed.
347 2007-05-08 Massimiliano Mantione <massi@ximian.com>
349 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
350 mono_class_interface_offset prototype to wrap all accesses to
351 "MonoClass.interface_offsets".
353 * class.c: Implemented mono_class_interface_offset, and wrapped all
354 accesses to "MonoClass.interface_offsets".
356 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
357 "MonoClass.interface_offsets".
359 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
361 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
362 GetMethodFromHandle overloads (bug #78637).
364 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
366 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
367 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
369 2007-05-01 Zoltan Varga <vargaz@gmail.com>
371 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
374 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
376 (mono_custom_attrs_from_index): Ditto.
378 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
381 2007-04-30 Zoltan Varga <vargaz@gmail.com>
383 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
384 is now allocated from a mempool.
386 2007-04-28 Zoltan Varga <vargaz@gmail.com>
388 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
389 caller holds threads_lock, leading to deadlocks. Fixes #81476.
391 2007-04-26 Zoltan Varga <vargaz@gmail.com>
393 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
394 mono_loader_clear_error () too late. Fixes #81463.
396 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
398 * culture-info-table.h : regenerated.
400 2007-04-25 Zoltan Varga <vargaz@gmail.com>
402 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
405 2007-04-25 Dick Porter <dick@ximian.com>
407 * Makefile.am: Put the mingw enforced-optimisation back into the
408 PLATFORM_WIN32 section.
410 2007-04-24 Zoltan Varga <vargaz@gmail.com>
412 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
415 * image.c (mono_image_load_module): New API function to load a module reference.
417 * image.c (load_modules): Load modules lazily. Fixes #80812.
419 * class.c (mono_class_from_typeref): Use mono_image_load_module.
421 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
423 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
424 to mono_image_load_module_dynamic.
426 2007-04-23 Jonathan Chambers <joncham@gmail.com>
428 * marshal.c: Fix calling convention for CCW on non-windows
429 platforms. STDCALL on windows, CDECL everywhere else to work
430 with XPCOM and MainWin COM.
432 Code is contributed under MIT/X11 license.
434 2007-04-23 Martin Baulig <martin@ximian.com>
439 (method_from_memberref): Added `gboolean *used_context' argument.
440 (mono_get_method_from_token): Likewise.
441 (mono_get_method_full): Don't insert the method in the cache when
442 `used_context' is true.
444 2007-04-23 Raja R Harinath <rharinath@novell.com>
446 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
448 * reflection.c (mono_reflection_bind_generic_parameters): Don't
449 create new MonoTypes for returned types.
450 * class.c (mono_generic_class_get_class): Export mono-internal.
451 * class-internals.h: Update to changes.
453 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
455 * threadpool.c, threadpool.h, icall-def.h: patch from
456 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
458 2007-04-18 Zoltan Varga <vargaz@gmail.com>
460 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
462 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
464 * threads.c (mono_thread_get_stack_bounds): New helper function.
466 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
467 Correctly compute stack bounds when attaching. Fixes #81394.
469 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
471 * reflection.c: fix handling of doubles in custom attributes
472 for the arm-fpa format (bug #81368).
474 2007-04-18 Raja R Harinath <rharinath@novell.com>
476 * reflection.c (assembly_add_win32_resources): Mildly relax an
477 bounds check to let the end pointer point just past the end of the
478 allocated buffer. (may fix #81384)
480 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
482 * culture-info-table.h : regenerated.
484 2007-04-07 Zoltan Varga <vargaz@gmail.com>
486 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
487 the thread is aborted early.
489 2007-04-05 Dick Porter <dick@ximian.com>
491 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
492 FindFirstFile()/FindNextFile() to find entries. This lets the
493 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
496 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
498 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
500 2007-04-04 Martin Baulig <martin@ximian.com>
503 (mono_method_desc_full_match): Add support for nested classes.
505 2007-04-02 Zoltan Varga <vargaz@gmail.com>
507 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
509 2007-04-01 Zoltan Varga <vargaz@gmail.com>
511 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
512 waiting for too many threads.
514 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
516 * environment.c: Fix return value check on uname so we can get the
517 executing version on Solaris operating systems.
519 2007-03-28 Jb Evain <jbevain@gmail.com>
521 * class.c (mono_type_get_name_recurse): Complete the
522 fix for the creation of assembly qualified names for
523 pointer types. Fixes #81208.
525 2007-03-27 Dick Porter <dick@ximian.com>
527 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
528 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
532 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
533 the value of ReleaseMutex().
535 2007-03-27 Dick Porter <dick@ximian.com>
537 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
538 in little-endian order, not network endian, so must be converted
539 to host endian here. Fixes bug 80593.
541 2007-03-22 Jb Evain <jbevain@gmail.com>
543 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
544 qualified names for pointer types. Fixes #81208.
546 2007-03-21 Jonathan Chambers <joncham@gmail.com>
548 * marshal.c: Add support for PreserveSigAttribute.
550 Code is contributed under MIT/X11 license.
552 2007-03-14 Zoltan Varga <vargaz@gmail.com>
554 * process.c: Fix endianness issues. Fixes #81126.
556 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
557 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
559 * image.c (mono_image_lookup_resource): Make this work on big-endian
560 machines.Change API contract so the caller needs to free the return value.
562 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
565 2007-03-14 Martin Baulig <martin@ximian.com>
567 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
568 mono_type_get_desc() as well.
570 2007-03-13 Jonathan Chambers <joncham@gmail.com>
572 * icall.c: Fix environ access in VS.
574 2007-03-13 Alp Toker <alp@atoker.com>
576 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
577 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
580 2007-03-12 Zoltan Varga <vargaz@gmail.com>
582 * reflection.c (mono_reflection_create_dynamic_method): Add support for
583 circular references among dynamic methods. Fixes #81091.
585 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
587 2007-03-09 Martin Baulig <martin@ximian.com>
589 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
591 2007-03-09 Jonathan Chambers <joncham@gmail.com>
593 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
594 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
596 Code is contributed under MIT/X11 license.
598 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
600 * loader.c: Reapply patch for bug #79424.
602 2007-03-06 Zoltan Varga <vargaz@gmail.com>
604 * metadata.c (mono_type_to_unmanaged): Only convert object to
605 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
607 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
609 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
610 (and incorrectly set) is_reference field from MonoGenericInst.
612 2007-03-06 Zoltan Varga <vargaz@gmail.com>
614 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
617 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
619 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
621 2007-03-05 Miguel de Icaza <miguel@novell.com>
623 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
624 FileOptions.1 value to mean "temporary", map that to
625 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
629 2007-03-03 Marek Habersack <mhabersack@novell.com>
631 * appdomain.c: implement MS .Net style shadow copying. Copies of
632 the assemblies are made in a subdirectory of the dynamic base
633 directory, the assembly names are preserved.
634 Copy .mdb and .config files along with the assemblies being shadowed.
636 2007-02-28 Zoltan Varga <vargaz@gmail.com>
638 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
639 (emit_marshal_handleref): Ditto.
641 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
642 on Visual C++. Fixes #80671.
644 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
646 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
647 for clone operations.
649 2007-02-28 Zoltan Varga <vargaz@gmail.com>
651 * marshal.c: Fix warnings.
653 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
655 * loader.c: allow case-insensitive matching of the dll name
656 in dllmap handling when prefixed with "i:".
658 2007-02-20 Jonathan Chambers <joncham@gmail.com>
660 * threads.c: Fix #ifdef for dummy_apc function for VS.
662 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
664 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
666 2007-02-19 Massimiliano Mantione <massi@ximian.com>
667 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
668 giving precedence to the methods with a fully qualified name
669 (InterfaceName.MethodName) when building the interface sections
672 2007-02-16 Dick Porter <dick@ximian.com>
674 * threadpool.c (append_job): Fix fast-path array handling, so it's
675 less likely the array will grow exponentially when the load is
678 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
680 * metadata-internals.h, loader.c: fix dllmap lookup order
681 for non-function maps, too, and prepare for fallback code.
683 2007-02-12 Robert Jordan <robertj@gmx.net>
685 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
686 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
687 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
688 GlobalFree. Fixes a part of bug #77075.
690 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
692 * loader.c: implemented typedef parent in field memberref.
694 2007-02-11 Jonathan Chambers <joncham@gmail.com>
696 * marshal.c: Fix warnings and remember to call Release on
699 Code is contributed under MIT/X11 license.
701 2007-02-10 Miguel de Icaza <miguel@novell.com>
703 * class-internals.h: Add MonoHandleRef definition, and
704 handleref_class to mono_defaults.
706 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
707 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
709 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
710 (do nothing on this stage)
711 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
712 (emit_marshal_handleref): New method, used for argument handling
715 2007-02-08 Jonathan Chambers <joncham@gmail.com>
717 * class.c (mono_class_setup_parent): Lazily init com types.
718 * domain.c (mono_init_internal, mono_init_com_types): Lazily
720 * object.c (mono_remote_class_vtable): Lazily init com types.
721 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
722 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
723 * domain-internals.h: Expose mono_init_com_types.
724 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
725 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
726 Add support for COM Callable Wrapper marshalling.
727 * marshal.h: Add icall definitions.
728 * gc.c: Handle freeing of CCWs in finalizer code.
730 Code is contributed under MIT/X11 license.
732 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
734 * reflection.c: changed all the signature encoding code to use
735 a variable-sized buffer.
737 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
739 * marshal.c: locking fixes: never take the loader lock
740 or other runtime locks when holding the marshal lock
743 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
745 * marshal.c: make the delegate function pointer mapping
746 work for the moving GC.
748 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
750 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
753 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
755 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
758 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
760 * threadpool.c: made the code moving-GC safe.
762 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
764 * assembly.c, boehm-gc.c, class-internals.h, class.c,
765 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
766 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
768 * reflection.c: warning cleanup, some threading and moving GC fixes.
770 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
772 * class.c, loader.c: create the needed Set/Get/Address array methods
773 as well as the .ctors in mono_class_init (), fixes bug #80567.
775 2007-01-24 Zoltan Varga <vargaz@gmail.com>
777 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
778 we doesn't decrease its alignment. Should fix the sparc build.
780 2007-01-24 Dick Porter <dick@ximian.com>
783 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
784 Create the returned object if we need to ignore an unsupported
785 socket option. Fixes a segfault reported by Atsushi.
787 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
789 * class.c, object.c: restrict GC-tracked fields to
790 UIntPtr fields used inside corlib, so we provide better
791 type info to the GC and also allow broken packing as in
794 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
796 * sgen-gc.c: removed duplicated function.
798 2007-01-19 Miguel de Icaza <miguel@novell.com>
800 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
801 value that means that the value is not supported, but that we
802 should not return a failure, but instead report this as a
803 successful operation.
805 2007-01-19 Raja R Harinath <rharinath@novell.com>
807 Fix tests/bug79956.2.il
808 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
809 (mono_generic_class_get_class): If the generic definition in an
810 enum, copy over other fields related to it.
812 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
814 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
815 genericinst enums (bug #79215).
817 2007-01-17 Massimiliano Mantione <massi@ximian.com>
818 * class.c: Fix bug 80307.
820 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
822 * image.c: if the file table is not present, try to load
823 all the modules, since we don't have info about them
824 having or not metadata (bug #80517).
825 * assembly.c: allow mono_assembly_load_references () to
828 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
830 * image.c, metadata-internals.h, object.c: execute module
831 cctors when running on the 2 runtime if present (bug #80487).
833 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
835 * icall.c: optimized InitializeArray() on bigendian.
837 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
839 * icall.c: fix for the broken ARM FPA double format.
841 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
843 * icall.c: handle endian issues for r4 and r8 types, too, in
844 the InitializeArray() icall.
846 2007-01-15 Miguel de Icaza <miguel@novell.com>
848 * loader.c (mono_loader_error_prepare_exception): Clear the error
849 once we have extracted the information from it, do this before we
850 call into the JIT's class loading mechanisms.
852 * object.c (mono_class_create_runtime_vtable): Do not clear the
853 loader error before calling mono_class_get_exception_for_failure
854 as the loader error is needed inside
855 mono_class_get_exception_for_failure to throw the error (thinko).
859 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
861 * reflection.c: align fields rva data so it's faster to load at
864 2007-01-12 Raja R Harinath <rharinath@novell.com>
866 Prepare to simplify GenericMethod handling.
867 * class-internals.h (mono_method_get_context): New accessor function.
868 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
869 rather than directly accessing '->context' field.
871 * class-internals.h (_MonoGenericParam.method): Move ...
872 (_MonoGenericContainer): ... here. Add into union with klass field.
873 * class.c, icall.c, loader.c, metadata.c, reflection.c:
876 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
878 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
879 the wrapper type enum and reduce relocations.
881 2007-01-12 Raja R Harinath <rharinath@novell.com>
883 * reflection.c (inflate_mono_method): Reuse method instantiation
884 from the generic method, if available.
886 2007-01-11 Jonathan Chambers <joncham@gmail.com>
888 * marshal.c (emit_marshal_variant): Fix conv_arg
889 type in last commit, based on whether parameter is byref.
891 2007-01-11 Jonathan Chambers <joncham@gmail.com>
893 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
895 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
896 MONO_TYPE_OBJECT back for VARIANT support.
898 2007-01-11 Jonathan Chambers <joncham@gmail.com>
900 * marshal.c, marshal.h, icall-def.h: Implement
901 Marshal.ReAllocCoTaskMem.
903 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
905 * marshal.c: memory retention fixes: use the proper
906 image cache for runtime_invoke method lookups.
908 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
910 * mempool.c: added code to help debug mempool allocations.
912 2007-01-11 Dick Porter <dick@ximian.com>
914 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
915 support (experimenting with faking it with IP_MTU_DISCOVER for
916 systems that don't have IP_DONTFRAGMENT.)
917 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
920 * icall-def.h: new System.Net.Sockets.Disconnect icall.
922 * socket-io.h: Add new fields to MonoSocketAsyncResult
923 corresponding to the new ones in Socket.cs.
925 2007-01-11 Raja R Harinath <rharinath@novell.com>
927 Fix IronPython regression mentioned in #80249
928 * metadata.c (do_mono_metadata_parse_generic_class): Clear
929 'cached_context' field, since it may have been initialized as a
930 side-effect of metadata parsing.
932 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
933 (_MonoGenericClass.cached_class): Move here and rename from lone
934 remaining field of ...
935 (_MonoInflatedGenericClass): ... this. Remove.
936 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
939 Fix mcs/tests/test-128.cs regression.
940 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
941 2007-01-10 change below.
942 [MONO_TYPE_OBJECT]: Recurse into array case.
944 2007-01-11 Raja R Harinath <harinath@gmail.com>
946 * class-internals.h (mono_get_inflated_generic_class): Remove.
947 * class.c (mono_get_inflated_generic_class): Remove.
948 (mono_generic_class_get_class): Rename from
949 mono_class_create_generic.
950 (mono_class_from_mono_type) [GENERICINST]: Use it.
951 * reflection.c, metadata.c: Update to changes. Use
952 'mono_class_from_mono_type'.
954 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
956 * reflection.c: use passed type when encoding an array element
957 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
959 2007-01-09 Robert Jordan <robertj@gmx.net>
961 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
962 result arguments (someDelegate.EndInvoke (unrelatedAres)).
965 2007-01-09 Raja R Harinath <rharinath@novell.com>
967 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
969 * object.c (set_value): Avoid aliasing between type->data.klass
970 and type->data.generic_class.
972 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
974 2007-01-08 Raja R Harinath <rharinath@novell.com>
976 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
977 between type->data.klass and type->data.generic_class.
979 2007-01-08 Lluis Sanchez <lluis@ximian.com>
981 * marshal.c: In MS.NET, StringBuilder objects are not copied by
982 value in out parameters.
984 2007-01-08 Raja R Harinath <rharinath@novell.com>
986 Simplify invariant for MonoGenericClass::klass field.
987 * class.c (mono_class_create_generic): Verify 'klass' is null.
988 * metadata.c (do_mono_metadata_parse_generic_class): Don't
989 initialize 'klass' field.
991 2007-01-05 Raja R Harinath <rharinath@novell.com>
993 Ongoing work to avoid redundant data and simplify invariants.
994 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
995 'generic_class', and change type to a GenericInst.
996 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
997 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
999 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
1001 * class.c : skip io-layer under PLATFORM_WIN32.
1003 2007-01-03 Tor Lillqvist <tml@novell.com>
1005 Fix #80305: In a bundled executable, look in the bundled exe
1006 assembly to determine the runtime version. Add the possibility to
1007 bundle also the machine.config file.
1009 * assembly.c (mono_assembly_open_from_bundle): Make
1010 non-static. Allow being called even if we have no bundled
1011 assemblies, and return NULL right away in that case.
1013 * domain-internals.h: Declare mono_assembly_open_from_bundle()
1016 * domain.c (app_config_parse): Take an assembly exe file name as
1017 parameter instead of a config file name. Check for a bundled
1018 config file for that assembly by calling
1019 mono_config_string_for_assembly_file() (see below) before looking
1020 for one in the file system.
1021 (get_runtimes_from_exe): Corrsponding change to call of
1023 (get_runtimes_from_exe): Check for bundled assembly exe file first
1024 by calling mono_assembly_open_from_bundle(). If no bundled
1025 assembly exe file is found, call mono_image_open() as before to
1026 look it up in the file system.
1028 * mono-config.c: Add variable bundled_machinec_onfig.
1029 (mono_config_string_for_assembly_file): New function.
1030 (mono_config_for_assembly): Move code snippet that looks for a
1031 bundled assembly .config file into the above new function. Call
1033 (mono_register_machine_config, mono_get_machine_config): New
1034 functions to set and retrieve
1036 * assembly.h: Declare mono_register_machine_config().
1038 * mono-config.h: Declare mono_get_machine_config() and
1039 mono_config_string_for_assembly_file().
1041 * icall.c: No declaration of environ necessary on Win32. It is
1042 declared (as a macro expanding to a function call) in stdlib.h.
1043 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
1044 New internal mono function. Returns the value of
1045 mono_get_machine_config() as a Mono string.
1047 * icall-def.h: Add get_bundled_machine_config().
1049 2007-01-04 Raja R Harinath <rharinath@novell.com>
1051 Remove redundant field
1052 * class-internals.h (_MonoGenericContext.container): Remove field.
1053 * loader.c (mono_method_get_signature_full): Don't parse a
1054 "container" for a signature parse when the signature is inflated
1056 (method_from_methodspec): Likewise, for a generic_inst.
1057 * class.c, metadata.c, reflection.c: Update to changes.
1059 2006-01-04 Raja R Harinath <rharinath@novell.com>
1061 * class-internals.h (_MonoGenericClass): Rename 'context' field to
1062 'cached_context', and change semantics -- it starts off NULL, and
1063 is initialized on demand.
1064 * class.c (mono_generic_class_get_context): New accessor to
1065 replace 'context' field accesses.
1066 (mono_class_get_context): New helper.
1067 (*): Update to changes.
1068 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
1070 2007-01-03 Miguel de Icaza <miguel@novell.com>
1072 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
1073 before the memcpy. Fixes Marshal2 regression.
1075 2007-01-02 Jb Evain <jbevain@gmail.com>
1077 * blob.h: add a MONO_TYPE_ENUM definition
1078 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
1079 fix the encoding of arrays of enums in custom attributes.
1083 2007-01-01 Miguel de Icaza <miguel@novell.com>
1085 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
1086 string is null terminated, but only cut the string short if it
1087 overflows the buffer.
1089 (mono_string_to_byvalstr): Also fix this routine. The code here
1090 was not properly terminating a string (it was only terminated
1091 because of the previous catch-all memset).
1093 I left the memset, because I do not know if applications expect
1094 the runtime to clear this region.
1098 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1099 Clear the error before returning to unmanaged code to prevent the
1100 runtime from being confused later on (fixes 80420).
1101 (ves_icall_type_from_name): Always call mono_loader_clear_error
1102 after parsing a type that could have failed.
1103 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
1105 * loader.c (mono_loader_clear_error): Fix indentation.
1107 2006-12-28 Martin Baulig <martin@ximian.com>
1109 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
1111 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
1113 * reflection.c: patch from Rolf Bjarne Kvinge to fix
1114 getting a token for an EnumBuilder.
1116 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1118 * reflection.c: be more careful in case resource generation
1119 fails to create the data array.
1121 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
1123 * sgen-gc.c: write barrier for clone and fix unregister handles.
1125 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
1127 * reflection.c: some fixes needed in the generics code for the moving GC.
1129 2006-12-22 Robert Jordan <robertj@gmx.net>
1131 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
1132 account. Fixes bug #80299.
1134 2006-12-21 Raja R Harinath <rharinath@novell.com>
1136 Fix WaitHandle usage in delegates.
1137 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
1138 * object.c (mono_wait_handle_new): Use the property set method to
1139 initialize the handle.
1140 (mono_wait_handle_get_handle): New.
1141 * threadpool.c (mono_async_invoke): Use it.
1142 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
1144 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
1146 2006-12-21 Jonathan Chambers <joncham@gmail.com>
1148 * marshal.c (emit_marshal): Call emit_marshal_variant and
1149 emit_marshal_com_interface when applicable.
1150 (emit_marshal_variant, emit_marshal_com_interface): Add
1151 methods for this case and remove if's from emit_marshal_object.
1153 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
1155 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
1157 2006-12-19 Jonathan Chambers <joncham@gmail.com>
1159 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
1160 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
1161 and GlobalFree on Windows. Remove FIXME.
1163 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1165 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
1166 implementation for managed objects.
1168 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
1170 * object.c: implemented code to be used for checking
1171 that no reference field overlaps with non-references.
1173 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1175 * threadpool.c: fix queue code to be compatible with the
1178 2006-12-18 Miguel de Icaza <miguel@novell.com>
1180 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
1181 in structures by throwing ArgumentNullException.
1183 (emit_marshal_safehandle): Also when they are null parameters.
1185 (emit_marshal_safehandle): Add support for ref
1186 SafeHandles parameters
1188 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1190 * profiler.c: updated to use the mono-dl API instead of
1193 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1195 * profiler.c: updated to use the mono-dl dynamic loading
1196 API instead of gmodule.
1198 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
1200 * profiler.c: use readlink, older versions of glib don't have
1201 g_file_read_link ().
1203 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1205 * profiler.c: try to detect the path to mono if libc fails to provide
1206 a useful name (bug #80286).
1208 2006-12-16 Raja R Harinath <rharinath@novell.com>
1211 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
1212 instance, use the generic type definition instead.
1213 (ves_icall_Type_GetNestedTypes): Likewise.
1214 * class.c (mono_class_create_generic): Always set the
1215 nested_classes of a generic instance to NULL, even if the generic
1216 type definition has nested types.
1218 2006-12-15 Jonathan Chambers <joncham@gmail.com>
1220 * marshal.c (mono_string_from_bstr): Revert previous Windows change
1223 2006-12-15 Miguel de Icaza <miguel@novell.com>
1225 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
1226 my arguments were in the wrong order. I also fixed the Windows
1227 version which seems to have had the same issue.
1229 (mono_free_bstr): On Unix, this is g_free.
1230 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
1231 conversions (for the tests in corlib to pass).
1233 2006-12-14 Miguel de Icaza <miguel@novell.com>
1235 * marshal.c (emit_ptr_to_object_conv): For now, ignore
1236 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
1237 exception if a ref SafeHandle in a struct has changed).
1239 (emit_struct_conv): Do not perform layout checks for classes
1240 derived from SafeHandle, as those are specially handled.
1242 (emit_object_to_ptr_conv): Add support for
1243 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
1245 (emit_marshal_safehandle): Implement conversion of return values
1246 of safehandles (MARSHAL_ACTION_CONV_RESULT).
1248 * threads.c: WaitHandle now is compiled with two different handles
1249 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
1252 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
1253 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
1254 these routines to cope with both kinds of fields.
1256 2006-12-12 Miguel de Icaza <miguel@novell.com>
1258 * metadata.c (mono_type_to_unmanaged): Handle the case where
1259 type->data.klass is a SafeHandle, and in that case, return the
1260 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
1261 MONO_MARSHAL_CONV_SAFEHANDLE.
1263 2006-12-11 Miguel de Icaza <miguel@novell.com>
1265 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
1266 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
1267 calling emit_marshal_object.
1269 (emit_marshal_safehandle): Implement marshalling of
1270 SafeHandle parameters (no ref support yet).
1272 (MarshalAction): Document the defines as I implement
1273 them for SafeHandle.
1275 (emit_marshal_object): indentation police.
1277 * class-internals.h: Define MonoSafeHandle.
1278 Add safehandle_class to MonoDefaults type.
1280 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
1281 list of classes to check for fields.
1283 * domain.c (mono_init_internal): Add SafeHandle to the list of
1284 mono_defaults loaded.
1286 2006-12-15 Raja R Harinath <rharinath@novell.com>
1289 * reflection.c (mono_reflection_bind_generic_parameters): If the
1290 generic type definition is a type builder, ensure that it is fully
1291 initialized before instantiating it. Kill some dead code.
1293 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
1295 * object.c: clear the loader_error () before loading
1296 more metadata stuff (bug #80258).
1298 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
1300 * icall.c, icall-defs.h: type modifiers icalls for
1301 parameters and properties.
1303 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
1305 * object.c, icall.c: fixed warnings.
1307 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
1309 * marshal.c: fixed a couple of leaks and coding style in a few places.
1311 2006-12-08 Dick Porter <dick@ximian.com>
1313 * process.c: Cope with NULL ProcessStartInfo arguments on windows
1314 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
1317 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1319 * process.c: ProcessStartInfo may have only filename set and
1320 arguments can be NULL.
1322 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1324 * icall.c: fix leak found by Robert Jordan.
1326 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
1328 * marshal.c, marshal.h: generate managed method to access an element
1329 of a multi-dimensional array.
1331 2006-11-30 Paolo Molaro (lupus@ximian.com)
1333 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
1335 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1337 * icall.c: back out GetFields () fix until the serialization code is
1338 fixed to not depend on the incorrect behaviour.
1340 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
1342 * profiler.c: provide defaults if none are set.
1344 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
1346 * Makefile.am, attrdefs.h: new public header file with
1347 constants for attributes for use by embedders.
1349 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
1351 * icall.c: GetFields () fix for bug #80064.
1353 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
1355 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
1356 removed long unused icalls.
1358 2006-11-27 Jonathan Chambers <joncham@gmail.com>
1361 (mono_marshal_emit_managed_wrapper): Level of indirection for
1362 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
1363 can be generated without a delegate class.
1364 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
1366 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
1368 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1370 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
1373 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1375 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
1376 icall-def.h: added icalls needed by System.GC.
1378 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
1380 * loader.c: ensure the class in catch clauses is handled
1381 correctly for generics methods (fixes bug#79980).
1383 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
1385 * monitor.h, monitor.c: added mono_locks_dump () function
1386 to help debug deadlocks involving managed locks.
1388 2006-11-13 Dick Porter <dick@ximian.com>
1390 * file-io.c (get_file_attributes): If the file is a symlink try
1391 and get the stat data for the target, but also add the
1392 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
1393 the specs for the windows symlink support, but will probably have
1394 to be reworked when I have test data from a vista machine. Fixes
1397 2006-11-13 Dick Porter <dick@ximian.com>
1399 * gc.c (mono_domain_finalize):
1400 * marshal.c (mono_delegate_begin_invoke):
1401 * threadpool.c (socket_io_init, mono_thread_pool_init)
1402 (mono_thread_pool_finish):
1403 * monitor.c (mono_monitor_try_enter_internal):
1404 * threads.c (mono_thread_resume, mono_thread_init)
1405 (mono_thread_suspend_all_other_threads)
1406 (mono_thread_execute_interruption):
1407 * appdomain.c (mono_domain_unload): Check for NULL error returns
1408 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
1411 2006-11-11 Miguel de Icaza <miguel@novell.com>
1414 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
1415 Only close the handle if the value of the handle is not
1416 INVALID_HANDLE_VALUE. This just makes the process a bit more
1419 Improvement for #75733, so that we do not run into this problem.
1422 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
1423 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
1424 internal variables. Fixes #79462
1427 2006-11-09 Dick Porter <dick@ximian.com>
1429 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
1430 Use poll() not select(). Fixes bug 79397.
1432 2006-11-09 Raja R Harinath <rharinath@novell.com>
1435 * assembly.c (mono_assembly_load_from_full): Check that the given
1436 image has an assembly manifest.
1438 2006-11-09 Ankit Jain <jankit@novell.com>
1440 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
1441 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
1442 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
1444 2006-11-07 Dick Porter <dick@ximian.com>
1446 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
1447 Put the old resolver behaviour back for pre-2.0 profiles.
1449 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1451 * threadpool.c: precise GC and locking fixes.
1453 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
1455 * class.c: don't load types that have an explicit unaligned
1456 managed reference. Provide better info in the TypeLoad exception.
1457 Part of the fix for bug #79744.
1458 * object.c: use the correct check for class type load issues.
1460 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1462 * class.c: enforce alignment of fields with managed references
1463 even when Pack=1 is forced by the user (bug #77788).
1465 2006-11-03 Dick Porter <dick@ximian.com>
1467 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
1468 If the address reverse lookup fails, return it as the hostname
1469 anyway. Fixes bug 79721.
1471 2006-11-03 Dick Porter <dick@ximian.com>
1473 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
1474 Fix build on Windows.
1476 2006-11-02 Dick Porter <dick@ximian.com>
1479 * object-internals.h:
1480 * exception.c (mono_get_exception_thread_interrupted):
1481 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
1484 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
1485 Check for pending Thread.Interrupt.
1487 2006-10-27 Massimiliano Mantione <massi@ximian.com>
1488 * loader.c: Fixed bug 79684.
1490 2006-10-27 Dick Porter <dick@ximian.com>
1492 * file-io.c (get_file_attributes): Force symlinks to directories
1493 to be returned as a regular file. Fixes bug 79733.
1494 2006-10-26 Dick Porter <dick@ximian.com>
1496 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
1497 CreateFile to open a directory then we need to set the
1498 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
1500 2006-10-23 Zoltan Varga <vargaz@gmail.com>
1502 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
1505 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1507 * sgengc.c: small cleanup of timer code.
1509 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1511 * sgen-gc.c: fix some warnings and start adding support for
1512 complete object removal on domain unload.
1514 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
1516 * assembly.c: build_assembly_name should not consider a version
1517 number without build or revision number invalid. Fixes bug #79715.
1519 2006-10-18 Jonathan Chambers <joncham@gmail.com>
1521 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
1522 call kernel32 function OutputDebugString directly.
1524 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
1526 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
1528 * reflection.c: small cleanup, using a function to insert a MonoString
1531 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
1533 * reflection.c: moving GC fixes.
1535 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
1537 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
1538 all the objects with finalizers belonging to an unloading appdomain.
1540 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
1542 * sgen-gc.c: added ability to allocate even when the nursery is fully
1543 pinned and fixed a couple of bugs.
1545 2006-10-15 Zoltan Varga <vargaz@gmail.com>
1547 * threads.h: Revert the last change for now.
1549 * threads.h (mono_thread_get_pending_exception): Rename this to
1550 mono_thread_get_undeniable_exception ().
1552 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
1554 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
1555 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
1556 when fname does not refer to valid assembly. This result in a more
1557 meaningful error message.
1558 * exception.c: added mono_get_exception_bad_image_format2 which
1559 constructs a BadImageFormatException using the ctor taking a custom
1560 message and the file name. Passing in a NULL msg results in a default
1562 * exception.h: define mono_get_exception_bad_image_format2 function.
1563 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
1564 when file name pointed to an invalid IL image. Use
1565 mono_get_exception_file_not_found2 to construct FileNotFoundException,
1566 as this results in a more meaningful error message.
1568 2006-10-15 Zoltan Varga <vargaz@gmail.com>
1570 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
1573 2006-10-12 Zoltan Varga <vargaz@gmail.com>
1575 * metadata.c (mono_type_size): Change the align parameter to guint32 for
1576 consistency with the other _size functions.
1577 (mono_type_stack_size): Ditto.
1579 * class.c object.c icall.c: Fix warnings caused by the above change.
1581 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
1583 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
1585 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
1587 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1589 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
1590 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
1591 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
1592 threadpool.h, threads-types.h: mark more internal functions.
1594 2006-10-11 Dick Porter <dick@ximian.com>
1596 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
1597 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
1598 reproduce the bug even before applying the fix.)
1600 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
1602 * reflection.c: allow retrieving attributes for arguments in generic
1603 methods (bug #79241).
1605 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
1607 * debug-mono-symfile.c: properly check fopen () result (found by
1610 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
1612 * reflection.c: make error message clearer and fixed two
1613 issuelets found by Coverity.
1615 2006-10-10 Zoltan Varga <vargaz@gmail.com>
1617 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
1619 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1621 * object-internals.h, gc-internal.h, profiler-private.h:
1622 mark internal functions.
1624 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1626 * reflection.c: put data in the text section.
1627 * icall.c: recognize more types in type_from_typename ().
1628 * process.c, marshal.c: added some GC FIXMEs.
1630 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
1632 * loader.c: check for NULL before initializing.
1634 2006-10-09 Zoltan Varga <vargaz@gmail.com>
1636 * gc.c (finalizer_thread): Use a non-alertable wait here.
1638 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
1639 until the correct solution is found.
1641 2006-10-06 Zoltan Varga <vargaz@gmail.com>
1643 * reflection.c (mono_module_get_object): Avoid an assert when operating on
1644 modules with no metadata. Fixes #79596.
1646 * image.c (load_metadata_ptrs): Put back the error message when
1647 the #- heap is encountered since the support is not complete yet.
1649 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
1651 * gc.c: do not allow the user to SuppressFinalize () a
1652 delegate because it would leak the trampoline if present.
1654 2006-10-06 Zoltan Varga <vargaz@gmail.com>
1656 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
1659 2006-10-05 Zoltan Varga <vargaz@gmail.com>
1661 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
1663 * metadata.c (mono_metadata_get_param_attrs): Ditto.
1665 * row-indexes.h: Add definitions for *Ptr tables.
1667 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
1669 * metadata.c (mono_metadata_translate_token_index): New helper function to
1670 translate table indexes used in uncompressed metadata.
1671 (mono_metadata_decode_table_row): Ditto.
1672 (mono_metadata_decode_table_row_col): Ditto.
1674 * metadata.c: Add table schema for *Ptr tables.
1676 * class.c loader.c: Use the new helper function to access the affected metadata
1679 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
1682 2006-10-04 Zoltan Varga <vargaz@gmail.com>
1684 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
1685 sequences which can be unbounded in size. Fixes #79583.
1687 2006-10-02 Zoltan Varga <vargaz@gmail.com>
1689 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
1690 static initialization.
1692 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
1694 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
1696 * domain.c (mono_domain_free): Free up type_init_exception_hash.
1698 * object.c (mono_runtime_class_init): Implement correct semantics when a static
1699 ctor fails, i.e. throw the same exception on subsequent accesses.
1701 2006-09-0 Jonathan Chambers <joncham@gmail.com>
1703 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
1704 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
1705 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
1706 Handle marshalling of interfaces and VARIANTs contained in structs.
1708 Code is contributed under MIT/X11 license.
1710 2006-09-30 Zoltan Varga <vargaz@gmail.com>
1712 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
1714 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
1717 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1719 * console-io.c: ignore previous SIGINT handler.
1721 2006-09-27 Zoltan Varga <vargaz@gmail.com>
1723 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
1724 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
1725 #79460, #79461, #79485.
1727 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
1729 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
1732 2006-09-26 Zoltan Varga <vargaz@gmail.com>
1734 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
1735 could be generated from it.
1737 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
1739 * rand.c: fix read loop to correctly handle EINTR.
1741 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1743 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
1744 internal calls are defined to keep methods closer to the declaring
1745 type and allow a significant reduction in runtime relocations and
1748 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
1750 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
1751 exception message to have FileNotFoundException use the default
1752 assembly load error message. Fixes bug #79426.
1753 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
1755 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1757 * threadpool.c: (start_thread_or_queue) use the root domain when
1758 creating the thread instead of the async object one.
1760 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
1762 * class.c, object.c, class-internals.h, reflection.c:
1763 for arrays, store element_size inside MonoClass (speedup
1764 for array object creation).
1766 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
1768 * icall.c: fixed CodeBase to use the file name and not the module
1771 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
1773 * mono-debug.c, mono-debug.h: export find_method as
1774 mono_debug_find_method ().
1776 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1778 * debug-helpers.c, class-internals.h: added a few functions useful
1779 when debugging under gdb.
1781 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1783 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
1784 characters that need special handling.
1786 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
1788 * mono-config.c: make the os/cpu specification more flexible,
1789 allowing lists and negation.
1791 2006-09-18 Jonathan Chambers <joncham@gmail.com>
1793 * marshal.c: COM Interop fixes. Handle case where method->klass.
1794 is interface. Handle BSTR/MonoString when null. Use CDECL as
1795 calling convention on non-windows platforms. This is for
1796 compatibility with XPCOM and MainWin COM.
1798 Code is contributed under MIT/X11 license.
1801 2006-09-18 Zoltan Varga <vargaz@gmail.com>
1803 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
1804 correctly. Fixes #79217.
1806 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
1808 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
1810 * mono-config.c: allow both an os and cpu attribute for dllmap
1811 and dllentry elemnets to enable a single config file to be used
1812 for multiple architectures.
1814 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
1816 * loader.c: MonoLoaderError was cleared too soon on load failure.
1819 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
1821 * icall.c: use the defining class vtable when accessing a
1822 static field, not a pobblibly derived class.
1824 2006-09-17 Zoltan Varga <vargaz@gmail.com>
1826 * icall.c string-icalls.c: Remove references to unicode.h.
1828 * unicode.h unicode.c Makefile.am: Remove these unused source files.
1830 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
1832 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
1833 indicating the image where custom marshaller types should be looked up.
1834 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
1835 custom marshallers, instead of corlib. Fixes #79425.
1837 2006-09-14 Zoltan Varga <vargaz@gmail.com>
1839 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
1841 2006-09-14 Jonathan Chambers <joncham@gmail.com>
1843 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
1844 Implement Environment.ProcessorCount.
1846 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
1847 Implement Environment.ProcessorCount.
1850 Add Environment.ProcessorCount icall.
1852 Patch by Jason McFall.
1854 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1856 * assembly.c: don't append .exe/.dll when the filename already contains
1857 one of those extensions.
1859 2006-09-12 Martin Baulig <martin@ximian.com>
1861 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
1862 to array interfaces.
1864 2006-09-11 Martin Baulig <martin@ximian.com>
1866 * reflection.c (mono_image_build_metadata): Create the
1867 MethodImpl's after emitting all types and methods, so we don't
1868 need another fixup pass for them.
1870 2006-09-11 Zoltan Varga <vargaz@gmail.com>
1872 * class.c (mono_class_from_name_case): Fix regression introduced by the last
1875 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
1877 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
1880 2006-09-10 Zoltan Varga <vargaz@gmail.com>
1882 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
1883 args is not set. Fixes #78926.
1885 2006-09-08 Zoltan Varga <vargaz@gmail.com>
1887 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
1889 * image.c (load_class_names): Move this to class.c, and rename it to
1890 'mono_image_init_name_cache'.
1891 (load_modules): Fix a warning.
1893 * class.c icall.c image.c: Initialize image->name_cache lazily.
1895 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
1896 on its name using information in the AOT file.
1898 * class.c (mono_class_from_name): Use the new hook function.
1900 2006-09-06 Zoltan Varga <vargaz@gmail.com>
1902 * reflection.c (mono_param_get_objects): Handle enum default parameter values
1905 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
1908 2006-09-06 Martin Baulig <martin@ximian.com>
1910 * icall.c (mono_lookup_internal_call): Small fix.
1912 2006-09-05 Raja R Harinath <rharinath@novell.com>
1914 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
1917 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
1919 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
1920 when --debug is specified.
1922 2006-09-04 Zoltan Varga <vargaz@gmail.com>
1924 * class.c (setup_generic_array_ifaces): Fix a warning.
1926 2006-09-04 Miguel de Icaza <miguel@novell.com>
1928 * Temporarily remove the patch to assemly.c that checks the
1929 assembly versions as it breaks our gacutil.
1931 2006-09-03 Zoltan Varga <vargaz@gmail.com>
1933 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
1935 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
1938 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
1939 created using the default ctor. Fixes #79152.
1940 (mono_string_builder_to_utf16): Ditto.
1942 2006-09-01 Martin Baulig <martin@ximian.com>
1944 Fix handling of the generic array interfaces.
1947 (MonoDefaults): Removed `generic_array_class' and added
1948 `generic_ilist' class.
1951 (mono_bounded_array_class_get): Add the new generic array interfaces.
1952 (setup_generic_array_ifaces): New static method; create vtable
1953 entries for each method in the generic array interfaces.
1956 (select_container): Allow "parent-less" generic methods.
1959 (mono_marshal_get_generic_array_helper): New public method.
1962 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
1963 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
1964 moved the interncall into System.Array.
1966 2006-09-01 Raja R Harinath <rharinath@novell.com>
1968 A few more cases of avoiding work on types with ->byref set.
1969 Has the real fix for #79238
1970 * icall.c (is_generic_parameter): New helper.
1971 (ves_icall_Type_GetGenericParameterPosition): Use it.
1972 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
1973 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
1974 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1975 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
1977 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
1979 (ves_icall_Type_get_IsGenericInstance): Likewise.
1980 (ves_icall_Type_get_IsGenericType): Likewise.
1982 2006-09-01 Zoltan Varga <vargaz@gmail.com>
1984 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
1987 * mempool.h (mono_mempool_get_allocated): New helper function.
1989 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
1992 * mempool.c: Fix warnings and the calculation of stats.
1994 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
1996 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
1998 * loader.c (mono_get_method_from_token): Update method_count stat.
2000 * class-internals.h (MonoStats): Add some stats.
2002 2006-08-31 Robert Jordan <robertj@gmx.net>
2004 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
2005 with managed variants.
2006 All code is contributed under the MIT/X11 license.
2008 2006-08-31 Zoltan Varga <vargaz@gmail.com>
2010 * reflection.c (reflection_methodbuilder_to_mono_method): Set
2011 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
2013 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
2015 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
2016 with cycles in classes.
2018 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
2020 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
2021 missing a [MarshalAs] directive. Fixes #79203.
2023 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
2024 klass->marshal_info. Fixes #79217.
2026 2006-08-30 Martin Baulig <martin@ximian.com>
2028 Committing a patch from Joachim Ante <joe@otee.dk>:
2029 Add support for binary data symbol stores.
2031 * debug-mono-symfile.c
2032 (mono_debug_open_mono_symbol_file): Renamed into
2033 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
2037 (mono_debug_open_image): Added `raw_contents' and `size' args.
2038 (mono_debug_init_2_memory): New public function.
2040 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
2042 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
2044 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2046 * appdomain.c: implement support for ShadowCopyFiles.
2048 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
2050 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
2051 when value is NULL (and should remove CID #51).
2053 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2055 * image.c: moved 2 functions to ../utils.
2057 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
2059 * gc.c: cope with the target object of a GC handle being NULL
2062 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
2064 * class.c: recursively check parent's explicit implementations
2065 of interface methods (fixes bug #79125).
2067 2006-08-19 Miguel de Icaza <miguel@novell.com>
2069 * filewatcher.c: Avoid warnings when building, do not redefine
2070 constants that are defined.
2074 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2076 * image.c: don't fail when the link points to an absolute path.
2078 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
2080 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
2083 2006-08-17 Miguel de Icaza <miguel@novell.com>
2085 * image.c (full_path): A new method used to obtain the actual path
2086 of an assembly even in the presence of symbolic links.
2088 This is necessary for the case where we are running a binary that
2089 has been GACed, but we are using the "published" path name
2090 ($prefix/mono/1.0/blah.exe) which happens to point to the real
2093 This was the source of the failure for the `xsp' command with the
2094 recent AppDomain changes, as far as the runtime was concerned,
2095 there were two different assemblies: $prefix/mono/1.0/blah.exe and
2096 $prefix/mono/gac/blah/version/blah.exe.
2098 (do_mono_image_open): use full path
2100 2006-08-17 Zoltan Varga <vargaz@gmail.com>
2102 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
2104 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
2106 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
2107 domain_id is supplied. Fix CID #241 and corlib's unit tests.
2109 2006-08-17 Zoltan Varga <vargaz@gmail.com>
2111 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
2112 small structures. Fixes #78990.
2114 2006-08-17 Zoltan Varga <vargaz@gmail.com>
2116 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
2118 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
2120 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2123 * marshal.c: don't load all the assemblies from a domain into newly
2124 created ones. The new domains might have different rules and load
2125 assemblies from different locations. Fixes bug #76757.
2127 Patch by Lluis. Conflicts resolved by Brian Crowell.
2129 2006-08-16 Alp Toker <alp@atoker.com>
2131 * socket-io.c: First half of the fix for #79084.
2132 Set sa_size to the length of the content, not that of the struct.
2133 Don't add NULL suffix to the content, this should be done in
2134 managed code if needed.
2136 2006-08-14 Raja R Harinath <rharinath@novell.com>
2139 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
2140 mono_metadata_parse_type returns NULL.
2142 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
2144 * normalization-tables.h : new file for string normalization data.
2145 * locales.c, locales.h, icall.c :
2146 added load_normalization_resource() for string normalization,
2148 * Makefile.am : added normalization-tables.h to the sources.
2150 2006-08-13 Zoltan Varga <vargaz@gmail.com>
2152 * marshal.c: Add more helper functions to reduce code duplication and use them
2155 2006-08-12 Zoltan Varga <vargaz@gmail.com>
2157 * marshal.c: Fix non-x86 stdcall warnings.
2159 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
2162 2006-08-11 Jonathan Chambers <joncham@gmail.com>
2164 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
2165 type check on multi-dimensional arrays. Fixes #79000.
2167 2006-08-10 Jonathan Chambers <joncham@gmail.com>
2169 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
2170 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
2171 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
2172 * class-internals.h: add is_com_object to class structure.
2173 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
2174 null checks to COM object marshalling. Fix .ctor call on RCW.
2175 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
2177 All code is contributed under the MIT/X11 license.
2179 2006-08-09 Dick Porter <dick@ximian.com>
2181 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
2182 racing mono_monitor_allocator_lock() somewhere, so don't delete
2183 the critical section for now. Found by running and exiting
2186 2006-08-10 Zoltan Varga <vargaz@gmail.com>
2188 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
2189 (ves_icall_System_ComObject_FindInterface): Ditto.
2190 (ves_icall_System_ComObject_CacheInterface): Ditto.
2192 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
2193 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
2195 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2197 * threadpool.c: treat pipes from process asynchronous reads as sockets
2198 when reading from them, so we get select/poll or epoll to wait for
2201 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
2203 * loader.c: Fix a typo (CID #233) in the null check.
2205 2006-08-07 Zoltan Varga <vargaz@gmail.com>
2207 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
2208 Hopefully fixes #78949.
2210 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
2211 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
2212 bytes. Fixes #78972.
2214 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2216 * filewatcher.c: we need to set errno here.
2218 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2220 * filewatcher.c: let Win32Exception get the error value.
2222 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2224 * filewatcher.c: translate errno into win32 errors for Win32Exception
2225 to know what happened.
2227 2006-08-01 Zoltan Varga <vargaz@gmail.com>
2229 * threadpool.c: Fix more warnings.
2231 * assembly.c (search_loaded): Fix warnings.
2233 * threadpool.c (mono_thread_pool_finish): Fix warnings.
2234 (mono_async_invoke): Ditto.
2236 2006-07-28 Jonathan Chambers <joncham@gmail.com>
2238 * object.c (mono_remote_class_vtable): Need to create proxy vtable
2239 entries for __ComObject type in addition to ComImport types.
2240 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
2243 All code is contributed under the MIT/X11 license.
2245 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
2247 * image.c: avoid tentative loading of modulerefs that contain
2248 no metadata (P/Invoke library names).
2250 2006-07-28 Dick Porter <dick@ximian.com>
2252 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
2253 mono_loader_lock() somewhere, so don't delete the critical section
2254 for now. Found by running and exiting monodevelop.
2256 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2258 * filewatcher.c: define the inotify syscalls when we're building on
2259 linux and have sys/syscall.h. The build system might not have support
2260 for inotify but the target system might have it.
2262 2006-07-26 Miguel de Icaza <miguel@novell.com>
2264 * domain.c: Documentation updates.
2266 * loader.c (mono_free_method): Do not release the method
2267 information if we are being profiled, as profilers will use this
2268 information at shut down to present some data to the user.
2270 This is needed so that the profiler does not crash, as the
2271 profiler tends to keep MonoMethods around, and they might become
2272 invalid if we free these.
2274 (mono_get_method_constrained): Return the original CIL stream
2275 method as well, so verification can be performed against it.
2277 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2279 * filewatcher.[ch]: support for inotify file system watcher.
2280 * icall.c: add new internal calls for the inotify file system watcher.
2282 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2284 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
2287 2006-07-20 Dick Porter <dick@ximian.com>
2289 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
2292 2006-07-20 Dick Porter <dick@ximian.com>
2294 * threads.c (start_wrapper): Do the thread cleanup while we still
2295 hold a reference to its object. Fixes bug 78123.
2297 2006-07-18 Kornél Pál <kornelpal@gmail.com>
2299 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
2300 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
2301 "managed-to-managed".
2302 * icall.c: Redirect string constructors that take sbyte* to
2303 ves_icall_System_String_ctor_RedirectToCreateString.
2304 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
2305 to CreateString () methods with matching signature.
2306 * reflection.c: Use original security informations for
2307 MONO_WRAPPER_MANAGED_TO_MANAGED.
2308 * security-manager.c: Use original security informations for
2309 MONO_WRAPPER_MANAGED_TO_MANAGED.
2310 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
2311 that is a placeholder and only its address should be used.
2312 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
2313 that is a placeholder and only its address should be used.
2315 2006-07-15 Jonathan Chambers <joncham@gmail.com>
2317 Begin implementing COM Interop.
2318 * appdomain.c: Increment corlib version.
2319 * class.c: Set ComImport classes' parent to __ComObject.
2320 * loader.c: Mark cominterop methods as such.
2321 * domain.c: Add __ComObject class to MonoDefaults structure.
2322 * image.c: Add 2 hashtables to the image for COM Interop related methods
2323 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
2324 using the mempool allocator
2326 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
2327 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
2328 declaration for mono_metadata_type_dup_mp.
2330 * debug-helpers.c: Added strings for two additional wrapper types
2331 * object.c: Create proxy objects for ComImport classes
2332 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
2333 and added __ComObject class to MonoDefaults structure.
2335 * object-internals.h: Finish MonoRealProxy definition, and add definition of
2336 MonoComInteropProxy and MonoComObject.
2338 * marshal.c: Added support for COM Interop
2339 (signature_cominterop): Converts managed signature to corresponding
2340 unmanaged COM signature.
2341 (cominterop_get_function_pointer): gets unmanaged function pointer via
2343 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
2344 (cominterop_get_method_interface): returns interface type that method is defined on
2345 (mono_mb_emit_cominterop_call): emits native call to function pointer
2347 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
2348 that matches signature of unmanaged function.
2349 (cominterop_get_native_wrapper): wrapper around adjusted method call.
2350 (cominterop_get_invoke): forwards call from proxy to __ComObject
2351 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
2352 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
2353 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
2355 * marshal.h: Added Marshal icall declarations.
2356 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
2357 so we can access them in finalizer
2359 2006-07-14 Dick Porter <dick@ximian.com>
2361 * object.c (mono_type_initialization_cleanup): Fix a race
2362 condition by temporarily commenting out the critical section
2365 2006-07-14 Zoltan Varga <vargaz@gmail.com>
2367 * reflection.c (create_custom_attr): Fix some warnings.
2368 (create_custom_attr_data): Ditto.
2369 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
2370 types. Fixes #78855.
2372 2006-07-11 Zoltan Varga <vargaz@gmail.com>
2374 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
2376 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
2378 2006-07-08 Zoltan Varga <vargaz@gmail.com>
2380 * reflection.c (resolve_object): Add support for DynamicMethod.
2382 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
2383 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
2385 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
2387 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
2388 don't leak GPtrArray's pdata has we have no use (nor free) for it.
2390 2006-07-01 Zoltan Varga <vargaz@gmail.com>
2392 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
2395 2006-06-30 Raja R Harinath <rharinath@novell.com>
2397 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
2398 slightly: remove a shadow local variable.
2400 2006-06-29 Raja R Harinath <rharinath@novell.com>
2402 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
2403 definition that introduces the virtual function slot.
2404 Also fix Coverity #105.
2406 2006-06-29 Zoltan Varga <vargaz@gmail.com>
2408 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
2409 for dynamic assemblies. Fixes #78724.
2411 2006-06-28 Zoltan Varga <vargaz@gmail.com>
2413 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
2416 2006-06-21 Martin Baulig <martin@ximian.com>
2419 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
2422 2006-06-21 Zoltan Varga <vargaz@gmail.com>
2424 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
2426 2006-06-20 Raja R Harinath <rharinath@novell.com>
2428 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
2430 * class.c (mono_class_create_from_typespec): Add 'context' argument.
2431 Inflate result if necessary.
2432 (mono_class_get_full): Remove old version. Rename from
2433 'mono_class_get' and add 'context' argument. Pass it to
2434 ..._create_from_typespec.
2435 (mono_class_get): New. Simple wrapper to mono_class_get_full.
2436 (mono_ldtoken): Revert change below.
2438 2006-06-20 Martin Baulig <martin@ximian.com>
2440 * class.c (mono_ldtoken): Don't pass the generic context to
2441 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
2443 2006-06-15 Zoltan Varga <vargaz@gmail.com>
2445 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
2446 and later freeing it. Fixes #78638.
2448 2006-06-15 Miguel de Icaza <miguel@novell.com>
2450 * icall.c (mono_class_get_throw): Revert over-zealous error
2451 throwing, the caller for mono_class_get_throw will cope with
2452 errors when classes are not properly initialized already.
2454 The code still copes with loader exceptions though.
2456 Fixes the regression in reftype1 and reftype3 from the CAS tests.
2458 2006-06-14 Miguel de Icaza <miguel@novell.com>
2460 Fixes the `make run1' version of RuntimeAbort (to be commited,
2461 source is in Bugzilla).
2463 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
2464 FALSE on class loading failure instead of returning true.
2466 * class.c (mono_class_create_from_typedef): It is possible for
2467 mono_metadata_interfaces_from_typedef_full to fail if a class is
2468 not found, cope with this.
2471 2006-06-14 Dick Porter <dick@ximian.com>
2474 * process.c: Fix a bunch of signed/unsigned warnings from gcc
2477 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
2479 * culture-info-table.h : oops, forgot to make it nsync with r61548.
2481 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
2483 * icall.c: Another fix for building mono in Visual Studio.
2485 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
2487 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
2489 2006-06-09 Martin Baulig <martin@ximian.com>
2491 * debug-mono-symfile.c: Put this back and really fix it this
2492 time. Sorry for all the trouble.
2494 2006-06-08 Zoltan Varga <vargaz@gmail.com>
2496 * icall.c (mono_class_get_throw): Fix a warning.
2497 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
2498 ReflectionTypeLoadException if needed. Fixes #78606.
2500 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
2501 (mono_class_init): Ditto.
2503 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
2504 ref_only exceptions.
2505 (mono_loader_clear_error): Make this work even if there is no error.
2507 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
2509 * object-internals.h marshal.c marshal.h icall.c: Implement method
2510 Marshal.GetComSlotForMethodInfo using internal call.
2512 2006-06-07 Zoltan Varga <vargaz@gmail.com>
2514 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
2515 a function for signalling it.
2517 * class.c (mono_class_from_typeref): Use the new kind of loader error when
2518 a referenced assembly is not found.
2520 * loader.c (mono_loader_error_prepare_exception): Add support for
2521 LOADER_ERROR_ASSEMBLY. Fix formatting.
2523 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
2525 * domain.c appdomain.c class-internals.h marshal.c: Add support
2526 for VARIANT marshalling on windows and increment corlib version
2527 since Variant struct was added.
2529 2006-06-03 Miguel de Icaza <miguel@novell.com>
2531 * debug-mono-symfile.c: Revert Martin's previous patch which broke
2532 stack trace line information:
2534 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
2535 (Martin) when looking up B which is between A and C, return A not C.
2539 Thanks to Alexander Olk for tracking this down.
2541 2006-06-02 Zoltan Varga <vargaz@gmail.com>
2543 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
2545 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
2546 avoid clobbering its value.
2547 (mono_string_to_lpstr): Fix a warning on windows.
2549 2006-05-31 Zoltan Varga <vargaz@gmail.com>
2551 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
2553 * reflection.c loader.c: Removed references to 'dummy' flag.
2555 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
2557 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
2558 it gets GC tracking.
2560 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
2563 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
2565 * marshal.c threadpool.c: Update callers of mono_async_result_new.
2567 * appdomain.c: Bump corlib version.
2569 2006-05-30 Zoltan Varga <vargaz@gmail.com>
2571 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
2572 CEE_STIND_REF when working with object references.
2574 2006-05-31 Zoltan Varga <vargaz@gmail.com>
2576 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
2579 2006-05-30 Miguel de Icaza <miguel@novell.com>
2581 * loader.c (method_from_memberref): Fix argument value for
2582 mono_loader_set_error_method_load (I was passing the MonoClass
2583 instead of the class name char *).
2585 2006-05-30 Zoltan Varga <vargaz@gmail.com>
2587 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
2588 CEE_STIND_REF when working with object references.
2590 2006-05-30 Martin Baulig <martin@ximian.com>
2592 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
2593 mono_method_full_name() change and replace the ':' with a '.'
2596 2006-05-30 Martin Baulig <martin@ximian.com>
2598 * debug-mono-symfile.c
2599 (mono_debug_symfile_lookup_location): Fix the algorithm:
2600 when looking up B which is between A and C, return A not C.
2602 2006-05-29 Martin Baulig <martin@ximian.com>
2605 (MonoDebugMethodInfo): Make the typedef public.
2606 (MonoDebugSourceLocation): New public struct.
2609 (mono_debug_source_location_from_address): Removed.
2610 (mono_debug_source_location_from_il_offset): Removed.
2611 (mono_debug_il_offset_from_address): Removed.
2612 (mono_debug_address_from_il_offset): Removed.
2613 (mono_debug_lookup_method): New public function.
2614 (mono_debug_lookup_source_location): New public function; replaces
2615 the old mono_debug_source_location_from_*() functions; see the
2616 inline documentation.
2617 (mono_debug_free_source_location): New public function.
2618 (mono_debug_print_stack_frame): New public function; see the
2619 inline documentation.
2621 * debug-mono-symfile.c
2622 (mono_debug_find_source_location): Renamed into
2623 mono_debug_symfile_lookup_location(); only take a
2624 `MonoDebugMethodInfo *' and an `offset' argument; added inline
2626 (mono_debug_find_method): Renamed into
2627 mono_debug_symfile_lookup_method().
2629 2006-05-27 Zoltan Varga <vargaz@gmail.com>
2631 * assembly.c (mono_assembly_open_full): Dont overwrite the status
2632 returned by mono_image_open_full ().
2634 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
2635 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
2638 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
2641 2006-05-27 Miguel de Icaza <miguel@novell.com>
2643 * class.c (mono_class_from_typeref): handle missing images
2644 earlier, deals with bug #78418. Refactor code;
2646 Fix a warning introduced in my previous commit (some stale code
2647 from before I revisited my patch).
2649 * class.c (mono_class_create_from_typedef): On failure, remove the
2650 class from the MonoImage->class_cache as the class is not
2651 initialized; Fixes the leak pointed out by Paolo.
2653 2006-05-25 Dick Porter <dick@ximian.com>
2655 * threads.c (mono_thread_cleanup): Build fix. Comment out the
2656 DeleteCriticalSections until I figure out which one may still be
2657 sometimes locked when mono_thread_cleanup is called.
2659 2006-05-24 Dick Porter <dick@ximian.com>
2661 * threads.c (mono_thread_cleanup): Move the threading cleanup out
2662 of mono_thread_manage and back into its own function, so it can be
2663 called after the finalizer thread has finished.
2665 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
2667 2006-05-24 Zoltan Varga <vargaz@gmail.com>
2669 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
2672 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
2673 with non-blittable elements.
2674 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
2676 2006-05-24 Martin Baulig <martin@ximian.com>
2678 * mono-debug-debugger.h (MonoDebuggerEvent): Added
2679 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
2681 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
2682 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
2683 `mono_debugger_event_handler' to NULL.
2685 2006-05-24 Martin Baulig <martin@ximian.com>
2687 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
2689 2006-05-24 Martin Baulig <martin@ximian.com>
2691 * mono-debug-debugger.h
2692 (mono_debugger_create_notification_function): Added
2693 `MonoCodeManager *' argument.
2695 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
2697 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
2699 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
2701 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
2702 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
2705 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
2707 * icall.c: precise GC support: objects can't be stored in unmanaged
2708 memory anymore, even if they are kept alive by other references: since
2709 they can move the GC needs to be able to always find them.
2711 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
2713 * object.c: precise GC support for static fields. Support
2714 for moving GCs: write barriers and pinned allocation for interned
2717 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
2719 * domain.c, domain-internals.h: precise GC support for the MonoDomain
2722 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
2724 * class.c, gc.c: sgen and precise GC updates.
2726 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
2728 * marshal.h, marshal.c: added write barrier wrapper and precise type
2731 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
2733 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
2736 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
2738 * reflection.c: precise and sgen GC updates.
2740 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
2742 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
2744 2006-05-22 Zoltan Varga <vargaz@gmail.com>
2746 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
2748 2006-05-20 Zoltan Varga <vargaz@gmail.com>
2750 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
2751 MONO_TYPE_OBJECT. Fixes #78462.
2753 2006-05-18 Zoltan Varga <vargaz@gmail.com>
2755 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
2756 and blittable types.
2758 2006-05-17 Miguel de Icaza <miguel@novell.com>
2760 * class.c (mono_class_get_exception_for_failure): Implement parts
2761 of a TODO: if the loader error is set (instead of the class
2762 error), we return a Loader exception that can be properly thrown
2765 This was exposed by some Winforms 2.0 code that I tried to run
2766 (Atsushi pointed me to it).
2768 2006-05-17 Zoltan Varga <vargaz@gmail.com>
2770 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
2771 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
2773 * marshal.c (emit_marshal_vtype): Add limited support for
2774 UnmanagedType.LPStruct. Fixes #78427.
2776 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
2777 Applied a patch from kangaroo to fix #77523.
2779 2006-05-17 Martin Baulig <martin@ximian.com>
2782 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
2783 (debugger_thread_created): Removed.
2784 (debugger_thread_exited): Removed.
2786 2006-05-15 Zoltan Varga <vargaz@gmail.com>
2788 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2790 * object-internals.h (MonoReflectionResource): Sync with managed version.
2792 2006-05-12 Wade Berrier <wberrier@novell.com>
2794 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
2796 2006-05-12 Zoltan Varga <vargaz@gmail.com>
2798 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
2799 functions try to allocate from the image mempool.
2801 2006-05-12 Dick Porter <dick@ximian.com>
2803 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
2805 2006-05-12 Lluis Sanchez <lluis@ximian.com>
2807 * object.c: The FieldGetter and FieldSetter methods require the full
2808 name of the class, not only the name. Fixes bug #78277.
2810 2006-05-11 Miguel de Icaza <miguel@novell.com>
2812 * loader.c (method_from_memberref): Do not pass the NULL klass to
2813 mono_loader_set_error_() methods. Pass the non-NULL value
2816 2006-05-11 Zoltan Varga <vargaz@gmail.com>
2818 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
2819 (mono_assembly_close): Null out assembly->image->references after freeing it.
2821 * image.c (mono_image_close): Free image->references.
2823 * reflection.c (mono_image_basic_init): Fix a small memory leak.
2825 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
2827 * marshal.c: In function mono_mb_add_local don't use the mb pointer
2828 before checking if it's NULL (g_assert).
2830 2006-05-10 Martin Baulig <martin@ximian.com>
2832 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
2833 I thought I already killed that two months ago, but now it somehow reappeared.
2835 2006-05-10 Martin Baulig <martin@ximian.com>
2837 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
2839 2006-05-10 Zoltan Varga <vargaz@gmail.com>
2841 * reflection.c: Allocate memory for dynamically created methods in the image
2844 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
2846 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
2847 don't use the ad pointer before checking if it's NULL (g_assert).
2849 2006-05-09 Zoltan Varga <vargaz@gmail.com>
2851 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
2852 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
2854 * marshal.c: Allocate all signatures from mempools.
2856 * marshal.c: Allocate some more signatures from mempools.
2858 2006-05-09 Miguel de Icaza <miguel@novell.com>
2860 * object.c (mono_load_remote_field): The code used to provide a
2861 temporary variable for returning results if the user did not
2862 provide a result pointer. But our temporary variable was allocted
2865 Fix calling code to always pass a result area. Coverity ID 103.
2867 2006-05-06 Zoltan Varga <vargaz@gmail.com>
2869 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
2870 value, not the old. Fixes #78312.
2871 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
2873 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
2874 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
2877 * assembly.c (mono_assembly_close): Free image->references.
2879 * assembly.c (mono_assembly_names_equal): Fix a warning.
2880 (mono_assemblies_cleanup): Cleanup more global data.
2882 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
2884 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
2885 ptr_cache and image->modules.
2887 * image.c (mono_image_init): Allocate array_cache lazily.
2889 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2891 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
2892 behavior was changed recently and has bad side effects.
2894 2006-05-05 Zoltan Varga <vargaz@gmail.com>
2896 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
2898 * assembly.c (mono_assembly_close): Remove a debug printf.
2900 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
2902 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
2903 to also allow for temporary references between mono_image_open ()/close ().
2905 * domain.c (get_runtimes_from_exe): Add a FIXME.
2907 2006-05-04 Zoltan Varga <vargaz@gmail.com>
2909 * marshal.c: Fix support for dynamic methods.
2911 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
2913 * marshal.c (mono_marshal_cleanup): New cleanup function.
2915 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
2918 * class.c (mono_class_init): Fix leaking class->nested_classes.
2920 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
2922 * image.c (mono_image_init): Initialize the new cashes.
2924 * image.c (mono_image_close): Destroy the new cashes.
2926 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
2928 * mempool.c (mono_mempool_strdup): New helper function.
2930 * class-internals.h: Add prototype for mono_loader_unlock ().
2932 * domain.c (mono_jit_info_table_find): Fix a warning.
2933 (mono_debugger_check_runtime_version): Ditto.
2935 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
2936 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
2937 functions to these modules.
2939 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
2942 * marshal.c (mono_free_bstr): Fix a warning.
2944 * assembly.c (mono_assembly_open_full): Fix another small leak.
2946 * object.c: Fix some unload leaks in the remoting code.
2948 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
2951 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
2953 * reflection.c: Fix some unload leaks in dynamic assemblies.
2955 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
2957 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
2958 * marshal.h: Add BSTR support on Win32
2959 * icall.c: Add BSTR icalls
2960 * metadata.h: Add BSTR enums
2962 2006-04-28 Miguel de Icaza <miguel@novell.com>
2964 Work to catch the crash from #76795 and turn it into an
2965 exception. As I stubbed out pieces of the VisualBasic support,
2966 I found a number of places where the code was failing and I added
2967 checks to those places.
2969 * metadata.c (do_mono_metadata_parse_generic_class): Make this
2970 function return a status code. If we fail to parse the signature
2971 from mono_metadata_parse_generic_inst, return FALSE.
2973 * loader.c (mono_get_method_from_token): If we fail to load the
2974 method (mono_class_get) return NULL.
2976 * (method_from_memberref): Return NULL if we are unable to parse
2977 the method signature
2979 (mono_loader_error_prepare_exception): Since we now use the
2980 loader_error flag internally to stop processing, and obtaining
2981 exceptions that might be thrown will walk this code path the
2982 proper way of going from a MonoLoaderError into a
2983 MonoException was convoluted. This new routine encapsulates the
2984 process of turning the error into an exception and *clearing* the
2987 2006-04-27 Miguel de Icaza <miguel@novell.com>
2989 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
2990 with missing assemblies), and to cope with:
2992 * Missing fieldref from a non-existing assembly.
2993 * Missing methodref from a non-existing assembly.
2995 The first batch of work to address *some* of the issues from 76661.
2997 * object.c (mono_class_create_runtime_vtable): If we fail to
2998 initialize the class raise the exception here.
3000 * metadata.c (mono_class_get_overrides_full): If any methods fail
3001 to load return the failure to the caller.
3003 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
3004 flagging assemblies that failed to load.
3006 Do not crash if we are unable to load the assembly.
3008 (mono_assembly_close): Do nothing with REFERENCE_MISSING
3011 * loader.c (mono_loader_set_error_type_load): Change the
3012 convention to always pass unallocated strings, so we make our own
3013 copies (I know our own code had duplicated strings before, but
3014 this keeps the normal conventions).
3015 (method_from_memberref): Call mono_loader_set_error_method_load
3016 for all possible failures of loading the class.
3017 Remove assert, turn into a loader error.
3019 (mono_loader_error_to_exception): Move this routine from mini
3020 (mini_loader_error_to_exception) there was no need to have that in
3023 * class.c (mono_class_from_typeref): If we were not able to load
3024 the assembly with mono_assembly_load_reference, call the
3025 mono_loader_set_error_type_load to register the problem.
3027 (mono_class_setup_fields): If we fail to load the type from
3028 mono_metadata_parse_type_full, call mono_class_set_failure and
3029 break from the loop.
3031 If class->exception_type is set, we do not layout the fields as
3032 that might crash the runtime, and instead return (from breaking
3033 from the previous loop).
3035 (mono_class_setup_vtable): This now returns a boolean indicating
3036 whether the table was properly setup. The decision is driven by
3037 mono_class_get_overrides_full which might run into non-existing
3040 (mono_class_init): Returns TRUE on success or FALSE if there was a
3041 problem in loading the type (incorrect assemblies, missing
3042 assemblies, methods, etc).
3044 When we call mono_class_setup_fields we also check for a potential
3045 error inside this call (either a class exception or a general
3048 (mono_class_create_from_typedef): If the parent fails to load
3049 (calling mono_class_get_full) return NULL.
3053 calls to mono_metadata_parse_type_full should be checked
3054 everywhere and set the mono_class_set_failure
3055 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
3057 The current patch checks the places where my manually constructed
3058 tests show the errors are showing up, but we should do it
3063 mono_class_init return values should be tested everywhere, like
3064 the previous case this is something that we should audit
3065 everywhere and not only on the cases exposed by the tests I
3068 2006-04-26 Miguel de Icaza <miguel@novell.com>
3070 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
3071 boolean parameter and instead pass the information on `options'
3072 parameter (FileOptions).
3074 * icall.c: Register the new signature for MonoIO.Open.
3076 * debug-helpers.c (dis_one): Trying to understand how coverity
3077 works. Fix Run 5, item 78.
3079 2006-04-26 Dick Porter <dick@ximian.com>
3081 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
3084 2006-04-25 Martin Baulig <martin@ximian.com>
3086 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
3088 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
3089 debugger_thread_created().
3090 (debugger_gc_push_all_stacks): Don't handle the main thread in any
3092 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
3093 (mono_debugger_finalize_threads): New function; undo the effects
3094 of mono_debugger_init_threads().
3095 (mono_debugger_create_all_threads): Removed.
3097 2006-04-24 Zoltan Varga <vargaz@gmail.com>
3099 * image.c (mono_image_close): Tidy up trace messages.
3101 * assembly.c (mono_assembly_close): Ditto.
3103 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
3104 no longer references an already freed assembly. Fixes #78168.
3106 2006-04-21 Dick Porter <dick@ximian.com>
3108 * threads.c (mono_thread_detach): Fix reference counting when
3111 2006-04-21 Zoltan Varga <vargaz@gmail.com>
3113 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
3116 2006-04-19 Zoltan Varga <vargaz@gmail.com>
3118 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
3119 (mono_type_to_stind): Ditto.
3121 * marshal.c: Use the new helper functions to simplify code.
3123 * image.c (mono_image_close): Add some code for help debug assembly unloading
3126 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
3129 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
3130 assembly was already loaded in another appdomain. Fixes #78083.
3132 2006-04-13 Zoltan Varga <vargaz@gmail.com>
3134 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
3135 referenced assemblies.
3136 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
3138 * domain.c (mono_domain_free): Add a trace message.
3140 * appdomain.c (add_assemblies_to_domain): Ditto.
3142 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
3145 2006-04-12 Zoltan Varga <vargaz@gmail.com>
3147 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
3149 2006-04-12 Martin Baulig <martin@ximian.com>
3151 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
3152 `USE_INCLUDED_LIBGC'.
3154 2006-04-12 Zoltan Varga <vargaz@gmail.com>
3156 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
3157 the patch contains ../ and a small directory name later. Hopefully fixes
3160 2006-04-10 Martin Baulig <martin@ximian.com>
3162 Clean up the debugger's thread-handling code.
3164 The debugger's thread-handling code has been moved from
3165 ../mini/debug-debugger.c to threads.c. We now iterate directly
3166 over the `threads' hash, keep track of exiting threads and also
3169 We can now debug XSP and XSP based applications with the debugger.
3171 * object-internals.h (MonoThread): Added `gpointer end_stack'.
3174 (MonoThreadCallbacks): Removed; this was only used by the debugger.
3175 (mono_install_thread_callbacks): Likewise.
3177 * threads.c (mono_thread_callbacks): Removed.
3178 (debugger_thread_created, debugger_thread_exited): New static functions.
3179 (start_wrapper): Call debugger_thread_created().
3180 (thread_cleanup): Call debugger_thread_exited().
3181 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
3182 (mono_debugger_init_threads): New public function.
3183 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
3184 iterate directly over the `threads' hash and also use proper locking.
3186 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
3188 * mono-debug-debugger.h
3189 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
3191 2006-04-10 Zoltan Varga <vargaz@gmail.com>
3193 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
3194 argument type=array. Fixes #78057.
3196 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
3198 * culture-info-table.h : regenerated. Fixed bug #69652.
3200 2006-04-07 Zoltan Varga <vargaz@gmail.com>
3202 * loader.c metadata.c: Reapply a variant r59116.
3204 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
3206 * class.c (mono_class_setup_interface_offsets): New internal function.
3208 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
3209 interfaces too. Fixes #77398.
3211 * reflection.c (encode_cattr_value): Add support for
3212 parameter type=object, argument type=array.
3213 (load_cattr_value): Ditto. Fixes #77916.
3215 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
3216 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
3218 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
3219 a byval char array and CharSet is Ansi.
3221 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
3223 2006-04-06 Zoltan Varga <vargaz@gmail.com>
3225 * metadata.c: Add some locking comments.
3227 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
3229 (mono_metadata_free_method_signature): Don't free the signature itself.
3231 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
3233 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
3234 reference the same MonoImage.
3235 (mono_assembly_load_from_full): Add an assert.
3237 2006-04-05 Zoltan Varga <vargaz@gmail.com>
3239 * image.c (mono_image_close): Don't put the image we are about to free into the
3240 loaded_images_guid_hash.
3242 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
3243 to reduce code duplication.
3245 * marshal.c: Register the native functions called by this module as icalls, to
3246 somewhat centralize the creation of MonoMethodSignature's.
3248 * loader.c (mono_method_signature): Add a cache for method signatures.
3250 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
3251 the parameter attributes of a method.
3252 (mono_metadata_parse_method_signature_full): Refactored the computation of
3253 parameter attributes into a separate function. Also avoid one allocation in
3256 * assembly.c (mono_assembly_close): Ditto.
3258 * image.c (mono_image_close): Log trace messages with INFO level.
3260 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
3262 * image.c reflection.c: Correct reference counting of image modules.
3264 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
3265 of this function from the image mempool.
3267 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
3268 to allow more cached types to be used.
3270 * mono-debug.c (mono_debug_add_method): Appled patch from
3271 David S. Miller <davem@sunset.davemloft.net>: Access
3272 minfo->lexical_blocks[] entry elements using read32().
3274 2006-04-04 Zoltan Varga <vargaz@gmail.com>
3276 * loader.c (mono_free_method): No longer free the method header for non-dynamic
3277 methods as it is allocated from the mempool.
3279 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
3282 * metadata-internals.h: Add comments describing the reference counting scheme
3283 used for MonoImage and MonoAssembly.
3285 * image.c assembly.c reflection.c: Rework reference counting of images and
3286 assemblies so they are freed when the runtime is shut down. Free some
3287 additional memory structures when an image is unloaded.
3289 2006-04-03 Zoltan Varga <vargaz@gmail.com>
3291 * class.c loader.c reflection.c: Allocate more data structures in
3294 2006-03-31 Miguel de Icaza <miguel@novell.com>
3297 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
3298 build on pre glib 2.4 systems.
3300 2006-03-31 Zoltan Varga <vargaz@gmail.com>
3302 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
3304 * icall.c: Fix some warnings.
3306 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
3308 * culture-info-table.h : regenerated.
3310 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
3312 * threads.c, object-internals.h, verify.c: changed the culture caching
3313 code to use a normal MonoArray for storage so the GC can keep track of
3314 them easily. Fixed bits of the cache logic, too and simplified the
3317 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
3319 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
3320 thread for non-Boehm GCs.
3322 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
3324 * domain.c, object.c, domain-internals.h: reduce the amount of memory
3325 needed to keep track of the data for static fields.
3327 2006-03-29 Raja R Harinath <rharinath@novell.com>
3330 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
3331 for interface classes. Use 'num_methods' instead.
3332 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
3333 before using '->vtable_size' field.
3335 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
3337 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
3338 doesn't contain managed pointers, so use a normal hashtable.
3340 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
3342 * reflection.c, class-internals.h, domain.c: fixed handling of types
3343 used as values for objects in custom attributes (bug #77915):
3345 2006-03-24 Martin Baulig <martin@ximian.com>
3347 * class.c (mono_class_setup_fields): Added support for generic
3348 instances; fixes #77580.
3350 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3352 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
3354 2006-03-24 Dick Porter <dick@ximian.com>
3356 * file-io.c (get_file_attributes): More stat macro breakage.
3359 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
3361 * profiler.c: added the file=filename option in the default profiler
3362 to output the profile data to filename.
3364 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3366 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
3369 2006-03-22 Martin Baulig <martin@ximian.com>
3371 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
3372 allocated `MonoClassField *' in `fb->handle'.
3374 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3376 * class.c, image.c, metadata-internals.h: implemented new mechanism to
3377 allocate interface ID to save memory and allow better ID reuse on
3378 appdomain unload. setup_generic_vtable () removal from Martin.
3380 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
3382 * object.h, appdomain.c, domain.c, exception.c, icall.c,
3383 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
3384 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
3385 write barriers for reference stores with managed objects accessed with
3386 C structures in the runtime and in embedding programs.
3388 2006-03-20 Raja R Harinath <rharinath@novell.com>
3390 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
3391 'interface_id' and 'max_interface_id' fields of MonoClasses
3392 representing open generic types.
3394 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
3396 * object.h, object.c, icall.c: added functions to deal with
3397 storing valuetypes that contain references in managed objects.
3398 * reflection.c, string-icalls.c, threads.c, marshal.c: small
3399 fixes and comments around uses of mono_array_addr ().
3401 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
3403 * object.h, icall.c, monitor.c: object.GetHashCode ()
3404 implementation that supports the moving garbage collector.
3406 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
3408 * icall.c, threads-types.h, threads.c: implemented finalizer for
3411 2006-03-15 Zoltan Varga <vargaz@gmail.com>
3413 * metadata.c (mono_type_size): Add a fixme.
3414 (mono_type_stack_size): Ditto.
3416 * object-internals.h (MonoReflectionAssemblyBuilder): Added
3417 'type_forwarders' field.
3419 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
3420 attribute from net 2.0.
3422 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
3425 * class.c (mono_class_setup_fields): Fix a warning.
3427 * class.c (mono_class_from_name): Add support for assemblyref entries
3428 in the EXPORTEDTYPE table.
3430 * reflection.c: Add support for handling type forwarders under net 2.0.
3432 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3434 2006-03-14 Zoltan Varga <vargaz@gmail.com>
3436 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
3437 overwriting entries in ModuleBuild->types, also clean up the code
3438 a little. Fixes #77774.
3440 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
3442 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
3443 load friend assembly info when present.
3445 2006-03-14 Raja R Harinath <rharinath@novell.com>
3447 Fix crasher on gtest-158.cs.
3448 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
3449 the return value if the MonoClass we want is yet in an
3451 * class.c (mono_class_create_from_typedef): Add an comment
3452 explaining an order dependency between mono_class_setup_parent and
3453 mono_class_setup_mono_type.
3455 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
3457 * class.c: documentation updates and events bug fix.
3459 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
3461 * class.c: some cleanup, locking fixes.
3463 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3465 * class.c: fix the generics code to setup nested
3466 type info to the instantiated type (bug #77770).
3468 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
3470 * marshal.c: fixed a few type correctness issues.
3472 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3474 * loader.c: the Set/Get/Addrtess array methods should be public.
3476 2006-03-11 Zoltan Varga <vargaz@gmail.com>
3478 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
3480 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
3483 2006-03-10 Zoltan Varga <vargaz@gmail.com>
3485 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
3487 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
3489 * mempool.c (mono_mempool_alloc): Speed this up a bit.
3490 (mono_mempool_alloc0): Ditto.
3492 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3495 (create_object_from_sockaddr): it was allocating 4 extra bytes
3496 for the AF_UNIX data. Fixes bug #77747.
3498 2006-03-09 Zoltan Varga <vargaz@gmail.com>
3500 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
3502 2006-03-09 Dick Porter <dick@ximian.com>
3504 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
3505 Fixes bug 76966 again.
3507 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
3509 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
3511 * appdomain.c: Bumped corlib version to 48 (due to r57532)
3513 2006-03-07 Martin Baulig <martin@ximian.com>
3516 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
3518 2006-03-07 Martin Baulig <martin@ximian.com>
3521 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
3522 regression introduced in r56970; see gtest-252.cs.
3524 * loader.c (mono_get_method_constrained): Correctly handle generic
3525 methods; see gtest-253.cs.
3527 2006-03-04 Zoltan Varga <vargaz@gmail.com>
3529 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
3531 2006-03-04 Martin Baulig <martin@ximian.com>
3533 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
3534 compute the parent type at runtime, just like we're already doing
3538 (mono_reflection_bind_generic_parameters): Don't compute the
3539 parent type anymore.
3541 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
3543 2006-03-04 Martin Baulig <martin@ximian.com>
3545 * mono-debug-debugger.h
3546 (mono_debugger_create_notification_function): Allocate memory at
3547 runtime and return a pointer to it.
3549 2006-03-03 Zoltan Varga <vargaz@gmail.com>
3551 * assembly.c: Fix windows build.
3553 * assembly.c: Fix build.
3555 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
3557 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
3559 2006-03-03 Dick Porter <dick@ximian.com>
3562 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
3563 Check parameters before dereferencing them. Fixes Aaron's part of
3566 2006-03-03 Raja R Harinath <rharinath@novell.com>
3568 Fix performance regression.
3569 * loader.c (find_method_in_class): Add 'from_class' argument.
3570 Rename 'klass' argument to 'in_class'. The signature is compared
3571 against the method in 'in_class', and the corresponding method is
3572 returned from 'from_class'.
3573 (find_method): Walk both 'in_class' and 'from_class' in parallel.
3574 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
3575 type definition and generic instantiation in parallel.
3576 (mono_get_method_constrained): Update to changes.
3578 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
3580 * threads.c: make sure the domain is correct, too when doing
3581 mono_thread_attach ().
3583 2006-03-01 Zoltan Varga <vargaz@gmail.com>
3585 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
3586 windows. Fixes #77683.
3588 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
3590 * object.h, *: introduced specific way to set elements of an array
3591 of references to be used as write barrier. Still need to audit the
3592 uses of mono_array_addr.
3594 2006-03-01 Miguel de Icaza <miguel@novell.com>
3596 * object-internals.h: New field to cache the assmebly name, patch
3597 from Tambet Ingo (tambet@ximian.com)
3599 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
3601 * decimal.h, class-internals.h, metadata-internals.h,
3602 file-io.h: mark a few function declarations as internal, to
3603 reduce the number of PLT entries.
3605 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3607 * file-io.c: fix typo in warning message.
3609 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
3611 * loader.c: on unix, lookup the "*A" version of a function
3612 if charset is auto as a second option before failing.
3614 2006-02-28 Raja R Harinath <rharinath@novell.com>
3616 * class.h (mono_class_inflate_generic_method): Revert to two
3618 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
3619 (mono_class_inflate_generic_method_full): Add.
3620 * class.c (mono_class_inflate_generic_method_full): Rename from
3621 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
3622 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
3623 * loader.c, reflection.c: Update to changes.
3625 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
3627 * icall.c: const fixes and small improvements.
3629 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3631 * threadpool.c: for asynchronous connect(), enable the same workaround
3632 for BSD 6 as for the Mac. Fixes bug #77637.
3634 2006-02-24 Zoltan Varga <vargaz@gmail.com>
3636 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
3637 formatted classes. Fixes #77524.
3639 2006-02-24 Raja R Harinath <rharinath@novell.com>
3641 * class.c (inflate_generic_type): Add a couple more
3642 micro-optimizations.
3643 (inflate_generic_context): Don't use the 'gmethod' from
3645 (mono_class_inflate_generic_method): If the method has generic
3646 parameters, but the passed-in context doesn't have a 'gmethod',
3647 create one. Use the possibly simplified generic instantiation
3648 from the declaring class instead of the one passed in.
3650 2006-02-24 Raja R Harinath <harinath@gmail.com>
3652 Make generic method signature and method header handling lazy.
3653 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
3654 (inflate_generic_header): Likewise.
3655 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
3656 parameter to avoid inflating types.
3657 (mono_get_inflated_method): Empty out.
3658 * class.h (mono_class_inflate_generic_method): Update to changes.
3659 * loader.c (mono_get_method_from_token): Don't parse signature for
3660 generic methods, nor methods of generic classes.
3661 (mono_method_signature): Rename from 'mono_method_signature'.
3662 Inflate signature on demand.
3663 (mono_method_get_header): Inflate method header on demand.
3664 * reflection.c: Update to changes.
3666 2006-02-23 Raja R Harinath <rharinath@novell.com>
3668 * metadata.c (mono_metadata_inflate_generic_inst): If the
3669 instantiation is closed, don't bother expanding it in the new
3671 * class.c (inflate_generic_class): If the generic instantiation
3672 doesn't change after inflation, return the argument itself.
3673 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
3675 (inflate_generic_context): If neither the generic class nor the
3676 generic method instantiations change, return the original context.
3677 * reflection.c (mono_method_get_object): Do
3678 'mono_get_inflated_method' before accessing the ->klass field.
3679 (inflate_mono_method): Don't create a MonoGenericMethod unless
3681 (inflate_method): Don't pass a constructed type as the declaring
3682 type of a methodbuilder.
3684 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
3686 * object.c: fix memory overwrite.
3688 2006-02-22 Dick Porter <dick@ximian.com>
3690 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
3691 it doesn't work any more.
3692 (mono_threads_request_thread_dump): Fix unused variable warnings.
3694 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3696 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
3697 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
3698 the public header file.
3700 2006-02-21 Zoltan Varga <vargaz@gmail.com>
3702 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
3704 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
3706 * class-internals.h, object.c: reduce the size of MonoVTable
3707 and store the interface_offsets array at negative offsets.
3709 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
3711 * metadata.c: tweak table descriptors data structures to reduce
3712 size and runtime relocations.
3714 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3716 * marshal.c: fix some types and opcodes to be type-safe
3717 in marshaling wrappers.
3719 2006-02-21 Ankit Jain <jankit@novell.com>
3721 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
3723 2006-02-21 Raja R Harinath <rharinath@novell.com>
3725 * metadata.c (get_constraints): Relax debugging checks for monodis.
3727 2006-02-21 Ankit Jain <jankit@novell.com>
3729 * metadata.c (mono_metadata_load_generic_params): Move the code
3730 checking for ambiguous generic params from here to mono/dis/get.c
3731 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
3733 2006-02-21 Raja R Harinath <harinath@gmail.com>
3735 Fix assertion triggered when compiling nemerle.
3736 * class.c (mono_get_shared_generic_inst): Rename from
3737 get_shared_inst and make non-static.
3738 * loader.c (mono_get_shared_generic_method): New. Used to create
3739 the MonoGenericContext-equivalent of a MonoGenericContainer.
3740 (mono_get_method_from_token): Initialize the 'context' field of
3741 the created MonoGenericContainer.
3742 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
3743 * metadata.c (get_constraints): Add sanity check.
3744 * class-internals.h: Add new internal methods.
3746 * reflection.c (verify_safe_for_managed_space): New sanity check.
3747 Currently checks that owner-less generic parameters aren't allowed
3749 (mono_type_get_object): Use it.
3750 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
3751 that are now in mono_type_get_object.
3752 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
3754 2006-02-19 Raja R Harinath <harinath@gmail.com>
3756 * metadata.c (mono_type_create_from_typespec): Rename from
3757 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
3758 argument and caching of types in the generic container.
3759 (unwrap_arrays, find_generic_param): Remove.
3760 * metadata-internals.h: Update.
3761 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
3763 2006-02-18 Zoltan Varga <vargaz@gmail.com>
3765 * class.c (mono_class_get_exception_for_failure): Fix a warning.
3767 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
3768 return values. Fixes #77581.
3770 * class.c (mono_fnptr_class_get): Switch name and name_space.
3772 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
3773 classes and add support for [In, Out] attributes.
3774 (mono_marshal_free_asany): Ditto. Fixes #77524.
3776 2006-02-18 Raja R Harinath <harinath@gmail.com>
3778 * class.c (mono_class_from_generic_parameter): Make more robust to
3779 incomplete MonoGenericContainers from monodis.
3781 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3783 * class-internals.h: added some more exception types.
3784 * class.c, metadata.c: added a few checks to handle missing
3787 2006-02-17 Raja R Harinath <rharinath@novell.com>
3789 Use owner-less generic-params some more.
3790 * class.c (my_mono_class_from_generic_parameter): Remove.
3791 (mono_class_from_generic_parameter): Handle null image,
3792 param->name and param->owner.
3793 (mono_class_from_mono_type): Update.
3794 (mono_class_create_from_typespec): Remove 'container' parameter.
3795 If that parameter is non-null, the result is always inflated by
3796 'mono_class_get_full' anyway.
3797 (mono_class_get): Rename from _mono_class_get. Remove 'container'
3799 (mono_class_get_full): Update.
3801 * class.c (inflate_generic_type) [GENERICINST]: If the generic
3802 instance is not open, don't bother inflating.
3803 (mono_class_setup_fields): Hoist some loop-invariants. Don't
3804 parse metadata for inflated classes.
3805 (_mono_class_get): Change GenericContext* parameter to
3807 (mono_class_create_from_typespec): Likewise. Simplify, and
3808 implement trivially. All the cases are handled in
3809 mono_class_from_mono_type. Don't inflate returned class.
3810 (mono_class_get_full): Delegate GENERICINST optimization to
3811 inflate_generic_type.
3812 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
3814 2006-02-16 Dick Porter <dick@ximian.com>
3816 * socket-io.c (create_object_from_sockaddr): Fix typo.
3817 (create_sockaddr_from_object): Check array lengths before
3818 potentially accessing items off the end.
3819 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
3820 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
3821 (ves_icall_System_Net_Sockets_Socket_Send_internal)
3822 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
3823 length checks to avoid wraparound overflows.
3824 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
3825 contents of the array of sockets
3826 (hostent_to_IPHostEntry2)
3827 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
3828 Check return value of inet_ntop ().
3829 (addrinfo_to_IPHostEntry): Fix typo
3831 2006-02-16 Raja R Harinath <rharinath@novell.com>
3833 Type metadata parsing doesn't use generic-instantiation information.
3834 * metadata.c (mono_metadata_parse_array_full): Change
3835 MonoGenericContext* parameter to MonoGenericContainer*.
3836 (mono_metadata_parse_type_full): Likewise.
3837 (mono_type_create_from_typespec_full): Likewise.
3838 (mono_metadata_parse_mh_full): Likewise.
3839 (mono_metadata_parse_generic_inst): Likewise.
3840 (do_mono_metadata_parse_generic_class): Likewise.
3841 (do_mono_metadata_parse_type): Likewise.
3842 * metadata-internals.h: Update to changes.
3843 * class.c (mono_class_find_enum_basetype): Likewise.
3844 (mono_class_setup_fields): Likewise.
3845 (mono_class_create_from_typespec): Likewise.
3846 * loader.c (method_from_methodspec): Likewise.
3847 (mono_get_method_from_token): Likewise.
3848 (mono_method_get_header): Likewise.
3850 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3852 * marshal.c: handle additional GENERICINST case (patch from
3853 Thong Nguyen <tum@veridicus.com>).
3854 Fix a few cases where LDIND_I/STIND_I was used for references.
3856 2006-02-16 Raja R Harinath <rharinath@novell.com>
3858 * reflection.c (mono_reflection_get_token): Remove unused variable.
3860 2006-02-16 Martin Baulig <martin@ximian.com>
3862 * reflection.c (mono_reflection_get_token): Add support for fields
3863 in instantiated generic types.
3866 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
3868 2006-02-15 Martin Baulig <martin@ximian.com>
3871 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
3872 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
3873 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
3874 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
3876 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
3878 * class.c, metadata.c, metadata.h, object.c, icall.c,
3879 marshal.c: changed mono_type_get_underlying_type () to do
3880 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
3881 Fixed handling of instantiated generic valuetypes (bug #75479).
3883 2006-02-15 Raja R Harinath <rharinath@novell.com>
3885 * metadata.c (mono_metadata_decode_signed_value): Simplify.
3886 Delegate to mono_metadata_decode_value, and work on the returned value.
3888 * icall.c (ves_icall_MonoType_GetGenericArguments):
3889 Add consistency check here too.
3891 2006-02-15 Ankit Jain <jankit@novell.com>
3893 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
3896 2006-02-15 Ankit Jain <jankit@novell.com>
3898 * metadata.c (mono_metadata_decode_signed_value): New function to decode
3899 signed values, used only for representing lower bounds of arrays.
3900 (mono_metadata_parse_array_full): Use new
3901 mono_metadata_decode_signed_value to decode lower bounds.
3903 2006-02-14 Martin Baulig <martin@ximian.com>
3906 (mono_reflection_get_token): Support "MonoGenericMethod" and
3907 "MonoGenericCMethod" and allow generic instances / methods.
3909 2006-02-11 Zoltan Varga <vargaz@gmail.com>
3911 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
3912 to obtain the terminal size using an ioctl.
3914 * object.c (mono_nullable_init): Revert this as nullable reference
3915 types are not valid.
3916 (mono_nullable_box): Ditto.
3918 2006-02-09 Dick Porter <dick@ximian.com>
3920 * threads.c (mono_thread_detach): Drop a reference to the thread
3923 2006-02-09 Zoltan Varga <vargaz@gmail.com>
3925 * object.c (mono_nullable_init): Handle nullable reference types.
3926 (mono_nullable_box): Ditto. Fixes #77446.
3928 2006-02-07 Martin Baulig <martin@ximian.com>
3930 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
3932 2006-02-07 Ankit Jain <jankit@novell.com>
3934 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
3935 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
3936 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
3937 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
3938 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
3939 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
3941 2006-02-02 Zoltan Varga <vargaz@gmail.com>
3943 * class.c (mono_class_create_generic): Set type_token as well.
3945 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
3948 2006-02-02 Martin Baulig <martin@ximian.com>
3950 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
3951 has never been used so far.
3953 2006-02-02 Martin Baulig <martin@ximian.com>
3955 * mono-debug-debugger.h: Changed comment at the top of this file;
3956 the header is not installed, but it's safe to #include it from
3959 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
3960 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
3962 2006-02-02 Martin Baulig <martin@ximian.com>
3965 (MonoSymbolTable): Removed the `metadata_info' field.
3968 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
3970 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
3971 (mono_debugger_add_builtin_types): Removed.
3972 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
3973 (mono_debugger_create_notification_function): We now operate on a
3974 pre-allocated area; take a `gpointer' and return `void'.
3976 * mono-debug-debugger.c
3977 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
3978 (mono_debugger_add_builtin_types): Removed.
3980 2006-02-02 Martin Baulig <martin@ximian.com>
3982 * threads.c (mono_debugger_create_all_threads): New public method.
3984 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3986 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
3987 breaks on several platforms.
3989 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
3991 * assembly.c: the VS.NET build doesn't supply default values for
3992 MONO_ASSEMBLIES and MONO_CFG_DIR.
3994 2006-02-01 Zoltan Varga <vargaz@gmail.com>
3996 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
3999 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
4001 * loader.c (method_from_memberref): Fix a warning.
4003 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
4005 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
4006 with explicit layout. Fixes #77433.
4008 2006-01-31 Zoltan Varga <vargaz@gmail.com>
4010 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
4011 max_interface_id is initialized before using it. Fixes #77398.
4012 (ves_icall_Type_GetInterfaces): Ditto.
4014 2006-01-30 Raja R Harinath <rharinath@novell.com>
4016 * metadata.c (mono_metadata_parse_method_signature_full): Don't
4017 allocate memory for parameter attributes when parsing memberref
4019 * loader.c (mono_loader_set_error_method_load): Don't warn.
4020 (method_from_memberref): Ensure MissingMethodException gets thrown
4021 if method is not found. Make warning more informative.
4023 2006-01-29 Raja R Harinath <harinath@gmail.com>
4026 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
4027 return true if is byref.
4028 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
4029 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
4030 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
4032 2006-01-27 Raja R Harinath <rharinath@novell.com>
4034 Fix tests/find-method.2.il
4035 * loader.c (find_method, find_method_in_class): Remove is_inflated
4036 argument. Revert 2006-01-18 change.
4037 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
4038 is generic, search for method in its generic definition.
4039 * class.c (mono_class_setup_vtable_general): Print generic
4040 arguments of generic types in debugging printf.
4042 2006-01-26 Zoltan Varga <vargaz@gmail.com>
4044 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
4046 * threads.c (mono_threads_request_thread_dump): New helper function.
4048 2006-01-25 Raja R Harinath <rharinath@novell.com>
4050 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
4052 2006-01-25 Ankit Jain <jankit@novell.com>
4054 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
4055 move definition to ..
4056 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
4058 2006-01-25 Ankit Jain <jankit@novell.com>
4059 Raja R Harinath <rharinath@novell.com>
4061 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
4062 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
4065 2006-01-25 Martin Baulig <martin@ximian.com>
4067 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
4068 `MonoDebuggerThread' into debug-debugger.c.
4070 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4072 * profiler.c: fix printing of data.
4074 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
4076 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
4077 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
4079 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4081 * object.c: fix deadlock related to string interning.
4083 2006-01-23 Martin Baulig <martin@ximian.com>
4085 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
4087 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
4089 2006-01-23 Martin Baulig <martin@ximian.com>
4091 * mono-debug.h: Moved the prototypes of some functions which are
4092 used by the JIT here from mono-debug-debugger.h.
4094 2006-01-21 Martin Baulig <martin@ximian.com>
4096 * Makefile.am: Don't install mono-debug-debugger.h.
4098 2006-01-21 Martin Baulig <martin@ximian.com>
4100 * mono-debug-debugger.h: Enforce the private status of this header
4101 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
4102 Moved some stuff from mono-debugger-jit-wrapper.h here.
4104 2006-01-20 Raja R Harinath <rharinath@novell.com>
4106 * class.c (mono_class_from_typeref): Add a sanity test to help
4107 catch lack of assembly load/search hooks.
4109 2006-01-19 Zoltan Varga <vargaz@gmail.com>
4111 * marshal.c (emit_struct_conv): Relax the fields with same offset
4112 check even more. Fixes #77230.
4114 2006-01-18 Martin Baulig <martin@ximian.com>
4116 * loader.c (find_method_in_class): Added `gboolean is_inflated'
4117 argument; if false, we compare the uninstantiated signatures.
4118 (method_from_memberref): Compare the uninstantiated signatures;
4121 2006-01-18 Robert Jordan <robertj@gmx.net>
4123 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
4124 Clear the weak link. Fixes bug #77170.
4126 * gc.c (mono_gchandle_free):
4127 Reflect *-gc.c changes (tiny optimization).
4129 2006-01-18 Zoltan Varga <vargaz@gmail.com>
4131 * metadata.c (mono_metadata_signature_dup): Applied patch from
4132 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
4135 2006-01-17 Zoltan Varga <vargaz@gmail.com>
4137 * marshal.c (emit_struct_conv): Allow fields with the same offset when
4138 marshalling from native to managed code. Fixes #77230.
4140 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4142 * threadpool.c: fix problem (Mac only) when more than one asynchronous
4143 connect. Fixes bug #77020.
4145 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4147 * class.c: fixed id assignement for nested interfaces (bug #77275).
4148 Added also better info for --print-vtable debugging.
4150 2006-01-12 Martin Baulig <martin@ximian.com>
4152 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
4153 interfaces on-the-fly; fixes #76625.
4156 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
4157 don't need that anymore.
4159 2006-01-12 Miguel de Icaza <miguel@novell.com>
4162 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
4163 To avoid initing the nested_classes when not needed I turned the
4164 PeerCredData as a toplevel internal class, as it has to be shared
4167 Fixes the CASA issue.
4169 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
4171 * domain.c: Accessors for MonoJitInfo
4173 * profiler-private.h: Add jitinfo to the end jit hook
4175 * profiler.[ch]: Define new hooks, called after jitting which give
4176 the MonoJitInfo that was compiled
4178 2006-01-10 Martin Baulig <martin@ximian.com>
4180 * class.c (mono_class_setup_events): Add support for generic
4181 classes; fixes #76440.
4183 2006-01-06 Raja R Harinath <rharinath@novell.com>
4186 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
4187 on passed-in method.
4189 2006-01-03 Zoltan Varga <vargaz@gmail.com>
4191 * object.c (mono_runtime_invoke_array): Add Nullable support.
4193 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
4195 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
4197 * file-io.c: Don't consider sockets as directory and avoid an endless
4198 loop. Fix bug #76966.
4200 2006-01-03 Zoltan Varga <vargaz@gmail.com>
4202 * object.c (mono_nullable_init): New helper function.
4203 (mono_nullable_box): Ditto.
4205 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
4207 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
4209 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
4211 2006-01-02 Zoltan Varga <vargaz@gmail.com>
4213 * class.c (mono_class_is_assignable_from): Make T assignable to
4216 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
4218 * appdomain.c: Bump corlib version to 46.
4219 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
4220 serialization purpose) and changed ves_icall_System_Reflection_
4221 Assembly_get_code_base signature to accept a boolean (to escape, or
4222 not, the assembly code base).
4224 2005-12-23 Dick Porter <dick@ximian.com>
4228 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
4229 CreateEvent icall now returns "created" boolean parameter.
4231 2005-12-22 Zoltan Varga <vargaz@gmail.com>
4233 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
4236 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
4237 when attr_klass is an interface. Fixes #77045.
4239 2005-12-20 Zoltan Varga <vargaz@gmail.com>
4241 * marshal.c (emit_struct_conv): Fix previous patch.
4243 * marshal.c (emit_struct_conv): Add a check for fields with the same
4246 2005-12-20 Raja R Harinath <rharinath@novell.com>
4248 Fix regression in Mono.C5.
4249 * class.c (mono_class_create_generic): If 'klass' is an interface
4250 set up the interface offsets.
4251 (mono_class_is_assignable_from): Don't throw away generic arguments.
4253 2005-12-19 Raja R Harinath <rharinath@novell.com>
4255 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
4258 2005-12-15 Raja R Harinath <rharinath@novell.com>
4260 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
4262 (do_mono_metadata_parse_generic_class): Don't pass the current
4263 generic context when parsing the type being instantiated: it
4264 cannot use it, anyway.
4266 * loader.c (method_from_memberref): Don't inflate a signature if
4267 it doesn't contain any type parameters.
4269 2005-12-15 Zoltan Varga <vargaz@gmail.com>
4271 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
4273 2005-12-14 Martin Baulig <martin@ximian.com>
4276 (mono_type_get_name_recurse): Don't return null for type
4277 parameters and open generic classes.
4278 (mono_class_setup_methods): Don't exclude generic instances.
4279 (mono_get_unique_iid): Use different IDs for different
4280 instantiations of the same generic type.
4281 (mono_class_setup_vtable): Only use setup_generic_vtable() for
4282 open generic instances; create a normal vtable for closed generic
4284 (mono_class_setup_vtable_general): We're now also called for
4285 closed generic instances.
4288 (mono_reflection_bind_generic_parameters): Correctly use
4289 mono_metadata_lookup_generic_inst() everywhere.
4291 2005-12-14 Zoltan Varga <vargaz@gmail.com>
4293 * object.c (mono_class_create_runtime_vtable): Call
4294 mono_class_setup_vtable ().
4296 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
4298 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
4301 * loader.c (mono_loader_set_error_type_load): Print the type load
4302 warnings to the console so they are more visible to the user.
4303 (mono_loader_set_error_method_load): Ditto.
4305 * reflection.c (ensure_runtime_vtable): Revert the last change as it
4308 * reflection.c (ensure_runtime_vtable): Fix build.
4310 * reflection.c (ensure_runtime_vtable): Disable an optimization which
4311 doesn't work in all cases.
4313 2005-12-13 Zoltan Varga <vargaz@gmail.com>
4315 * object.c (mono_array_new_full): Treat a single dimensional array
4316 with 0 lower bounds as an szarray. Fixes #76973.
4318 * reflection.c (custom_attr_visible): Really fix this.
4320 2005-12-12 Zoltan Varga <vargaz@gmail.com>
4322 * reflection.c (custom_attr_visible): Allow nested public attributes
4325 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
4328 2005-12-12 Raja R Harinath <harinath@gmail.com>
4330 * class.c (set_generic_param_owner): Delete.
4331 (mono_class_create_from_typedef): Don't set ->owner field of
4332 generic parameters to "param containers" of enclosing classes.
4333 * reflection.c (mono_reflection_initialize_generic_parameter):
4336 2005-12-11 Zoltan Varga <vargaz@gmail.com>
4338 * reflection.c (custom_attr_visible): Fix build.
4340 2005-12-10 Zoltan Varga <vargaz@gmail.com>
4342 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
4345 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
4346 handling of null parameter defaults.
4348 2005-12-09 Raja R Harinath <rharinath@novell.com>
4350 * class.c (mono_class_from_generic_parameter): Don't set
4351 klass->generic_container.
4352 (my_mono_class_from_generic_parameter): Likewise.
4354 2005-12-07 Zoltan Varga <vargaz@gmail.com>
4356 * reflection.c (load_public_key): Fix a warning.
4357 (method_encode_code): Fix unaligned accesses.
4359 2005-12-07 Martin Baulig <martin@ximian.com>
4361 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
4364 (write_generic_param_entry): Encode our custom attrs.
4366 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
4368 2005-12-07 Martin Baulig <martin@ximian.com>
4370 * reflection.c (encode_new_constraint): Removed; we don't use the
4371 `NewConstraintAttribute' anymore.
4373 2005-12-06 Zoltan Varga <vargaz@gmail.com>
4375 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
4376 not fire a TypeResolve event when Assembly.GetType () is called.
4378 2005-12-05 Ben Maurer <bmaurer@ximian.com>
4380 Beginning of support for nullable types in the runtime. Parts of
4381 this patch are from Martin.
4383 * appdomain.c (MONO_CORLIB_VERSION): Bump
4385 * domain.c (mono_init_internal): get the nullable type
4387 * class.c (mono_class_is_nullable): New method
4388 (mono_class_get_nullable_param): New mehod
4389 (mono_class_create_generic): In types T? set cast_class to T
4391 * class-internals.h (MonoDefaults): new nullable default class
4392 (mono_class_get_nullable_param, mono_class_get_nullable_param):
4395 2005-12-05 Raja R Harinath <rharinath@novell.com>
4397 * metadata.c (select_container): New. Refactor code to select the
4398 appropriate GenericContainer given the type of generic parameter
4400 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
4401 not a MonoGenericContext. Use select_container. Update parameters.
4402 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
4404 (unwrap_arrays): Remove duplicate tests.
4405 (find_generic_param): Rename from 'has_same_context'. Now walks a
4406 generic instantiated class to find any arguments that are generic
4408 (mono_type_create_from_typespec_full): Use find_generic_param to
4409 avoid evicting some generic instantiations from the typespec
4412 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
4414 * reflection.c: fixed writing of doubles on ARM FPA.
4416 2005-12-02 Robert Jordan <robertj@gmx.net>
4418 * icall.c: Fixed EventInfo.ReflectedType (#76829).
4420 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4422 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
4423 least on SUSE 10 they are not the same (on debian, they are just the
4426 2005-12-01 Raja R Harinath <rharinath@novell.com>
4428 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
4429 DeclaringType for VARs and MVARs.
4430 * class.c (set_generic_param_owner): Fix initialization of owner
4433 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
4435 * icall.c: fixed Enum.ToObject() to correctly convert the values.
4437 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4439 * threadpool.c: workaround for a bug that shows up on the Mac:
4440 select()+connect() on a blocking socket is not like it should
4441 be, so we proceed to connect() in that case, wasting the I/O
4442 threadpool thread until connect succeedes. Fixes bug #75436.
4444 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4446 * threadpool.c: fix typo when setting file descriptor states.
4448 2005-11-28 Raja R Harinath <rharinath@novell.com>
4450 * class-internals.h (MonoGenericContainer.is_signature): Remove.
4451 * metadata.c (mono_metadata_parse_method_signature_full): Don't
4452 create a temporary signature container.
4453 (mono_metadata_parse_generic_param): Update to changes.
4454 (mono_type_create_from_typespec_full): Update to changes.
4455 * loader.c (method_from_memberref): Don't use a
4456 MonoGenericContainer while parsing a memberref signature.
4457 (method_from_methodspec): Remove dead-store of the 'container'
4458 variable. It's overwritten before use.
4460 * metadata.c (mono_type_create_from_typespec_full): Make debugging
4462 (mono_metadata_parse_generic_param): Likewise.
4463 * loader.c (find_method_in_class): Does not need a
4464 MonoGenericContainer. Use 'mono_method_signature' rather than
4465 'mono_method_signature_full'.
4466 (find_method, mono_get_method_constrained, method_from_memberref):
4469 * metadata.c (mono_type_create_from_typespec_full): Ensure that
4470 owner-less generic-parameters are never evicted from the typespec
4473 * loader.c (method_from_memberref): Don't use the current context
4474 when parsing signatures.
4475 (method_from_methodspec, mono_get_method_from_token): Update to changes.
4477 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
4478 side-effects in g_assert.
4479 * loader.c (mono_get_method_from_token): Resolve klass earlier so
4480 that we don't potentially lose information.
4482 2005-11-26 Dick Porter <dick@ximian.com>
4485 * threads.c: icalls to implement basic (ie, not named)
4486 System.Threading.Semaphore.
4488 2005-11-24 Dick Porter <dick@ximian.com>
4491 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
4492 Use GetProcessId() if it's available.
4494 2005-11-23 Zoltan Varga <vargaz@gmail.com>
4496 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
4498 2005-11-23 Raja R Harinath <rharinath@novell.com>
4499 Ankit Jain <jankit@novell.com>
4501 * loader.c (mono_get_method_from_token): Initialize 'method' field
4502 of all generic parameters before parsing the signature. Remove
4503 code that "fixed"-up MVAR references.
4505 2005-11-23 Ankit Jain <jankit@novell.com>
4507 * metadata.c (mono_metadata_has_generic_params):
4508 (mono_metadata_load_generic_param_constraints):
4509 (mono_metadata_load_generic_params): Move duplicate code ...
4510 (mono_metadata_get_generic_param_row): ... here. Returns the
4511 first row-id in GenericParam table for a given owner (token).
4512 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
4515 2005-11-23 Raja R Harinath <rharinath@novell.com>
4516 Ankit Jain <jankit@novell.com>
4518 * metadata.c (mono_metadata_class_equal): Pass signature_only when
4520 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
4521 type->data.generic_param only if the type is an MVAR.
4522 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
4523 leak owner-less VARs and MVARs into managed space.
4525 2005-11-21 Martin Baulig <martin@ximian.com>
4528 (MonoMethod): Moved the `generic_container' here from
4529 `MonoMethodNormal' since we now also need it for
4530 `MonoMethodPInvoke';
4531 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
4532 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
4533 an union containing both `MonoMethodNormal' and
4534 `MonoMethodPInvoke'.
4537 (mono_get_method_from_token): Allow implementing generic methods
4541 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
4544 2005-11-17 Dick Porter <dick@ximian.com>
4548 * process.c: Split the Process Start_internal icall into
4549 ShellExecuteEx_internal and CreateProcess_internal, which are
4550 called depending on whether UseShellExecute is true. Fixes bug
4553 * appdomain.c (MONO_CORLIB_VERSION): Incremented
4555 2005-11-17 Zoltan Varga <vargaz@gmail.com>
4557 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
4558 'msize' parameters, use the information in 'mspec' instead.
4559 (emit_object_to_ptr_conv): Ditto.
4561 * marshal.c (emit_struct_conv): Handle explicit layout structs with
4562 fields out of order. Fixes #76733.
4564 2005-11-17 Ankit Jain <jankit@novell.com>
4566 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
4568 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
4570 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
4573 2005-11-16 Zoltan Varga <vargaz@gmail.com>
4575 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
4576 for types with non-auto layout. Fixes #76717.
4578 2005-11-16 Ankit Jain <jankit@novell.com>
4580 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
4581 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
4582 if generic_context is null.
4583 (mono_metadata_generic_param_equal): param->owner can be null.
4584 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
4587 2005-11-16 Zoltan Varga <vargaz@gmail.com>
4589 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
4592 2005-11-15 Martin Baulig <martin@ximian.com>
4594 * object.c (set_value): Use mono_class_from_mono_type() instead of
4595 the hack for generic instances; fixes #76136.
4597 2005-11-15 Zoltan Varga <vargaz@gmail.com>
4599 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
4602 * image.c (load_metadata_ptrs): Initialize the new fields.
4604 * reflection.c (create_dynamic_mono_image): Ditto.
4606 * reflection.c (build_compressed_metadata): Use the new fields.
4608 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
4611 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
4614 2005-11-15 Ankit Jain <jankit@novell.com>
4615 Raja R Harinath <harinath@gmail.com>
4617 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
4618 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
4619 new per-generic_container cache if the cached MonoType's context matches
4620 the current context.
4621 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
4622 to the expected context.
4623 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
4625 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4627 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
4628 we changed the signature of an icall.
4629 * icall.c: Modify to mono_double_ParseImpl return true/false
4630 depending on the success, instead of throwing the exception. This will
4631 help us in Double.TryParse methods.
4633 2005-11-14 Zoltan Varga <vargaz@gmail.com>
4635 * marshal.c (emit_marshal_object): Throw an exception when
4636 marshalling 'object' instead of crashing. Fixes #76696.
4638 2005-11-11 Zoltan Varga <vargaz@gmail.com>
4640 * class-internals.h: Add prototype for mono_type_get_full_name ().
4642 2005-11-11 Dick Porter <dick@ximian.com>
4644 * threads.c (mono_thread_manage): Make sure the main thread has
4645 abandoned all its mutexes when cleaning up. Fixes bug 74680.
4647 2005-11-11 Zoltan Varga <vargaz@gmail.com>
4649 * loader.c (mono_loader_set_error_type_load): Log a warning to the
4650 console about the missing type.
4651 (mono_loader_set_error_method_load): Ditto.
4653 2005-11-09 Miguel de Icaza <miguel@novell.com>
4655 * mono-config.c (mono_get_config_dir): Set the system defaults if
4658 * assembly.c (mono_set_dirs): New API entry point to set the
4659 assembly and the config directory in one call
4661 2005-11-09 Zoltan Varga <vargaz@gmail.com>
4663 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
4664 the ftnptr was created from a delegate in a domain other than the
4665 current domain. Fixes #75377.
4667 * exception.h exception.c: Add mono_get_exception_not_supported ().
4669 2005-11-08 Martin Baulig <martin@ximian.com>
4671 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
4673 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
4675 * security-manager.h: Added definitions to deal with strongname key
4676 pairs bigger (and smaller) than 1024 bits.
4677 * reflection.c: Remove hardcoded strongname size (128 bytes) and
4678 adjust wrt the public key length being used.
4680 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
4682 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
4683 Windows build (r51396-51397).
4685 2005-11-03 Martin Baulig <martin@ximian.com>
4687 * class.c (mono_class_setup_vtable_general): Also add generic
4688 methods to the vtable; fixes #76581.
4690 2005-11-01 Miguel de Icaza <miguel@novell.com>
4692 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
4693 sure that we lookup GetString method from the System.Text.Encoding
4694 class, not the derived class or we get an empty method.
4698 2005-10-25 Miguel de Icaza <miguel@novell.com>
4700 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
4701 if it has been previously set (embedders).
4703 Make mono_set_rootdir available also on Unix.
4705 005-10-24 Robert Jordan <robertj@gmx.net>
4707 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
4709 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
4711 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
4712 only calls which are made to native code use this flag.
4714 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
4716 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
4718 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
4719 Add support for FieldBuilders.
4721 2005-10-29 Martin Baulig <martin@ximian.com>
4724 (mono_debug_using_mono_debugger): New public method; returns
4725 whether we're running inside the debugger.
4727 2005-10-27 Zoltan Varga <vargaz@gmail.com>
4729 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
4730 for Method/Constructor/FieldBuilders.
4732 2005-10-26 Zoltan Varga <vargaz@gmail.com>
4734 * reflection.c (module_add_cattrs): Save custom attributes for global methods
4737 2005-10-26 Martin Baulig <martin@ximian.com>
4739 * mono-debug-debugger.c
4740 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
4742 2005-10-24 Raja R Harinath <harinath@gmail.com>
4744 * icall.c (base64_to_byte_array): Don't pass an out-of-range
4747 2005-10-21 Zoltan Varga <vargaz@gmail.com>
4749 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
4750 when passing valuetypes byref. Fixes #76502.
4752 2005-10-19 Jackson Harper <jackson@ximian.com>
4754 * profiler.c: Don't put a . in front of types that are not in a
4757 2005-10-18 Zoltan Varga <vargaz@gmail.com>
4759 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
4761 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
4763 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
4765 (mono_marshal_get_ldflda_wrapper): Fix a warning.
4767 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4769 * assembly.c metadata-internals.h icall.c: Define an additional
4770 parameter for mono_assembly_name_parse_full, so we can avoid creating
4771 S.R.AssemblyName.Version when no version info wasn't passed.
4773 2005-10-09 Miguel de Icaza <miguel@novell.com>
4775 * class.c (mono_type_get_full_name): Reimplement method that was
4778 * image.c: Some docs
4780 2005-10-10 Zoltan Varga <vargaz@gmail.com>
4782 * profiler.c (output_newobj_profile): Fix printing of Total memory
4785 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
4787 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
4789 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
4791 * threads.c: remove debug output.
4793 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
4795 * threads.c (mono_thread_manage): Fix crashes if more than 64
4796 threads need to be aborted. Hopefully fixes #75899.
4798 * assembly.c (mono_stringify_assembly_name): New helper function.
4800 * class.c: Use mono_stringify_assembly_name instead of the similar
4803 * assembly.h assembly.c: Add support for calling a postload search
4804 hook if an assembly cannot be loaded.
4806 * appdomain.c: Register new search hooks which call the AssemblyResolve
4807 events in AppDomain. Fixes #75231
4809 2005-10-07 Martin Baulig <martin@ximian.com>
4811 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
4812 methods without debug info.
4814 2005-10-07 Zoltan Varga <vargaz@gmail.com>
4816 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
4819 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4821 * file-io.c: now that we return symlinks, use lstat and, when the file
4822 is a symbolic link, stat, to get the file attributes. Also avoid the
4823 conversion to/from utf16/external.
4825 2005-10-06 Zoltan Varga <vargaz@gmail.com>
4827 * class.c (mono_class_layout_fields): Compute klass->has_references
4828 correctly if an embedded valuetype is not yet initialized. Fixes
4831 2005-10-04 Martin Baulig <martin@ximian.com>
4834 (mono_metadata_load_generic_param_constraints): New public
4835 function; splitted the constraints loading out from
4836 mono_metadata_load_generic_params().
4838 * class.c (mono_class_create_from_typedef): Call
4839 mono_metadata_load_generic_param_constraints() after setting up
4840 the type and creating our parent; fixes #75329.
4842 2005-10-04 Martin Baulig <martin@ximian.com>
4844 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
4845 non-dynamic parent classes.
4847 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
4849 * file-io.c : win32 build fix (ETXTBSY seems not found).
4851 2005-10-04 Martin Baulig <martin@ximian.com>
4854 (mono_image_get_methodspec_token): Make the cache actually work;
4857 2005-10-04 Martin Baulig <martin@ximian.com>
4859 * class.c (mono_class_name_from_token): Removed the unneccessary
4860 `MonoGenericContext *' argument.
4862 2005-10-04 Martin Baulig <martin@ximian.com>
4865 (method_from_methodspec): Make the caching work again; fixes the
4866 performance regression from #76262.
4868 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4872 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
4873 GetFileSystemEntries that performs the same work but without going
4874 into io-layer, locking, etc.
4876 2005-09-30 Zoltan Varga <vargaz@gmail.com>
4878 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
4879 ThreadState_Stopped as well. Fixes #76047.
4881 2005-09-29 Martin Baulig <martin@ximian.com>
4884 (inflate_generic_context): If the new context has a `gmethod', set
4885 its `container' that that gmethod's `container'.
4888 (mono_metadata_parse_generic_param): Simplify things;
4889 `generic_container = generic_context->container;' is just fine.
4891 * loader.c (method_from_methodspec): Code cleanups.
4893 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
4895 * decimal.c: fix warning (and let gcc generate correct
4896 code on ARM with optimizations).
4898 2005-09-28 Martin Baulig <martin@ximian.com>
4901 (method_from_memberref): Added `MonoGenericContext *class_context'
4902 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
4903 (method_from_methodspec): If we're a memberref, use the enclosing
4904 context when parsing its parent. Fixes #76262; see gtest-206.cs.
4906 2005-09-28 Martin Baulig <martin@ximian.com>
4908 * object.c (mono_runtime_invoke_array): Added support for
4909 MONO_TYPE_GENERICINST; fixes #75917.
4911 2005-09-27 Martin Baulig <martin@ximian.com>
4913 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
4914 `k->byval_arg.type' to determine the actual type.
4916 * loader.c (method_from_methodspec): Removed some hacks.
4918 2005-09-27 Ben Maurer <bmaurer@ximian.com>
4920 * class-internals.h (mono_field_is_deleted): Do the test for
4921 rtspecialname before we check the actual name of the field. This
4922 prevents us from dereferencing a pointer into the string table,
4923 saving us from accessing a few pages
4925 * *.c: Replace the use of {Enter,Leave}CriticalSection with
4926 macros. This will allow a deadlock debugger to easily be plugged
4929 2005-09-27 Martin Baulig <martin@ximian.com>
4931 * loader.c (method_from_methodspec): Create a "signature"
4932 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
4934 2005-09-27 Martin Baulig <martin@ximian.com>
4937 (inflate_generic_class): Correctly set the new context's
4941 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
4942 instead of a `MonoGenericContext *'.
4943 (mono_method_signature_full): Take a `MonoGenericContainer *'
4944 instead of a `MonoGenericContext *'.
4947 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
4948 instead of a `MonoGenericContext *'.
4949 (mono_metadata_parse_method_signature_full): Likewise.
4951 2005-09-26 Martin Baulig <martin@ximian.com>
4954 (mono_class_from_generic_parameter): Set `klass->generic_container'
4955 (mono_class_from_generic_parameter): Likewise.
4956 (mono_bounded_array_class_get): We inherit the generic container
4957 from the element class.
4960 (find_method, find_method_in_class): Take a `MonoGenericContext *'
4961 argument rather than computing it here.
4962 (method_from_memberref): Correctly set the generic context before
4963 parsing the signature. Fixes #75681.
4965 2005-09-26 Zoltan Varga <vargaz@gmail.com>
4967 * object.c (mono_class_has_special_static_fields): Fix warnings.
4969 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4971 * assembly.c: Add parse_public_key function, to
4972 par the public keys. Also added mono_assembly_name_parse_full,
4973 to define it the parsed key should be freed or not.
4974 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
4975 to parse a long format assembly name.
4976 * metadata-internals.h: Keep mono_assembly_name_parse_full as
4977 private, since calling it to preserve the key requires
4978 freeing it manually.
4980 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
4982 * locales.c : removed HAVE_ICU part.
4984 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
4986 * object.c (mono_class_create_runtime_vtable): Avoid calling
4987 field_is_special_static if the klass has no special static fields.
4989 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
4990 (MonoCachedClassInfo): Likewise.
4992 * object.c (mono_class_has_special_static_fields): New helper function.
4994 2005-09-23 Zoltan Varga <vargaz@gmail.com>
4996 * class.c (mono_class_create_from_typedef): Don't call
4997 interfaces_from_typedef_full for enums.
4998 (mono_class_create_from_typedef): Compute the base types of enums directly
4999 without calling mono_class_setup_fields ().
5000 (mono_class_find_enum_basetype): New helper function.
5002 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
5003 one place inside the string heap.
5005 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
5007 * class.c: locking fixes, code cleanups, some docs added.
5008 Allocate some data structures in the image mempool.
5010 2005-09-23 Zoltan Varga <vargaz@gmail.com>
5012 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
5015 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
5017 * class-internals.h, class.c, reflection.c: reduce memory taken by
5020 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
5022 * metadata.c, metadata.h, loader.h: documentation updates, code and
5025 2005-09-23 Zoltan Varga <vargaz@gmail.com>
5027 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
5030 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
5031 page faults caused by the runtime while reading metadata.
5033 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5035 * socket-io.c: the field names were changed 3 months ago and no one
5036 realized until bug #76077 got filed!
5038 2005-09-20 Martin Baulig <martin@ximian.com>
5040 * icall.c (assembly_icalls): Removed some unused debugger icalls.
5042 2005-09-20 Martin Baulig <martin@ximian.com>
5044 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
5045 write the rank into the class entry.
5047 2005-09-20 Martin Baulig <martin@ximian.com>
5049 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
5051 2005-09-19 Zoltan Varga <vargaz@gmail.com>
5053 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5055 * icall.c (custom_attrs_defined_internal): New icall.
5057 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
5059 (mono_custom_attrs_construct_by_type): New helper function.
5061 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
5063 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
5064 terminate the resulting string. Fixes #76123.
5066 2005-09-16 Martin Baulig <martin@ximian.com>
5069 (mono_debug_add_method): Ignore inflated methods for the moment.
5071 2005-09-14 Martin Baulig <martin@ximian.com>
5073 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
5075 2005-09-13 Zoltan Varga <vargaz@gmail.com>
5077 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
5078 return a success/failure indication.
5079 (mono_metadata_interfaces_from_typedef_full): Ditto.
5080 (get_constraints): Ditto.
5082 2005-09-12 Zoltan Varga <vargaz@gmail.com>
5084 * marshal.c (emit_marshal_array): Fix handling of null arrays.
5086 * marshal.c (emit_marshal_array): Add support for returning string
5087 arrays from delegates. Fixes #76063.
5089 * marshal.c: Use the emit_ldloc/stloc macros where possible.
5091 2005-09-11 Zoltan Varga <vargaz@gmail.com>
5093 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
5096 2005-09-09 Zoltan Varga <vargaz@gmail.com>
5098 * reflection.c icall.c: Fix after mono_get_exception_type_load
5101 * assembly.c (mono_assembly_get_assemblyref): New helper function.
5102 (mono_assembly_load_reference): Use the new helper.
5104 * class-internals.h (MonoLoaderError): New structure containing
5105 information about type loading errors.
5107 * class-internals.h loader.c: Add APIs to store per-thread loader
5110 * loader.c class.c: Set the loader error if needed.
5112 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
5114 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
5116 * decimal.c: fixed to handle the broken ARM fp format.
5118 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
5120 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
5123 2005-09-06 Martin Baulig <martin@ximian.com>
5125 * domain.c (supported_runtimes): Added v2.0.50727.
5127 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
5129 * culture-info.h: reduce the size of some structures.
5131 2005-09-05 Martin Baulig <martin@ximian.com>
5133 Reflect latest API changes in the August CTP.
5136 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
5137 ("MonoType.HasGenericArguments"): Removed.
5138 ("MonoMethod.BindGenericParameters"): Renamed to
5139 "MakeGenericMethod".
5140 ("MethodBuilder.BindGenericParameters"): Renamed to
5141 "MakeGenericMethod".
5143 2005-09-05 Martin Baulig <martin@ximian.com>
5145 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
5147 2005-09-05 Martin Baulig <martin@ximian.com>
5149 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5151 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
5152 generic_container is non-NULL.
5154 2005-09-05 Martin Baulig <martin@ximian.com>
5156 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5158 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
5160 2005-08-29 Michal Moskal <malekith@nemerle.org>
5162 * reflection.c (encode_locals,
5163 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
5164 for large generic types.
5166 2005-09-05 Martin Baulig <martin@ximian.com>
5168 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5170 * class.c (mono_dup_array_type): New public method.
5171 (mono_metadata_signature_deep_dup): New public method.
5172 (dup_type): Correctly duplicate array and function types.
5174 2005-09-05 Martin Baulig <martin@ximian.com>
5176 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5178 * reflection.c (get_default_param_value_blobs): Handle generic types
5179 and generic methods.
5181 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
5183 * class.c: Fixed error reporting (method/class were inversed) for
5184 inheritance demands.
5185 * security-manager.c|h: Added the AppDomain when calling the managed
5186 System.Security.SecurityManager.InheritanceDemand method.
5188 2005-09-01 Raja R Harinath <rharinath@novell.com>
5190 * reflection.c (encode_marshal_blob): 'marshaltype' and
5191 'marshaltyperef' are alternate sources for the custom marshaler
5194 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
5196 * class.c: fix creation of array classes with rank == 1
5197 (patch by Ankit Jain <jankit@novell.com>).
5199 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
5201 * object.c: fix check for creating the bound data for arrays vs
5204 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5206 * object.c: configuration file name is now based on the executable name,
5207 not the image name. Fixes bug #75931.
5209 2005-08-29 Zoltan Varga <vargaz@gmail.com>
5211 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
5212 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
5214 2005-08-25 Zoltan Varga <vargaz@gmail.com>
5216 * rand.c: Use wincrypt.h instead of WinCrypt.h.
5218 2005-08-24 Ankit Jain <jankit@novell.com>
5219 Raja R Harinath <rharinath@novell.com>
5221 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
5222 called by it recursively.
5223 (mono_class_init): Remove special case in pending_init handling, since it's
5224 superseded by the fix to mono_class_from_typeref.
5226 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
5228 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
5229 BROKEN_THREAD_START stuff.
5231 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
5233 * class-internals.h object.c: Add a new kind of trampoline called a delegate
5236 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
5238 * object.c (mono_delegate_ctor): Replace the original function address with
5239 a delegate trampoline.
5241 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
5243 * icall.c: add boolean argument to base64_to_byte_array and
5244 InternalFromBase64String to control whether a whitespace-only string
5245 is allowed (or should casue a FormatException to be thrown). We need
5246 this as the behavior has changed between MS.NET 1.x and 2.0, and we
5247 to match the MS behaviour in both profiles.
5248 * appdomain.c: Bump corlib version.
5250 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5252 This patch implements a big portion of publisher policy
5253 support, used to bind assembly versions and redirect
5254 one assembly from version A to version B.
5257 New GSList loaded_assembly_bindings, for storing the cached
5259 (assembly_binding_maps_name): New static function for checking if a
5260 assembly binding information maps an assembly name.
5261 (mono_assembly_binding_info_free): New function for freeing
5262 assembly binding information resources.
5263 (get_publisher_policy_info): New static function for retrieving
5264 assembly binding information from a MonoImage.
5265 (compare_versions): New static function for comparing an assembly
5266 binding information data and the version of an assembly name.
5267 (check_policy_versions): New static function for checking if an
5268 assembly binding info mapping an assembly name is valid for it.
5269 (mono_assembly_load_publisher_policy): New static function for
5270 loading the 'policy.major.minor.MyAssembly' image for an assembly
5271 with an assembly name 'aname'.
5272 (mono_assembly_bind_version): New static function for updating
5273 assembly redirection.
5274 (mono_assembly_apply_binding): New static function for applying
5276 (search_binding_loaded): New static function for searching
5277 loaded assembly binding infos in the cache domain.
5278 (mono_assembly_load_full): Don't apply assembly binding for
5279 reflection only assemblies.
5281 * metadata-internals.h: Add MonoAssemblyBindingInfo,
5282 which contains information about assembly binding. Also
5283 declare signature for mono_config_parse_publisher_policy ()
5284 function, used to retrieve pub policy info.
5287 (publisher_policy_start): New static function used to parse publisher
5288 policy config files.
5289 (publisher_policy_parser): New static MonoParseHandler containing
5290 the functions used when parsing config files.
5291 (mono_config_parse_publisher_policy): New function for parsing
5292 publisher policy files.
5294 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
5296 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
5298 * marshal.c (mono_delegate_free_ftnptr): Ditto.
5300 * object.c (mono_get_addr_from_ftnptr): New helper function.
5302 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
5304 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5306 2005-08-19 Dick Porter <dick@ximian.com>
5308 * threads.c, threads.h, appdomain.c, appdomain.h,
5309 profiler-private.h, monitor.c, object.c, object-internals.h,
5310 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
5311 store the thread ID, so it can hold a 64 bit value if needed.
5313 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
5315 * reflection.c (mono_reflection_create_dynamic_method): Store the
5316 handle class into the method references as well so ldtoken works in
5319 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
5322 2005-08-19 Ankit Jain <jankit@novell.com>
5325 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
5326 here rather than using the method signature of a arbitrary function
5327 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
5329 Hack done with Harinath.
5331 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5333 * threadpool.c: disable printing stack traces when we get a exception
5334 in a threadpool thread. I need to do more testing to figure out which
5335 cases actually print this. Fixes bug #75828.
5337 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5339 * icall.c: there might be ignored whitespace after the last '='. This
5340 fixes length computation and bug #75840.
5342 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
5344 * assembly.c (mono_assembly_load_full): Consider .exe extension as
5347 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
5350 * reflection.c (create_custom_attr_data): Ditto.
5352 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
5354 * locales.c, culture-info.h : removed RegionLCIDMap.
5355 * culture-info-tables.h : regenerated.
5357 2005-08-16 Martin Baulig <martin@ximian.com>
5359 * class.c (mono_type_get_name_recurse): Small fix.
5361 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
5363 * locales.c : indentation fixie.
5365 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
5367 * object-internals.h,
5371 icall.c : added RegionInfo table support.
5372 * culture-info-table.h : regenerated for region support.
5374 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
5376 * reflection.c (resolve_object): handle all kinds of MonoMethod
5377 including generic ones
5379 2005-08-12 Ankit Jain <jankit@novell.com>
5381 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
5382 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
5384 2005-09-12 Lluis Sanchez <lluis@ximian.com>
5386 * process.c: Don't close a thread handle when it's NULL. This is a
5387 workaround for bug #75733.
5389 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
5391 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
5393 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
5395 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
5397 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5399 * threadpool.c: if a work item in the thread pool has a callback that
5400 catches a exception, don't propagate it after invoking the callback.
5403 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
5405 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
5407 * class-internals.h (MonoCachedClassInfo): Add some new fields.
5409 * class.c (mono_class_init): Load field info lazily in the AOT case.
5411 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
5413 2005-08-03 Ankit Jain <jankit@novell.com>
5416 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
5417 PInvoke calling convention is 0.
5419 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
5421 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
5422 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
5424 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
5426 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
5427 to handle threads not started by the GC (patch by Michael Meeks
5428 <michael.meeks@novell.com>).
5430 2005-07-31 Kamil Skalski <nazgul@omega.pl>
5432 * reflection.c: Make buffer used in emitting types larger for some
5433 big generic types (patch by Michal Moskal).
5435 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
5437 * mono-debug.c: Fix some (not all) alignment problems.
5439 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5441 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
5442 Invoke mono_image_load_from_data_full passing the refonly
5446 (mono_assembly_open_from_bundle): Add the refonly argument,
5447 in order to pass it to other methods it calls to.
5448 (do_mono_assembly_open): Add the refonly argument, in order
5449 to pass it to other methods it calls to.
5450 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
5451 the refonly parameter to it.
5453 * image.c: Add loaded_images_refonly_hash and
5454 loaded_images_refonly_guid_hash to cache the reflection
5456 (mono_images_init): Initialize the hash tables used for
5457 caching the reflection only images.
5458 (load_modules): Invoke mono_image_open_full passing the refonly
5459 parameter to load the modules the correct way.
5460 (build_guid_table): Add the refonly argument, to re-build the
5462 (do_mono_image_open): Added the refonly argument, in order to
5463 define it for the loaded image.
5464 (mono_image_loaded_full): New function, which receives an
5465 additional parameter to look for the image in the refonly or
5466 non-refonly section.
5467 (mono_image_loaded): Updated, using mono_image_loaded_full.
5468 (mono_image_loaded_by_guid_full): The same case that happens
5469 with mono_image_loaded_full.
5470 (mono_image_loaded_by_guid): Likewise.
5471 (register_image): Use the ref_only variable inside MonoImage
5472 to decide in which hash table store the current image.
5473 (mono_image_open_from_data_full): Rename
5474 mono_image_open_from_data to mono_image_open_from_data_full,
5475 adding the refonly argument, to define the ref_only variable
5477 (mono_image_open_from_data): Return
5478 mono_image_open_from_data_full.
5479 (mono_image_open_full): Rename mono_image_open to
5480 mono_image_open_full, receiving the new refonly argument,
5481 to pass it to inner methods.
5482 (mono_pe_file_open): Update this function, to open
5483 a MonoImage as a non-refonly image.
5484 (mono_image_close): Use the refonly variable inside
5485 MonoImage to remove the image from the correct caches.
5487 * image.h: Add the signatures of mono_image_open_full,
5488 mono_image_open_from_data_full, mono_image_loaded_full,
5489 mono_image_loaded_by_guid_full.
5491 * metadata-internals.h: Add the ref_only field to
5494 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5496 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
5497 Fix the last behavior, which used to load the assemblies and
5498 extract MonoReflectionAssemblyName information, instead of
5499 extract it from the metadata tables. Needed for Reflection
5502 2005-07-29 Martin Baulig <martin@ximian.com>
5504 * mono-debug-debugger.c
5505 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
5509 (mono_debug_address_from_il_offset): Check whether we have
5510 debugging support before attempting to take the lock.
5511 (mono_debug_source_location_from_address): Likewise.
5512 (mono_debug_source_location_from_il_offset): Likewise.
5513 (mono_debug_il_offset_from_address): Likewise.
5514 (mono_debug_address_from_il_offset): Likewise.
5516 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
5518 * class.c (mono_class_from_name_case): Add support for dynamic images.
5521 * object.c (mono_class_compute_gc_descriptor): Add a workaround
5524 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
5526 * reflection.c (mono_method_get_object): Fix warning.
5528 2005-07-28 Martin Baulig <martin@ximian.com>
5531 (mono_debug_add_wrapper): Also write the wrapper type.
5533 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
5535 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
5537 * class.c (mono_class_init): Avoid reading nested classes if the AOT
5538 data indicates the class has none.
5540 2005-07-26 Ben Maurer <bmaurer@ximian.com>
5542 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
5543 loader lock with the debugger lock. Prevents deadlocks for beagle.
5545 Beagle can now run on an smp box for a weekend without any
5548 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
5550 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
5551 in a module. Fixes #75629.
5553 2005-07-26 Martin Baulig <martin@ximian.com>
5555 * mono-debug.c (mono_debug_add_wrapper): New static method.
5556 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
5557 interncall or a wrapper.
5559 * mono-debug.h (MonoDebugWrapperData): New public typedef.
5560 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
5561 (MONO_DEBUGGER_VERSION): Bump to 51.
5563 * mono-debug-debugger.c
5564 (mono_debugger_add_type): Removed this empty function.
5565 (mono_debugger_add_method): Likewise.
5567 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
5569 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
5570 before accessing method->slot.
5572 2005-07-21 Jb Evain <jbevain@gmail.com>
5574 * reflection.c (method_encode_clauses/class): Handle filters clauses.
5577 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
5579 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
5582 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
5584 * image.h image.c: Add mono_image_get_guid () API function.
5586 2005-07-19 Ben Maurer <bmaurer@ximian.com>
5588 There were issues when multiple threads tried to load
5589 assemblies. A deadlock was created between assemblies_mutex and
5590 mono_domain_assemblies_lock. This fixes the issue by making the
5591 assembly ref counting be lock free. See bug 75586.
5593 * image.c (mono_image_close): The add ref function here was using
5594 Interlocked operations while the unref was using a mutex and a
5595 --. I don't think this was ever a bug that would be exposed in a
5596 non-pendantic way (ie, by an embedder doing a ref on one thread
5597 and an unref on another), but for the sake of correctness, this is
5600 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
5601 (mono_assembly_load_reference): Call mono_assembly_addref rather
5602 than touching the refcount ourselves.
5603 (mono_assembly_close): Use InterlockedDecrement to unref the
5604 assembly. Don't acquire the lock unless it is actually needed.
5606 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
5608 * class.c (mono_class_layout_fields): Fix calculation of has_references
5611 2005-07-12 Martin Baulig <martin@ximian.com>
5613 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5616 (mono_type_hash): Provide better hashing for generic instances.
5617 (mono_generic_inst_hash): Improve hashing.
5618 (mono_generic_class_hash): Likewise.
5620 * reflection.c (mymono_metadata_type_hash): Improve hashing for
5623 2005-07-12 Martin Baulig <martin@ximian.com>
5625 * reflection.c (mono_reflection_create_runtime_class): Remove the
5626 hack for generic type definitions and non-`Run' assemblies.
5627 (mono_reflection_bind_generic_parameters): Also use
5628 `klass->wastypebuilder' to check for TypeBuilders.
5630 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
5632 * class.c (mono_class_layout_fields): Fix calculation of has_references
5635 * class.c (inflate_generic_class): Fix a leak.
5636 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
5639 2005-07-11 Martin Baulig <martin@ximian.com>
5641 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
5644 2005-07-11 Martin Baulig <martin@ximian.com>
5646 * loader.c (find_method): Also lookup in
5647 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
5649 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
5651 * appdomain.c (mono_domain_unload): Don't free the error message
5652 before passing it to mono_get_exception_...
5654 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
5656 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
5658 * threads.c: try to better guess an available RT signal (bug #75387).
5660 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
5662 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
5665 2005-07-07 Martin Baulig <martin@ximian.com>
5667 * class.c (mono_type_get_name_full): Return NULL for
5668 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
5671 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
5673 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
5674 exit the appdomain as well being aborted.
5676 * threadpool.c: Create all threadpool threads inside the root appdomain, and
5677 change back to the root domain after calling managed code. This enables
5678 appdomains using threadpools to be unloaded.
5680 2005-07-07 Martin Baulig <martin@ximian.com>
5683 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
5684 into `MonoDynamicGenericClass' since we only need it for dynamic
5687 * reflection.c (mono_class_bind_generic_parameters): We don't need
5688 to compute the `parent' here.
5690 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
5692 * culture-info-table.h : regenerated.
5694 2005-07-06 Martin Baulig <martin@ximian.com>
5697 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
5699 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
5701 2005-07-06 Martin Baulig <martin@ximian.com>
5703 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
5704 we're doing a signature-only comparision; fixes #74945.
5706 2005-07-06 Martin Baulig <martin@ximian.com>
5708 * class-internals.h (MonoGenericClass): Moved some things out into
5709 a new `MonoInflatedGenericClass' type.
5710 (MonoInflatedGenericClass): New type; the `klass' of a
5711 `MonoGenericClass' is now computed lazyly in
5712 mono_get_inflated_generic_class().
5714 * class.c (mono_get_inflated_generic_class): New public function.
5715 (mono_class_inflate_generic_method): Removed the unused
5716 `MonoClass *' argument.
5717 (setup_generic_vtable): Don't call mono_get_inflated_method() on
5719 (mono_class_create_generic): Make this static and merge it with
5720 mono_class_create_generic_2(); we're now called automatically from
5721 mono_get_inflated_generic_class().
5723 * loader.c (mono_method_signature): Call
5724 mono_get_inflated_method() here.
5726 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
5728 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
5729 type of fields with RVA.
5731 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
5732 for this pseudo class.
5733 (my_mono_class_from_generic_parameter): Likewise.
5734 (mono_class_init): Allow interfaces to have cctors.
5736 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
5738 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
5739 lazily for AOT methods.
5741 2005-07-05 Martin Baulig <martin@ximian.com>
5743 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
5744 returns FALSE for a successful match, not TRUE.
5746 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
5748 * loader.c (mono_method_get_index): Optimize this a bit.
5750 2005-07-04 Martin Baulig <martin@ximian.com>
5753 (class_compute_field_layout): Move the check for generic type
5754 definitions into mono_class_layout_fields(). Fixes #74684.
5755 (mono_class_from_generic_parameter): Correctly compute
5756 `klass->parent'; fixes #75457.
5758 * reflection.c (register_assembly, register_module): Make sure
5759 `domain->rejobject_hash' is already created.
5761 2005-07-02 Martin Baulig <martin@ximian.com>
5764 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
5765 `MonoDynamicGenericClass'.
5767 2005-07-01 Lluis Sanchez <lluis@ximian.com>
5769 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
5770 returned by a field getter is null, since null is a valid value.
5772 2005-07-01 Martin Baulig <martin@ximian.com>
5774 * reflection.c (mono_reflection_generic_class_initialize): Update
5775 the `dgclass->fields [i].parent' to the correct class.
5776 (mono_image_get_fieldref_token): Use the declaring type, not the
5779 2005-07-01 Martin Baulig <martin@ximian.com>
5781 * loader.c (find_method): Also look in the interfaces; fixes #75429.
5783 2005-06-30 Ben Maurer <bmaurer@ximian.com>
5785 * threads.c (thread_cleanup): assert that thread != NULL
5786 (wait_for_tids_or_state_change): We were using the wrong variable
5787 when accessing wait->threads. `i' was always out of the bounds of
5790 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5792 * loader.c: map user32 and kernel32 to libMonoSupportW
5794 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
5796 * appdomain.c (unload_thread_main): Mark this as WINAPI.
5798 2005-06-28 Martin Baulig <martin@ximian.com>
5800 * loader.c (method_from_methodspec): Fix #75334.
5802 2005-06-28 Martin Baulig <martin@ximian.com>
5804 Fix #74953 - Arrays now implement the generic IList<T> interface
5805 on the 2.0 platform.
5807 * class-internals.h (MonoDefaults): Added `generic_array_class'.
5809 * reflection.c (mono_class_bind_generic_parameters): New public
5810 function; similar to mono_reflection_bind_generic_parameters(),
5811 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
5813 * domain.c (mono_init_internal): Try to initialize.
5814 `mono_defaults.generic_array_class' here; this'll only succeed if
5815 we're using the 2.0 corlib.
5818 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
5819 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
5820 (mono_lookup_internal_call): Added support for nested classes.
5823 (mono_get_method_from_token): Set `result->signature->pinvoke' if
5824 we're an interncall and have generic arguments.
5827 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
5828 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
5829 instance of System.Array.InternalArray<T> for arrays, so they
5830 implement the generic IList<T> interface.
5832 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
5834 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
5835 (chastamar@yahoo.com). Fixes #75374.
5837 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
5839 * culture-info-table.h: regenerated.
5841 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5843 * icall.c: handle spaces correctly for base64 strings.
5845 2005-06-26 Ben Maurer <bmaurer@ximian.com>
5847 * *.c: Kill some warnings.
5849 2005-06-23 Duncan Mak <duncan@novell.com>
5851 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
5852 that this builds on Solaris 10 (x86).
5854 2005-06-23 Martin Baulig <martin@ximian.com>
5857 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
5858 generic type definitions.
5860 2005-06-23 Martin Baulig <martin@ximian.com>
5864 * metadata.c (mono_class_get_overrides): Renamed to
5865 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
5866 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
5867 pass it to mono_get_method_full().
5869 2005-06-22 Ben Maurer <bmaurer@ximian.com>
5871 * reflection.c (mono_reflection_create_runtime_class): take the
5872 mono_domain_lock in this method. Prevents deadlocks
5874 2005-06-22 Martin Baulig <martin@ximian.com>
5876 * loader.c (method_from_methodspec): Fix #75330.
5878 2005-06-22 Martin Baulig <martin@ximian.com>
5880 * reflection.c (type_get_qualified_name): Use
5881 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
5882 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
5883 argument; use it if we don't have an assembly name.
5885 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
5887 * object.c: In mono_message_init, set "copy out" flag for in
5888 parameters with the [Out] flag.
5890 2005-06-21 Martin Baulig <martin@ximian.com>
5893 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
5896 2005-06-21 Martin Baulig <martin@ximian.com>
5898 * class.c (mono_class_init): Don't initialize `class->fields' for
5899 generic instances since they're initialized again in
5900 compute_field_layout().
5901 (compute_field_layout): Set the field's `generic_info' here; fix
5904 2005-06-21 Martin Baulig <martin@ximian.com>
5907 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
5909 * metadata.c (mono_metadata_generic_method_equal): Also
5910 distinguish the `generic_class'; fixes #75334.
5912 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5916 * domain-internals.h:
5917 * reflection.c: 'domain_assemblies' field is now protected by its own
5918 lock. Don't call into managed code to run the AssemblyLoad event if we
5919 now there are no registered delegates for it.
5921 2005-06-20 Martin Baulig <martin@ximian.com>
5923 * class.c (mono_class_is_assignable_from): Use a custom version of
5924 mono_class_has_parent() to make things work for generic instances;
5927 2005-06-20 Martin Baulig <martin@ximian.com>
5929 * loader.c (method_from_methodspec): Apply a patch from
5930 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
5932 2005-06-20 Martin Baulig <martin@ximian.com>
5934 * class.c (mono_class_init): Reverted Zoltan's last change; it
5937 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
5939 * threads.c (wait_for_tids_or_state_change): Add missing locking.
5941 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5943 * socket-io.c: fix the index in the socket array for writable/error
5944 sockets. Fixes bug #75306.
5946 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
5948 * class.c (mono_class_init): Allow interfaces to have static ctors.
5950 2005-06-17 Martin Baulig <martin@ximian.com>
5952 * loader.c (method_from_methodspec): Use `context->container' when
5953 parsing the `gmethod->inst'.
5955 2005-06-17 Martin Baulig <martin@ximian.com>
5957 * class.c (mono_type_get_name_recurse): Don't add the assembly
5958 name for type arguments.
5960 2005-06-15 Martin Baulig <martin@ximian.com>
5962 * reflection.c (mono_image_get_inflated_method_token): Encode
5963 correct klass; fixes #75260.
5965 2005-06-13 Michal Moskal <malekith@nemerle.org>
5967 * icall.c: Make GetCorrespondingMethod/Constructor take
5968 MonoReflectionMethod method not MonoMethod. Removed
5969 MonoType.GetCorrespondingField, and make
5970 MonoGenericType.GetCorrespondingField take name not
5973 2005-06-13 Michal Moskal <malekith@nemerle.org>
5975 * reflection.c (field_encode_signature, encode_locals):
5976 Make sizes of buffers for types larger (for big generic types).
5977 (create_generic_typespec,
5978 mono_reflection_sighelper_get_signature_local,
5979 mono_reflection_sighelper_get_signature_field):
5980 Add asserts for too small buffers.
5982 2005-06-15 Martin Baulig <martin@ximian.com>
5984 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
5985 if our parent is not a dynamic type.
5987 2005-06-15 Martin Baulig <martin@ximian.com>
5989 * class-internals.h (MonoTypeNameFormat): New enum.
5992 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
5993 (mono_type_get_full_name): Removed.
5994 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
5995 argument instead of the boolean's.
5997 * icall.c (ves_icall_System_MonoType_getFullName):
5998 Added `gboolean assembly_qualified'.
6001 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
6003 * reflection.c (mono_reflection_parse_type): Parse the new type
6006 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6008 * icall.c: no need to convert from utf16 to utf8 and then back again
6009 after the call to GetLogicalDrives.
6011 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6013 * icall.c: frombase64. Fix problems exposed by new tests.
6015 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6017 * icall.c: added internal calls for converting char [] and strings in
6018 base64 into byte [].
6020 2005-06-10 Martin Baulig <martin@ximian.com>
6022 * class.c (mono_class_create_generic_2): Read the nested classes
6023 from the metadata rather than from `gklass->nested_classes' since
6024 `gklass' might not be initialized yet.
6026 2005-06-09 Duncan Mak <duncan@novell.com>
6028 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
6029 all public headers. Fixes #74919.
6031 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
6033 * domain.c: The key for proxy_vtable_hash is now a pointer
6034 array. Added new GHashFunc and GCompareFunc functions for this.
6036 * class.h: The list of interfaces in MonoRemoteClass is known in
6037 advance and can't grow (we create a new MonoRemoteClass if needed),
6038 so now the interface array can be allocated together with
6041 * object.c: Added a new method create_remote_class_key.
6042 Fixed mono_remote_class so it does not depend on
6043 mono_upgrade_remote_class.
6044 Removed extend_interface_array.
6045 Added new method clone_remote_class(), which makes a copy of a remote
6046 class and adds a new interface or class to it.
6047 mono_upgrade_remote_class() now creates a new remote class (or gets
6048 it from the cache) if an vtable upgrade is needed. In this way
6049 we make sure that other objects sharing the same remote class
6050 don't get the new vtable with unwanted interfaces.
6052 * object-internals.h:
6053 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
6055 * marshal.c: Track changes in mono_upgrade_remote_class().
6057 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
6058 * icall.c: Add runtime methods for obtaining members of inflated
6059 class, which were created from supplied non-inflated members. It
6060 is used in internal Get{Method,Constructor,Field} methods in
6063 2005-06-09 Martin Baulig <martin@ximian.com>
6066 (mono_reflection_bind_generic_method_parameters): Fix #75169.
6068 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6069 * reflection.c (mono_image_basic_init): Define
6070 Version in MonoDynamicAssembly.
6072 2005-06-08 Martin Baulig <martin@ximian.com>
6077 (mono_method_signature_full): New public method; takes a
6078 `MonoGenericContext *'.
6079 (find_method): Use mono_method_signature_full() and pass the
6080 klass'es context to it.
6082 * class.c (mono_class_is_inflated_method): Use
6083 mono_method_signature_full() and pass the context to it.
6085 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
6087 * object.c: add proper locking in mono_remote_class_vtable(),
6088 fixes possible memory corruption.
6090 2005-06-08 Michael Meeks <michael.meeks@novell.com>
6092 * marshal.c (mono_remoting_marshal_init): set
6093 initialized after initialization.
6095 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
6099 2005-06-06 Michael Meeks <michael.meeks@novell.com>
6101 * object.c (extend_interface_array): fix really silly
6102 memory corrupting / comparison bug.
6104 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6106 * reflection.c: Functions added to support the creation
6107 of CustomAttributeData, which includes Attribute data
6108 used by ReflectionOnly methods.
6110 * reflection.h: mono_reflection_get_custom_attrs_data and
6111 mono_custom_attrs_data_construct added (functions exposed).
6113 * icall.c: Added mono_reflection_get_custom_attrs_data
6116 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
6118 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
6121 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
6123 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
6125 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
6126 dynamic DllImportAttribute.
6128 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
6129 dynamic DllImportAttribute.
6131 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
6134 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6136 * threads.c: avoid segfault when an unstarted thread is aborted.
6138 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
6140 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
6141 Returns the name and version of the runtime for reporting.
6143 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6145 * appdomain.c: bump corlib version.
6146 * object-internals.h: new field in MonoReflectionAssembly.
6148 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6150 * object-internals.h: Carlos forgot to add this field.
6152 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6154 * icall.c: Added create_version to create instances
6155 of Version of MonoReflectionAssemblyName. This change helps
6156 the AssemblyName tests to keep running fine.
6158 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
6160 * object.c (mono_method_return_message_restore): A somehow less
6161 intrusive fix for #75138.
6163 2005-06-03 Raja R Harinath <rharinath@novell.com>
6165 * object.c (mono_method_return_message_restore): Fix computation
6166 of expected number of out args.
6168 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
6170 * reflection.c (mono_image_get_method_info): Fix the case when the
6173 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
6175 * object.c: Added missing null check in
6176 mono_method_return_message_restore.
6178 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
6180 * reflection.c (mono_image_get_method_info): Handle the case when
6183 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
6185 * object.c: When creating the vtable for a proxy, take into account
6186 all inherited interfaces, not only the ones registered in
6187 iclass->interfaces. This fixs bug #74996.
6188 Also, in mono_method_return_message_restore, verify that the array
6189 of out args has the expected lengh.
6191 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6193 * socket-io.c: update the timeout in Poll when the call is interrupte.
6195 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6197 * socket-io.c: support abort/suspend in Select_internal after last
6200 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6202 * threadpool.c: remove warning.
6204 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6207 * socket-io.[ch]: Select_internal uses poll() now when available, thus
6208 removing the 1024 limit from select(). Runtime part of the fix for
6211 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6213 * socket-io.c: when resolving the addresses for the same
6214 host returned by gethostname(), get the local IPs from the interface
6215 list. Loopback addresses are discarded if the are interfaces up with
6216 non-loopback ones. Fixes bug #63265.
6218 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
6220 * appdomain.c, verify.c, object-internals.h, reflection.c:
6221 bumped corlib number to 36, and added new extra_flags field
6222 to ReflectionMethodBuilder and friends. Fixes #75060.
6224 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
6226 * gc.c: register a new weak link only if the object is non-null
6229 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
6231 * culture-info.h : short time pattern too.
6233 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
6235 * culture-info.h : expand long time pattern string length.
6237 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
6239 * culture-info-table.h : update (more French date format; #72788).
6241 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
6243 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
6244 the method is static. Fixes #75029.
6246 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
6248 * reflection.c: Update the table_idx field of method builders after
6249 saving the module, since it can change. This is a workaround for
6252 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
6254 * culture-info-table.h : update (additional French date format).
6256 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
6258 * icall.c (ves_icall_type_Equals): Revert last change.
6260 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
6262 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
6264 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
6266 * class-internals.h: Added executioncontext_class field to
6267 MonoDefaults structure.
6268 * domain.c: Cache System.Threading.ExecutionContext class in
6270 * object.c: Capture the ExecutionContext for asynchroneous calls in
6271 mono_async_result_new.
6272 * object-internals.h: Added execution_context and original_context
6273 fields to MonoAsyncResult. Added execution_context to MonoThread.
6274 * security-manager.c|.h: Added mono_get_context_capture_method to
6275 return the capture method (if required by the security manager or by
6276 the framework version used).
6277 * threadpool.c: Apply capture (if present) ExecutionContext in
6278 mono_async_invoke and revert to original context after it completes.
6280 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
6282 * culture-info-table.h : updated (real hacky solution for zh-CHT).
6284 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
6286 * culture-info-table.h : zh-CHT related workaround.
6288 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
6290 * marshal.c (emit_marshal_custom): Add some error checking and call the
6291 methods in the ICustomMarshaler interface. Fixes #74875.
6293 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
6294 native->managed wrappers.
6296 2005-05-12 Martin Baulig <martin@ximian.com>
6298 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
6299 here and use the loader lock.
6301 * mono-debug.c: Properly lock when the debugger is not attached.
6302 (mono_debug_init): Release the initial lock if we're not running
6305 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
6307 * marshal.c (emit_marshal_custom): Pass through NULL values without
6308 calling the custom marshalling routines.
6310 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
6311 conversion in structures. Fixes #74882.
6313 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
6315 * culture-info-table.h : zh-* cultures were missing.
6317 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
6319 * threads.c: Added a new event background_change_event which is signaled
6320 when a thread changes its background mode.
6321 Moved here several checks previously done in managed code. The checks
6322 require the thread lock, and using the thread lock in managed code
6323 can result in deadlocks.
6324 Merged Start_internal and Thread_internal into a single method. Now
6325 Thread_internal does all work of creating and starting a thread.
6326 Added icalls for setting and getting the state of the object. Moved from
6327 managed code to avoid locking there.
6328 Added wait_for_tids_or_state_change() which is called instad of
6329 wait_for_tids when waiting for non-backround threads to end. This method
6330 will return if one of the threads ends or the background_change_event
6332 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
6333 the background mode. This method signals the background_change_event
6336 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
6337 removed Start_internal.
6339 2005-05-11 Martin Baulig <martin@ximian.com>
6341 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
6342 to order of some fields to get proper alignment on 64-bit machines.
6344 2005-05-11 Martin Baulig <martin@ximian.com>
6346 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
6347 changes as they're broken and completely fuck up the debugger.
6349 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
6351 2005-05-10 Martin Baulig <martin@ximian.com>
6353 * reflection.c (mono_reflection_generic_class_initialize): Don't
6354 call mono_class_setup_parent() here.
6356 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6358 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
6359 send/receive timeout use an integer in milliseconds. We were using a
6362 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6365 (internal_get_cultures): reserve the first slot of the array for the
6366 InvariantCulture, which will be filled in managed code.
6368 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
6370 * reflection.c (mono_image_fill_module_table): Initialize the
6371 GENERATION field as well.
6373 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6375 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
6376 Monitor.Enter on the object.
6378 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
6380 * threads.c: Enable the wait for running threads when exiting.
6381 * icall.c: Suspend all threads before exiting.
6383 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
6385 * assembly.c (mono_assembly_load_reference): Fix warning.
6387 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6389 * threadpool.c: changed the default number of threads per cpu. From now
6390 on, the default will be 20 + (5 * number of cpus) instead of 50.
6392 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
6394 * loader.c (mono_method_get_signature_full): Add locking here.
6396 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
6398 * appdomain.c: Moved methods for parsing and freeing assembly
6399 names to assembly.c.
6400 * assembly.c, domain-internals.h: Created public methods for parsing
6401 assembly names. Fixed mono_assembly_load_with_partial_name:
6402 it now finds the best match, taking into account the version,
6403 token and culture specified in the partial name. Also return
6404 the latest version if no version information is specified.
6406 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
6408 * threadpool.c: replace check for SocketAsyncCall class.
6410 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6412 * threadpool-internals.h:
6413 * Makefile.am: added threadpool-internals.h
6415 * threadpool.c: call mono_unhandled_exception on exceptions not handled
6416 that happen in threadpool threads (tested on MS).
6417 (mono_thread_pool_remove_socket): new function that dispatch any pending
6418 AIO call on a socket that is closing. By now only epoll really needs it,
6419 as select/poll wake up when the socket closes.
6422 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
6424 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
6426 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
6428 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
6430 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
6432 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
6434 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
6435 has an abort request, convert it into a suspend request.
6437 2005-04-30 Ben Maurer <bmaurer@ximian.com>
6439 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
6440 warning for the usage of `UnmanagedFunctionPointerAttribute' which
6441 is not supported yet.
6443 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6445 * image.c: register assemblies loaded from data (bundles) in the loaded
6446 assemblies hash. Fixes bug #74772.
6448 2005-04-29 Martin Baulig <martin@ximian.com>
6450 * class.c (mono_type_get_name_recurse): Update to the new naming
6451 schema from the latest .NET 2.x beta2.
6452 (mono_class_setup_vtable_general): If we're a generic instance,
6453 copy the vtable from our generic type definition and inflate all
6456 * loader.c (find_method): Update to the new naming schema from the
6457 latest .NET 2.x beta2.
6459 2005-04-29 Raja R Harinath <harinath@gmail.com>
6461 * class.c (mono_class_init): Add a mono_loader_unlock to the
6464 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
6466 * icall.c (ves_icall_System_Environment_Exit): Remove the
6467 suspend_all_other_threads () call for the time being, since it can hang.
6469 * threads.c (mono_thread_manage): Similarly, disable the waiting for
6470 the background threads to exit, since it can also hang.
6472 * class.c (mono_class_init): Applied patch from Ankit Jain
6473 (radical@gmail.com). Avoid pending init errors when a field refers
6474 to a nested class using a typeref. Fixes #74734.
6476 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
6477 this for dynamic modules.
6479 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6481 * threads.c: don't wait for threads that are in the process of aborting
6482 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
6483 and waiting for background threads to finish. This makes xsp and
6484 mod-mono-server exit without random length delays and/or hangs.
6486 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6488 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
6490 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
6492 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
6493 dynamic types to prevent infinite loops. Fixes #74727.
6495 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
6496 ..._is_assignable_to.
6498 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
6500 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
6502 2005-04-25 Martin Baulig <martin@ximian.com>
6504 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
6507 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
6509 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
6511 * reflection.c (build_compressed_metadata): Set metadata header
6514 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
6516 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
6517 number into an integral and a decimal part. Fixes #70473.
6519 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
6521 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
6523 * culture-info-table.h : reflected the latest locale-builder output.
6525 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6527 * threadpool.c: check for SuspendRequested too when deciding if
6528 mono_thread_interruption_checkpoint should be called.
6530 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6532 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
6533 * threads.c: remove interruption_mutex and use Interlocked instead. When
6534 suspending all the threads, wait for all the suspended events at once.
6535 If we're shutting down and get an APC that is going to be queued,
6536 call mono_thread_execute_interruption immediately, as the thread might
6537 be sleeping on a pthread condition or mutex.
6539 * icall.c: call mono_runtime_set_shutting_down before suspending the
6542 Fixes bug #74693. And now xsp is happier when exiting.
6544 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
6546 * loader.c (mono_stack_walk): Fix #74690.
6548 2005-04-22 Martin Baulig <martin@ximian.com>
6550 * mono-debug.h (MonoDebugMethodJitInfo): Added
6551 `MonoDebugMethodJitInfo *jit'.
6553 * mono-debug.c (mono_debug_read_method): Cache the
6554 MonoDebugMethodJitInfo in `address->jit'.
6555 (mono_debug_free_method_jit_info): New public method.
6557 2005-04-22 Martin Baulig <martin@ximian.com>
6559 * class.c (mono_class_is_assignable_from): Disallow
6560 type parameter -> interface.
6562 2005-04-21 Dick Porter <dick@ximian.com>
6564 * threads.c (mono_thread_create): Turn an assertion into an error.
6566 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
6568 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
6570 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
6571 Fix some gcc 4.0 warnings.
6573 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
6575 * file-io.c: fix alt dir separator char on unix systems
6576 and cleanup (fixes bug #71214).
6578 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
6580 * marshal.c: Use CALLVIRT instead of CALL when dispatching
6581 a call to a remote domain, since the method may be an
6582 interface method in the client domain. This fixes bug #74192.
6584 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6586 * threadpool.c: recv/send are now performed before going back to managed
6587 code to save one transition.
6589 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6591 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
6593 * metadata/threadpool.c: removed hack to workaround the bug above.
6597 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
6599 * reflection.c reflection.h: Fix handling of parameter defaults in
6600 dynamic methods. Also fixes handling of parameter attributes.
6603 * mono-debug.c (mono_debug_close_image): Fix warning.
6605 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6607 * socket-io.h: replaced old unused field with new 'blocking'.
6608 * threadpool.c: restore socket blocking state on windows(tm).
6610 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
6612 * icall.c: don't return the codebase in the AssemblyName[] returned by
6613 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
6614 * object-internals.h: Removed FIXME (fields were presents) and fixed
6615 versioncompat declaration.
6617 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6619 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
6620 not closed, so don't cleanup when it happens.
6622 2005-04-13 Chris Toshok <toshok@ximian.com>
6624 * mono-debug-debugger.h: change prototype for
6625 mono_debugger_lookup_type.
6627 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
6628 this function, although it should probably be named
6629 mono_debugger_init_type.
6631 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6633 * threadpool.c: fix non-AIO case.
6635 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
6637 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
6638 the built-in profiler to measure just JIT compilation times.
6640 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6642 * threadpool.c: the epollfd might be closed by another thread at
6643 any time, so ignore EBADF at treat it as a "we're closing" sign.
6645 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6647 * threadpool.c: release the semaphores with a count equals to the number
6648 of working threads in both IO and regular pools. Fixed typo that messed
6649 up the count of IO pool threads. Don't initialize the pipe handles if
6652 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6654 * threadpool.c: some systems don't like a NULL when deleting the socket
6657 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6659 * threadpool.c: fix semaphore allocation.
6661 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6663 * threadpool.c: added epoll() based implementation for asynchronous IO
6664 that is used instead of the default poll() when available.
6665 It can be disabled by setting MONO_DISABLE_AIO.
6667 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6669 * threadpool.c: windows needs 'closesocket' and instead of returning
6670 0 when the stream is closed while in select, it returns -1. Fixes bug
6673 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
6675 * class.c (class_compute_field_layout): Fix the regression caused by
6678 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6680 * threadpool.c: separate pool for socket async. IO.
6681 * threadpool.h: mono_max_worker_threads is not a global any more.
6683 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
6685 * class.c (class_compute_field_layout): Fix #74549.
6687 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6689 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
6690 use 2 connected sockets instead.
6692 2005-04-08 Miguel de Icaza <miguel@novell.com>
6694 * mono-config.c: Add new entry point for mkbundle
6695 mono_config_parse_memory.
6697 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6699 * threadpool.c: removed another unused function.
6701 2005-04-08 Ankit Jain <radical@corewars.org>
6703 * reflection.c (get_default_param_value_blobs): Add 'types'
6704 parameter to get the types encoded in the constant table.
6705 (mono_param_get_objects): Use the type from the constant table,
6706 not the type of the parameter, when creating default values.
6707 Handle null default values correctly.
6709 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6716 * socket-io.c: removed dead code for async IO.
6718 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6720 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
6722 * threadpool.c: intercept socket async. calls and pass them to a thread
6723 that is polling and dispatching the job items to the threadpool as
6724 socket become ready. Fixes bugs #71217, #71933.
6726 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
6727 between char and short/ushort arrays.
6729 * socket-io.c: remove dead code.
6731 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
6734 icall.c : removed InternalToUpper_Comp() and
6735 InternalToLower_Comp().
6737 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
6739 * char-conversions.h : The tables were incorrectly generated. Should
6740 be generated against invariant culture.
6742 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
6744 * object.c (mono_runtime_invoke_array): Fix return value when
6745 passing pre-created valuetype objects to ctors.
6747 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
6748 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
6751 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
6753 * domain.c: removed g_assert for runtimesecurityframe_class. This is
6754 only used with --security and hides the wrong corlib version error.
6756 2005-03-30 Joshua Tauberer <tauberer@for.net>
6758 * class.c: Changed mono_class_name_from_token so that types
6759 outside of a namespace don't have an initial period. Improved
6760 the g_warning message used in _mono_class_get when loading
6762 * assembly.c: In mono_assembly_load_reference, when an assembly
6763 can't be found, "No such file or directory" is misleading and
6764 unhelpful because a few paths were checked for the presence of
6765 the assembly. When that happens (ENOENT), display a nicer
6766 message indicating the directories that were searched. In all
6767 cases, the warning is made easier to read for non-hackers.
6769 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
6771 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
6773 * appdomain.h|domain.c: Removed inline from functions.
6774 * appdomain.c: Reduced warnings when compiling on windows.
6775 * icall.c: Fixed output_debug declaration to gunichar2*.
6776 * mono-config.c: Reduced warnings when compiling on windows.
6777 * rand.c: Added missing "windows.h". Added missing return value.
6778 * rawbuffer.c: Added missing winsock2.h for windows.
6779 * sysmath.h: Added mono-compiler.h header to allow/ease
6780 compilation with non-GCC compilers.
6781 * threads.c: Fixed declarations to compile with VS.NET C compiler.
6782 Removed cast warnings.
6784 Adapted from the work of J Lothian (for VC6).
6786 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
6788 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
6791 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
6793 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
6796 2005-03-27 Raja R Harinath <harinath@gmail.com>
6798 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
6799 has to be in $(exec_prefix). $(prefix) is for arch-independent
6800 stuff, and it would probably use $(prefix)/share rather than
6803 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6805 * console-io.c: added 2 includes that might be missing.
6807 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
6809 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
6812 * reflection.c (create_custom_attr): Allocate the params array using
6813 alloca so it gets GC tracking.
6815 2005-03-23 Chris Toshok <toshok@ximian.com>
6817 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
6820 2005-03-24 Raja R Harinath <rharinath@novell.com>
6822 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
6823 changes to pick up any changes in prefix, etc.
6825 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
6827 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
6829 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
6830 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
6832 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
6834 * class-internals.h object-internals.h class.c reflection.c: Extend the
6835 mono_lookup_dynamic_token () function to return the class of the
6838 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
6841 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
6843 * security-manager.c: Skip inheritance checks for intra-corlib
6844 class inheritance and method overrides. This skips a lot of checks
6845 and (anyway) permissions cannot work until corlib is loaded.
6847 2005-03-23 Martin Baulig <martin@ximian.com>
6849 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
6850 MONO_TYPE_GENERICINST.
6852 2005-03-23 Martin Baulig <martin@ximian.com>
6854 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
6856 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6858 * class.c: added locking comments to some functions.
6859 Cache the interface offsets arrays (saves about 20 KB
6860 of runtime memory in a typical app).
6861 Reduce the time overhead in mono_class_setup_supertypes ().
6863 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
6865 * icall.c: speedup and fix leaks in GetMethodsByName and
6866 GetPropertiesByName.
6868 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6870 * reflection.c: some locking fixes.
6872 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6874 * metadata.c: added missing break in case statement.
6876 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
6878 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
6879 typedbyref return values. Fixes #73941.
6881 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
6883 * security-manager.c|h: Added demandunmanaged method and
6884 suppressunmanagedcodesecurity class to MonoSecurityManager.
6885 Renamed aptc class to allowpartiallytrustedcallers.
6887 2005-03-17 Martin Baulig <martin@ximian.com>
6889 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
6891 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6893 * file-io.c: disabled file async. IO using aio_*. It uses the
6894 threadpool now. Workaround for bug #73718.
6896 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6898 * assembly.h, mono-config.c: added code to deal with bundled configs
6899 for bundled assemblies.
6901 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
6903 * *.c, private.h: cleanup, removing old private.h header file.
6905 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
6907 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
6908 and throw_on_unmappable_char attributes.
6910 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
6912 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
6913 _ProcessName_internal.
6915 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
6917 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
6920 * icall.c threads.c threads-types.h: Remove slothash icalls as they
6923 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
6925 * object.c (compute_class_bitmap): Add support for generics. Fixes
6928 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
6930 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
6932 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6934 * filewatcher.c: commented out the code for windows watcher, as we don't
6935 use it (we use the managed implementation instead).
6937 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
6939 * object-internals.h (MonoThread): Remove 'unused1' field.
6941 * appdomain.c: Bump corlib version.
6943 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
6945 * reflection.c (mono_reflection_create_runtime_class): Remove the
6946 AssemblyBuilder.Save optimization since it causes too many problems.
6948 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
6950 * exception.c|h: Added mono_get_exception_reflection_type_load to
6951 create a ReflectionTypeLoadException object.
6952 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
6953 to return NULL is a InheritanceDemand fails during reflection. Updated
6954 ves_icall_System_Reflection_Assembly_GetTypes to throw a
6955 ReflectionTypeLoadException if an InheritanceDemand fails during
6956 reflection. Added icall mapping for GetLinkDemandSecurity.
6957 * security-manager.c|h: Added ves_icall_System_Security_
6958 SecurityManager_GetLinkDemandSecurity internal call to return the
6959 class and methods permissions set for a LinkDemand. Removed unused
6960 fields in MonoSecurityManager.
6962 2005-03-10 Martin Baulig <martin@ximian.com>
6964 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
6965 it's a generic instance.
6967 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
6969 * reflection.c (mono_get_object_from_blob): Applied patch from
6970 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
6972 * class.c (mono_class_is_assignable_from): Another try at fixing
6973 #73469 without breaking anything.
6975 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
6977 * class.c: (mono_class_is_assignable_from): Revert the last changes
6978 since they don't work with generics.
6980 * class.c (mono_class_is_assignable_from): Fix build bustage.
6982 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
6983 the managed IsAssignableFrom method. Fixes #73469.
6985 * reflection.c (mono_reflection_call_is_assignable_from): New helper
6988 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
6990 * object.c (mono_load_remote_field_new): Fix returning uninitialized
6991 memory when the remoting callback does not sets the out arguments.
6994 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
6997 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
6999 * object-internals.h (MonoStackFrame): Sync with managed object layout.
7001 * appdomain.c: Bump corlib version.
7003 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
7005 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
7008 * threads.c (mono_thread_attach): Detect threads which are not started
7009 by the GC pthread wrappers.
7011 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
7013 * icall.c: Added new icall for RNG.
7014 * rand.c|h: Added new icall to open the RNG. This allows to share a
7015 single handle on Linux to access /dev/urandom and fix #73183.
7017 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7019 * object.c: setting the new vtable in a transparent proxy object must
7020 not change the GC descriptor.
7022 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7024 * object.c: fixed compilation without GCJ support.
7025 * reflection.c: for runtime-created types ensure klass->has_references
7026 is correct (bug #73215).
7028 2005-03-02 Martin Baulig <martin@ximian.com>
7030 * class.c (mono_class_is_assignable_from): Make this work if
7031 `oklass' is a generic instance; fixes #72831.
7033 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
7035 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
7038 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
7040 * marshal.c: Reorganize native->managed marshalling code to also use
7041 the emit_marshal_... functions.
7043 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
7045 * object.c: typed allocs have issues with bitmap sizes > 30,
7046 so check for max_set >= 30.
7048 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
7050 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
7051 managed code. Fixes #73012.
7053 * metadata.h (MonoMarshalSpec): Add elem_mult field.
7055 * metadata.c reflection.c: Load/Emit elem_mult as well.
7057 * metadata.h (MonoMarshalSpec): Add comment.
7059 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
7061 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
7062 num_elem to -1 if not given.
7064 * object-internals.h (MonoReflectionMarshal): Add has_size field.
7066 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
7069 2005-03-01 Marek Safar <marek.safar@seznam.cz>
7071 * null-gc.c (mono_gc_free_fixed): Was not compilable.
7073 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
7075 * reflection.c (encode_marshal_blob): Encode param_num field as well.
7077 * object-internals.h (MonoReflectionMarshal): Add param_num field.
7079 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
7081 * object.c: generalized the reference bitmap creation
7082 and added hooks for the new GC.
7083 * class-internals.c: removed the gc_bitmap field from MonoClass.
7085 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7087 * domain.c: help the compiler to produce better code
7088 in mono_jit_info_table_find ().
7090 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
7092 * object.c: make all allocations look typed.
7094 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7096 * socket-io.c: load Mono.Posix if it's not loaded already
7099 2005-02-24 Martin Baulig <martin@ximian.com>
7101 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
7102 * reflection.c (dup_type): Likewise.
7104 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
7106 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
7107 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
7109 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7111 * domain.c, threads.c, object-internals.h: make the critical thread
7112 local vars use the fast access mode (even when we're compiled in
7113 a lib). Provide accessors to be used by the jit during codegen.
7115 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7117 * appdomain.c: Changed hook functios behavior to include
7118 support for the reflection only assemblies. Some icalls were changed
7119 to support the mentioned assemblies too. Signatures of static methods
7120 try_assembly_resolve and real_load now have an additional parameter:
7123 * assembly.c: General changes to mono_assembly_ methods to support
7124 reflection only api. Functions mono_assembly_open, mono_assembly_load,
7125 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
7126 suffix, to support an additional gbool parameter to specify whether
7127 the assembli is reflection only or not. Created some new hook functions
7128 to add support for reflection only assemblies. Signatures of static
7129 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
7130 have now an additional parameter: refonly.
7132 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
7133 indicating whether the assembly is reflection only or not.
7135 * exception.c: Add mono_get_exception_invalid_operation.
7137 * icall.c: Throw an InvalidOperationException when trying to invoke
7138 a property/method/event, or trying to set/get the value of a field.
7139 Also add an icall to retrieve the ref_only flag to the
7140 MonoReflectionAssembly.
7142 2005-02-23 Chris Toshok <toshok@ximian.com>
7144 Part of fix for #72827.
7145 * mono-debug.c (mono_debug_add_method): add lexical block data to
7146 the info we write. Kind of a hack at the moment - we copy the
7147 lexical block info from the MonoDebugMethodInfo to the
7148 MonoDebugMethodJitInfo here, before writing it.
7149 (mono_debug_read_method): read the lexical block info.
7151 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
7153 * debug-mono-symfile.h: add lexical block support.
7155 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
7158 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
7160 * loader.c (mono_lookup_pinvoke_call): Fix warning.
7162 * object.c (mono_runtime_free_method): Call mono_free_method () and
7163 put the TODOs there.
7165 * loader.c (mono_free_method): Free up most memory allocated for
7168 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7170 * reflection.c: properly flag a Type argument to a
7171 named custom attr value (bug #72248).
7173 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7175 * reflection.c: reduce code duplication in named custom
7178 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
7180 * reflection.c: properly encode custom attrs of type object
7183 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
7185 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
7187 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
7189 * socket-io.c: load System.dll if it's not loaded already
7190 (bug #72850 and #70477).
7192 2005-02-21 Martin Baulig <martin@ximian.com>
7194 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
7197 2005-02-21 Martin Baulig <martin@ximian.com>
7199 * reflection.c (mono_image_build_metadata): We also need to
7200 "fixup" the MethodImpl table after we computed the final method
7201 indices. Call fixup_methodimpl() to do that.
7202 (fixup_methodimpl): New private method.
7204 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
7206 * assembly.c: special case mscorlib.dll (bug#72536),
7207 patch from Carlos Alberto Cortez.
7209 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
7211 * threads-types.h threads.c: Fix build bustage.
7213 * threads.c: Use a union for long<->double conversions.
7215 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
7216 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
7218 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
7219 containing the checkpoint call with NOT_TAKEN.
7221 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
7222 checkpoint before pushing the arguments, so they won't have to be
7225 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7227 * domain.c, assembly.c, domain-internals.h: make some data
7228 const and relocation-free.
7230 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
7232 * object.c, appdomain.c, class-internals.h: introduce the
7233 MonoClassRuntimeInfo structure to hold the info needed to
7234 use a class at runtime. Made mono_class_vtable() lock-free
7235 for all the appdomains.
7237 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
7239 * metadata-internals.h, image.c: introduce a per-image mempool to
7240 be used for memory that has the same lifetime as the image.
7242 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
7244 * domain.c: In mono_init_internal(), instead of selecting the first
7245 runtime version supported by an executable, get a list of all
7246 supported versions and select the one for which an mscorlib exists
7247 (since even if the runtime supports a given version, it doesn't mean
7248 that the framework for that version is installed).
7249 Modified get_runtimes_from_exe to support this behavior.
7250 In supported_runtimes, added information about additional system
7253 * assembly.c: Added support for more than one system assembly version
7254 per runtime version. Updated the assembly list.
7255 In mono_assembly_remap_version, removed the initial version check,
7256 since we don't know to which version we need to compare until we
7257 get the version set on which the assembly is based.
7258 Moved the code for loading corlib into the new method
7259 mono_assembly_load_corlib(), so it can be used by the initialization
7262 * domain-internals.h: Updated data structures and added declaration
7263 for mono_assembly_load_corlib.
7265 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
7267 * reflection.c (resolve_object): Fix the creation of the signature in
7268 the SignatureHelper case.
7270 * assembly.c (mono_assembly_remap_version): Fix binary search.
7272 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
7274 * class.c: Added inheritance check when a method is overloaded (from a
7275 virtual method or when implementing an interface) and when a class is
7276 inherited. Added functions to set a failure for a class and to
7277 retreive the exception from a failure.
7278 * class-internals.h: Added fields to MonoClass to keep the exception
7279 information status for inheritance (or other exceptions) to be thrown
7280 later (i.e. not at load time).
7281 * object.c: Throw the inheritance SecurityException when a type is to
7282 be created with either class or method inheritance violations.
7283 * reflection.c|h: Fix when getting declsec from a class. Removed
7284 unrequired code for class. Improved sanity in parameter naming.
7285 * security-manager.c|h: Added functions to check for class and method
7288 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
7290 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
7291 and has_finalize in dynamic types as well.
7293 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
7295 * culture-info-table.h : fixed currency format for en-GB (and so on).
7297 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
7299 * gc.c: ensure the GC handles never have 0 as a value.
7301 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
7303 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
7304 a pointer to a struct to unmanaged code. Fixes #72625.
7306 2005-02-16 Martin Baulig <martin@ximian.com>
7308 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
7310 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
7312 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
7314 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
7316 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
7318 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
7319 UnmanagedFunctionPointerAttribute, use it for determining calling convention
7322 * reflection.c (mono_custom_attrs_get_attr): New helper function.
7324 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
7326 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
7328 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
7329 changes to make the current context a field in MonoThread.
7331 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
7333 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
7336 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
7337 extracted from mono_marshal_get_native_wrapper.
7339 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
7340 to create wrappers around native functions.
7342 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
7343 delegates for arbitrary function pointers. Fixes #71472.
7345 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
7347 * threads.c: cleaned up the code a little.
7349 2005-02-15 Martin Baulig <martin@ximian.com>
7351 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
7354 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
7355 allocate larger chunks if needed.
7357 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
7359 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
7362 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
7364 * domain.c: keep the domains in an array and ensure the domain ids
7365 are kept small, so they can be used as indexes to domain-specific data
7366 with a small memory overhead.
7368 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
7370 * icall.c: Handle byref types in Type icalls. Fixes #72544.
7372 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
7374 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
7376 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
7378 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
7380 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
7383 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
7385 2005-02-12 Ben Maurer <bmaurer@ximian.com>
7387 * domain-internals.h: add the hashtable here.
7389 * class-internals.h: Remove `info' from MonoMethod
7391 * domain.c: Add a new hashtable, jit_trampoline_hash
7393 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7395 * object.c: don't set the value of static fields
7398 2005-02-11 Martin Baulig <martin@ximian.com>
7400 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
7401 (mono_debug_add_method): Silently ignore the method if it's too big.
7402 (mono_debug_add_type): Likewise.
7404 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
7406 * threads.c, appdomain.c: remove #ifdefs from the code.
7408 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
7410 * metadata-internals.h: Added flags to MonoAssembly to cache the most
7411 common security informations. This allows us to stay in unmanaged code
7412 when doing LinkDemand and it's special cases (except for the first
7413 time for initialization). The flags a very much used with --security.
7414 * reflection.c|h: Added code to get declarative security attributes
7415 for LinkDemand and InheritanceDemand. This required to refactor the
7416 existing code for Demand.
7417 * security-manager.c|h: Added new method fields for the special cases
7420 2005-02-10 Martin Baulig <martin@ximian.com>
7422 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
7423 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
7425 2005-02-10 Martin Baulig <martin@ximian.com>
7427 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
7428 debugging code; this is almost a complete rewrite.
7430 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
7432 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7434 * domain.c, object.h: expose mono_string_equal () and
7435 mono_string_hash ().
7436 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
7437 it's implemented in managed code.
7439 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7441 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
7442 lo leak objects between appdomains.
7444 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7446 * assembly.c: old compilers compilation fix from
7447 robertj@gmx.net (Robert Jordan).
7449 2005-02-09 Ben Maurer <bmaurer@ximian.com>
7451 * class-internals.h: Little reminder for the future.
7453 * debug-helpers.c: Fix up wrapper_type_names
7455 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7457 * image.c, metadata-internals.h: when loading an image from a file,
7458 mmap all of it and use the same codepaths as when using a
7459 in-memory image: the code is simpler and we use less memory
7460 (both writable and readonly).
7462 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
7464 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
7465 API to alloc runtime data structures that need to be tracked by the
7466 GC and contain pointers.
7467 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
7468 make the code more readable and eventually use a different GC.
7470 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
7472 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
7475 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
7477 * object.c: In release_type_locks(), don't release the cctor lock
7478 if it has already been released. This fixes a crash in the
7481 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7483 * gc.c, marshal.c, icall.c: register a delegate for finalization
7484 only when the native function pointer has been allocated for it.
7486 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7488 * object.c: cleaned up some code, allocate objects that are
7489 pointer free with the atomic malloc variant. Allocate memory
7490 for static data from the mempool if it's pointer-free.
7491 Allocate the bounds array at the end of the array data, when needed.
7492 * object-internals.h, object.h: move a private function in a private
7494 * class.c: handle missing case in tracking references in fields.
7496 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
7498 * class.c, class-internals.h: keep track if a type has
7499 reference fields in either the instance or static fields.
7501 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
7503 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
7504 and renamed to MonoRuntimeInfo. Added fields to store the expected
7505 framework assembly version. Changed mono_get_framework_version and
7506 mono_get_runtime_version for a single mono_get_runtime_info method.
7508 * assembly.c: Added method to remap system assembly versions to the
7509 current executing runtime version. Removed old mapping code.
7510 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
7512 * icall.c, reflection.c: Track api changes.
7514 2005-02-06 Miguel de Icaza <miguel@novell.com>
7516 * loader.c (method_from_memberref): Improve error reporting,
7517 produce the class name instead of the typeref/typedef index.
7519 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
7521 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
7523 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
7525 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
7526 stdcall and charset name mangling. Reorganize the code and add
7529 2005-02-05 Ben Maurer <bmaurer@ximian.com>
7531 * monodiet.c: More iters!
7533 * marshal.c: Iter usage.
7535 * icall.c: Iter usage.
7537 * object.c: Use iters.
7539 * debug-helpers.c: More iters
7541 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
7543 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
7546 2005-02-05 Ben Maurer <bmaurer@ximian.com>
7548 * mono-debug-debugger.c: use iters
7550 * class.c, class-internals.h: mono_class_setup_events is static
7553 * All callers: use iters
7555 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
7557 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
7558 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
7560 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
7562 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
7564 * marshal.h: Add prototypes for ldfld/stfld_remote.
7566 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
7567 this is called during startup.
7569 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
7571 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
7572 MonoThreadsSync struct private in monitor.c. Changed the way
7573 MonoThreadsSync is allocated so it's faster and there is no
7574 need to keep track of it with a finalizer and it uses less memory.
7575 This also finally allows us to allocate mono objects as ptrfree when
7576 there are no reference fields.
7578 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
7580 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
7581 disappearing link to the GC interface and use them to simplify
7584 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
7586 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
7587 stfld_remote which call mono_load/store_field_new. This allows methods
7588 calling ldfld/stfld wrappers to be AOTed.
7590 * console-io.c: Include sys/filio.h under solaris.
7592 * console-io.c: Include curses.h if needed correctly.
7594 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
7596 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
7597 method->klass as well.
7599 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
7601 * class.c (mono_class_init): Switch on lazy initialization of
7604 * class.c (mono_class_get_finalizer): Handle the case when the
7605 finalizer is inherited.
7607 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7609 * console-io.c: <curses.h> is needed by term.h on solaris.
7611 2005-02-03 Ben Maurer <bmaurer@ximian.com>
7613 * icall.c, class-internals.h, monodiet.c, class.c: Remove
7614 mono_class_setup_properties where possible. Remove this ftn from
7615 the header file, and make it static.
7617 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
7619 * loader.c: Add missing setup_... call.
7621 * class.c: Add missing setup_... calls.
7623 * class.c (mono_class_init): Switch on lazy initialization of
7626 * class.c (mono_class_init): Fix generics broken by the recent changes.
7628 * monodiet.c (handle_type): Add missing setup_... calls.
7630 * class.c: Back out garbage in previous patch.
7632 * class.c: Add missing setup_... calls.
7634 * class.c (mono_class_get_method_from_name_flags): Avoid calling
7635 mono_class_setup_methods () if possible.
7637 * class-internals.h (MonoClass): Add 'has_cctor' flag.
7639 * class-internals.h (MonoCachedClassInfo): New structure.
7641 * class.c: Initialize properties and events fields of MonoClass lazily.
7643 * class.c: Add infrastructure for lazily initializing the methods and
7644 vtable fields of MonoClass. Not yet used.
7646 * class.c (mono_class_get_finalizer): New helper function.
7648 * class.c: Add infrastructure for loading some class related data from
7651 * object.c: Add infrastructure for initializing the vtable from data
7654 * gc.c (run_finalize): Use mono_class_get_finalizer ().
7656 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
7657 appropriate initialization function before accessing parts of the
7658 MonoClass structure.
7660 * marshal.c: Fix warnings.
7662 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
7664 * mono-debug-debugger.c (get_exception_message): Use
7665 mono_class_get_method_from_name_flags ().
7667 2005-02-02 Ben Maurer <bmaurer@ximian.com>
7669 * reflection.c, appdomain.c: Replace a few manual searches that
7670 Zoltan missed. (Paolo approved this part of my initial patch).
7672 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
7674 * profiler.c: disable recording statistical events at report time.
7676 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7678 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
7679 to byteswap arrays of enum values, too (bug #72080).
7681 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
7683 * appdomain.c (set_domain_search_path): Allow this to be called if
7684 domain->setup is not yet set.
7686 * loader.c (mono_method_get_index): New helper function.
7688 * loader.c reflection.c: Use mono_method_get_index ().
7690 * class.c (mono_class_get_method_from_name_flags): New helper method.
7692 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
7695 * class.c (mono_class_get_cctor): New helper method.
7697 * string-icalls.c object.c class.c marshal.c reflection.c: Use
7698 mono_class_get_method () to look up methods.
7700 2005-02-01 Miguel de Icaza <miguel@novell.com>
7702 * console-io.c: Fix the build, this should work on Windows.
7704 2005-01-31 Ben Maurer <bmaurer@ximian.com>
7706 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
7707 be set to null to keep things valid
7709 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7711 * icall.c: added Console 2.0 icalls.
7712 * Makefile.am: added console-io.[ch]
7713 * console-io.[ch]: internal calls for Console 2.0 API.
7715 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7717 * class.c: make sure we consider all the interfaces
7718 when calculating max_interface_id (bug found by
7719 Jeroen Frijters running ikvm).
7721 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
7723 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
7724 valuetype fields to null.
7726 * object.c (set_value): Ditto. Fixes #71669.
7728 2005-01-31 Martin Baulig <martin@ximian.com>
7730 * metadata.c (mono_metadata_has_generic_params): New public
7731 function; checks whether something is a generic method.
7733 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7735 * appdomain.c: fix infinite recursion when adding assemblies.
7737 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
7739 * object.c: Fix small typo to return all items for Environment.
7742 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7744 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
7745 reflection.c: more domain and assembly-unload related fixes
7746 and memory leaks plugs.
7748 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
7750 * 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.
7752 2005-01-29 Ben Maurer <bmaurer@ximian.com>
7754 * loader.c (mono_method_signature): Make this method lazy
7755 (mono_get_method_from_token): Don't computate the signature here.
7757 Doing this saves quite a bit of memory. I got 90 kb on starting up
7758 monodoc. It should also save some disk reads on startup.
7760 * *: MonoMethod->signature might be NULL now. You *MUST* use
7761 mono_method_signature.
7763 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
7765 * object.c (mono_runtime_get_main_args): Return an array from the
7766 current domain here. Fixes #71938.
7768 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
7770 * monitor.c: formatting changes to comply with the
7771 mono coding style and remove #ifdefs from the code.
7773 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
7775 * metadata.c, private.h: remove some unneeded data
7776 and use a more compact representation for table schemas.
7778 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
7780 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
7781 to get a better distribution in hash tables.
7782 * *.c: use mono_aligned_addr_hash() where appropriate.
7783 * assembly.c: make var static.
7785 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
7787 * domain-internals.h: Put MonoJitInfo on a diet.
7789 * domain.c: Fix a warning.
7791 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7793 * gc.c: rework the gc handles code to reuse handles
7796 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
7798 * domain.c: fixed long standing bug in mono_string_equal() which
7799 was brought to light with the ldstr changes.
7801 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
7803 * reflection.c: Remove warning by adding missing include for marshal.h
7805 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7807 * domain.c, object.c: change the ldstr_table to hold
7808 MonoString* as keys: makes the runtime isinterned lookup
7809 faster and simplifies memory management.
7811 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
7813 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
7814 possible to add imperative security checks before calling the icall.
7815 * reflection.c: Return security attributes on the original MonoMethod
7816 (and not the wrapped one). This fix permissions on icalls.
7818 2005-01-25 Dick Porter <dick@ximian.com>
7820 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
7821 the check for mktime() support actually test the mktime() return
7822 value. "Fixes" bug 71682, though the output is still different to
7825 2005-01-25 Martin Baulig <martin@ximian.com>
7827 * class.c (mono_class_is_assignable_from): Make this work for
7830 2005-01-24 Ben Maurer <bmaurer@ximian.com>
7832 * marshal.c (mono_string_utf8_to_builder)
7833 (mono_string_builder_to_utf16): We might not have ownership of the
7834 string. In thise case, we need to create a new buffer.
7836 * object-internals.h (mono_stringbuilder_capacity): sb->str might
7837 be null, in which case, use the default capacity.
7839 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7841 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
7842 GC events to the profiler.
7844 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
7846 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
7847 if you don't want the GC to run.
7849 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
7851 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
7852 start providing a GC API and keeping different implementations in
7854 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
7856 2005-01-22 Ben Maurer <bmaurer@ximian.com>
7858 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
7859 mmap rather than allocating a huge buffer.
7860 (mono_debug_close_mono_symbol_file): Free the buffer allocated
7863 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
7865 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
7866 and CheckExecutionRights.
7867 * reflection.c|h: Keep the index of the declarative security to be
7868 used, instead of the pointer, when AOT compiler is used. Also add
7869 class initialization when requesting demands.
7870 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
7871 CheckExecutionRights. Both properties are now FALSE by default, and
7872 unmodifiable, unless the --security option is used.
7874 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7876 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
7877 reflection.c: properly refcount images and assemblies, many leaks fixed.
7879 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7881 * threadpool.c: increase the timeout for threads in the thread pool to
7882 10s. Fixes bug #67159.
7884 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
7886 * class-internals.h: Sun's compiler insists on explicit
7887 signed on bit fields to handle then correctly.
7889 2005-01-19 Miguel de Icaza <miguel@ximian.com>
7891 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
7892 Make the size of the array fit only the number of invalid path
7895 * class.c (_mono_class_get): Improve the error reporting when a
7896 class referenced is not found, to assist debugging.
7898 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
7900 * threads.c: fix off-by-one error.
7901 * domain.c: free data allocated in the domain.
7903 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
7905 * reflection.c (mono_method_body_get_object): Fill out exception info
7908 * object-internals.h: Add MonoReflectionExceptionHandlingClause
7911 2005-01-19 Martin Baulig <martin@ximian.com>
7913 * loader.c (mono_get_method_constrained): Make this work again.
7915 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
7917 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
7918 guint16 to match the managed side.
7920 * reflection.c (mono_reflection_body_get_object): Fill out local
7923 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
7926 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
7927 'local_var_sig_token'.
7929 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
7931 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
7934 * reflection.c (mono_method_body_get_object): Handle abstract and
7937 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
7939 * marshal.c, loader.c, class-internals.h, reflection.c:
7940 store the emthod data for a wrapper in an array instead of a list.
7942 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
7944 * marshal.c: change the code to allocate memory more
7945 conservatively for method wrappers.
7947 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7949 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
7950 fields from MonoClass to the marshal info structure where they belong.
7952 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7954 * class.c, object.c, class-internals.h, marshal.c: rearrange
7955 some fields and tweak some types to lower memory usage.
7957 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
7959 * threads.c (signal_thread_state_change): Handle the case when the
7960 target thread is the current thread.
7962 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
7964 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
7965 emit_ptr_to_object_conv.
7967 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
7968 marshalling. Fixes #71352.
7970 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7972 * metadata.h, blob.h: move table enum to blob.h so it can be included
7974 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
7975 cut the size of MonoImage/MonoDynamicImage.
7977 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
7979 * profiler.c (mono_profiler_install_simple): Fix default arguments.
7981 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7983 * reflection.c, reflection.h, icall.c: add a function to check
7984 if an attribute type is defined for a metadata object.
7986 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
7988 * object-internals.h: Added some needed fields from StringBuilder class.
7989 * marshal.c: Set the maxCapacity when creating a StringBuilder.
7991 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
7993 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
7994 threads before shutting down the runtime.
7996 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
7998 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8000 * object-internal.h, threads.c: implement stacksize and
8001 parameterized thread start functionality (requires
8002 matching corlib). Marked broken code for later removal.
8004 2005-01-12 Martin Baulig <martin@ximian.com>
8006 * class-internals.h (MonoGenericClass): Moved the `initialized'
8007 flag to MonoDynamicGenericClass, removed `init_pending'.
8008 (MonoGenericInst): Added `is_reference' flag.
8010 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
8012 * reflection.c (mono_image_create_pefile): Only set the pe_offset
8013 inside the MSDOS header. Fixes #71201.
8015 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
8017 (mono_domain_finalize): Ditto.
8019 2005-01-12 Martin Baulig <martin@ximian.com>
8021 * class.c (mono_get_shared_generic_class): Use the cache for
8022 non-dynamic generic classes.
8024 * class-internals.h (mono_class_create_generic_2): Removed
8025 function prototype, this function is now static inside class.c.
8027 * class.c (mono_class_create_generic_2): Made this static, only
8028 call it from mono_class_init() and mono_class_setup_parent().
8029 (collect_implemented_interfaces_aux): Call mono_class_init() on
8030 the interfaces we collect.
8031 (mono_class_setup_vtable): Call mono_class_init (class->parent).
8033 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
8035 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
8036 it a real thread handle.
8038 * domain-internals.h: Move exvar_offset from MonoJitInfo to
8039 MonoJitExceptionInfo, since each catch clause needs its own variable.
8041 2005-01-11 Dick Porter <dick@ximian.com>
8043 * image.c (mono_pe_file_open): New variant on mono_image_open()
8044 that does not set up the CLI metadata; used for FileVersionInfo so
8045 it can get the data for windows binaries too.
8047 * process.c (process_read_string_block): Don't read off the end of
8048 the StringTable block.
8050 These both fix bug 70766.
8052 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
8054 * gc.c: set some fields to NULL at GC cleanup time.
8055 * threads.c: if we quit the main thread, call exit ().
8057 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
8059 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
8061 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
8063 * threads.h, threads.c, object.c: added accessor and settor for
8064 main_thread. Handle it specially when exiting from it: wait
8065 for other foreground threads to exit.
8067 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8069 * process.c, verify.c: remove some bloat.
8071 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
8073 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
8074 the calling convention to cdecl under win32.
8076 2005-01-08 Ben Maurer <bmaurer@ximian.com>
8078 * object.c (mono_object_get_size): New function to get the size of
8081 * profiler.c (simple_allocation): Use above.
8083 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
8085 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
8086 ves_icall_System_AppDomain_getRootDomain (as it's not required to
8087 get an appdomain by it's id and we can't assume the root's id is 0).
8088 * domain-internals.h: Change the function prototype to match.
8089 * icall.c: Change the icall table for AppDomain.
8091 2005-01-08 Miguel de Icaza <miguel@ximian.com>
8093 * locales.c (string_invariant_compare_char): Only compute
8094 GUnicodeTypes in the case where we need them. Test for ordinality
8095 first and return if so.
8100 * FIXME: here we must use the information from c1type and c2type
8101 * to find out the proper collation, even on the InvariantCulture, the
8102 * sorting is not done by computing the unicode values, but their
8103 * actual sort order.
8106 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8108 * loader.c: for P/Invoke methods, allow the "Internal" shared
8109 library name to refer to the calling process symbol namespace.
8111 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
8113 * Makefile.am: Add the security manager to the build.
8114 * security-manager.c|h: New. Initialization of the security manager.
8116 2005-01-07 Dick Porter <dick@ximian.com>
8119 * monitor.c: Update thread state during Monitor and WaitHandle
8120 waits. Fixes bug 71031.
8122 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
8124 * reflection.c (property_encode_signature): Correctly handle when the
8125 property has no methods.
8127 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
8129 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
8131 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
8132 fields from mb, not rmb. Fixes #71017.
8134 * marshal.c (emit_ptr_to_str_conv): Add support for
8135 ByValTStr -> string conversion. Fixes #71015.
8137 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
8139 * mempool.c (mono_mempool_contains_addr): New helper function.
8141 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
8143 * metadata.c (mono_metadata_compute_size): Fix size calculation of
8144 HasSematics encoded fields.
8146 * metadata.c (mono_type_to_unmanaged): Improve error message for
8147 invalid string marshalling.
8149 * metadata.c: Fix warnings.
8151 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8153 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
8156 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
8158 * domain.c object.c domain-internals.h: Revert part of r38077 since the
8159 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
8162 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
8164 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
8165 so methods containing these can be AOTed.
8167 2005-01-03 Martin Baulig <martin@ximian.com>
8169 * loader.c (find_method): Removed the hack for generic instances.
8170 (method_from_memberref): If our parent is a generic instance, pass
8171 its generic type definition to find_method() and then inflate the
8173 (mono_get_method_constrained): Pass the generic type definition to
8174 find_method() and inflate the method later.
8176 * class-internals.h (MonoStats): Added `generic_class_count'.
8178 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
8179 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
8181 * reflection.c (mono_custom_attrs_from_params): Don't ignore
8182 generic type definitions.
8184 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
8186 * loader.c icall.c: Fix warnings.
8188 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
8190 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
8191 blittable types. Fixes #70864.
8193 2004-12-29 Martin Baulig <martin@ximian.com>
8196 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
8198 * reflection.c (mono_method_get_object): Create a
8199 "System.Reflection.MonoGenericMethod" for inflated methods; don't
8200 call mono_get_inflated_method().
8202 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
8204 2004-12-27 Martin Baulig <martin@ximian.com>
8206 * class-internals.h (MonoMethod): Added `is_inflated' flag.
8207 (MonoMethodInflated): Added `inflated' field.
8209 * class.c (mono_class_inflate_generic_method): Don't really
8210 inflate the method here; just set the `is_inflated' flag in the
8212 (mono_class_get_inflated_method): Actually inflate the method here
8213 if it's not already inflated; we use the MonoMethodInflated's new
8214 `inflated' field as a cache.
8216 2004-12-26 Martin Baulig <martin@ximian.com>
8219 (inflate_generic_class): Moved some code out of inflate_generic_type().
8220 (mono_class_inflate_generic_method): If we're already inflated,
8221 inflate the context and use the declaring method; ie. make sure
8222 the declaring method of an inflated method is always the generic
8224 (mono_class_create_from_typedef): Create
8225 `class->generic_container->context->gclass'.
8227 2004-12-24 Ben Maurer <bmaurer@ximian.com>
8229 * metadata-internals.h, marshal.c, reflection.c: More
8230 MonoGHashTable->GHashTable.
8232 * domain-internals.h, class.c: Change MonoGHashTable's into
8233 GHashTables for some cases where no gc stuff is used
8235 All users: update apis
8237 2004-12-23 Ben Maurer <bmaurer@ximian.com>
8239 * metadata.c (builtin_types): Make this `const'. Makes this get
8240 put into the shareable section.
8241 (mono_metadata_init): Casts to make gcc happy.
8243 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
8245 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
8247 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
8249 * icall.c: Added an internal call to retrieve the position and length
8250 of assembly-level declarative security attributes (RequestMinimum,
8251 RequestOptional and RequestRefuse). This is used by the Assembly class
8252 to re-create the corresponding permission sets.
8254 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
8256 * marshal.c: fix the stelemref wrapper to be type correct
8259 2004-12-20 Ben Maurer <bmaurer@ximian.com>
8261 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
8262 to do key & 0x7fffffff. Hashtable already does this. It just
8263 results in longer code.
8265 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
8267 * appdomain.c: Bump corlib version.
8268 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
8269 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
8270 * reflection.c|h: Add functions to get declarative security infos
8271 (blob position and length) for assemblies, classes and methods.
8273 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
8275 * reflection.c: sort the constant table (bug #70693).
8277 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
8279 * object-internals.h, threads.c, domain.c: add accessors for
8280 the MonoThread and MonoDomain tls keys.
8282 2004-12-18 Martin Baulig <martin@ximian.com>
8284 * class.c (inflate_generic_type): If we're inflating a generic
8285 instance, set `ngclass->context->container = context->container';
8286 ie. the container we inflated into.
8288 * metadata.c (mono_metadata_parse_generic_param): Reflect above
8289 inflate_generic_type() changes.
8291 2004-12-17 Martin Baulig <martin@ximian.com>
8294 (MonoGenericClass): Replaced `MonoType *generic_type' with
8295 `MonoClass *generic_class'. Removed `dynamic_info'; if
8296 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
8297 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
8299 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
8301 * exception.c (mono_exception_from_token): New helper function.
8303 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
8305 * assembly.c (mono_assembly_load_with_partial_name): Call
8306 mono_assembly_loaded before invoking the preload hooks. Fixes
8309 * object-internals.h (MonoThread): Change culture_info and
8310 ui_culture_info into an array.
8312 * threads.c: Cache culture info objects from more than one appdomain.
8314 * threads.c threads-types.h icall.c: Add icalls for manipulating the
8317 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
8319 * threads.h threads.c appdomain.c: Clear the culture_info field of
8320 all threads during unloading if they point to an object in the dying
8323 2004-12-13 Ben Maurer <bmaurer@ximian.com>
8325 * culture-info.h (TextInfoEntry): New struct
8326 * object-internals.h: sync with managed
8327 * locales.c: fill the `text_info_data' field
8328 * culture-info-tables.h: update
8330 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
8332 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
8335 2004-12-12 Ben Maurer <bmaurer@ximian.com>
8337 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
8338 (ves_icall_ModuleBuilder_getMethodToken): Ditto
8340 2004-12-12 Martin Baulig <martin@ximian.com>
8342 * mono-debug-debugger.c (write_type): If we're an enum and the
8343 builtin types have already been initialized, call mono_class_init().
8345 2004-12-11 Martin Baulig <martin@ximian.com>
8347 * metadata.c (mono_metadata_load_generic_params): Added
8348 `MonoGenericContainer *parent_container' argument; automatically
8349 compute `container->is_method'; pass the correct owner to
8352 * reflection.c (compare_genericparam): Sort the GenericParam table
8353 according to increasing owners.
8355 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
8357 * profiler.c: allow disabling the default profiler.
8359 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
8361 * decimal.c, icall.c: allow disabling System.Decimal support.
8363 2004-12-09 Marek Safar <marek.safar@seznam.cz>
8365 * reflection.c: Add support for null attribute arguments.
8367 2004-12-09 Martin Baulig <martin@ximian.com>
8369 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
8370 names to get rid of compiler warnings.
8372 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
8374 * marshal.c (mono_marshal_get_struct_to_ptr): Call
8375 mono_marshal_load_type_info (). Fixes #69625.
8376 (mono_marshal_get_ptr_to_struct): Likewise.
8378 2004-12-08 Martin Baulig <martin@ximian.com>
8380 * mono-debug.h: Bumped version number to 47.
8382 * mono-debug-debugger.c
8383 (mono_debugger_event_handler, mono_debugger_event): Take two
8384 guint64 arguments insteed of a gpointer and a guint32.
8386 2004-12-08 Martin Baulig <martin@ximian.com>
8388 * debug-mono-symfile.h
8389 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
8390 `address' to `native_offset'.
8392 2004-12-08 Martin Baulig <martin@ximian.com>
8394 * class.c (mono_class_create_from_typespec): Only inflate if we
8395 either have `context->gclass' or `context->gmethod'.
8397 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
8399 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
8401 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
8403 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
8405 * reflection.c (mono_assembly_get_object): Remove the workaround put
8408 * appdomain.c: Use the corlib_internal field from MonoAssembly.
8410 * appdomain.c: Bump corlib version.
8412 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
8413 be visible in other appdomains.
8415 2004-12-07 Ben Maurer <bmaurer@ximian.com>
8417 * threads.c: Interlocked inc and dec for longs were messed up,
8418 use a KISS based impl for this. Fixes 70234
8420 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
8422 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
8424 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
8426 * icall.c: fix to follow policy not to allow struct
8427 arguments in icalls.
8429 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8431 * process.c: make the patch that handles spaces in file paths work
8432 on mono/windows too.
8434 2004-12-06 Martin Baulig <martin@ximian.com>
8436 * class.c (mono_class_create_generic): Call
8437 mono_class_setup_supertypes() if we're dynamic.
8438 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
8440 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
8442 * object-internals.h: Add new fields to MonoThread.
8444 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8446 * icall.c threads-types.h threads.c: Add new icalls.
8448 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
8450 * object-internals.h (MonoReflectionAssembly): Sync object layout with
8453 * appdomain.c: Bump corlib version.
8455 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
8456 internal assemblies. Fixes #69181.
8458 2004-12-05 Martin Baulig <martin@ximian.com>
8460 * class.c (mono_class_inflate_generic_signature): Make this a
8461 no-op if `context' is NULL or we don't have any type parameters;
8462 also copy `sentinelpos'.
8464 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
8466 * image.c: Add unbox_wrapper_cache.
8468 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
8470 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
8473 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
8476 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
8478 2004-12-04 Martin Baulig <martin@ximian.com>
8480 * loader.c (mono_method_get_signature_full): New public function;
8481 like mono_method_get_signature(), but with an additional
8482 `MonoGenericContext *' argument.
8484 * class.c (mono_class_inflate_generic_signature): Formerly known
8485 as inflate_generic_signature(); make this public.
8487 2004-12-04 Martin Baulig <martin@ximian.com>
8490 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
8491 instead of a `MonoGenericContainer *'.
8492 (mono_metadata_parse_array_full): Likewise.
8493 (mono_metadata_parse_signature_full): Likewise.
8494 (mono_metadata_parse_method_signature_full): Likewise.
8495 (mono_metadata_parse_generic_inst): Likewise.
8496 (mono_metadata_parse_generic_param): Likewise.
8497 (mono_metadata_parse_mh_full): Likewise.
8498 (mono_type_create_from_typespec_full): Likewise.
8500 2004-12-03 Martin Baulig <martin@ximian.com>
8502 * class-internals.h (MonoGenericContainer): Replaced the
8503 `MonoGenericContext * pointer with a `MonoGenericContext'
8504 structure and made it the first element.
8506 2004-12-03 Martin Baulig <martin@ximian.com>
8509 (inflate_generic_type): Set the `context->container' when creating
8510 a new MonoGenericContext.
8511 (mono_class_inflate_generic_method): Likewise.
8512 (mono_class_create_from_typespec): Just use `context->container'
8513 to get the container.
8515 * loader.c (method_from_methodspec): Set `context->parent' from
8516 `context->container' - and if that's a method container, use its
8517 parent. Also set the `context->container' when creating a new
8519 (mono_get_method_from_token): Use just `context->container' to get
8522 * metadata.c (do_mono_metadata_parse_generic_class): Also set
8523 `gclass->context->container'.
8525 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
8526 the `context->container' when creating a new MonoGenericContext.
8528 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
8530 * reflection.c (compare_genericparam): Sort params with identical
8531 owner by their number. Fixes gen-111 on sparc.
8533 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
8535 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
8536 around the domain changes.
8538 * appdomain.c (mono_domain_unload): Handle the case when the thread
8539 calling Unload is itself being aborted during unloading. Fixes #70022.
8541 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
8543 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
8544 checkpoint_func as an icall so it gets a wrapper.
8545 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
8546 in the cross-appdomain wrappers too.
8548 * threads.c (mono_thread_has_appdomain_ref): Make this public.
8550 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
8552 * reflection.c: Fix some memory leaks.
8554 2004-12-02 Martin Baulig <martin@ximian.com>
8556 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
8558 * metadata.c (generic_class_cache): New static hashtable.
8559 (mono_metadata_lookup_generic_class): New public method.
8561 2004-12-02 Martin Baulig <martin@ximian.com>
8563 * class.c (mono_class_create_from_typedef): Call
8564 mono_class_setup_parent() and mono_class_create_mono_type() before
8565 parsing the interfaces.
8567 2004-12-02 Martin Baulig <martin@ximian.com>
8569 * metadata.c (generic_inst_cache): New static hashtable.
8570 (mono_metadata_lookup_generic_inst): New public function.
8571 (mono_metadata_inflate_generic_inst): New public function.
8572 (mono_metadata_parse_generic_inst): New public function.
8573 (do_mono_metadata_parse_generic_class): Use the new
8574 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
8575 since this'll also use the cache.
8577 * reflection.c (mono_reflection_bind_generic_method_parameters):
8578 Use mono_metadata_lookup_generic_inst() to use the new cache.
8580 * class.c (inflate_mono_type): Use
8581 mono_metadata_inflate_generic_inst() to inflate a generic
8582 instance; this'll also use the new cache.
8584 * loader.c (method_from_methodspec): Use
8585 mono_metadata_parse_generic_inst() and
8586 mono_metadata_inflate_generic_inst() rather than parsing it
8587 manually, so we can use the new cache.
8589 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
8591 * threads.c (wait_for_tids): Do not incorrectly free threads when
8594 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8596 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
8597 iter->args based on whether parameters are passed in registers (i.e.
8598 MONO_ARCH_REGPARMS is defined)
8600 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
8602 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
8603 the exception message. Fixes #70070.
8604 (method_from_methodspec): Fix warnings.
8606 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8608 * process.c: (complete_path) return the path quoted
8610 2004-12-01 Martin Baulig <martin@ximian.com>
8612 * class-internals.h (MonoGenericInst): New structure.
8613 (MonoGenericClass): Replaced `type_argc', `type_argv' and
8614 `is_open' with `MonoGenericInst *inst'.
8615 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
8616 `is_open' with `MonoGenericInst *inst'.
8618 2004-11-30 Martin Baulig <martin@ximian.com>
8620 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
8622 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
8623 to `generic_class_cache'.
8626 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
8627 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
8628 (mono_generic_inst_is_valuetype): Renamed to
8629 mono_generic_class_is_valuetype().
8632 (MonoGenericInst): Renamed to MonoGenericClass.
8633 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
8634 (MonoClass): Renamed `generic_inst' to `generic_class'.
8635 (MonoGenericContext): Renamed `ginst' to `gclass'.
8637 * object-internals.h
8638 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
8640 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
8641 mono_reflection_generic_class_initialize().
8643 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
8644 now known as "System.Reflection.MonoGenericClass".
8645 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
8647 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
8649 * class-internals.h: Added a flag field to MonoClass to cache the
8650 declarative security attributes actions associated with the class.
8651 * domain-internals.h: Added booleans to MonoJitInfo to cache the
8652 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
8653 applicable to the JITted method.
8654 * reflection.c|h: Added functions to extract (as flags) which security
8655 actions are available (declaratively) for a method, class or assembly.
8656 * metadata.c|h: Added functions to search the declarative security
8657 table in the metadata.
8659 2004-11-29 Ben Maurer <bmaurer@ximian.com>
8661 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
8662 EXPORTEDTYPES are already in the class name cache, so there is no
8663 need to add extra code here to look at them. Just removes a bit of
8666 (ves_icall_System_Environment_get_TickCount): No need for #if
8667 WINDOWS. We already have the code in io-layer.
8669 2004-11-28 Martin Baulig <martin@ximian.com>
8672 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
8675 2004-11-27 Miguel de Icaza <miguel@ximian.com>
8677 * assembly.c (do_mono_assembly_open): Instead of having a
8678 conditional WITH_BUNDLE, incorporate support for bundles here, by
8679 having a global `bundles' variable holding a pointer to the actual
8682 (mono_register_bundled_assemblies): New API call used by the
8685 See mkbundle.1 for details.
8687 2004-11-27 Martin Baulig <martin@ximian.com>
8689 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
8690 the vtable for generic methods.
8692 2004-11-26 Martin Baulig <martin@ximian.com>
8695 (mono_metadata_generic_method_hash): New public function.
8696 (mono_metadata_generic_method_equal): Likewise.
8699 (MonoGenericContainer): Added `GHashTable *method_hash'.
8701 * reflection.c (ReflectionMethodBuilder): Added
8702 `MonoGenericContainer *generic_container'.
8703 (reflection_methodbuilder_to_mono_method): Don't create a new
8704 MonoGenericContainer each time we're called.
8705 (mono_reflection_bind_generic_method_parameters): Use
8706 `container->method_hash' to cache the results so we don't create a
8707 different method if we're called several times with the same
8710 * loader.c (method_from_methodspec): Use the new
8711 `container->method_hash' here, too.
8713 2004-11-26 Martin Baulig <martin@ximian.com>
8715 * class.c (inflate_generic_signature): Correctly compute
8716 `res->has_type_parameters'.
8717 (mono_class_vtable): Use the `has_type_parameters' flag to
8718 determine whether we're a generic method.
8720 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
8722 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
8724 * object.c (mono_runtime_run_main): Fix a small memory leak.
8726 2004-11-25 Martin Baulig <martin@ximian.com>
8728 * class.c (set_generic_param_owner): Fixed the loop.
8730 2004-11-25 Martin Baulig <martin@ximian.com>
8732 * object.c (mono_class_vtable): Don't create any JIT wrappers for
8735 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
8737 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
8738 names. Fixes #69787.
8740 2004-11-24 Martin Baulig <martin@ximian.com>
8742 * class.c (mono_class_create_generic_2): If we don't have a
8743 `ginst->parent', inflate `gklass->parent' to get our parent.
8745 2004-11-24 Martin Baulig <martin@ximian.com>
8747 * reflection.c (compare_genericparam): Correctly sort the
8748 GenericParam table; fixes #69779.
8750 2004-11-23 Ben Maurer <bmaurer@ximian.com>
8752 * reflection.c: When writing a PE file, don't create a huge
8753 buffer in memory. Just write the arrays we have to the file.
8754 This reduces memory usage.
8756 * metadata-internals.h: MonoDynamicStream pefile is no longer used
8759 2004-11-17 Martin Baulig <martin@ximian.com>
8761 * class.c (mono_class_init): Don't setup `class->parent' for
8762 dynamic instances; moved this to mono_class_generic_2().
8763 (mono_class_create_generic): Also set `klass->inited' for dynamic
8765 (mono_class_create_generic_2): Don't do anything for dynamic
8766 generic instances. Set `klass->parent' here and also call
8767 mono_class_setup_parent() here.
8769 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
8770 `MonoType *parent' argument; set `ginst->parent' before calling
8771 mono_class_create_generic_2(), so we set the correct parent.
8773 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
8775 * reflection.c: allow getting attributes from ModuleBuilder
8778 2004-11-17 Martin Baulig <martin@ximian.com>
8780 * class.c (mono_class_create_from_typedef): If a type parameter is
8781 inherited from an outer class, set its owner to that class.
8783 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
8785 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
8786 for (int*) written size. This fixes bug #69592.
8788 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
8790 * icall.c: Added IsAuthenticodePresnet internal call.
8791 * image.c|h: New function that check a MonoImage for an Authenticode
8792 signature in the certificate PE data directory.
8793 * security.c|h: New internal call to ask the runtime if an
8794 Authenticode signature seems referenced in the PE header.
8796 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
8798 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
8800 * reflection.c (mono_image_create_pefile): Free the assembly streams
8801 after writing out the assembly file.
8803 * object.c (mono_runtime_run_main): Fix small memory leak.
8805 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
8806 property access modifiers. Fixes #69389.
8808 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
8810 * domain.c, object.c, object-internals.h, domain-internals.h,
8811 object.h, marshal.c: keep dynamic code info per domain.
8813 2004-11-15 Martin Baulig <martin@ximian.com>
8815 * class.c (mono_type_get_name_recurse): Put type arguments in
8816 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
8819 2004-11-15 Martin Baulig <martin@ximian.com>
8821 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
8822 (mono_class_setup_vtable): When computing `the_cname' for a
8823 generic instance, don't include the namespace since we'd otherwise
8826 2004-11-15 Martin Baulig <martin@ximian.com>
8828 * class.c (mono_class_create_generic): Changed return type to void.
8829 (mono_class_create_generic_2): New public function; setup
8830 `class->method', `class->field' and `class->interfaces' here
8831 instead of in mono_class_init().
8833 * class.h (mono_class_create_generic): Moved to class-internals.h.
8835 2004-11-14 Ben Maurer <bmaurer@ximian.com>
8837 * reflection.c (mono_image_create_pefile): take a file HANDLE.
8838 rather than writing to memory, write to this file. Right now,
8839 we are just writting into a buffer, and copying that. However
8840 we can avoid the buffer later.
8842 (mono_dynamic_stream_reset): new function
8844 * icall.c, object-internals.h: update for the above.
8846 2004-11-13 Ben Maurer <bmaurer@ximian.com>
8848 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
8849 have been using gc'd memory. First it is slower, unlikely
8850 the comment in the source code said, secondly, it increases
8851 our footprint to do it in the gc.
8853 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
8854 the method so that it does not have to copy to managed code.
8856 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
8858 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
8860 2004-11-12 Martin Baulig <martin@localhost>
8862 * reflection.c (mono_image_create_token): Allow generic method
8863 definitions here, since they may appear in an `.override'; see
8864 gen-98/gen-99 for an example.
8866 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
8868 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
8871 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
8874 2004-11-11 Martin Baulig <martin@ximian.com>
8876 * class.c (mono_class_setup_vtable): In an explicit interface
8877 implementation, the method name now includes the arity.
8879 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
8881 * object.c (mono_array_full_copy): Fix warning.
8883 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
8885 * appdomain.c: Removed look_for_method_by_name(). Use the new method
8886 mono_class_get_method_from_name() instead.
8888 * class-internals.h: Added two new types of wrappers.
8889 Added MonoRemotingTarget enum. Added new trampoline function type, which
8890 takes an additional MonoRemotingTarget value as parameter, so it is
8891 possible to request a trampoline for a specific target.
8893 * class.c: Added new mono_class_get_method_from_name() method.
8895 * class.h: In MonoRemoteClass, we can have now to vtables, one for
8896 general remoting sinks and one specific for cross domain calls.
8898 * debug-helpers.c: Added new wrapper names.
8900 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
8903 * image.c: Porperly delete value objects form the remoting invoke hashtable.
8905 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
8906 with several other methods (mono_marshal_get_xappdomain_dispatch,
8907 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
8908 and others) can generate a fast remoting wrapper for cross domain calls.
8909 More information can be found in docs/remoting.
8910 Other changes: Removed mono_find_method_by_name, and used
8911 mono_class_get_method_from_name instead.
8912 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
8913 is stored in the remoting invoke hashtable.
8915 * marshal.h: published the new method for getting the xdomain wrapper,
8916 and also added a method for getting the adequate wrapper for a given
8919 * object-internals.h, object.c: Added a couple of methods for capying and
8921 Modified mono_install_remoting_trampoline, which takes the new remoting
8922 trampoline that has a remoting target as parameter.
8923 mono_class_proxy_vtable now also takes a remoting target as parameter, and
8924 will return the most suitable vtable for the target.
8925 Added mono_remote_class_vtable, which returns the vtable of a remote class
8926 (which can be the normal remoting vtable or the xdomain vtable).
8928 * threads.c: the xdomain invoke and dispatch wrappers must also be
8929 protected against interruptions.
8931 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8933 * icall.c: use memmove in BlockCopyInternal when the source and
8934 destination arrays are the same.
8936 2004-11-09 Martin Baulig <martin@ximian.com>
8938 * class-internals.h (MonoGenericContainer): Removed `method' and
8939 `signature', replaced them with `is_method' and `is_signature'
8940 flags. Added `context'.
8942 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
8943 instead of a `MonoGenericContainer *'.
8945 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
8946 for dynamic type parameters.
8947 (mono_metadata_load_generic_params): Setup `container->context'.
8949 * reflection.c (mono_reflection_setup_generic_class): Setup
8950 `tb->generic_container->context'.
8951 (do_mono_reflection_bind_generic_parameters): Use
8952 mono_class_inflate_generic_type() to correctly inflate types,
8953 rather than using our own hack just for MONO_TYPE_VAR.
8955 2004-11-09 Martin Baulig <martin@ximian.com>
8957 * class.c (mono_class_inflate_generic_method): Small fix; don't
8961 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
8962 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
8963 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
8964 (ves_icall_Type_BindGenericParameters): Likewise.
8965 (ves_icall_Type_get_IsGenericInstance): Likewise.
8966 (ves_icall_Type_GetGenericParameterPosition): Likewise.
8967 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
8968 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
8969 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
8971 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
8973 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
8974 assembly versions and public key tokens. Fixes #69113.
8976 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
8978 * metadata.c: fix bug introduced with the type cache changes
8981 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
8983 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
8984 the MonoClass pointer instead of the token in exception clauses.
8985 * reflection.c: updates for the above and make the code not depend
8986 on the structure of MonoExceptionClause.
8988 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
8990 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8991 Add support for dynamic assemblies. Fixes #69114.
8993 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
8995 2004-11-07 Ben Maurer <bmaurer@ximian.com>
8997 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
8998 since most only those methods use it. the code member of
8999 MonoMethodPInvoke was dead, so that can be removed too. Also,
9000 remove inline_count (again, not used), and move slot so that it
9001 can share bits with some other flags. This saves 8 bytes in the
9002 structure and gives us about 50 kb back for mcs helloworld.cs
9004 * *.[ch]: Do naming changes for the above.
9006 * loader.c (mono_method_get_header): Lazily init the header
9008 (mono_get_method_from_token): don't init the header here
9009 (mono_free_method): the header may never be allocated
9011 Overall, this saves 150 kb of unmanaged allocations
9012 for mcs helloworld.cs. That accounts for 10% of the unmanaged
9015 * loader.c, loader.h (mono_method_get_header): new accessor.
9017 * *.[ch]: use the above method. Prepares us to lazily load
9020 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
9021 three warnings, which are actual bugs (see 69206).
9023 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
9024 unused. Saves a cool 4 bytes / method.
9026 2004-11-06 Ben Maurer <bmaurer@ximian.com>
9028 * metadata.c (builtin_types): Add types for System.Object here.
9029 (mono_metadata_parse_type_full): Cache MonoType*'s that are
9030 for a class or valuetype from klass->this_arg or klass->byval_arg.
9032 On mcs for a hello world, this gets us down from 21836 MonoType's
9035 (mono_metadata_free_type): Account for the above change.
9037 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
9039 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
9040 exception instead of asserting if name is null.
9041 (ves_icall_System_AppDomain_GetData): Ditto.
9043 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
9045 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
9048 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
9049 Return NULL when the domain does not have entry_assembly set.
9051 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
9052 Add a 'resource_modules' argument.
9053 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
9055 * reflection.c (mono_reflection_create_runtime_class): Move setting
9056 of wastypebuilder here, so mono_get_type_object () returns a MonoType
9059 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
9060 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
9061 Throw an ArgumentNullException if 'ptr' is null.
9063 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
9064 assemblies here. Fixes #69020.
9066 2004-11-05 Geoff Norton <gnorton@customerdna.com>
9068 * reflection.c (build_compressed_metadata): Fix the previous patch for
9069 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
9072 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
9074 * assembly.c (mono_assembly_names_equal): Allow a match if one of
9075 the cultures is false. Fixes #69090.
9077 * reflection.c (build_compressed_metadata): Fix invalid memory read
9078 detected by valgrind.
9080 * reflection.c (mono_reflection_get_type): Avoid triggering a
9081 TypeResolve multiple times for the same type. Fixes #65577.
9083 2004-11-04 Ben Maurer <bmaurer@ximian.com>
9085 * marshal.c: Avoid using ldftn to call managed functions. It is
9086 much slower than just a call.
9088 * reflection.c (mono_module_get_object): free the basename we
9089 allocate here from glib.
9091 * reflection.c (ensure_runtime_vtable): make sure to free
9092 overrides. Also, we were allocating an array of MonoMethod not an
9093 array of MonoMethod*.
9095 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
9097 * image.c (mono_image_close): free image->guid here.
9099 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
9101 * reflection.c: Fix some spec conformance issues with the PE file
9102 structures so mcs compiled apps run on the Net 2.0 beta.
9104 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
9106 * string-icalls.c (ves_icall_System_String_ctor_encoding):
9107 Implement this. Fixes #67264.
9109 * debug-helpers.h debug-helpers.c marshal.c: Move
9110 mono_find_method_by_name to debug-helpers.c.
9112 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
9114 * object.c (mono_release_type_locks): type_initialization_hash is
9117 * reflection.c object.c object-internals.h: Fix warnings.
9119 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
9120 without accessors. Fixes #61561.
9122 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
9123 application base from the root domain if not set. Fixes #65641.
9124 (mono_runtime_init): Fix warning.
9126 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9128 * appdomain.c: call mono_thread_pool_init.
9129 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
9130 of worker threads based on the number of CPUs and the environment
9131 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
9132 for non-windows (windows) systems.
9134 2004-10-27 Chris Toshok <toshok@ximian.com>
9136 * mono-debug-debugger.c (write_class): don't call mono_class_init
9137 here, as even with the check for (!klass->init_pending), we get
9138 into a situation where we're hitting cycles in class
9139 initialization. Fixes #68816.
9141 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
9143 * image.c: Avoid overwriting values in the loaded_images_hash when an
9144 assembly is loaded multiple times. Fixes #61152.
9146 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
9147 so multiple satellite assemblies for the same name can be loaded.
9150 * mono_domain_assembly_preload: Actually return the loaded assembly,
9153 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
9154 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
9156 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
9157 pending finalizers are not invoked after the appdomain has been
9158 unloaded. Fixes #67862.
9160 2004-10-22 Martin Baulig <martin@ximian.com>
9162 * mono-debug-debugger.c
9163 (mono_debugger_runtime_invoke): Don't box valuetypes.
9165 2004-10-22 Chris Toshok <toshok@ximian.com>
9167 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
9168 don't hide private methods.
9170 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
9172 * icall.c: Allows the runtime to "share" (when known) the public key
9173 token of an assembly. This avoid the need to recalculate the token
9174 (from the public key) in managed code.
9176 2004-10-21 Chris Toshok <toshok@ximian.com>
9178 * debug-helpers.c (append_class_name): argh, revert last patch.
9180 2004-10-21 Chris Toshok <toshok@ximian.com>
9182 * debug-helpers.c (append_class_name): use '+' as the delimiter,
9183 not '/', so that it matches what the debugger uses to look up
9186 2004-10-21 Martin Baulig <martin@ximian.com>
9188 * mono-debug-debugger.c (mono_debugger_throw_exception): New
9189 public method; this is called each time an exception is thrown and
9190 allows the debugger to use exception catch points.
9192 2004-10-21 Martin Baulig <martin@ximian.com>
9194 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
9195 the stack pointer and the exception object in some struct and pass
9196 that to the debugger.
9198 2004-10-21 Chris Toshok <toshok@ximian.com>
9200 * mono-debug-debugger.c (do_write_class): add instance/static
9201 event support. We don't expose "raise" or "other" yet.
9202 (event_is_static): new method.
9204 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
9206 * mono-debug-debugger.c
9207 (mono_debugger_handle_exception): Remove
9208 bogus return value for fussy compilers.
9210 2004-10-20 Martin Baulig <martin@ximian.com>
9212 * mono-debug-debugger.c
9213 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
9214 (mono_debugger_handled_exception): Likewise.
9216 2004-10-20 Martin Baulig <martin@ximian.com>
9218 * mono-debug-debugger.h (MonoDebuggerEvent): Added
9219 MONO_DEBUGGER_EVENT_EXCEPTION.
9221 * mono-debug-debugger.c (mono_debugger_handle_exception): New
9222 public function to send the debugger a notification for an
9223 exception and inform it about a catch/finally clause.
9225 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
9227 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
9228 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
9231 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
9233 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
9235 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
9236 marshalled as [In,Out]. Fixes #58325.
9238 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
9240 * reflection.c (mono_method_body_get_object): Implement some fields.
9242 2004-10-12 Martin Baulig <martin@ximian.com>
9244 * reflection.c (mono_reflection_bind_generic_parameters): Small
9245 fix, correctly retrieve our parent from a generic instance.
9247 2004-10-12 Martin Baulig <martin@ximian.com>
9249 * metadata.c (mono_metadata_generic_param_equal): We always have
9253 (mono_class_from_generic_parameter): We need to have an owner.
9254 (my_mono_class_from_generic_parameter): Likewise.
9256 * reflection.c (mono_reflection_setup_generic_class): Renamed to
9257 mono_reflection_create_generic_class() and added a new
9258 mono_reflection_setup_generic_class().
9259 (mono_reflection_initialize_generic_param): If we're a nested
9260 generic type and inherited from the containing class, set our
9261 owner to the outer class.
9263 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
9265 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
9267 * reflection.c (mono_method_body_get_object): New function to create
9268 a MethodBody object.
9270 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
9272 2004-10-11 Martin Baulig <martin@ximian.com>
9274 * metadata.c (_mono_metadata_type_equal): Renamed to
9275 do_mono_metadata_type_equal() and made static.
9277 2004-10-11 Martin Baulig <martin@ximian.com>
9279 * appdomain.c: Bump corlib version number to 28.
9281 2004-10-10 Martin Baulig <martin@ximian.com>
9284 (MonoGenericInst): Added `MonoGenericContainer *container'.
9285 (MonoGenericMethod): Likewise.
9286 (MonoGenericContext): Likewise.
9287 (MonoGenericParam): Added `MonoGenericContainer *owner'.
9290 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
9291 (do_mono_metadata_parse_generic_inst): Likewise.
9292 (mono_metadata_parse_type_full): New public method. This is the actual
9293 mono_metadata_parse_type() implementation - with an additional
9294 `MonoGenericContainer *' argument.
9295 (mono_metadata_parse_array_full): Likewise.
9296 (mono_metadata_parse_signature_full): Likewise.
9297 (mono_metadata_parse_method_signature_full): Likewise.
9298 (mono_metadata_parse_mh_full): Likewise.
9299 (mono_type_create_from_typespec): Likewise.
9300 (mono_metadata_interfaces_from_typedef_full): New public method;
9301 this is similar to the other _full() methods, but we take a
9302 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
9303 (mono_metadata_parse_generic_param): Take an additional
9304 `MonoGenericContainer *' argument and lookup the MonoGenericParam
9305 from that container.
9306 (mono_metadata_generic_param_equal): New static method to compare
9307 two type parameters.
9308 (_mono_metadata_type_equal): New static method; takes an
9309 additional `gboolean signature_only' argument - if true, we don't
9310 compare the owners of generic parameters.
9311 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
9312 with a TRUE argument - do a signature-only comparision.
9314 * loader.c: Use the new _full() methods and pass the
9315 MonoGenericContainer to them.
9317 * object-internals.h (MonoReflectionTypeBuilder): Added
9318 `MonoGenericContainer *generic_container' field.
9319 (MonoReflectionMethodBuilder): Likewise.
9321 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
9323 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
9324 case initial images of dynamic assemblies.
9326 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
9328 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
9330 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
9331 length of event->other array.
9332 (typebuilder_setup_events): Ditto.
9334 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
9335 'assembly_by_name' and add an 'assemblies' list.
9337 * assembly.h assembly.c: Add a new search hook for determining whenever
9338 an assembly is already loaded. Use this instead of searching in the
9339 loaded_assemblies list.
9341 * domain.c appdomain.c: Implement the new search hook so loaded
9342 assemblies are now scoped by appdomain. Fixes #67727.
9344 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
9346 * threads.c (mono_thread_attach): Initialize synch_lock field so
9347 mono_thread_detach works again.
9349 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
9350 'lib' too. Fixes #63130.
9352 2004-10-06 Jackson Harper <jackson@ximian.com>
9354 * culture-info-tables.h: regenerated.
9356 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
9358 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
9359 implemented by other interfaces in the result. Fixes #65764.
9361 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9362 Handle unloadable modules without crashing.
9364 * image.c (load_modules): Revert the previous patch since modules must
9365 have a fixed index inside the array.
9367 * image.c (load_modules): Don't include native modules in the modules
9370 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
9372 * reflection.h: Add param_defaults field.
9374 * reflection.c: Add support for parameter defaults in dynamic methods.
9377 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
9378 an empty string when a type has no namespace. Fixes #64230.
9380 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
9382 * tabledefs.h: Added "internal" security actions to support non-CAS
9383 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
9384 Note: they do not seems to be used anymore in 2.0 (new metadata format)
9386 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
9388 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
9389 constructor of abstract class. Fixes #61689.
9391 2004-10-04 Martin Baulig <martin@ximian.com>
9393 * class-internals.h (MonoGenericContainer): New type.
9394 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
9395 `MonoGenericContainer *generic_container'.
9396 (MonoClass): Replaced `gen_params' and `num_gen_params' with
9397 `MonoGenericContainer *generic_container'.
9399 * metadata.c (mono_metadata_load_generic_params): Return a
9400 `MonoGenericContainer *' instead of a `MonoGenericParam *';
9401 removed the `num' argument.
9403 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
9405 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
9408 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
9411 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
9413 * reflection.c: Save pe_kind and machine values into the generated
9416 * appdomain.c: Bump corlib version number.
9418 * object-internals.h: Reorganize layout of LocalBuilder.
9420 * class-internals.h class.c (mono_class_get_implemented_interfaces):
9421 New helper function.
9423 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
9424 created MonoType for dynamic types. Fixes #66180.
9426 2004-10-02 Ben Maurer <bmaurer@ximian.com>
9428 * threadpool.c: the ares hashtable needs a critical section around it.
9429 this prevents some nasty segfaults
9431 2004-10-02 Massimiliano Mantione <massi@ximian.com>
9433 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
9434 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
9437 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
9439 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
9441 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
9443 * image.c: Always canonicalize image file names, to avoid loading
9444 the same assembly twice when referenced using a relative path.
9446 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
9448 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
9450 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
9452 * marshal.c: Fix warnings.
9454 2004-09-29 Geoff Norton <gnorton@customerdna.com>
9456 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
9457 attempting to marshal the delegate_trampoline as the method_addr.
9458 This patch has a static hashtable of marshalled delegates so that
9459 we can map delegate_trampoline addresses back to delegates. This
9460 allows a delegate passed to managed code to be passed back into native
9463 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
9465 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
9467 * reflection.c (method_encode_code): Align method headers properly.
9470 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
9472 * marshal.c: In the runtime invoke wrapper, reset the abort
9473 exception if it is cached. This avoids the automatic rethrowal of
9474 the exception after the catch of the wrapper. Also check for pending
9475 interruptions before calling the managed method. This is done using
9476 the new method emit_thread_force_interrupt_checkpoint, since the
9477 normal checkpoint method is ignored when running the invoke wrapper.
9478 * object.c: If the abort exception is rethrown, set the abort_exc
9479 field of the thread, so it will be rethrown aftere every catch.
9480 * threadpool.c: Only run an interruption checkpoint if what has been
9481 requested is a stop of the thread (aborts will be ignored).
9482 * threads.c: By default, a thread will now never be interrumped while
9483 running the runtime invoke wrapper (this ensures that runtime_invoke
9484 will always return to the caller if an exception pointer is provided).
9485 There is a new special method mono_thread_force_interruption_checkpoint()
9486 to force an interruption checkpoint even if running a protected
9487 wrapper, which is used by the same runtime invoke wrapper to do a check
9490 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
9492 * object.c, object-internals.h: Implemented mono_release_type_locks,
9493 which releases the cctor locks held by a thread.
9494 * threads.c, threads.h: In thread_cleanup, release cctor locks held
9495 by a thread. Added mono_thread_exit() method to be used to safely stop
9498 2004-09-28 Raja R Harinath <rharinath@novell.com>
9500 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9501 Move null check before dereference. Avoid indexing beyond the end
9502 of the 'modules' array.
9504 2004-09-28 Raja R Harinath <rharinath@novell.com>
9506 * metadata-internals.h (MonoImage): Add module_count field.
9507 * image.c (load_modules): Set image->module_count.
9508 (mono_image_load_file_for_image): Use image->module_count.
9509 * reflection.c (mono_image_load_module): Append to image->modules array
9510 of dynamic assembly.
9511 (mono_module_get_object): Fix loop to actually increment index.
9512 Use image->module_count.
9513 * assembly.c (mono_assembly_load_references): Use image->module_count.
9514 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9517 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
9519 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
9520 Avoid assert on generic types.
9522 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
9524 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
9526 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
9528 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
9529 function to convert a MarshalSpec structure to its managed counterpart.
9531 * reflection.c: Fix warnings.
9533 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
9536 * icall.c (mono_create_icall_signature): Fix build.
9538 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
9540 * icall.c: Add MakePointType icall.
9542 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
9545 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9547 * threadpool.c: reuse allocated slots in the queue.
9549 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
9551 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
9553 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
9555 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
9558 * tabledefs.h: Add constants for pinvoke attributes BestFit and
9559 ThrowOnUnmappableChar.
9561 * icall.c (ves_icall_Type_GetPacking): New icall.
9563 2004-09-24 Martin Baulig <martin@ximian.com>
9565 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
9567 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9570 (mono_domain_set): allow setting a domain that is being unloaded.
9571 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
9574 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
9576 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
9577 the GetCustomAttributes icall.
9579 2004-09-23 Martin Baulig <martin@ximian.com>
9581 * object-internals.h (MonoReflectionGenericParam): Replaced
9582 'has_ctor_constraint', `has_reference_type' and `has_value_type'
9583 with `guint32 attrs'.
9585 2004-09-23 Martin Baulig <martin@ximian.com>
9587 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
9589 2004-09-23 Martin Baulig <martin@ximian.com>
9591 * object-internals.h (GenericParameterAttributes): New enum.
9593 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
9595 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
9597 * class.c (init_events): Fill out event->other field.
9599 * class.c: Fix warnings.
9601 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
9603 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
9605 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
9606 walk which doesn't supply the IL offset.
9608 2004-09-22 Martin Baulig <martin@ximian.com>
9610 * reflection.c (mono_reflection_setup_internal_class): If we're
9611 System.ValueType, System.Object or System.Enum, set
9612 `klass->instance_size' and create the vtable.
9613 (mono_reflection_create_internal_class): If we're an enum type,
9614 get the base class from our current corlib.
9616 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
9618 * reflection.h (MonoResolveTokenError): New type.
9620 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
9623 * icall.c: Add an 'error' argument to the ResolveToken icalls.
9625 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
9627 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
9628 Support also calling constructors, but only for already allocated objects.
9630 2004-09-17 Geoff Norton <gnorton@customerdna.com>
9632 * reflection.c (type_get_qualified_name): If the klass is null
9633 return the typename to avoid a NullRefEx.
9634 (encode_cattr_value): Get the qualified name of the boxed type,
9635 not the underlying enumtype. Fixes #62984.
9637 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
9639 * marshal.c: Fix problems with previous checkin.
9641 2004-09-21 <vargaz@freemail.hu>
9643 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
9644 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
9646 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
9648 2004-09-21 Geoff Norton <gnorton@customerdna.com>
9650 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
9651 should only return a type for pointers, arrays, and passbyref types.
9654 2004-09-21 Martin Baulig <martin@ximian.com>
9656 * domain.c (mono_debugger_check_runtime_version): New public
9659 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
9661 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
9663 * reflection.c: Added missing sort to the declarative security
9664 attributes table. MS implementation stops seeing the attributes if the
9665 token number regress in the table (as shown by ildasm and permview).
9667 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
9669 * object-internals.h (MonoReflectionModule): Add 'token' field.
9671 * reflection.c (mono_reflection_get_token): Add support for Module
9673 (mono_module_get_object): Set 'token' field.
9674 (mono_module_file_get_object): Set 'token' field.
9676 * icall.c: Add new Assembly and Module icalls.
9678 * appdomain.c: Bump corlib version.
9680 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
9682 * loader.h loader.c class.h class.c: Add helper functions for obtaining
9683 tokens of metadata objects.
9685 * reflection.h reflection.c (mono_reflection_get_token): New function
9686 to obtain the token of a metadata object.
9688 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
9690 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
9692 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
9694 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
9696 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
9698 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
9699 * object-internals.h: Added 3 MonoArray* members to MonoReflection
9700 AssemblyBuilder to access the permissions set in the class lib.
9701 * reflection.c: Added security attributes encoding step in
9702 mono_image_build_metadata.
9703 * tabledefs.h: Added new security actions defined in 2.0:
9704 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
9706 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
9708 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
9711 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
9713 * locales.c: nullify the ICU_collator member of CompareInfo when it is
9714 finalized. There where random SIGSEVs at program termination, when
9715 an object being finalized was trying to do a string comparison and
9716 the current culture was already finalized.
9718 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9720 * threads.c: call thread_cleanup before finishing the thread if we get
9723 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
9725 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
9726 assemblies from the parent. Fixes #65665.
9728 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
9730 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
9733 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
9735 * reflection.h: add prototype for mono_get_dbnull_object
9736 * reflection.c: add prototypes for get_default_param_value_blobs
9737 and mono_get_object_from_blob for fussier compilers
9739 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
9741 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
9742 false deadlock checks in class initialization.
9744 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
9746 * image.c (mono_image_addref): Fix comment.
9748 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
9751 2004-09-12 Jambunathan K <kjambunathan@novell.com>
9753 * reflection.c (mono_param_get_objects): Modified to return
9754 ParameterInfo.DefaultValue object.
9756 (get_default_param_value_blobs):
9757 (mono_get_object_from_blob):
9758 (mono_get_dbnull_object): New helper routines.
9760 * object.c (mono_get_constant_value_from_blob): New helper routine
9761 carved out from get_default_field_value ()
9763 * object-internals.h (mono_get_constant_value_from_blob): Added
9764 function declaration.
9766 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
9768 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
9769 referenced assemblies. Fixes #62135.
9771 * exception.h exception.c (mono_get_exception_file_not_found2): New
9774 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
9776 * class.h class.c: Add mono_type_get_underlying_type ().
9778 2004-09-09 Geoff Norton <gnorton@customerndna.com>
9780 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
9781 Fix GetTypes() to support dynamically created assemblies.
9783 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
9785 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
9787 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
9790 * reflection.h reflection.c loader.c: Allow dynamic construction of
9791 pinvoke methods. Fixes #65571.
9793 * reflection.c (mono_reflection_get_type): Revert previous change since
9794 it causes regressions.
9796 2004-09-08 Martin Baulig <martin@ximian.com>
9798 * class.c (class_compute_field_layout): Don't call
9799 mono_class_layout_fields() for open generic instances.
9801 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
9802 * threads.c appdomain.c: fix typo in GC macro
9804 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9806 * threads.c: don't call mono_thread_detach() in start_wrapper(),
9807 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
9809 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
9811 * image.c (mono_image_close): Applied patch from
9812 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
9813 assembly is loaded multiple times from data.
9815 * image.c (mono_image_open): Fix warning.
9817 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
9819 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
9822 * reflection.c (mono_reflection_create_runtime_class): Initialize
9823 klass->nested_classes. Fixes #61224.
9825 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
9827 * threads.c: sched_yield() on exit, to allow threads to quit.
9829 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
9831 * object.c (mono_unhandled_exception): Remove leftover debug code.
9833 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
9835 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
9837 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
9839 * marshal.c (emit_marshal_array): Really null terminate string arrays.
9841 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
9843 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
9845 * marshal.c (emit_marshal_array): Null terminate string arrays.
9847 * marshal.c (raise_auto_layout_exception): Fix warning.
9849 * reflection.c (mono_param_get_objects): Initialize the default value
9850 with DBNull.Value, not null. Fixes #62123.
9852 2004-09-01 Miguel de Icaza <miguel@ximian.com>
9854 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
9855 throw an exception with a cute explanation.
9857 2004-09-06 Dick Porter <dick@ximian.com>
9859 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
9860 Close the new process's thread handle, as we don't use it. The
9861 handle stays around forever otherwise.
9863 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
9865 * object.c (arith_overflow): Fix warning.
9867 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
9868 calling conventions in method refs. Fixes #65352.
9870 * reflection.c: Fix warnings.
9872 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
9874 * icall.c: Add a new icall for Array.Clear
9876 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
9878 * object.c: When allocating an array, we have to throw
9879 an overflow exception if any of the lengths are < 0.
9881 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
9883 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
9884 properly. Also move implementation of string array marshalling to
9885 managed code. Fixes #42316.
9887 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9889 * assembly.c: provide more information when loading an assembly fails.
9891 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9893 * filewatcher.c: don't expect the development fam package to be
9896 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
9898 * marshal.c: Make a copy of the signature cookie since it will be
9899 freed by the caller.
9901 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
9903 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
9905 * metadata.c (mono_metadata_free_marshal_spec): New function to free
9908 * marshal.c: More refactoring.
9910 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
9913 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
9915 * object.c: In mono_message_invoke, fill the output parameter array after
9916 calling the managed method (it was done before the call). This fixes
9919 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
9921 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
9924 2004-09-02 Martin Baulig <martin@ximian.com>
9926 * class.c (mono_class_instance_size): Don't allow generic type
9927 definitions or open generic instances.
9928 (mono_class_array_element_size): If we're a value type, call
9929 mono_class_instance_size() on the original class.
9931 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
9932 handle generic instances.
9934 * mono-debug-debugger.c (write_type): Handle generic instances
9937 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
9939 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
9940 the allocation request fails. Fixes #65089.
9942 * object.c (mono_runtime_free_method): Do not call mono_free_method.
9944 * object.c (mono_runtime_free_method): New function to free a dynamic
9947 * marshal.c (mono_delegate_free_ftnptr): New function to free the
9948 delegate trampoline.
9950 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
9951 with hasthis as dynamic,
9953 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
9955 * domain.c (mono_jit_info_table_remove): New function to remove an
9956 entry from the jit info table.
9958 * class-internals.h (MonoMethod): Add 'dynamic' field.
9960 * loader.c: Fix warnings.
9962 2004-09-01 Martin Baulig <martin@ximian.com>
9964 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
9965 instead of mono_debugger_lock() because the latter one is a no-op
9966 unless running in the debugger.
9968 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
9970 * class.c (class_compute_field_layout): Classes with auto-layout or
9971 reference fields are not blittable.
9973 2004-09-01 Dick Porter <dick@ximian.com>
9975 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
9976 mono_image_get_filename() to get the assembly location.
9979 * metadata.h: Fix compile warnings
9981 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
9983 * class.c (class_compute_field_layout): System.Object is blittable.
9985 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
9986 as in/out. Fixes #59909.
9988 2004-09-01 Martin Baulig <martin@ximian.com>
9990 * metadata.h (MONO_TYPE_ISREFERENCE): Call
9991 mono_metadata_generic_inst_is_valuetype() if we're a generic
9992 instance to check whether our underlying type is a reference type.
9994 2004-09-01 Martin Baulig <martin@ximian.com>
9996 * metadata.c (mono_type_size): If we're a generic instance, call
9997 mono_class_value_size() for value types.
9999 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
10001 * marshal.c: Implement more custom marshalling functionality. Fixes
10004 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10006 * mono-debug.c, debug-mono-symfile.c: add some locking love.
10008 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
10010 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
10012 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
10014 * icall.c: Fix some warnings.
10016 * threads.c (abort_appdomain_thread): Fix unref errors.
10017 (mono_thread_current): Fix THREAD_DEBUG define.
10019 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
10021 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
10023 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
10025 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
10027 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
10030 2004-08-28 Martin Baulig <martin@ximian.com>
10033 (mono_metadata_generic_inst_is_valuetype): New public function.
10035 * metadata.h (MONO_TYPE_ISSTRUCT): Call
10036 mono_metadata_generic_inst_is_valuetype() if we're a generic
10037 instance to check whether our underlying type is a valuetype.
10039 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
10041 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
10044 2004-08-25 Martin Baulig <martin@ximian.com>
10046 * loader.c (mono_get_method_from_token): Abstract methods can also
10047 be generic and thus have type parameters.
10049 * metadata-internals.h
10050 (MonoDynamicImage): Added `GPtrArray *gen_params'.
10052 * reflection.c (mono_image_get_generic_param_info): Don't create a
10053 metadata row, just add an entry to the `gen_params' array.
10054 (build_compressed_metadata): Sort the `gen_params' array and then
10055 actually create the metadata.
10057 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10059 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
10061 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
10063 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
10065 2004-08-24 Martin Baulig <martin@ximian.com>
10067 * class.cs (mono_class_is_subclass_of): Like an interface, a
10068 generic instance also derives from System.Object.
10070 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
10072 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
10073 custom modifiers to be in any order. Fixes #61990.
10075 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
10077 * object.c: Register mono_object_new_fast icall.
10079 * object.c (mono_class_get_allocation_ftn): Return to calling
10080 mono_object_new_fast, since it seems faster to compute the object
10081 size in unmanaged code than passing it as a parameter.
10083 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
10085 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
10086 this function with Boehm as the oom handler, so we don't have to check
10087 the result of GC_malloc.
10089 * object.c: Remove checks for oom.
10091 * object.h object.c (mono_class_get_allocation_ftn): New function to
10092 return the icall which can be used to allocate an instance of a given
10095 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
10097 * class-internals.h: Add 'enabled' field.
10099 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
10101 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
10103 2004-08-18 Jambunathan K <kjambunathan@novell.com>
10104 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
10107 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
10109 * appdomain.c: use the Tls function for appdomain too,
10110 at Zoltan's request. Actually return in mono_context_get
10112 * appdomain.c, profiler.c, threads.c: use __thread
10114 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
10116 * appdomain.c threads.c: Call GC_CreateThread on windows.
10118 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
10119 multiple libraries since this don't work on windows.
10121 2004-08-18 Martin Baulig <martin@ximian.com>
10123 * class-internals.h
10124 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
10127 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
10128 MonoMethodNormal since we also need it for abstract and interface
10132 (build_compressed_metadata): Sort the GenericParam table.
10133 (mono_image_create_token): Added `gboolean create_methodspec'
10134 argument; this is false when generating a MethodImpl token.
10135 (reflection_methodbuilder_to_mono_method): Abstract and interface
10136 methods may also have generic parameters.
10138 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
10140 * appdomain.c: thread local alloc
10142 2004-08-17 Martin Baulig <martin@ximian.com>
10144 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
10147 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
10150 * class.c (mono_type_get_full_name): New public function.
10151 (mono_type_get_name): Don't include the type arguments.
10153 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
10155 * Makefile.am: Build static versions of libmetadata and libmonoruntime
10156 for inclusion into the mono executable.
10158 2004-08-16 Martin Baulig <martin@ximian.com>
10160 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
10161 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
10163 2004-08-14 Martin Baulig <martin@ximian.com>
10165 * class.c (dup_type): Also copy the `byref' field.
10167 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
10169 * reflection.c (create_dynamic_mono_image): Revert the last change
10170 since it breaks bootstrap.
10172 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
10174 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
10176 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
10177 not free them with g_free.
10179 2004-08-11 Martin Baulig <martin@ximian.com>
10181 * reflection.c (mono_reflection_setup_internal_class): Also call
10182 mono_class_setup_mono_type() if we already have a `tb->type.type'.
10184 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
10186 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
10187 called during default (first) AppDomain creation. Keep track of
10188 Evidence when loading assemblies.
10190 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10192 * opcodes.c, opcodes.h: reduce runtime relocations.
10194 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10196 * culture-info.h, locales.c: fixes and chages to sue the new
10197 optimized format of the locale data.
10198 * culture-info-tables.h: regenerated.
10200 2004-08-06 Geoff Norton <gnorton@customerdna.com>
10202 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
10204 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
10206 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
10207 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
10208 * domain-internals.h: icall declaration.
10209 * icall.c: icall registration.
10210 * object-internals.h: New fields in MonoAssembly for CAS.
10212 2004-08-05 Duncan Mak <duncan@ximian.com>
10214 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10217 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
10219 * reflection.c: fix to deal with object[] arrays in custom ctors
10222 2004-08-05 Martin Baulig <martin@ximian.com>
10224 * class.c (mono_class_array_element_size): Added support for
10225 generic instances and correctly handle "recursive" types.
10227 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
10229 * assembly.c: Fix warnings.
10231 2004-08-04 Martin Baulig <martin@ximian.com>
10234 (mono_type_get_name_recurse): Added `gboolean include_arity'
10235 argument specifying whether or not we should include the generic
10236 arity in the type name.
10237 (_mono_type_get_name): New static function.
10238 (mono_class_setup_vtable): If we're a generic instance, don't
10239 include the generic arity in the names of explicit method
10242 2004-08-03 Martin Baulig <martin@ximian.com>
10244 * class.c (mono_type_get_name_recurse): Enclose the generic type
10245 arguments in `<', '>'.
10247 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10249 * gc.c: make GC warning messages use the trace API, they are just
10250 noise to most of the users.
10252 2004-08-03 Martin Baulig <martin@ximian.com>
10254 * debug-mono-symfile.c (read_string): Correctly read the string.
10256 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
10258 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
10260 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
10262 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
10264 2004-07-30 Martin Baulig <martin@ximian.com>
10266 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
10267 Reflect latest symbol writer changes.
10269 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
10271 * object.c: always create an object if null is passed
10272 to Invoke() where a valuetype is expected.
10274 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
10276 * marshal.c (mono_marshal_init): make managed
10277 signatures match native ones better for 64bits.
10279 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10281 * appdomain.c: hack to build correctly the private bin path on windows.
10284 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
10286 * assembly.c: Load mscorlib from the correct framework directory
10287 (mono/<version>/mscorlib.dll).
10288 * appdomain.h: Added prototypes for new functions.
10289 * internals.h: Added some prototypes.
10290 * domain.c: When initializing the runtime, get from the executable and
10291 the configuration files the runtime version that the app supports.
10292 Added support methods for reading app.exe.config. Added list of versions
10293 supported by the JIT. Added two new methods: mono_init_from_assembly,
10294 which initializes the runtime and determines the required version from
10295 the provided exe file, and mono_init_version, which initializes
10296 the runtime using the provided version.
10297 * icall.c: Get machine.config from version-specific directory.
10298 * reflection.c: When generating an image, embed the version number
10299 of the current runtime.
10301 2004-07-28 Dick Porter <dick@ximian.com>
10304 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
10305 returned sockaddr size before creating the remote address object.
10306 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
10309 2004-07-28 Dick Porter <dick@ximian.com>
10311 * locales.c (string_invariant_compare_char): Fix invariant char
10312 compares between upper and lower cases. Fixes bug 61458.
10314 2004-07-27 Ben Maurer <bmaurer@ximain.com>
10316 * marshal.c: actually cache stelem.ref wrappers.
10318 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10320 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
10321 sections and remove the mono_cli_rva_map () function.
10323 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10325 * debug-mono-symfile.c: fix one more endianess issue, from a patch
10326 by Geoff Norton (<gnorton@customerdna.com>).
10328 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10330 * class.c: fix class loads for pointer types (typeof(int) !=
10333 2004-07-27 Martin Baulig <martin@ximian.com>
10335 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
10336 reading the debugging information from an external ".mdb" file.
10338 2004-07-24 Martin Baulig <martin@ximian.com>
10340 * reflection.c (mono_image_get_type_info): Only write a class
10341 layout entry if we actually have a size or a packing size.
10343 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
10345 * reflection.c (type_get_fully_qualified_name):
10346 insert cast to get type checking of ?: with non-gcc compilers
10348 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
10350 * rand.c: use g_getenv for both lookups of
10353 2004-07-17 Martin Baulig <martin@ximian.com>
10355 * reflection.c (mono_reflection_bind_generic_method_parameters):
10356 Set `gmethod->reflection_info'.
10358 2004-07-17 Martin Baulig <martin@ximian.com>
10360 * class.c (mono_class_create_from_typedef): Insert the newly
10361 created class into the hash table before computing the interfaces
10362 since we could be called recursively.
10364 2004-07-16 Ben Maurer <bmaurer@ximain.com>
10366 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
10367 function to implement stelem.ref in managed code
10368 * class-internals.h, debug-helpers.c: a new wrapper type
10371 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
10373 * gc.c: allow GC handles to work even when no GC is compiled in.
10374 Fix part of bug #61134 (GetAddrOfPinnedObject).
10376 2004-07-13 Peter Williams <peter@newton.cx>
10378 * process.c (complete_path): Make sure we don't attempt to execute
10381 2004-07-12 Geoff Norton <gnorton@customerdna.com>
10383 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
10384 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
10385 and will add/subtract the hour if needed
10387 2004-07-12 Martin Baulig <martin@ximian.com>
10389 * reflection.c (mono_field_get_object): If we have
10390 `field->generic_info', take the attributes from
10391 `field->generic_info->generic_type'.
10393 2004-07-12 Martin Baulig <martin@ximian.com>
10395 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
10396 This function must be called before initializing the runtime.
10397 (mono_debug_init_1): New function; call this after initializing
10398 the runtime, but before loading the assembly. It tells the
10399 debugger to load corlib and the builtin types.
10401 * mono-debug-debugger.c: Did some larger changes in the debugging
10402 code; support recursive class declarations, make sure we actually
10405 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10407 * debug-helpers.c: undo my previous patch and fixed the real issue in
10408 ../mini/exceptions-x86.c
10410 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10412 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
10413 when no HOME env. variable was set and a NullRef was thrown in a .cctor
10414 called from other .cctors.
10416 2004-07-09 Miguel de Icaza <miguel@ximian.com>
10418 * loader.c: Removed the mono_loader_wine_init hack now that we are
10419 doing a managed version of Windows.Forms.
10421 2004-07-09 Ben Maurer <bmaurer@ximian.com>
10423 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
10424 threadpool.c, threads.c: remove static data from rootset.
10426 2004-07-09 Dick Porter <dick@ximian.com>
10428 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
10429 Don't do any more processing if the matched length was 0. It was
10430 increasing the size of the string before. Fixes bug 61167.
10432 2004-07-09 Dick Porter <dick@ximian.com>
10436 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
10437 Add support for SO_PEERCRED if its available.
10439 2004-07-09 Peter Bartok <pbartok@novell.com>
10440 * loader.c: winelib.exe.so error message is now only displayed if
10441 MONO_DEBUG is set. To help us avoid questions when people are trying
10442 out the new Managed.Windows.Forms.
10444 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
10446 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
10447 for isinst and castclass wrappers.
10449 * class-internals.h icall.c: Move registration and lookup of JIT icalls
10450 to libmetadata from the JIT, so they could be used by the marshalling
10451 code and the interpreter.
10453 * marshal.c: Register marshalling related JIT icalls here instead of
10454 in mini.c. Use CEE_MONO_ICALL instead of the family of
10455 CEE_MONO_PROC<x> opcodes to call marshalling functions.
10457 * metadata.h: Remove unneeded marshalling conversions.
10459 * opcodes.c: Update for new opcodes.
10461 2004-07-08 Martin Baulig <martin@ximian.com>
10463 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
10464 (mono_debug_get_domain_data): Make this function static.
10466 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
10468 * gc.c, object.h: add nice GC handle API for embedders.
10470 2004-07-06 Ben Maurer <bmaurer@ximian.com>
10472 * reflection.c: more changes for the new api
10474 * object.c: When we reflect on a field w/ a constant value, it
10475 will not have a memory location, so we must access metadata. Also,
10476 allow easier reading of strings so that we can read them from
10479 * class.c (mono_class_layout_fields): no need for literal fields here.
10481 * class-internals.h: api changes for const fields
10483 * icall.c (ves_icall_get_enum_info): use new apis for const fields
10485 2004-07-06 Martin Baulig <martin@ximian.com>
10487 * mono-debug.h: Increment version number to 44.
10489 * mono-debug.c (mono_debug_add_wrapper): The second argument is
10490 now a gpointer, rewrote this whole method.
10492 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
10493 function. Add information about the wrapper in a new "misc table".
10495 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
10496 for the new misc table.
10498 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
10500 * metadata-internals.h image.c: Add a cache for helper signatures.
10502 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
10504 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
10506 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
10507 delegates from a delegate. Fixes #61033.
10509 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
10510 marshalling of stringbuilder arrays. Fixes #59900.
10512 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
10514 * icall.c: Add EnumBuilder:setup_enum_type icall.
10516 2004-06-30 Ben Maurer <bmaurer@ximian.com>
10518 * icall.c: Added a new icall for the property version of
10519 OffsetOfStringData.
10521 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
10523 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
10524 it has a constant size across platforms.
10526 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
10529 2004-06-29 Martin Baulig <martin@ximian.com>
10531 * mono-debug.c (mono_debug_add_method): Protect the whole function
10532 in mono_debugger_lock(), not just parts of it.
10534 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10536 * reflection.c: make sure padding bytes in heaps are zeroed.
10538 2004-06-24 David Waite <mass@akuma.org>
10540 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
10541 image.c, loader.c, locales.c, marshal.c, metadata.c,
10542 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
10543 string-icalls.c, threads.c: change to C90-style comments from C99 /
10546 2004-06-24 Dick Porter <dick@ximian.com>
10549 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
10550 return createdNew. Fixes bug 60412.
10553 * icall.c: Add createdNew parameter to CreateMutex icall
10555 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10557 * reflection.c, object-internals.h: save default value in params.
10559 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10561 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
10562 no need to build a new path combining that with the application base.
10565 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10567 * reflection.c: fixed minor standard compliance issues.
10569 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
10571 * reflection.c: fixed issue with encoding some custom attributes
10572 (arrays in properties and fields, bug #60411).
10574 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10576 * reflection.c: fix start address when copying the public key token.
10578 2004-06-23 Martin Baulig <martin@ximian.com>
10580 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
10581 the `exc' object in a static object to put it into the GC's root set.
10583 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
10585 * reflection.c: make mono_reflection_setup_internal_class ()
10586 callable a second time to setup a new parent class.
10588 2004-06-23 Dick Porter <dick@ximian.com>
10590 * threads.c: Check for WAIT_IO_COMPLETION return values.
10592 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
10594 * appdomain.c: Removed the g_free on the public key token. Now copy
10595 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
10596 * assembly.c: Added public key token string value when loading
10597 assemblies. Fix bug #60439.
10598 * icall.c: Added missing informations (like public key) in
10599 GetReferencedAssemblies. Fix #60519.
10600 * image.h: Changed definition for public key token from const char*
10601 public_tok_value to guchar public_key_token [17];
10602 * reflection.c: Updated for changes to public key token.
10604 2004-06-22 Lluis Sanchez Gual
10606 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
10607 for the field in base classes.
10609 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
10611 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
10612 mark headers as not supported, they are installed only for use by the
10615 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
10617 * *.c, *.h: avoid namespace pollution in public headers.
10619 2004-06-21 Martin Baulig <martin@ximian.com>
10621 * exception.c (mono_get_exception_security): It's in
10622 "System.Security", not in "System".
10624 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
10625 the exception classes.
10627 2004-06-21 Martin Baulig <martin@ximian.com>
10629 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
10630 Protect the exception object from being finalized.
10632 2004-06-21 Martin Baulig <martin@ximian.com>
10634 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
10637 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
10639 * reflection.c: Load the assembly in mono_reflection_type_from_name,
10640 if it was not loaded before. Fix parts of #60439.
10642 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
10644 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
10645 code that was broken since Ben's change: wrappers are now
10646 dependent on the method signature only again.
10648 2004-06-21 Martin Baulig <martin@ximian.com>
10650 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
10651 added interface support.
10653 2004-06-21 Martin Baulig <martin@ximian.com>
10655 * class.c (mono_vtable_get_static_field_data): New public method.
10657 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
10659 * filewatcher.c : Windows build fix to be compliant with API changes.
10661 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10663 * class.h, class.c: more accessors.
10664 * metadata.h, metadata.c: prepare for hiding MonoType and
10665 MonoMethodSignature: people should use the accessors from now on
10666 outside of the tree.
10668 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10670 * *.c, *.h: more API cleanups.
10672 2004-06-18 Jackson Harper <jackson@ximian.com>
10674 * assembly.c: Trace loading assemblies.
10675 * loader.c: Trace loading native libraries.
10676 * mono-config.c: Trace loading config files.
10678 2004-06-18 Dick Porter <dick@ximian.com>
10680 * locales.c: Tell ICU the lengths of strings, it can cope with
10681 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
10683 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10685 * image.c: swapped name/filename;
10687 2004-06-18 Martin Baulig <martin@ximian.com>
10689 * mono-debug-debugger.c (write_class): Write the parent class at
10690 the end of the header.
10692 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
10694 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
10696 2004-06-17 Raja R Harinath <rharinath@novell.com>
10698 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
10699 (bundle_obj): New conditional define.
10700 (BUILT_SOURCES): Remove.
10701 ($(bundle_srcs)): Make parallel-make safe.
10702 (libmonoruntime_la_LIBADD): Make unconditional.
10703 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
10704 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
10706 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
10708 * culture-info-tables.h: It was inconsistent with the latest
10711 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
10713 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
10716 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
10719 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10721 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
10722 cleaned up public header threads.h.
10724 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10726 * Makefile.am, *.c, *.h: more API cleanups.
10728 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10730 * Makefile.am: removed monosn from compilation.
10731 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
10732 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
10733 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
10734 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
10735 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
10736 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
10738 2004-06-15 Jackson Harper <jackson@ximian.com>
10740 * assembly.c: Make locales lower case when searching the GAC for
10741 assemblies. gacutil will always make locales lowercase when
10742 installing so this effectively makes them case insensitive.
10744 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
10746 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
10747 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
10748 parameter which allows to choose whether the wait can be interrupted or
10749 not. Also added the method mono_monitor_enter(), which locks the monitor
10750 using an infinite wait and without allowing interruption.
10751 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
10753 * object.h: Added new fields in MonoThread. suspend_event holds the event
10754 used to susped/resume the thread. synch_lock is the lock object to use for
10755 modifying the thread state.
10756 * threads.c: Use the new synch_lock object for locking, instead of "this",
10757 which can generate deadlocks.
10758 Moved thread state change in Thread.Sleep and Thread.Join from managed
10759 to unmanaged code. This avoids a deadlock when the thread was suspended
10760 just after acquiring the thread lock.
10761 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
10762 Implemented Thread.Suspend using an event instead of ThreadSuspend,
10763 which is not fully implemented in the io-layer.
10764 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
10766 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
10768 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
10769 threads-types.h: more API cleanups.
10771 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10773 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
10774 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
10775 threadpool.c, threads.c: first pass at the exported API cleanup.
10777 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10779 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
10781 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10783 * icall.c: added internalGetHome.
10785 2004-06-14 Dick Porter <dick@ximian.com>
10787 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
10788 possible to return successfully when '.' or '..' were the only
10789 entries in a directory, but were skipped. The MonoIOStat was not
10790 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
10793 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10795 * reflection.c: make binaries run on .Net 1.1 by default.
10797 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10799 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
10801 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
10803 * marshal.c: keep track of struct size with explicit layout
10806 2004-06-12 Martin Baulig <martin@ximian.com>
10808 * mono-debug-debugger.c: Comment out a debugging g_message().
10810 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
10812 * reflection.c, reflection.h: do not free custom attrs that are cached.
10813 * icall.c: use braces to make code clearer.
10815 2004-06-11 Martin Baulig <martin@ximian.com>
10817 * class.h (MonoInflatedField): New type.
10818 (MonoClassField): Replaced `MonoType *generic_type' with
10819 `MonoInflatedField *generic_info'.
10822 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
10824 2004-06-11 Martin Baulig <martin@ximian.com>
10826 * reflection.c (mono_image_create_method_token): Correctly encode
10829 2004-06-11 Martin Baulig <martin@ximian.com>
10831 * metadata.c (mono_metadata_parse_method_signature): When parsing
10832 a MethodDef which has VarArgs, also set sentinelpos if we don't
10833 have any parameters.
10835 2004-06-11 Martin Baulig <martin@ximian.com>
10837 * verify.c (mono_method_verify): In CEE_CALL, use
10838 mono_method_get_signature() to get the method's signature, unless
10839 we're a PInvoke method.
10841 2004-06-10 Jackson Harper <jackson@ximian.com>
10843 * assembly.c: Use <path>/lib/mono/gac for the extra paths
10844 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
10845 logical name as the supplied path is just a prefix to the gac not
10846 the direct path to it.
10848 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
10850 * reflection.c: make the token for a created method match
10851 the token of the MethodBuilder it was created from
10852 (IKVM requires this behaviour now).
10854 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
10856 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
10857 reflection.c, socket-io.c: leak fixes.
10859 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
10861 * icall.c: handle sentinel pos in vararg methods in position different
10864 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10866 * culture-info-tables.h: freshly generated.
10868 2004-06-09 Martin Baulig <martin@ximian.com>
10870 * loader.c (mono_get_method_constrained): Call `mono_class_init
10871 (constrained_class)'.
10873 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
10875 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
10876 any methods. Fixes #59629.
10878 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
10880 * culture-info-tables.h: reflecting locale-builder updates.
10882 2004-06-08 Dick Porter <dick@ximian.com>
10885 * locales.c: Fixed compile warnings, including a real bug in
10886 CompareInfo_internal_compare.
10888 2004-06-08 Dick Porter <dick@ximian.com>
10891 (ves_icall_System_Globalization_CompareInfo_internal_index):
10892 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
10893 Double-check the resuls of usearches, because ICU currently
10894 ignores most of the collator settings here. Fixes bug 59720.
10896 2004-06-08 Dick Porter <dick@ximian.com>
10899 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
10900 Fix memory leak and segfault-causing typo. No idea how this one
10901 lasted so long without being noticed.
10903 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
10905 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
10906 any methods. Fixes #59629.
10908 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10911 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
10912 own the critical section before). Removed dead code (that's done
10913 in the preload hook).
10915 (mono_assembly_load_with_partial_name): call the preload hook.
10917 2004-06-08 Martin Baulig <martin@ximian.com>
10919 * metadata.c (mono_metadata_signature_alloc): Default
10920 `sentinelpos' to -1.
10922 * reflection.c (mono_image_get_array_token): Likewise.
10924 2004-06-08 Martin Baulig <martin@ximian.com>
10926 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
10928 * metadata.c (mono_metadata_parse_method_signature): When parsing
10929 a MethodDef which has VarArgs, set sentinelpos.
10931 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
10932 `gint16' since we're using -1 for non-varargs methods.
10935 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
10936 (method_encode_signature): Added varargs support.
10937 (method_builder_encode_signature): Likewise.
10938 (mono_image_get_varargs_method_token): New static method.
10939 (mono_image_create_method_token): New public method; this is
10940 called via an icall instead of mono_image_create_token() when
10941 calling a varargs method.
10943 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
10945 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
10947 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
10949 * culture-info-tables.h : Reflecting the latest locale-builder that
10950 fixed empty array representation ({} to {0}).
10952 2004-06-07 Jackson Harper <jackson@ximian.com>
10954 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
10955 looking up extra gac paths. This allows MONO_GAC_PATH to act
10956 exactly like a prefix.
10958 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
10960 * reflection.c (mono_reflection_type_from_name): Make a copy of the
10961 type name before modifying it. Fixes #59405.
10963 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
10965 * culture-info.h: added fields for "all datetime patterns".
10966 * locales.c: ( ves_icall_System_Globalization_CultureInfo
10967 _construct_datetime_format ()): fill xxx_patterns fields.
10968 * object.h: added fields for "all datetime patterns" to
10969 MonoDateTimeFormatInfo.
10970 * culture-info-tables.h: reflecting locale-builder updates.
10972 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
10974 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
10975 the event has no add and remove methods. Fixes #59629.
10977 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
10979 * object.c: Fixed possible integer overflow when allocating large
10982 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
10984 * culture-info-tables.h: reflecting locale-builder updates.
10986 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
10988 * culture-info-tables.h: reflecting locale-builder updates.
10990 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
10992 * culture-info-tables.h: reflecting locale-builder updates.
10994 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
10996 * threads.c: Made Thread.Sleep abortable.
10998 2004-06-02 Martin Baulig <martin@ximian.com>
11000 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
11002 * debug-mono-symfile.h: Bumped symbol file version number to 37.
11004 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
11006 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
11008 2004-05-30 Jackson Harper <jackson@ximian.com>
11010 * reflection.c: Do not hardcode assembly versions or public key
11011 tokens anymore. All of this except the corlib section was dead
11014 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
11016 * object.c (mono_runtime_invoke_array): Automatically create boxed
11017 objects for byref valuetypes if needed. Fixes #59300.
11019 * object.c (mono_method_return_message_restore): Handle
11020 MONO_TYPE_OBJECT as well.
11022 2004-05-28 Jackson Harper <jackson@ximian.com>
11024 * reflection.c: The modified type encoding was causing build
11025 problems. Reverted for now.
11027 2004-05-28 Jackson Harper <jackson@ximian.com>
11029 * reflection.c/h: Take an assembly ref so that we dont create
11030 fully qualified names when encoding types in the same assembly as
11031 the custom attribute being emitted.
11032 * appdomain.c: Increment version number.
11034 2004-05-26 Duncan Mak <duncan@ximian.com>
11037 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11038 Set the full version number (major, minor, build, revision).
11040 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
11042 * marshal.c (emit_struct_conv): increment src/dst after blit
11043 (mono_marshal_get_managed_wrapper,
11044 mono_marshal_get_native_wrapper): make sure we have marshalling
11045 info before marshalling params (info computation affects
11048 * class.c (class_compute_field_layout): correctly deal with
11050 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
11051 value types (as per what windows dows by default)
11052 (mono_class_setup_mono_type): System.ValueType is blittable
11053 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
11056 * marshal.c (mono_marshal_load_type_info): flag types as
11057 non-blittable if the native layout doesn't match the managed
11060 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11062 * appdomain.c: don't add stuff in the private search path that is
11063 above the application base. If application base is not set, there's
11064 no private search path.
11066 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
11068 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
11069 byref struct arguments in native->managed marshalling.
11071 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
11073 * marshal.c (mono_marshal_get_runtime_invoke): correctly
11074 cache methods using signature (special case for methods
11075 that are value type or string class)
11077 * image.c (mono_image_close): clean up allocated GSList's
11078 in runtime_invoke_cache.
11080 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11082 * mono-config.c: set the correct path for mono_cfg_dir on windows when
11083 there's no MONO_CFG_DIR environment variable defined.
11085 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11087 * threads.c: windows version must be >= 0x0500 to include OpenThread.
11089 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
11091 * threadpool.c: Really wait for 500ms after the async call, even if the wait
11093 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
11094 before waiting for it, and call CloseHandle after the wait to unref it.
11095 This will make sure that handles are not disposed too early.
11097 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11102 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
11105 * object.c: se the application_base only for the domain that runs
11106 Main. Fixes bug #59216,
11108 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11111 * object.c: only the domain in which Main is run have
11112 SetupInformation.ConfigurationFile set, so moved a few lines from
11113 appdomain.c to object.c.
11115 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11117 * appdomain.c: we tried to load [name].(dll|exe), but according
11118 to bug #57710, we must also try [culture]/[name].(dll|exe) and
11119 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
11120 There's a test case attached to bug #58922.
11122 2004-05-27 Dick Porter <dick@ximian.com>
11125 * file-io.c: Implemented icalls for locking and unlocking regions
11127 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
11128 FALSE on error (fixes both compiler warning and real bug.)
11130 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
11132 * culture-info-tables.h: reflecting locale-builder updates.
11134 (Added missing ChangeLog entry for 05/26)
11136 2004-05-27 Jackson Harper <jackson@ximian.com>
11138 * locales.c: Fix some cut and paste errors.
11140 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11142 * mono-config.c: set the correct path for config. directory on windows.
11144 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
11146 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
11149 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
11151 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
11152 from pinvoke functions.
11154 * marshal.c (mono_ftnptr_to_delegate): Implement this.
11156 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
11158 * culture-info-tables.h: reflecting locale-builder updates.
11160 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
11162 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
11165 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
11167 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
11168 * icall.c: Modified icalls for RNG.
11169 * rand.c|h: Changed RNG interface to allow thread-safe usage under
11170 Windows (CryptoAPI).
11172 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
11174 * locales.c: Fix build.
11176 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
11178 * culture-info-tables.h: reflecting locale-builder updates.
11180 2004-05-25 Jackson Harper <jackson@ximian.com>
11182 * locales.c: When creating the current culture use the $LANGs
11183 specific culture. So DateTimeFormat and NumberFormat entries are created.
11185 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
11187 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
11188 a char array as parameter.
11190 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
11192 * image.c: In mono_image_open(), always use an absolute path name to
11193 look for already loaded images.
11195 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
11197 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
11198 missing in the windows build (like older cygwin include files).
11200 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
11202 * icall.c: Fixed check for possible integer overflow in Buffer_
11203 BlockCopy icall. Replaced comments style // by /* */.
11205 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
11207 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
11209 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
11210 check after MONO_VTADDR. Fixes pinvoke2.exe.
11212 * marshal.h marshal.c metadata.h: Add beginnings of support for
11213 ftnptr -> delegate marshalling.
11215 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
11217 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
11218 * threads.c: Fix warnings.
11220 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
11222 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
11223 * icall.c: Registered icalls for Suspend and Resume.
11224 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
11226 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
11227 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
11228 * process.c: Use WaitForSingleObjectEx.
11229 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
11231 * threads.c, threads.h: Make use of new Ex wait methods. Improved
11232 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
11233 for Suspend and Resume. Added new mono_thread_stop, used for stoping
11234 background threads. Added basic support for Abort in Windows.
11235 Start new threads using a managed delegate invoke wrapper. This wrapper
11236 has an interruption checkpoint that is needed since an interruption
11237 can be requested before the thread leaves the unmanaged code that starts
11239 * marshal.c: Added interruption checkpoint after every native call, and
11240 also before managed calls for wrappers called from unmanaged code to
11241 go into managed code.
11242 * object.h: Added new field in MonoThread to keep track of interruption
11245 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
11247 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
11250 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11257 * rand.c: getenv -> g_getenv (windows!)
11259 * process.c: complete_path is also used on non-windows platforms.
11261 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11263 * icall.c: new signature for Process_Start.
11265 * process.[ch]: new signature for Process_Start. If we're on windows
11266 and UseShellExecute is false, we have to search for the program by
11267 ourselves if we don't get a full path.
11269 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
11271 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
11272 marshalling and call CleanUpNativeData if needed. Fixes #58646.
11274 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11276 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
11279 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11281 * process.c: use double quotes to quote program name and arguments on
11282 windows. Fixes bug #58575.
11284 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11286 * file-io.c: don't return "." and ".." when using windows Find*File.
11288 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
11290 * marshal.c: Don't pass wrappers to message init because method
11291 addressed used to lookup metadata. part of remoting[2|3] fix.
11293 2004-05-15 Jackson Harper <jackson@ximian.com>
11295 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
11296 path is essentially the same as MONO_PATH except that it points to
11297 GACs instead of lib directories.
11298 * loader.h: The user gac is gone so we dont need function to
11300 * mono-config.c: user gac option is now gone.
11302 2004-05-15 Jackson Harper <jackson@ximian.com>
11304 * culture-info.h: Make defines more consistent, add calendar data
11305 to the culture info table.
11306 * culture-info-tables.h: Add basic calendar data. Basically
11307 everyone gets default gregorian until all the data is
11309 * locales.c: Use the new consistent defines. Set calendar data for
11310 culture info objects.
11311 * object.h: add a field for calendar data to CultureInfo
11313 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
11315 * image.c: image->runtime_invoke_cache is keyed on signatures now.
11316 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
11318 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
11319 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
11320 an extra param that is the pointer of the method to invoke. The IL for
11321 the invoke method is no longer specific to the method, but to the
11322 signature of the method. Thus, we can share the same code for multiple
11323 methods. This reduces the number of methods that have to be compiled.
11325 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
11327 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
11329 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11331 * icall.c: Optimize Buffer.BlockCopy.
11333 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11335 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
11336 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
11337 quote). Changed them to "MMMM yyyy".
11339 2004-05-12 Miguel de Icaza <miguel@ximian.com>
11342 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
11344 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
11346 * reflection.h: Updated after changes to managed structures.
11348 * appdomain.c: Bump corlib version.
11350 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11352 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
11355 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11357 * Makefile.am: link to ../os/libmonoos.la on windows.
11360 -If MONO_DEBUG, warn about non-existing directories in
11362 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
11363 compile time variable.
11364 -Removed init_default_path and call mono_set_rootdir from
11365 libmonoos.a instead (windows only).
11367 * assembly.h: declare mono_assembly_getrootdir().
11370 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
11372 * loader.c: s/getenv/g_getenv/
11374 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
11376 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
11378 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
11380 * metadata.h: Add new marshalling conversions.
11382 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
11385 * reflection.c (mono_reflection_get_type): Lookup the type in all
11386 modules of a multi-module assembly. Fixes #58291.
11388 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
11390 * threads.c: Before aborting a background, set the StopRequested
11391 state. This avoids throwing the Abort exception.
11392 In mono_thread_manage, don't continue with the shutdown until all
11393 aborted threads have actually stopped.
11395 2004-05-10 Jackson Harper <jackson@ximian.com>
11397 * locales.c: Remove the modifier from culture names.
11399 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11401 * Makefile.am: monosn is not installed any more. It has been deprecated
11404 2004-05-07 Jackson Harper <jackson@ximian.com>
11407 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
11408 Fix array construction, add bailout if the length is 0.
11410 2004-05-07 Dick Porter <dick@ximian.com>
11412 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
11413 machine doesn't have a DNS entry. Patch by Urs Muff
11414 (umuff@quark.com), fixes bug 57928.
11416 2004-05-06 Jackson Harper <jackson@ximian.com>
11418 * reflection.c: Handle null PublicTokens properly. alloc mem for
11419 assembly names culture so we dont crash when freeing it.
11421 2004-05-06 Jackson Harper <jackson@ximian.com>
11423 * assembly.c: Check the usergac when loading with partial names.
11425 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
11427 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
11428 does nothing for now (not required for Linux/Windows) but the class
11429 library can call it (and a newer or modified runtime could need it).
11430 * icall.c: Registred icall.
11432 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11434 * loader.c: prints a message on module loading error we set MONO_DEBUG
11435 environment variable.
11437 2004-05-05 Jackson Harper <jackson@ximian.com>
11439 * appdomain.c: Handle PublicKeyToken=null properly.
11441 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
11443 * environment.c|h: Added icall ves_icall_System_Environment_
11444 GetOSVersionString to get the current OS version as a string.
11445 * icall.c: Registred icall.
11447 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
11449 * object.c: in mono_object_get_virtual_method(), take into account that
11450 non-virtual methods don't have a slot in the vtable. Check needed when
11451 the object is a proxy.
11453 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
11455 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
11456 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
11458 * object.c (mono_class_compute_gc_descriptor): Fix warning.
11460 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
11461 passed when a valuetype is expected.
11463 * object.c (mono_unhandled_exception): Only set the exit code if the
11464 exception happens in the main thread. Fixes thread5.exe.
11466 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
11467 invalid names. Fixes #58047.
11469 2004-05-03 Jackson Harper <jackson@ximian.com>
11471 * assembly.c: This line was committed accidently and is unneeded.
11473 2004-05-03 Jackson Harper <jackson@ximian.com>
11475 * icall.c: Add new icall for Assembly::LoadWithPartialName
11476 * assembly.c/.h: new function that probes the GAC to load partial
11477 assembly names by Paolo Molaro.
11479 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11481 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
11482 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
11483 (type_get_fully_qualified_name): Added PublicKeyToken when building a
11486 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11488 * appdomain.c: fixed check for 'neutral' culture and removed warning.
11489 * reflection.c: fix bug when parsing a full type name and Version is not
11490 the last thing in the string.
11492 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
11494 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
11495 crashes when it is freed.
11497 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11499 * assembly.c: print the compat warning to stderr.
11501 2004-05-01 Miguel de Icaza <miguel@ximian.com>
11503 * assembly.c (mono_assembly_load_references): Add a compatibility
11504 hack to run old applications that might be still referencing the
11505 3300-based assemblies, only do this for System.xxx.
11507 2004-05-01 Jackson Harper <jackson@ximian.com>
11509 * appdomain.c: If the culture is neutral we set it to "".
11511 2004-04-29 Jackson Harper <jackson@ximian.com>
11513 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
11515 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
11517 * string-icalls.c: added low overhead function for copying chars
11518 * icall.c: added needed icall for the above function
11520 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11522 * icall.c: fix return value of get_global_assembly_cache. Implemented
11523 Environment.GetLogicalDrives.
11525 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
11527 * rand.c: try and talk to egd or prngd
11528 for random bytes if opening devices fail.
11530 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
11532 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
11533 alignment for the type using the native alignment of its members
11534 instead of using klass->min_align.
11536 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
11538 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11541 * socket-io.c: added check for sys/aio.h.
11543 2004-04-28 Dick Porter <dick@ximian.com>
11545 * threads.c: Don't abort a thread thats already aborting, when
11546 terminating everything.
11548 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11550 * icall.c: added 2 new async calls for Socket.
11552 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
11553 IO on *nix systems.
11555 * threadpool.c: removed unused variable.
11557 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
11559 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
11561 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
11563 * locales.c: put back string_invariant_tolower () and
11564 string_invariant_toupper ().
11566 2004-04-26 David Waite <mass@akuma.org>
11571 * unicode.h: remove comma from end of enumeration declarations
11573 2004-04-26 David Waite <mass@akuma.org>
11575 * debug-mono-symfile.h:
11578 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
11581 2004-04-26 Jackson Harper <jackson@ximian.com>
11583 * appdomain.c: Increment version number.
11585 2004-04-26 Jackson Harper <jackson@ximian.com>
11587 * appdomain.c: Set assembly references public token value when
11588 PublicKeyToken is specified, not the hash_value. Free public token
11589 values when free assembly name data. Previously the public key
11590 token was hex decoded, however we are using hex encoded public key
11591 tokens, so this is not neccasary.
11592 * assembly.c: Lookup assemblies in the gac if their public token
11593 value is set. Add function to allow enabling user gac
11594 lookups. Specify whether or not the assembly was loaded from the
11595 GAC. Compare full assembly names when checking the cache for
11596 assemblies (Temporarily disabled see comment in code). Remove
11597 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
11598 specifies trace-loader they get extra info to stdout on the
11599 loading of assemblies.
11600 * image.h: Add a field for an assembly references public token
11601 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
11602 whether an assembly has been loaded from the GAC.
11603 * image.c: Remove a corlib -> mscorlib name mapping.
11604 * loader.h: Add function to enable/disable the user gac.
11605 * mono-config.c: Check if the usergac is enabled in the config
11607 * icall.c: New icall to determine whether or not an assembly has
11608 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
11609 * tabldefs.h: Add constant for assemblyref flag that specifies a
11610 full public key is used instead of a public token.
11611 * reflection.c: Remove mscorlib -> corlib mappings. Set
11612 PublicTokenValue instead of hash value. This value is a hex
11613 string so it does not need to be expanded.
11615 2004-04-26 Martin Baulig <martin@ximian.com>
11617 * mono-debug-debugger.c (mono_debugger_initialize): Set
11618 `mono_debugger_initialized' before calling mono_debug_lock().
11620 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
11622 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
11623 InternalToUpper/InternalToLower.
11624 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
11625 removed invariant culture shortcut. This is now done in managed code.
11626 * locales.c: (string_invariant_toupper/tolower) removed.
11628 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11630 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
11631 Added Poll internal call.
11633 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
11634 call for Poll. Select was too heavy for polling a single socket.
11636 * threadpool.[ch]: added mono_threadpool_cleanup.
11637 * threads.c: use it. Don't use Thread_Abort on windows.
11639 2004-04-23 Martin Baulig <martin@ximian.com>
11641 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
11643 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
11645 * icall.c: Registred new icalls for key pair protection and added an
11646 icall for Environment.GetFolderPath on Windows.
11647 * security.c|h: Added new icalls for key pair protection.
11649 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11651 * socket-io.c: don't display the non-supported family warning for known
11652 families. Now this is not displayed on windows when checking support
11655 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11657 * class.c: don't display the layout warning for static fields.
11659 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
11661 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
11662 * locales.c, locales.h: Added new icalls for culture-specific
11663 Char.ToLower and Char.ToUpper.
11665 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11667 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
11670 2004-04-20 Martin Baulig <martin@ximian.com>
11672 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
11673 of the type name before passing it to mono_reflection_type_from_name().
11675 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
11677 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
11678 encodings here. Fixes #56965.
11680 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
11682 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
11683 fix test on strstr result not that I can see anything that
11684 relies on the result.
11686 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
11688 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
11691 * marshal.c (mono_marshal_get_string_encoding): New helper function.
11693 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
11694 function to determine which marshalling to use for strings. Fixes
11697 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
11699 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
11701 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
11703 * icall.c: #include mono-config.h
11705 2004-04-15 Jackson Harper <jackson@ximian.com>
11707 * culture-info-tables.h: Fix date formats for en-US culture.
11709 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
11711 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
11712 ThreadPool.SetMinThreads.
11713 * threadpool.c: Implemented ThreadPool.GetMinThreads and
11714 ThreadPool.SetMinThreads.
11716 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11718 * mono-config.c: also load the .config file in the directory
11719 where the assembly was found.
11721 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
11723 * assembly.c: load per-assembly config files.
11724 * icall.c: decrapified code to get the config dir and moved to
11726 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
11727 per-assembly config files. When doing a dll map lookup give precedence
11728 to the per-assembly data.
11730 2004-04-14 Martin Baulig <martin@ximian.com>
11732 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
11733 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
11734 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
11736 * mono-debugger-debugger.c: While the debugger is locked, remember
11737 whether the symbol tables have changes and send one single
11738 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
11740 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
11742 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
11744 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
11747 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
11748 account when marshalling string arrays. Fixes #56965.
11750 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
11752 * icall.c: Add new icalls mapping for security.
11753 * security.c|h: Add internal calls for WindowsIdentity,
11754 WindowsImpersonationContext and WindowsPrincipal.
11756 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
11758 * class.c: Added comment to ensure the System.MonoDummy class
11759 is removed when no longer necessary
11761 2004-04-13 Miguel de Icaza <miguel@ximian.com>
11763 * appdomain.c: Pass arguments to the bootstraping exceptions to
11764 minimize JITed methods at boot
11766 * metadata.c (mono_exception_from_name_two_strings): Allow for the
11767 second string to be null.
11769 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
11770 Change the protocol to minimize the JIT methods at startup. Now
11771 it Returns the internal codepage, if the value of "int_code_page"
11772 is 1 at entry, and we can not compute a suitable code page
11773 number, returns the code page as a string.
11775 2004-04-13 Jackson Harper <jackson@ximian.com>
11777 * culture-info-tables.h: Fix number of decimal digits for all
11780 2004-04-13 Jackson Harper <jackson@ximian.com>
11782 * icall.c: Clairfy out of sync error message. It is not always
11783 your corlib that is out of sync.
11785 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
11787 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
11788 properties when only the set accessor is overriden. Fixes #55874.
11790 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
11792 * assembly.c (mono_assembly_load_references): Make this thread safe.
11795 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
11797 * monosn.c: Add missing initialization calls.
11799 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
11802 ves_icall_System_Globalization_CultureInfo_construct_number_format
11803 Fix g_assert so it compiles on fussier compilers re int/ptr
11806 2004-04-08 Dick Porter <dick@ximian.com>
11809 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
11810 53992. Also rearrange the code so that the internal calls return
11811 an error value and exceptions are thrown from managed code.
11813 * icall.c: Add type info to the socket icalls.
11815 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11817 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
11820 2004-04-07 Martin Baulig <martin@ximian.com>
11822 * class.c (mono_class_from_generic_parameter): Don't default
11823 `klass->parent' to `mono_defaults.object_type'.
11825 2004-04-07 Martin Baulig <martin@ximian.com>
11827 * reflection.c (mono_reflection_initialize_generic_parameter): Set
11828 `param->pklass->reflection_info'.
11830 2004-04-07 Jackson Harper <jackson@ximian.com>
11832 * culture-info-tables.h: Fix date separator symbol.
11834 2004-04-07 Martin Baulig <martin@ximian.com>
11836 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
11837 from System.Type to System.MonoType.
11839 2004-04-07 Martin Baulig <martin@ximian.com>
11842 (MonoReflectionGenericParam): Added `has_reference_type' and
11843 `has_value_type' fields.
11845 * reflection.c (mono_image_get_generic_param_info): Encode the
11846 correct flags if we have the `class' or `struct' constraint.
11848 2004-04-07 Martin Baulig <martin@ximian.com>
11851 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
11853 2004-04-07 Jackson Harper <jackson@ximian.com>
11855 * appdomain.c: Revert extra patches, just wanted to bump the
11858 2004-04-07 Jackson Harper <jackson@ximian.com>
11860 * Makefile.am: Add culture-info private headers.
11861 * icall.c: Add new icalls for contructing locales.
11862 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
11863 * locales.h: Declare new culture info construction methods.
11864 * object.h: Add new fields used to avoid the CultureMap to
11866 * culture-info.h: Definition of structs used in the culture info
11868 * culture-info-tables.h: Autogenerated tables that contain culture
11869 info data. This file was generated with the locale-builder tool.
11870 * appdomain.c: Incement corlib version number.
11872 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
11874 * appdomain.c: (mono_runtime_init) move mono_thread_init
11875 to before mono_object_new calls so critical sections
11876 are initialized before use.
11878 2004-04-07 Martin Baulig <martin@ximian.com>
11881 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
11882 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
11883 (ves_icall_MonoGenericParam_initialize): Removed.
11884 (monogenericparam_icalls): Removed.
11885 (generictypeparambuilder_icalls): Added new table for
11886 System.Reflection.Emit.GenericTypeParameterBuilder.
11889 (mono_reflection_define_generic_parameter): Removed.
11890 (mono_reflection_initialize_generic_parameter): This is now called
11891 from GenericTypeParameterBuilder's .ctor.
11893 2004-04-06 Martin Baulig <martin@ximian.com>
11895 * class.c (mono_class_init): Don't inflate nested classes in a
11897 (mono_type_get_name_recurse): Include the generic arguments for
11898 generic instances and generic type declarations.
11899 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
11900 (_mono_class_get_instantiation_name): Removed.
11901 (mono_class_create_generic): Always use `gklass->name' as our name.
11903 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
11905 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
11906 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
11907 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
11908 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
11909 closed generic methods here.
11912 (mono_reflection_generic_inst_get_nested_types): Removed.
11913 (inflate_mono_method): Copy the generic parameters from the
11914 MonoMethodHeader into out MonoGenericMethod.
11916 2004-04-06 Martin Baulig <martin@ximian.com>
11919 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
11921 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
11923 * reflection.c (build_compressed_metadata): If we have any entries
11924 in the GenericParam, MethodSpec or GenericParamConstraint tables,
11925 set the header version to 1.1.
11927 2004-04-06 Martin Baulig <martin@ximian.com>
11929 * class.c (mono_class_init): If we're a generic instance,
11930 initialize our nested classes, too.
11931 (_mono_class_get_instantiation_name): Deal with the new `!%d'
11934 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11936 * process.c: quote the argument passed to the shell on windows.
11938 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
11940 * threads.c (mono_alloc_special_static_data): Allow this to be
11941 called during startup.
11943 2004-04-02 Martin Baulig <martin@ximian.com>
11946 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
11948 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
11950 * icall.c: Fix build.
11952 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
11954 * Makefile.am: Added security.c|h.
11955 * icall.c: Added icall for get_UserName;
11956 * security.c: New file for security related icalls. Added function
11957 get_UserName for System.Environment (fix #56144).
11958 * security.h: New. Header file for security.c
11960 2004-04-02 Dick Porter <dick@ximian.com>
11962 * icall.c: Deleted the icalls that were obsoleted some time ago
11963 by the ICU string code, and which were mixed into the icall
11964 rearranging. Fixes bug 55969.
11967 * string-icalls.c: Deleted the code that those icalls reference.
11969 2004-04-01 Martin Baulig <martin@ximian.com>
11971 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
11973 * class.c (mono_class_from_generic_parameter): Don't set
11974 TYPE_ATTRIBUTE_INTERFACE.
11975 (my_mono_class_from_generic_parameter): Likewise.
11977 2004-04-01 Martin Baulig <martin@ximian.com>
11979 * loader.c (find_method): Added an optional `MonoClass *ic'
11980 argument to search in a specific interface.
11981 (mono_get_method_constrained): New public function.
11983 2004-04-01 Martin Baulig <martin@ximian.com>
11985 * reflection.c (mono_image_get_generic_field_token): Use the
11986 `handleref' cache here.
11988 2004-04-01 Martin Baulig <martin@ximian.com>
11990 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
11992 * reflection.c (create_generic_typespec): Use the `typespec' hash
11993 here, not the `typeref' one.
11995 2004-04-01 Martin Baulig <martin@ximian.com>
11997 * class.c (mono_class_inflate_generic_type): Moved the
11998 functionality into a new static inflate_generic_type() which
11999 returns NULL if it didn't do anything. Only increment the
12000 `mono_stats.inflated_type_count' if we actually inflated
12002 (mono_class_get_full): Check the classes type to see whether we
12003 need to inflate it; also inflate MONO_TYPE_(M)VAR.
12005 2004-04-01 Jackson Harper <jackson@ximian.com>
12007 * reflection.c: Set culture for assembly references.
12009 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
12011 * reflection.[ch], icall.[ch], Fix support for pinning variables.
12013 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12016 (do_mono_assembly_open): the critical section also covers
12017 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
12019 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12022 (mono_manage_threads): abort the background threads when finishing.
12025 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12027 * gc.c: only close the done_event handle if there was no timeout.
12030 2004-03-30 Martin Baulig <martin@ximian.com>
12032 * icall.c (icall_entries): It's called "System.Activator", not
12033 "System.Activation".
12035 2004-03-30 Martin Baulig <martin@ximian.com>
12037 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
12038 (mono_class_create_from_typespec): Likewise.
12040 2004-03-30 Martin Baulig <martin@ximian.com>
12042 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
12043 `has_ctor_constraint' and `initialized'.
12045 2004-03-30 Martin Baulig <martin@ximian.com>
12047 * reflection.c (encode_new_constraint): New static function to add
12048 the constructor constraint attribute to a type parameter.
12049 (encode_constraints): Call encode_new_constraint() if necessary.
12052 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
12054 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
12056 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
12058 * reflection.c, icall.c: add support for pinning variables.
12060 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
12062 * marshal.c (mono_marshal_get_managed_wrapper):
12063 init bool local with zero rather than null.
12065 2004-03-29 Martin Baulig <martin@ximian.com>
12067 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
12068 the "official" behavior here.
12069 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
12071 2004-03-29 Martin Baulig <martin@ximian.com>
12073 * icall.c: Reflect latest API changes.
12075 2004-03-29 Martin Baulig <martin@ximian.com>
12077 * loader.c (mono_get_method_from_token): Also call
12078 mono_metadata_load_generic_params () for abstract and interface
12079 methods; replace the type arguments in the method signature with
12080 the ones which are loaded from the metadata.
12082 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
12084 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
12085 of the lock is not the current thread. MS.NET don't do it, in spite of
12086 what the documentation says. See bug #56157.
12088 2004-03-28 Martin Baulig <martin@ximian.com>
12090 * class.c (mono_class_init): Don't call init_properties() and
12091 init_events() for generic instances; set `prop->parent' when
12092 inflating properties.
12094 * reflection.c (mono_generic_inst_get_object): Call
12095 `mono_class_init (ginst->klass)'.
12096 (mono_type_get_object): Only create a MonoGenericInst if your
12097 generic type is a TypeBuilder.
12098 (do_mono_reflection_bind_generic_parameters): Only set
12099 `ginst->is_dynamic' if our generic type is a TypeBuilder.
12101 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
12103 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
12106 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12108 * icall.c: added Kill_internal icall.
12109 * process.[ch]: added Kill_internal icall.
12111 2004-03-25 Martin Baulig <martin@ximian.com>
12113 * class.h (MonoStats): Added `generic_instance_count',
12114 `inflated_method_count', `inflated_type_count' and
12115 `generics_metadata_size'.
12117 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12119 * reflection.c: no warnings now.
12121 2004-03-25 Martin Baulig <martin@ximian.com>
12123 * class.c (mono_class_get_full): New public function; does a
12124 mono_class_get(), but also takes a `MonoGenericContext *'.
12126 * loader.c (mono_field_from_memberref): Renamed to
12127 `field_from_memberref', made static and added `MonoGenericContext *'
12129 (mono_field_from_token): Added `MonoGenericInst *' argument.
12130 (method_from_memberef): Likewise.
12131 (mono_get_method_from_token): Likewise.
12132 (mono_get_method_full): New public function; does a
12133 mono_get_method(), but also takes a `MonoGenericContext *'.
12135 * verify.c (mono_method_verify): Get the method's generic context
12136 and pass it to mono_field_from_token(), mono_get_method_full() and
12137 mono_class_get_full().
12139 2004-03-25 Martin Baulig <martin@ximian.com>
12141 * class.c (mono_class_inflate_generic_type): Take a
12142 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
12143 `MonoGenericMethod *'.
12145 2004-03-25 Martin Baulig <martin@ximian.com>
12147 * loader.h (MonoMethodInflated): Store the MonoGenericContext
12148 instead of the MonoGenericMethod here.
12150 2004-03-25 Martin Baulig <martin@ximian.com>
12152 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
12153 each time we create a new MonoGenericInst, we also create a new
12154 context which points back to us.
12156 * class.c (inflate_method): Use `ginst->context' instead of
12157 creating a new context.
12159 * loader.c (method_from_memberref): Use
12160 `klass->generic_inst->context' instead of creating a new context.
12162 2004-03-25 Martin Baulig <martin@ximian.com>
12164 * class.h (MonoGenericContext): New struct.
12165 (MonoGenericMethod): Removed `generic_inst'.
12167 * class.c (mono_class_inflate_generic_method): Take a
12168 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
12170 2004-03-25 Martin Baulig <martin@ximian.com>
12172 * loader.h (MonoMethodInflated): New typedef.
12174 * metadata.h (MonoMethodSignature): Removed `gen_method', make
12175 `generic_param_count' consume just 30 bits, added `is_inflated'
12176 and `has_type_parameters' flags (one bit each).
12178 * class.c (mono_class_inflate_generic_method): Create a
12179 MonoMethodInflated instead of a MonoMethodNormal and set
12180 `is_inflated' in the method signature.
12182 * class.h (MonoGenericMethod): Removed `generic_method'.
12184 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
12186 * image.c: Make sure the name of a MonoImage is always an absolute path.
12187 This fixes bug #54415.
12189 2004-03-24 Martin Baulig <martin@ximian.com>
12191 * class.c (mono_class_setup_vtable): If we're a generic instance,
12192 use our generic type's vtable size.
12194 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
12196 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
12197 MONO_NO_UNLOAD env var as a temporary workaround for unloading
12200 2004-03-23 Martin Baulig <martin@ximian.com>
12202 * class.h (MonoDynamicGenericInst): Added `int count_events' and
12203 `MonoEvent *events'.
12205 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
12206 (typebuilder_icalls): Added "get_event_info"; calls
12207 mono_reflection_event_builder_get_event_info().
12209 * reflection.c (mono_reflection_generic_inst_initialize): Added
12210 `MonoArray *events'.
12211 (mono_reflection_event_builder_get_event_info): New function.
12213 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
12215 * object.h: add mono_type_initialization_init
12217 * object.c (mono_runtime_class_init):
12218 implement class constructor synchronization rules
12219 to cope with threading issues.
12220 add mono_type_initialization_init
12222 * appdomain.c (mono_runtime_init): call
12223 mono_type_initialization_init
12225 * class.h: removing initializing field from MonoVTable
12227 2004-03-23 Martin Baulig <martin@ximian.com>
12229 * class.c (my_mono_class_from_generic_parameter): Use
12230 `param->name' if it's not NULL.
12232 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
12234 * class.c: do not insert non-virtual methods in the vtable.
12235 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
12236 that means the method is non-virtual. This never would have
12239 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
12241 * profiler.c: Added lock for accessing coverage_hash.
12243 2004-03-22 Martin Baulig <martin@ximian.com>
12245 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
12246 `method->method->signature->generic_param_count != 0' to make it
12247 work for interface methods.
12249 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12251 * process.c: quote the string passed to the shell using g_shell_quote.
12253 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12256 (mono_threads_manage): don't remove the finalizer thread and self
12257 from the threads hash table so that mono_thread_manage can be called
12260 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12262 * process.c: quote the arguments when UseShellExecute is true. Fixes
12265 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12267 * threads.c: set mono_thread_detach as a cleanup routine for every
12268 thread. This way it's always executed upon thread termination, either
12269 aborted or finished normally. No more xsp hangs!
12271 2004-03-17 Martin Baulig <martin@ximian.com>
12273 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
12274 `int count_nested' and a `MonoType **nested'.
12276 * reflection.c (mono_reflection_bind_generic_parameters): Moved
12277 most of the functionality into a new static
12278 do_mono_reflection_bind_generic_parameters() and don't take a
12279 `MonoType *nested_in' argument any more. Don't compute nested
12281 (mono_reflection_generic_inst_get_nested_types): New public method
12282 to get nested types.
12284 * class.c (mono_class_create_generic): Set `klass->nested_in' if
12285 we're a nested class.
12287 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
12288 mono_reflection_generic_inst_get_nested_types() to compute the
12291 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
12293 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
12294 descriptive error message under windows.
12296 2004-03-17 Martin Baulig <martin@ximian.com>
12298 * class.c (dup_type): Added `const MonoType *original' argument;
12299 copy the attrs from the original type.
12301 2004-03-17 Martin Baulig <martin@ximian.com>
12303 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
12304 `m->generic_inst_cache' here.
12306 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
12308 * exception.h exception.c: Add stack_overflow_exception.
12310 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12313 (overlapped_callback): call SetEvent *after* invoking the callback.
12314 No need to call CloseHandle.
12316 2004-03-16 Martin Baulig <martin@ximian.com>
12318 * reflection.c (mono_image_get_fieldref_token): Take a
12319 `MonoReflectionField *' instead of a `MonoClassField *' and a
12320 `MonoClass *'; store the `MonoReflectionField *' in the hash.
12322 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12324 * appdomain.c: don't add the culture to the filename we're looking for
12325 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
12327 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12329 * locales.c: don't ignore symbols when doing case insensitive compares.
12330 Thanks Dick! Fixes bug #54046.
12332 * threads.c: surround 'threads' usage with enter/leave in
12333 mono_thread_manage.
12335 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
12337 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
12338 implicitly marshalled as [Out]. Fixes #55450.
12340 (mono_marshal_get_runtime_invoke): Zero out the result if there is
12343 2004-03-16 Martin Baulig <martin@ximian.com>
12345 * class.c (mono_class_from_generic_parameter): Use the actual
12348 2004-03-16 Martin Baulig <martin@ximian.com>
12350 * reflection.c (type_get_signature_size): New static function.
12351 Compues the size of the type in a method signature.
12352 (method_get_signature_size): New static function; calls
12353 type_get_signature_size() to compute the actual size of the
12354 method's signature.
12355 (method_encode_signature): Use method_get_signature_size() to get
12356 the signature's size rather than using `nparams * 10'.
12358 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12360 * file-io.h: define here WapiOverlapped on windows. I don't want the
12361 regular OVERLAPPED one.
12364 * threadpool.c: somehow, BindIoCompletionCallback is not found.
12365 Disabling AIO on windows.
12367 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12369 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
12372 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12374 * appdomain.c: upgraded corlib version.
12376 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
12377 and BeginWrite. Allow opening files for asynchrnous operations.
12379 * file-io.h: new struct that maps FileStreamAsyncResult.
12380 * icall.c: added new icalls.
12381 * process.[ch]: support setting child process environment variables
12382 and use the SHELL or COMSPEC when UseShellExecute is true.
12384 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
12385 callback for async. IO is here and also BindHandle.
12387 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
12390 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
12392 * reflection.c (create_custom_attr): Allow len == 0.
12394 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
12395 computation on big-endian machines.
12397 2004-03-13 Martin Baulig <martin@ximian.com>
12399 * class.h (MonoGenericInst): Added `int count_ifaces'.
12401 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
12402 `ginst->count_ifaces' instead `klass->interface_count' since we
12403 may get called before the vtable is created.
12405 * loader.c (mono_method_get_param_names): If we're a generic
12406 instance, return and don't initialize the class.
12408 * reflection.c (mono_reflection_setup_generic_class): Don't call
12409 ensure_runtime_vtable().
12410 (mono_reflection_bind_generic_parameters): Set
12411 `ginst->count_ifaces'.
12413 2004-03-11 Jackson Harper <jackson@ximian.com>
12417 * unicode.h: Remove unused System.Char icalls.
12419 2004-03-11 Miguel de Icaza <miguel@ximian.com>
12421 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
12422 code when we P/Invoke the first library in Windows.Forms, instead
12423 of when we first open the assembly.
12425 * assembly.c: Drop the lookup from here.
12427 2004-03-10 Martin Baulig <martin@ximian.com>
12429 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
12430 class for properties, fields and events. Finally fixes #54945.
12432 2004-03-10 Martin Baulig <martin@ximian.com>
12434 * metadata.c (mono_metadata_class_equal): New static function;
12435 checks whether two generic instances or two generic parameters are
12437 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
12440 2004-03-10 Martin Baulig <martin@ximian.com>
12442 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
12444 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
12445 argument and write it into the `reflection_info' field.
12448 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
12449 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
12451 2004-03-09 Jackson Harper <jackson@ximian.com>
12453 * char-conversions.h: use 8 bits for numeric data its all we need
12454 * icall.c: numeric data is only 8 bits now.
12456 2004-03-09 Martin Baulig <martin@ximian.com>
12458 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
12460 * class.c (init_properties, init_events): Initialize the new
12463 * reflection.c (typebuilder_setup_properties): Likewise.
12464 (typebuilder_setup_events): Likewise.
12466 * reflection.h (MonoEventInfo): Replaced `parent with
12467 `declaring_type' and `reflected_type'.
12469 * icall.c (ves_icall_get_property_info): Distinguish between
12470 declaring and reflected type.
12471 (ves_icall_get_event_info): Likewise.
12473 2004-03-09 Martin Baulig <martin@ximian.com>
12475 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
12476 (ves_icall_Type_GetField): Correctly set field->klass.
12478 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
12480 * loader.h: Fix warning.
12482 2004-03-08 Miguel de Icaza <miguel@ximian.com>
12484 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
12485 library routine if present. Notice that it will still continue
12486 executing even if its missing, for those working on the Gtk#
12487 edition of Windows.Forms.
12489 * assembly.c (do_mono_assembly_open): If loading the
12490 System.Windows.Forms call mono_loader_wini_init.
12492 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
12494 * class.h: Added MonoRemoteClass struct.
12495 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
12496 function for MonoStrings.
12497 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
12498 Added internal call for getting the proxy type.
12499 * marshal.c: Get the type of transparent proxies from its remote_class.
12500 Added methods that generate the IL for type checks and casts:
12501 mono_marshal_get_isinst, mono_marshal_get_castclass,
12502 mono_marshal_get_proxy_cancast.
12503 * marshal.h: Declaration of the previous new methods.
12504 * object.c: Added new moethods for creating and updating MonoRemoteClass
12505 instances: mono_remote_class, mono_upgrade_remote_class,
12506 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
12507 * verify.c: FIx transparent_proxy_fields layout.
12508 * appdomain.c: Bump corlib version.
12510 2004-03-04 Jackson Harper <jackson@ximian.com>
12512 * icall.c: Add icall to access char conversion tables.
12513 * char-conversions.h: Character conversion tables.
12514 * Makefile.am: Add char-conversions.h private header file.
12516 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
12518 * appdomain.c (unload_thread_main): Increase unloading timeout to
12519 10 sec as a temporary workaround for Nant problems.
12521 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
12523 * gc.c: Add checks for GC_enable and GC_disable.
12525 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
12526 (jaak@zd.com.pl). Fix memory corruption in String.Replace
12529 2004-02-27 Martin Baulig <martin@ximian.com>
12531 * reflection.c (mono_reflection_bind_generic_parameters): Take a
12532 `MonoReflectionType *' instead of a `MonoType *'.
12534 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
12536 * gc.c (run_finalize): Avoid finalizing the object representing the
12538 (finalizer_thread): Fix warning.
12540 2004-02-25 Martin Baulig <martin@ximian.com>
12542 * class.c (_mono_class_get_instantiation_name): Added `int offset'
12543 argument for nested types.
12544 (mono_class_create_generic): Added support for nested generictypes.
12546 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
12549 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
12551 * reflection.c (method_encode_signature): Increase the minimum
12552 value of `size' from 10 to 11.
12553 (mono_reflection_bind_generic_parameters): Take `int type_argc'
12554 and `MonoType **types' arguments instead of the `MonoArray
12555 *types'; added `MonoType *nested_in'. Recursively instantiate
12558 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
12560 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
12561 stack_overflow_ex members which are used by exception handling.
12563 * appdomain.c (mono_runtime_init): Initialize the new members.
12565 * gc.c (mono_gc_enable): New helper function.
12566 * gc.c (mono_gc_disable): New helper function.
12568 2004-02-23 Martin Baulig <martin@ximian.com>
12570 * icall.c: I must have been really stupid - make it actually work
12573 2004-02-23 Martin Baulig <martin@ximian.com>
12575 * loader.c (method_from_memberref): Only inflate the method if
12576 it's in another klass.
12578 2004-02-23 Martin Baulig <martin@ximian.com>
12580 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
12581 (mono_class_init): If we're a generic instance and an interface,
12582 compute `class->interface_id'; also create `class->interfaces'
12583 here and inflate them.
12585 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
12587 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
12589 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
12591 2004-02-15 Miguel de Icaza <miguel@ximian.com>
12593 * reflection.c (method_encode_code): Improved the error message
12594 generated by the exception.
12596 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12598 * icall.c: Martin did not do what he said in the ChangeLog for
12599 2004-02-18, but put back the changes for properties and events.
12600 Commenting those changes out again and adding comment to bug #54518.
12602 * process.c: removed warning.
12604 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
12606 * marshal.c (emit_struct_conv): Print an error message instead of
12607 asserting when a type does not have the StructLayout attribute.
12609 2004-02-20 Martin Baulig <martin@ximian.com>
12611 * reflection.c (mono_type_get_object): Also use the cache for
12613 (mono_reflection_bind_generic_parameters): Always compute
12616 2004-02-20 Martin Baulig <martin@ximian.com>
12618 * class.h (MonoGenericMethod): Removed `klass'.
12620 * class.c (mono_class_inflate_generic_method): Added `MonoClass
12623 2004-02-20 Martin Baulig <martin@ximian.com>
12625 * reflection.c (method_encode_methodspec): Actually use the
12626 uninflated signature for the memberref.
12628 2004-02-20 Martin Baulig <martin@ximian.com>
12630 * class.h (MonoGenericMethod): Removed `declaring'.
12632 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
12633 is NULL, compute it here.
12635 2004-02-20 Martin Baulig <martin@ximian.com>
12637 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
12639 * metadata.c (mono_metadata_generic_inst_hash): New method.
12640 (mono_metadata_generic_inst_equal): New method.
12642 * reflection.c (mono_reflection_bind_generic_parameters): Use the
12643 `klass->image->generic_inst_cache' cache to avoid creating
12644 duplicate MonoGenericInst's.
12646 * class.c (mono_class_inflate_generic_type): Use the cache.
12648 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
12650 * object.c: fixed gc descriptor calculation for embedded valuetypes.
12652 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12654 * icall.c: added Socket.WSAIoctl icall.
12656 * socket-io.[ch]: implemented
12657 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
12659 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
12661 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
12663 2004-02-18 Urs C Muff <umuff@quark.com>
12665 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
12666 this work on PPC and other big-endian architectures.
12668 * debug-mono-symfile.h: Prepended the names of all the `guint32'
12669 fields with an underscore to make sure they're only accessed by
12670 the read32() macro.
12672 2004-02-18 Martin Baulig <martin@ximian.com>
12674 * icall.c: Put the klass->refclass changes back for methods and
12675 fields, but not for properties and events. We're currently not
12676 distinguishing between DeclaringType and ReflectedType for
12677 properties and events, that's what caused the regressions.
12679 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12682 (mono_async_result_new): the handle can be NULL.
12684 * threadpool.c: Use an event instead of a semaphore, don't initialize
12685 it until needed. This saves quite a few semaphores from being created
12686 when using the threadpool.
12688 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
12690 * object.c (mono_string_is_interned_lookup): Fix interning of long
12691 strings. Fixes #54473.
12693 * domain.c (ldstr_equal): Optimize if the two strings are equal.
12695 * icall.c: Revert the klass->refclass changes since they introduce
12696 regressions (bug #54518).
12698 2004-02-18 Martin Baulig <martin@ximian.com>
12700 * class.c (mono_class_init): If we're a generic instance and don't
12701 come from a TypeBuilder, inflate our members here.
12702 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
12703 (mono_class_create_generic): New public method.
12704 (mono_class_initialize_generic): Removed.
12705 (get_instantiation_name): Renamed to
12706 _mono_class_get_instantiation_name() and made it public.
12708 2004-02-18 Martin Baulig <martin@ximian.com>
12710 * class.c (mono_class_inflate_generic_type): Clear the new
12711 instance's `nginst->klass' when inflating a generic instance.
12712 (mono_class_is_subclass_of): Added (basic) support for generic
12715 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
12717 * appdomain.h, domain.c: use a MonoCodeManager instead of a
12718 MonoMempool to hold compiled native code.
12720 2004-02-17 Martin Baulig <martin@ximian.com>
12722 * class.h (MonoDynamicGenericInst): Added `count_properties' and
12725 * reflection.c (mono_reflection_generic_inst_initialize): Added
12726 `MonoArray *properties' argument.
12728 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
12730 2004-02-17 Martin Baulig <martin@ximian.com>
12732 * icall.c (ves_icall_Type_GetFields): Renamed to
12733 ves_icall_Type_GetFields_internal() and added a
12734 `MonoReflectionType *rtype' argument; pass it to
12735 mono_field_get_object() to set the field's "reflected" type.
12736 (ves_icall_Type_GetConstructors): Likewise.
12737 (ves_icall_Type_GetEvents): Likewise.
12738 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
12739 argument; pass it to mono_method_get_object() to set the method's
12742 2004-02-17 Martin Baulig <martin@ximian.com>
12744 * class.h (MonoDynamicGenericInst): New type.
12745 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
12747 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
12748 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
12749 (ves_icall_MonoGenericInst_GetFields): New interncall.
12751 * class.c (mono_class_from_generic): Don't call
12752 mono_class_initialize_generic() if this is a dynamic instance;
12753 ie. it's being created from a TypeBuilder.
12754 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
12755 `class->byval_arg.type'.
12757 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
12758 to `inflate_method' and made static.
12759 (mono_reflection_inflate_field): Removed.
12760 (mono_reflection_generic_inst_initialize): New public method.
12762 * reflection.h (MonoReflectionGenericInst): Removed `methods',
12763 `ctors' and `fields'; added `initialized'.
12765 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
12767 * debug-helpers.c (mono_method_full_name): Fix output for empty
12770 2004-02-12 Martin Baulig <martin@ximian.com>
12772 * class.h (MonoClassField): Added `MonoType *generic_type'.
12774 * reflection.c (mono_image_get_fieldref_token): Added support for
12775 instantiated generic types.
12776 (field_encode_inflated_field): Removed.
12777 (mono_image_get_inflated_field_token): Removed.
12778 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
12780 * reflection.h (MonoReflectionInflatedField): Removed.
12782 2004-02-12 Martin Baulig <martin@ximian.com>
12784 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
12785 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
12787 * reflection.c (mono_image_get_methodspec_token): Take a
12788 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
12789 (mono_image_create_token): Check whether we have a
12790 `method->signature->gen_method' and call
12791 mono_image_get_methodspec_token() if appropriate.
12792 (inflated_method_get_object): Removed.
12793 (mono_reflection_bind_generic_method_parameters): Return a
12794 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
12795 (mono_reflection_inflate_method_or_ctor): Likewise.
12797 * reflection.h (MonoReflectionInflatedMethod): Removed.
12799 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
12801 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
12802 for custom valuetype marshalling.
12804 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
12806 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12808 * icall.c: fixed WSAGetLastError_internal name.
12810 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
12812 * threads.c (mono_thread_attach): Allow this to be called multiple
12813 times for a thread.
12815 * threads.c (build_wait_tids): Do not wait for ourselves.
12817 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
12818 appdomain list is empty.
12820 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
12821 memory returned by mono_string_builder_to_utf16, since it points into
12822 managed memory. Thanks to Bernie Solomon for noticing this.
12824 * icall.c: Add AppDomainSetup icalls.
12826 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
12828 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
12831 * reflection.c (reflection_methodbuilder_to_mono_method): Save
12832 custom attributes to the method_aux struct. Also fix array indexes etc.
12834 * loader.c (mono_method_get_param_names): Make dynamic case work again.
12836 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
12838 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
12839 (both static and runtime) and reduce startup time.
12841 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
12843 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
12844 AsAny marshalling conversion instead of crashing.
12846 * marshal.c: Fix warnings.
12848 2004-02-09 Martin Baulig <martin@ximian.com>
12850 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
12852 * reflection.h (MonoReflectionInflatedMethod): Removed the
12853 `declaring' field, it's now in the unmanaged MonoGenericMethod.
12855 * reflection.c (method_encode_methodspec): Removed the `method'
12856 argument; we get it from `gmethod->declaring'.
12857 (inflated_method_get_object): Removed the `declaring' argument.
12859 2004-02-09 Martin Baulig <martin@ximian.com>
12861 * class.h (MonoGenericMethod): New type.
12862 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
12865 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
12866 a `MonoGenericMethod *gen_method' one.
12868 * class.c (mono_class_inflate_generic_type): Take an additional
12869 `MonoGenericMethod * argument. This is only non-NULL if we're
12870 inflating types for a generic method.
12871 (mono_class_inflate_generic_signature): Renamed to
12872 inflate_generic_signature() and made static; take a
12873 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
12874 (inflate_generic_header): Take a `MonoGenericMethod *' argument
12875 instead of a `MonoGenericInst *' one.
12876 (mono_class_inflate_generic_method): Likewise.
12878 * reflection.c (encode_generic_method_sig): Take a
12879 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
12880 (method_encode_methodspec): Likewise.
12881 (inflated_method_get_object): Likewise.
12883 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
12884 field with a `MonoGenericMethod *gmethod' one.
12886 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
12888 * class.h (mono_class_has_parent): add parens to expansion
12891 2004-02-08 Martin Baulig <martin@ximian.com>
12893 * image.h (MonoImage): Removed `generics_cache'.
12895 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
12896 instead of a `MonoType *' argument; removed the `inflate_methods'
12897 argument. Don't inflate methods here.
12899 * loader.c (find_method): If it's a generic instance, call
12900 mono_class_init() on the `sclass->generic_inst->generic_type'.
12902 * metadata.c (mono_type_size): Make this work on uninitialized
12903 generic instances; call it on the `ginst->generic_type's class.
12905 * reflection.c (mono_reflection_bind_generic_parameters): Call
12906 mono_class_from_generic() to create the `ginst->klass'.
12908 2004-02-08 Martin Baulig <martin@ximian.com>
12910 * class.h (MonoClass): Changed type of `generic_inst' from
12911 `MonoType *' to `MonoGenericInst *'.
12913 2004-02-08 Martin Baulig <martin@ximian.com>
12915 * icall.c (ves_icall_Type_BindGenericParameters): Just call
12916 mono_type_get_object(), this is now creating a `MonoGenericInst'
12917 for MONO_TYPE_GENERICINST.
12918 (ves_icall_MonoGenericInst_GetParentType): Likewise.
12919 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
12921 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
12922 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
12923 (inflated_method_get_object): Added `MonoClass *refclass' argument.
12924 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
12925 and reflected type.
12927 * reflection.h (MonoReflectionInflatedMethod): Removed
12928 `declaring_type' and `reflected_type'.
12930 2004-02-08 Martin Baulig <martin@ximian.com>
12932 * class.h (MonoGenericInst): Added `MonoType *parent' and
12933 `MonoType **ifaces'.
12935 * reflection.h (MonoReflectionGenericInst): Removed `klass',
12936 `parent' and `interfaces'.
12938 * reflection.c (mono_reflection_bind_generic_parameters): Take a
12939 `MonoType *' argument and return a `MonoType *'.
12942 (ves_icall_MonoGenericInst_GetParentType): New interncall.
12943 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
12945 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
12947 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
12948 valuetype marshalling.
12950 2004-02-06 Martin Baulig <martin@ximian.com>
12953 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
12954 (my_mono_class_from_generic_parameter): Likewise.
12956 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
12958 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
12959 contents of the symbol files lazily.
12961 * object.h (MonoThread): Add 'name' and 'name_len' fields.
12963 * threads.h threads.c icall.c: New icalls for getting and setting the
12966 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
12968 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
12969 Raise an exception when the domain is not found.
12971 2004-02-03 Martin Baulig <martin@ximian.com>
12973 * reflection.c (mono_image_get_methodspec_token): Use the
12974 uninflated signature; fixes gen-33.
12976 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
12978 * gc.c threads.c: Make the finalizer thread a normal managed thread so
12979 the finalizer code can use thread functionality.
12981 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
12982 the finalizer thread.
12984 * threads.c: Make some functions more robust.
12986 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
12988 * metadata.h: Add new marshalling conventions.
12990 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
12991 stringbuilder marshalling. Fixes #53700.
12993 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
12995 * reflection.c (mono_image_get_type_info): Save declarative security
12998 * reflection.c (mono_image_get_field_info): Handle uninitialized
12999 unmanaged fields as well.
13001 * appdomain.c: Bump corlib version.
13003 2004-02-01 Martin Baulig <martin@ximian.com>
13005 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
13006 method type arguments.
13008 2004-01-30 Duncan Mak <duncan@ximian.com>
13010 * marshal.h: Add prototype for
13011 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
13013 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
13016 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
13018 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
13019 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
13021 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
13023 * marshal.c (mono_marshal_get_native_wrapper): Add support for
13024 custom marshalling of valuetypes.
13026 * marshal.c: Fix some warnings.
13028 2004-01-29 Martin Baulig <martin@ximian.com>
13030 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
13031 for generic method parameters.
13033 * reflection.c (method_encode_methodspec): Write the uninflated
13034 signature into the methodspec table.
13035 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
13036 is always the uninflated method.
13037 (reflection_methodbuilder_to_mono_method): Copy the generic
13038 parameters from the MethodBuilder into `header->gen_params'.
13040 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
13042 * class.c (mono_class_from_generic_parameter): Fix warning.
13044 2004-01-27 Martin Baulig <martin@ximian.com>
13046 * class.c (mono_class_from_generic_parameter): Don't create
13047 `klass->methods' here.
13049 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
13051 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
13052 extension since it does not work with libraries named lib<FOO>.dll.so.
13054 2004-01-25 Martin Baulig <martin@ximian.com>
13056 * class.c (mono_class_inflate_generic_type): Added support for
13057 MONO_TYPE_GENERICINST.
13059 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
13060 inflate methods on open constructed types.
13062 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13064 * object.c: fire ProcessExit event in the root AppDomain after running
13065 Main. Fixes bug #53299.
13067 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13069 * socket-io.c: include the new socket-wrappers.h header.
13070 Use the wrappers instead of the unix socket functions to make the code
13073 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
13075 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
13077 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
13080 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
13082 * reflection.c (mono_image_create_pefile): Handle the case when the
13083 entry point is not a MethodBuilder.
13085 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
13086 field to ReflectionMethod since it is not allways a builder.
13088 * reflection.c (type_get_fully_qualified_name): New helper function to
13089 return the fully qualified name of a type.
13091 * reflection.c (encode_marshal_blob): Always emit the fully qualified
13092 type name for custom marshallers.
13094 * reflection.c (mono_marshal_spec_from_builder): Ditto.
13096 * class.c (mono_class_setup_vtable): If a parent class already
13097 implements an interface, use the implementing methods from that class.
13100 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13102 * threadpool.c: just return instead of ExitThread to allow for thread
13105 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
13107 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
13108 when closing resource modules.
13110 * reflection.c (mono_image_create_pefile): Handle the case when the
13111 entry point is not a MethodBuilder.
13113 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
13114 field to ReflectionMethod since it is not allways a builder.
13116 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
13118 * marshal.c (mono_marshal_get_managed_wrapper):
13119 mono_marshal_alloc takes native int so CONV_I
13120 the arg for 64bits.
13122 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
13124 * reflection.c (fixup_cattrs): New function to fixup the methoddef
13125 tokens in the cattr table. Fixes #53108.
13127 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13129 * loader.c: don't trim ".dll" before looking up in the config file.
13130 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
13132 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
13134 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13135 Return the module which contains the resource as well.
13136 (ves_icall_System_Reflection_Module_Close): New icall.
13138 * appdomain.c: Bump corlib version number.
13140 * image.c (mono_image_addref): New public function.
13142 * assembly.c: Call mono_image_addref.
13144 * reflection.c (mono_module_get_object): Increase reference count of
13147 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
13150 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
13151 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
13152 proper exceptions on DllImport problems.
13154 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
13156 * class.c, metadata.c: eliminate CSIZE macro.
13158 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
13160 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
13161 * object.h: Added async_callback field in MonoAsyncResult.
13162 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
13163 * verify.c: Added async_callback in MonoAsyncResult layout.
13165 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
13167 * reflection.c (mono_reflection_get_custom_attrs): Add support
13170 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
13172 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
13174 (mono_marshal_method_from_wrapper): Add null pointer check.
13176 2004-01-16 Martin Baulig <martin@ximian.com>
13178 * debug-mono-symfile.h: Set version number to 36 and reflect
13179 latest symbol writer changes.
13181 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
13183 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
13184 multi-dimensional arrays.
13185 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
13186 (mono_class_from_mono_type): Use bounded_array_class_get.
13188 * class.c (mono_bounded_array_class_get): New function which takes
13189 a 'bounded' bool argument to distinguish vectors from one dimensional
13192 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
13193 bounded_array_class_get if the array has bounds.
13195 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13196 Search modules loaded using AssemblyBuilder:AddModule as well.
13198 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13200 * appdomain.c: increased corlib version.
13201 * filewatcher.c: removed g_print.
13203 (get_property_info): only allocate what is actually requested.
13204 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
13206 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13208 * Makefile.am: added filewatcher.[ch]
13209 * filewatcher.[ch]: FileSystemWatcher runtime support.
13210 * icall.c: added new FSW icalls.
13212 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13214 * string-icalls.c: fix stringbuilder regression as suggested by
13215 Iain McCoy <iain@mccoy.id.au>.
13217 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
13219 * process.c (process_read_stringtable_block): Recognize '007f' as
13220 a language neutral stringtable block.
13222 2004-01-12 Patrik Torstensson
13224 * object.h (MonoStringBuilder) : Changed layout to support our
13225 new stringbuilder class.
13226 * marshal.c: Change marshalling to support the new layout of
13228 * appdomain.c: increased version number because new layout of
13231 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
13233 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
13234 assembly name as an string instead of an AssemblyName, since it is
13235 easier to extract info from it.
13237 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
13238 the culture subdirectories too. Fixes #52231.
13240 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13242 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
13243 It takes 2 new parameters with an optional name for the method to look
13244 for and case ignoring info.
13246 * threadpool.c: removed unused variable.
13248 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13250 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
13251 It takes 2 new parameters with an optional name for the property to look
13252 for and case ignoring info.
13255 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
13257 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
13260 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13263 * assembly.c: escape the uri before passing it to g_filename_from_uri.
13266 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
13268 * reflection.c: Add support for more than one unmanaged resource.
13270 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
13271 in field->def_value, as done in all other cases.
13273 * reflection.c (mono_reflection_get_custom_attrs): Add support for
13276 * reflection.c (mono_reflection_create_runtime_class): Remove
13277 errorneous assignment to klass->element_class, since it is already
13278 done in mono_reflection_setup_internal_class.
13280 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13282 * gc.c: added missing LeaveCriticalSection.
13283 * icall.c: indented a couple of lines.
13284 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
13285 if we call EndInvoke inside a callback. Fixes bug #52601.
13287 2004-01-07 Martin Baulig <martin@ximian.com>
13289 * mono-debug-debugger.h
13290 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
13292 2004-01-06 Miguel de Icaza <miguel@ximian.com>
13294 * appdomain.c: Use messages in NotImplementedException.
13296 * exception.c (mono_get_exception_not_implemented): Now this takes
13297 a message argument.
13299 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
13300 exception instead of g_asserting an aborting when something is not
13303 Add some inline docs.
13305 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
13307 * reflection.h: Update after changes to object layout.
13309 * reflection.c: Implement saving of unmanaged aka win32 resources.
13311 * appdomain.c: Bump version number.
13313 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
13314 Handle missing domains gracefully.
13316 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
13318 * file-io.c : On Windows, there are much more invalid_path_chars.
13320 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13322 * class.h, object.c: prepare for GetType () speedup.
13324 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
13326 * profiler.c: workaround for --profile null reference exception on
13327 cygwin. Patch by Patrik Torstensson.
13329 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
13331 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
13332 make work for unaligned access.
13334 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
13336 * class.c: small cleanup (class->fields [i] -> field).
13337 * image.c: check address of metadata is valid.
13339 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
13341 * assembly.h assembly.c (mono_assembly_loaded): New public function to
13342 search the list of loaded assemblies.
13344 * reflection.c (mono_reflection_type_from_name): Use
13345 mono_assembly_loaded instead of mono_image_loaded.
13347 * reflection.c: Fix warnings.
13349 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
13351 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
13352 is dynamic. This is needed since an assembly can contain both dynamic and
13353 non-dynamic images.
13355 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
13358 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
13360 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
13361 to store modules loaded using AddModule.
13363 * reflection.c (mono_image_fill_file_table): Generalize this so it works
13366 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
13368 * reflection.c (mono_image_fill_export_table_from_module): New function to
13369 fill out the EXPORTEDTYPES table from a module.
13371 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
13372 into a separate function. Also handle loaded non-dynamic modules.
13374 * reflection.c (mono_image_basic_init): Fix memory allocation.
13376 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13378 * assembly.c (mono_assembly_load_references): Make this public.
13380 2003-12-19 Martin Baulig <martin@ximian.com>
13382 * class.c (mono_class_initialize_generic): Made this static, take
13383 a `MonoGenericInst *' instead of a `MonoClass *'.
13384 (mono_class_from_generic): Call mono_class_initialize_generic()
13385 unless we're already initialized or being called from
13386 do_mono_metadata_parse_generic_inst().
13388 * class.h (MonoGenericInst): Added `initialized' and
13389 `init_pending' flags.
13391 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
13392 `mono_class_init (gklass)' or mono_class_initialize_generic()
13393 here; set `generic_inst->init_pending' while parsing the
13396 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
13398 * locales.c: include string.h for memxxx prototypes
13400 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
13402 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
13403 constructor when accessing literal fields.
13405 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
13407 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13409 * reflection.c (assembly_add_resource_manifest): New function to fill
13410 the MANIFESTRESOURCE table.
13412 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
13414 * reflection.h: Update to changes in class layout.
13416 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
13417 Reenable call to mono_runtime_is_shutting_down ().
13419 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
13420 determine if the runtime is shutting down.
13422 2003-12-16 Jackson Harper <jackson@ximian.com>
13424 * icall.c: comment out call to mono_runtime_is_shutting_down to
13427 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
13429 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
13430 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
13432 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
13434 * reflection.c: move definition of swap_with_size
13435 to before its first call
13437 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
13439 * appdomain.c (mono_runtime_is_shutting_down): New public function.
13441 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
13444 * object.c: Fix warnings.
13446 * icall.c (ves_icall_Type_Get...): Only consider inherited static
13447 members if FlattenHierarchy is set.
13449 * reflection.c (mono_image_add_decl_security): New function to emit
13450 declarative security.
13452 * reflection.h reflection.c: Add support for declarative security.
13454 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
13456 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
13458 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
13460 * appdomain.c verify.c: Moved corlib version checking into its own
13461 function in appdomain.c since it needs to create vtables etc.
13463 2003-12-13 Patrik Torstensson <p@rxc.se>
13465 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
13466 instead of unwrapped server.
13468 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
13470 * verify.c (check_corlib): Fix field index.
13472 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
13474 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
13477 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
13479 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
13480 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
13481 cope with sizeof(size_t) != sizeof(guint32).
13483 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13485 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
13486 in case of failure.
13488 2003-12-10 Mark Crichton <crichton@gimp.org>
13490 * icall.c: removed the GetNonZeroBytes. We now handle this case
13493 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
13495 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
13497 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
13500 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
13502 * verify.c (check_corlib): Handle the case when the version field is
13503 initialized by a static constructor.
13505 2003-12-08 Patrik Torstensson <p@rxc.se>
13507 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
13509 2003-12-08 Martin Baulig <martin@ximian.com>
13511 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
13512 a MonoReflectionGenericParameter, also take the parameter index
13513 and name as arguments.
13514 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
13515 (ves_icall_MonoGenericParam_initialize): New interncall.
13516 (ves_icall_Type_make_byref_type): New interncall.
13518 * reflection.h (MonoReflectionGenericParam): Derive from
13519 MonoReflectionType, not just from MonoObject. Added `refobj' and
13522 * reflection.c (mono_reflection_define_generic_parameter): Create
13523 and return a new MonoReflectionGenericParam; don't initialize the
13525 (mono_reflection_initialize_generic_parameter): New public method;
13526 initializes the constraints and creates the `param->pklass'.
13528 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
13530 * reflection.h reflection.c: Use the new fields 'num_types',
13531 'num_fields' and 'num_methods' to track the number of types etc.
13533 * verify.c (check_corlib): Check corlib version number.
13535 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
13537 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
13538 function works on all methods.
13540 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
13542 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
13543 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
13544 the custom_type_info flag of the transparent proxy.
13545 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
13546 objects that supports IRemotingTypeInfo.
13547 * object.h: Added custom_type_info field in transparent proxy.
13549 2003-12-06 Martin Baulig <martin@ximian.com>
13551 * class.c (mono_class_create_from_generic): Removed.
13552 (mono_class_from_generic): Check `ginst->klass' before doing
13553 anything else. This is important to fully support "recursive"
13556 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
13557 empty `generic_inst->klass' before doing anything else.
13559 2003-12-06 Dick Porter <dick@ximian.com>
13564 * locales.c: Use C structs to access class fields. Don't do a
13565 conversion between MonoString and UChar because both are
13566 platform-endian UTF-16. Compare now takes startindex and count
13567 parameters. Add a char overload for IndexOf. Speed up the
13568 invariant string IndexOf.
13570 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
13572 * Makefile.am (monosn_LDADD): Fix parallel build.
13574 2003-12-04 Martin Baulig <martin@ximian.com>
13577 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13578 (ves_icall_Type_make_array_type): New interncall.
13580 2003-12-04 Martin Baulig <martin@ximian.com>
13582 * locales.c: also change it in the !HAVE_ICU case.
13584 2003-12-04 Dick Porter <dick@ximian.com>
13587 * locales.c: construct_compareinfo is now in CompareInfo, not
13590 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
13592 * image.c (mono_image_load_file_for_image): Cache loaded images in the
13593 image->files array.
13595 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
13598 * assembly.c (mono_assembly_load_references): Only load references
13601 * class.c (mono_class_from_name): Avoid linear search of the
13602 EXPORTEDTYPE table.
13604 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
13606 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
13608 * image.h (MonoImage): Add 'field_cache' field.
13610 * loader.c (mono_field_from_token): Cache field lookups.
13612 * reflection.c (mono_module_get_object): Fix name property.
13614 * icall.c (ves_icall_get_enum_info): Update after changes to
13615 mono_metadata_get_constant_index ().
13617 * icall.c: Get rid of get_type_info icall, use a separate icall for
13618 each type property to avoid needless memory allocations. Fixes #51514.
13620 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
13621 to avoid needless binary searches.
13623 * class.c (class_compute_field_layout): Move the initialization of
13624 field->def_value to mono_class_vtable ().
13626 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
13629 * object.c (mono_object_allocate): Make it inline.
13631 * object.c (mono_object_allocate_spec): Make it inline.
13633 2003-12-02 Dick Porter <dick@ximian.com>
13635 * locales.c (create_NumberFormat): NumberFormatInfo construction.
13636 Patch by Mohammad DAMT (mdamt@cdl2000.com).
13638 2003-12-01 Dick Porter <dick@ximian.com>
13640 * threads.c: Fix signature and call in CreateMutex and
13643 2003-12-01 Dick Porter <dick@ximian.com>
13646 * locales.c: Implement string compares and searching
13648 * object.h: Add extra Thread field
13650 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
13652 * reflection.c (fixup_method): Add support for MonoCMethod.
13654 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
13656 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
13658 * reflection.c (assembly_name_to_aname): Allow extra characters in
13659 assembly names. Fixes #51468.
13661 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
13663 * exception.c (mono_exception_from_name_domain): New helper function.
13665 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
13666 exception object in the correct domain.
13668 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
13669 formatting + make a copy a the input data.
13671 * loader.c (mono_get_method_from_token): Methods which contain
13672 native code do not have entries in the ImplMap.
13674 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
13675 Thanks to Gonzalo for spotting this.
13677 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
13678 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
13680 * assembly.h (mono_assembly_load_from): Split the second part of
13681 assembly loading into a new public function.
13683 * exception.h (mono_get_exception_bad_image_format): New function.
13685 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
13687 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13688 Enumerate all modules inside a dynamic assembly. Fixes #51293.
13690 * icall.c: Add new icall for creating dynamic methods.
13692 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
13694 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
13696 * reflection.c (mono_reflection_create_dynamic_method): New icall to
13697 create a dynamic method.
13699 * reflection.c (resolve_object): New helper function.
13701 * reflection.c: Generalize ReflectionMethodBuilder and the functions
13702 which manipulate it so they can also work on dynamic methods.
13704 * reflection.c (reflection_method_builder_to_mono_method): Avoid
13705 creating the MonoReflectionMethodAux structure if it is not needed.
13707 * reflection.h verify.c: Update after changes to object layout.
13709 * reflection.c (method_builder_encode_signature): Fix compilation on
13712 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
13714 * appdomain.h: Added support for context static fields. Added static_data
13715 field to MonoAppContext and renamed thread_static_fields to a more
13716 generic special_static_fields in MonoAppDomain, since it can now contain
13717 context static fields.
13718 * domain.c: Updated hashtable name.
13719 * object.c: Replaced field_is_thread_static() for a more generic
13720 field_is_special_static() which also checks for context static attribute.
13721 In mono_class_vtable(), added support for static context fields.
13722 * threads.c: Changed methods that manage thread static fields to more
13723 generic methods so they can be reused both for thread and context static
13725 * threads.h: Declared some new methods.
13727 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
13729 * reflection.h: Update after changes to the managed types.
13731 * reflection.c (encode_custom_modifiers): New helper function.
13733 * reflection.c (method_encode_signature): Emit custom modifiers.
13735 * reflection.c (field_encode_signature): Emit custom modifiers.
13737 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
13739 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
13741 * icall.c (ves_icall_System_ValueType_Equals): New optimized
13744 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
13747 * object.c (mono_field_get_value_object): New function.
13749 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
13752 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
13754 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
13755 return a preallocated out-of-memory exception instance.
13757 * object.c (out_of_memory): Use the new function.
13759 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
13760 flag is before the custom modifiers. Fixes #49802.
13762 2003-11-16 Martin Baulig <martin@ximian.com>
13764 * class.c (mono_class_is_open_constructed_type): Implemented the
13765 MONO_TYPE_GENERICINST case.
13767 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
13769 * assembly.c (mono_assembly_fill_assembly_name): New function to
13770 fill out the MonoAssemblyName structure.
13771 (mono_assembly_open): Use the new function.
13773 * icall.c (fill_reflection_assembly_name): New helper function.
13775 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
13778 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
13780 2003-11-15 Martin Baulig <martin@ximian.com>
13782 * class.c (mono_class_is_open_constructed_type): New public
13783 function; checks whether a type is an open constructed type,
13784 ie. whether it still contains type parameters.
13785 (mono_class_inflate_generic_type): If we're a type parameter and
13786 the inflated type is also a MONO_TYPE_(M)VAR, return the original
13789 * class.h (MonoGenericInst): Added `guint32 is_open'.
13791 * loader.c (method_from_methodspec): Check whether we're an open
13792 or closed constructed type and set `ginst->is_open'.
13794 * reflection.c (mono_reflection_bind_generic_parameters): Check
13795 whether we're an open or closed constructed type and set
13797 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
13798 from open constructed types.
13800 2003-11-15 Martin Baulig <martin@ximian.com>
13802 * reflection.c (mono_reflection_bind_generic_parameters): If we're
13803 a generic instance (instead of a generic type declaration) with
13804 unbound generic parameters, bind them to our actual types.
13806 2003-11-14 Martin Baulig <martin@ximian.com>
13808 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
13810 * reflection.c (mono_reflection_bind_generic_parameters): If we're
13811 an interface type, populate `res->interfaces' with instantiated
13812 versions of all the interfaces we inherit.
13814 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
13816 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
13817 when MONO_PATH is set but doesn't contain the install dir.
13819 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13822 (ves_icall_Type_GetInterfaces): don't return an interface twice when
13823 it's also implemented in base classes. Fixes bug #50927.
13825 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
13827 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
13828 if this method is called from a finalizer. Fixes #50913.
13830 2003-11-12 Miguel de Icaza <miguel@ximian.com>
13832 * threads.c: Implement VolatileRead/VolatileWrite
13834 * icall.c: Add new icalls for VolatileRead/VolatileWrite
13836 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
13838 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
13839 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
13842 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
13843 from Peter Ross (pro@missioncriticalit.com).
13845 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
13847 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
13849 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
13851 * assembly.c (mono_assembly_load_references): Disable check because it
13852 triggers on older corlibs which lots of people have.
13854 2003-11-12 Jackson Harper <jackson@ximian.com>
13856 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
13857 load corlib.dll if mscorlib.dll is not found.
13858 * assembly.h: Remove corlib name define.
13861 * image.c: Change corlib name to mscorlib.
13863 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
13865 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
13867 2003-11-11 Miguel de Icaza <miguel@ximian.com>
13869 * appdomain.h: Added loader_optimization here to sync with the C#
13870 code, and add disallow_binding_redirects field.
13872 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
13874 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
13876 * reflection.c (mono_image_build_metadata): Fix crash on modules
13879 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
13881 * icall.c (ves_icall_get_method_info): Return callingConvention as
13884 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
13885 namespaces from the EXPORTEDTYPE table as well.
13887 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
13888 from all modules inside the assembly.
13890 2003-11-11 Martin Baulig <martin@ximian.com>
13892 * reflection.c (mono_reflection_bind_generic_parameters): Make
13893 this work for interfaces.
13895 2003-11-11 Martin Baulig <martin@ximian.com>
13897 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
13899 2003-11-11 Martin Baulig <martin@ximian.com>
13901 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
13902 "MonoInflatedMethod" and "MonoInflatedCtor".
13904 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
13906 * reflection.c (resolution_scope_from_image): Use the assembly table
13907 from the manifest module, since other modules don't have it.
13909 * debug-helpers.c (mono_type_full_name): New helper function.
13911 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
13913 * image.c (mono_image_load_file_for_image): New public function which
13914 is a replacement for the load_file_for_image in class.c.
13916 * assembly.c (mono_assembly_load_module): A wrapper for the function
13917 above which does assembly association and reference loading too.
13919 * class.c (mono_class_from_name): Call mono_assembly_load_module.
13921 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13923 * appdomain.c: not all of the attributes for the full assembly name
13924 are required and the order doesn't matter. Fixes bug #50787.
13926 2003-11-10 Dick Porter <dick@ximian.com>
13928 * locales.c: Use platform-endian UTF16
13930 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
13932 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
13934 2003-11-10 Martin Baulig <martin@ximian.com>
13937 (mono_metadata_load_generic_params): Make this actually work.
13939 * reflection.c (mono_reflection_bind_generic_parameters): If our
13940 parent is a generic instance, pass all the `types' to it, no
13941 matter whether it has the same number of type parameters or not.
13943 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
13945 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
13947 * assembly.c (mono_assembly_load_references): Move the image<->assembly
13948 assignment code to this function so it gets called recursively for all
13951 * image.c (load_modules): Remove the assembly assignment since it is
13952 now done by mono_assembly_load_references.
13954 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13955 Add 'module' argument.
13956 (mono_module_get_types): New helper function.
13957 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
13959 2003-11-08 Martin Baulig <martin@ximian.com>
13961 * class.c (mono_class_inflate_generic_method): Interface method
13962 don't have a header.
13964 * reflection.c (mono_image_get_methodspec_token): Take an
13965 additional `MonoGenericInst *' argument instead of reading it from
13966 the header; this is necessary to support interfaces.
13967 (mono_image_create_token): Pass the `MonoGenericInst *' from the
13968 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
13969 (inflated_method_get_object): Take an additional `MonoGenericInst *'
13972 * reflection.h (MonoReflectionInflatedMethod): Added
13973 `MonoGenericInst *ginst'.
13975 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
13977 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
13979 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
13981 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
13983 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
13986 (reflection_methodbuilder_from_method_builder):
13987 (reflection_methodbuilder_from_ctor_builder): New helper functions to
13988 initialize a ReflectionMethodBuilder structure.
13989 (mono_image_get_methodbuilder_token):
13990 (mono_image_get_ctorbuilder_token): New functions to emit memberref
13991 tokens which point to types in another module inside the same assembly.
13993 * reflection.c: Use the new helper functions.
13995 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
13997 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
13998 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
14000 * reflection.c (resolution_scope_from_image): Emit a moduleref if
14003 * reflection.c (mono_image_build_metadata): Emit metadata only for the
14004 current module. Emit the manifest only for the main module.
14006 * reflection.c (mono_image_create_token): Add assertion when a
14007 memberref needs to be created.
14009 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
14011 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
14012 larger buffer for the custom attribute blob. Fixes #50637.
14014 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14016 * threadpool.c: notify listener on async processing handles after
14017 invoking the async callback. Thanks to Zoltan.
14019 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
14021 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
14022 avoid code duplication.
14024 * reflection.h (MonoDynamicImage): New type which is currently unused,
14025 but will be used through the ref.emit code in place of
14026 MonoDynamicAssembly.
14028 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
14031 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
14032 a MonoDynamicImage instead of just a MonoImage.
14034 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
14035 icalls to ModuleBuilder but keep their semantics, so they will work
14036 with moduleb->assemblyb. This will change later.
14038 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
14040 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
14043 * reflection.c (mono_image_build_metadata): Avoid creation of a default
14044 main module, since it is now done by the managed code.
14046 2003-11-03 Martin Baulig <martin@ximian.com>
14048 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
14049 `ginst->klass' here.
14050 (method_encode_methodspec): Don't use the `ginst->generic_method's
14051 klass if it's a generic instance, use `ginst->klass' in this case.
14053 2003-11-03 Martin Baulig <martin@ximian.com>
14055 * reflection.c (mono_image_get_generic_method_param_info):
14056 Removed, use mono_image_get_generic_param_info() instead.
14057 (mono_image_get_type_info): Write the GenericParam table before
14058 the Method table. This is neccessary because in the GenericParam
14059 table, type parameters of the class (ie. '!0' etc.) must come
14060 before the ones from its generic methods (ie. '!!0' etc).
14062 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
14064 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
14066 2003-11-02 Martin Baulig <martin@ximian.com>
14068 * reflection.c (create_generic_typespec): Take a
14069 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
14070 the generic parameters from it.
14072 2003-11-02 Martin Baulig <martin@ximian.com>
14074 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
14075 instead of a `MonoClassField *' since we just need the type.
14076 (create_generic_typespec): New static function. Creates a
14077 TypeSpec token for a generic type declaration.
14078 (mono_image_get_generic_field_token): New static function.
14079 (mono_image_create_token): If we're a FieldBuilder in a generic
14080 type declaration, call mono_image_get_generic_field_token() to get
14083 2003-11-02 Martin Baulig <martin@ximian.com>
14086 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
14087 `MonoReflectionGenericInst *declaring_type' and
14088 `MonoReflectionGenericInst *reflected_type' fields.
14090 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
14091 `MonoReflectionGenericInst *declaring_type' and a
14092 `MonoReflectionGenericInst *reflected_type' argument instead of a
14093 single `MonoReflectionGenericInst *type' one. Set
14094 `res->declaring_type' and `res->reflected_type' from them.
14095 (mono_reflection_inflate_field): Likewise.
14097 2003-11-02 Martin Baulig <martin@ximian.com>
14099 * class.c (mono_class_setup_vtable): Don't store generic methods
14102 2003-11-02 Martin Baulig <martin@ximian.com>
14104 * reflection.h (MonoReflectionGenericInst): Added
14105 `MonoReflectionType *declaring_type'.
14107 * reflection.c (mono_reflection_bind_generic_parameters): Use
14108 `if (tb->parent)' instead of `klass->parent'.
14110 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
14112 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
14113 with an empty ASSEMBLY table.
14115 * reflection.c (mono_image_build_metadata): Avoid using the same loop
14116 variable in the inner and outer loops.
14118 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
14120 * metadata.h (mono_metadata_make_token): Put parentheses around macro
14123 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
14125 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
14126 icalls. Instead, do everything in managed code. This is needed since
14127 it is hard to restore the original domain etc. in unmanaged code in the
14128 presence of undeniable exceptions.
14130 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
14131 New icalls to push and pop appdomain refs.
14133 2003-10-31 Martin Baulig <martin@ximian.com>
14135 * class.c (inflate_generic_type): Renamed to
14136 mono_class_inflate_generic_type() and made it public.
14138 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
14141 * loader.c (mono_field_from_memberref): Also set the retklass for
14144 * fielder.c (mono_image_get_inflated_field_token): New static
14145 method; creates a metadata token for an inflated field.
14146 (mono_image_create_token, fixup_method): Added support for
14147 "MonoInflatedField".
14148 (fieldbuilder_to_mono_class_field): New static function.
14149 (mono_reflection_inflate_field): New public function.
14152 (MonoReflectionGenericInst): Added `MonoArray *fields'.
14153 (MonoReflectionInflatedField): New typedef.
14155 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
14157 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
14158 for Solaris and other platforms without s6_addr16
14160 2003-10-30 Martin Baulig <martin@ximian.com>
14162 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
14163 argument instead of two.
14164 (mono_class_inflate_generic_signature): Likewise.
14165 (inflate_generic_header): Likewise.
14166 (mono_class_inflate_generic_method): Likewise. In addition, if
14167 `ginst->klass' is set, it becomes the new `method->klass'.
14169 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
14172 * reflection.c (encode_generic_method_sig): Write a 0xa as the
14173 first byte. [FIXME]
14174 (method_encode_methodspec): If we have generic parameters, create
14175 a MethodSpec instead of a MethodRef.
14176 (fixup_method): Added support for "MonoInflatedMethod" and
14177 "MonoInflatedCtor".
14178 (mono_image_create_token): Added support for "MonoInflatedMethod"
14179 and "MonoInflatedCtor".
14180 (inflated_method_get_object): New static function; returns a
14181 managed "System.Reflection.MonoInflatedMethod" object.
14182 (mono_reflection_bind_generic_method_parameters): Return a
14183 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
14184 (mono_reflection_inflate_method_or_ctor): Likewise.
14185 (mono_image_get_generic_method_param_info): Initialize unused
14187 (mono_image_get_generic_param_info): Likewise.
14189 * reflection.h (MonoReflectionInflatedMethod): New public
14190 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
14191 "S.R.MonoInflatedCtor" classes.
14193 * loader.c (method_from_memberref): If we're a TypeSpec and it
14194 resolves to a generic instance, inflate the method.
14196 2003-10-28 Dick Porter <dick@ximian.com>
14198 * object.c (mono_runtime_run_main): Convert command-line arguments
14199 into utf8, falling back to the user's locale encoding to do so.
14201 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
14203 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
14206 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
14208 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
14209 up icalls at method definition time. Partially fixes #33569.
14211 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
14213 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
14214 marshalling of arrays. Fixes #50116.
14216 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
14218 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
14219 points to a vtable in the dying appdomain.
14221 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
14222 listeners into unmanaged code inside the lock.
14224 * object.c (mono_class_vtable): Turn off typed allocation in non-root
14225 domains and add some comments.
14227 2003-10-25 Martin Baulig <martin@ximian.com>
14229 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
14231 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
14233 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
14234 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
14235 currently parsing. Create the generic class and store it in
14236 `generic_inst->klass' before parsing the type arguments. This is
14237 required to support "recursive" definitions; see mcs/tests/gen-23.cs
14239 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
14240 to support recursive typespec entries.
14242 * class.c (mono_class_setup_parent): If our parent is a generic
14243 instance, we may get called before it has its name set.
14244 (mono_class_from_generic): Splitted into
14245 mono_class_create_from_generic() and mono_class_initialize_generic().
14247 2003-10-25 Martin Baulig <martin@ximian.com>
14249 * icall.c (ves_icall_Type_BindGenericParameters): Return a
14250 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
14251 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
14252 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
14254 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
14255 (create_typespec): Likewise.
14256 (mono_reflection_bind_generic_parameters): Return a
14257 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
14258 (mono_reflection_inflate_method_or_ctor): New public function.
14260 * reflection.h (MonoReflectionGenericInst): New typedef.
14262 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
14264 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
14265 inside the domain lock. Fixes #49993.
14267 * object.c (mono_class_vtable): When typed allocation is used,
14268 allocate vtables in the GC heap instead of in the mempool, since the
14269 vtables contain GC descriptors which are used by the collector even
14270 after the domain owning the mempool is unloaded.
14272 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
14274 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
14275 reflect what it does. Also invalidate mempools instead of freeing
14276 them if a define is set.
14278 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
14281 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
14282 hold the finalizable objects in this domain.
14284 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
14287 * appdomain.c (mono_domain_set): New function to set the current
14288 appdomain, but only if it is not being unloaded.
14290 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
14291 appdomain which is being unloaded.
14293 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
14294 unloading of the root appdomain.
14296 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
14297 icall to execute a method in another appdomain. Intended as a
14298 replacement for InternalSetDomain, which can confuse the code
14299 generation in the JIT.
14301 * appdomain.c (mono_domain_is_unloading): New function to determine
14302 whenever an appdomain is unloading.
14304 * appdomain.c (mono_domain_unload): New function to correctly unload
14307 * assembly.c (mono_assembly_load_references): Check that an assembly
14308 does not references itself.
14310 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
14311 domain manually, it asks the finalizer thread to do it, then waits for
14312 the result. Also added a timeout.
14314 * icall.c: Register the new icalls.
14316 * threads.h threads.c: Export the mono_gc_stop_world and
14317 mono_gc_start_world functions.
14319 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
14320 function to fill out the mempool with 0x2a.
14322 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
14324 * reflection.h (MonoReflectionMethodAux): New structure to store
14325 information which is rarely used, thus is not in the MonoMethod
14328 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
14329 store the aux info.
14331 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
14332 and marshalling info into the aux structure.
14334 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
14335 from the aux structure.
14337 * loader.c (mono_method_get_param_names): Retrieve the param names from
14340 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
14342 * exception.h exception.c: Add AppDomainUnloadedException && fix
14345 2003-10-21 Dick Porter <dick@ximian.com>
14348 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
14349 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
14351 2003-10-21 Martin Baulig <martin@ximian.com>
14353 * reflection.c (mono_reflection_bind_generic_parameters):
14354 `klass->parent' is NULL for interfaces.
14356 2003-10-21 Martin Baulig <martin@ximian.com>
14358 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14360 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
14362 * exception.c (mono_exception_from_name_msg): New helper function for
14363 creating exceptions and initializing their message field.
14365 * exception.c: Simplify functions using the new helper.
14367 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
14370 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
14371 mono_raise_exception, since otherwise gcc doesn't generate the function
14372 epilog for raise_exception, confusing the stack unwinding in the JIT.
14375 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
14376 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
14379 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14381 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
14384 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
14386 * icall.c: Removed GetUninitializedObject method because
14387 AllocateUninitializedClassInstance does the same.
14389 2003-10-18 Martin Baulig <martin@ximian.com>
14391 * class.c (inflate_generic_signature): Renamed to
14392 mono_class_inflate_generic_signature() and made it public.
14393 (my_mono_class_from_generic_parameter): New static function; if we
14394 don't already have the generic parameter's MonoClass, create a
14395 very simple one which is just used internally in the runtime and
14396 not passed back to managed code.
14398 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
14400 * metadata.h (MonoMethodSignature): Moved the
14401 `MonoGenericParam *gen_params' to the MonoMethodHeader.
14402 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
14404 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
14405 ves_icall_MonoMethod_GetGenericArguments(); this is now an
14406 interncall on the MonoMethod class, not on MethodInfo.
14407 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
14408 calling mono_reflection_bind_generic_method_parameters() directly.
14410 * loader.c (mono_method_get_signature): If this is a MethodSpec;
14411 return the already computed `method->signature'.
14412 (method_from_methodspec): New static function to load a method
14413 from a MethodSpec entry.
14414 (mono_get_method_from_token): Call the new method_from_methodspec()
14415 for MethodSpec tokens.
14416 (mono_get_method_from_token): If we're a generic method, load the
14419 * reflection.c (mono_image_get_memberref_token): Allow
14420 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
14422 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
14423 (mono_image_create_token): First check whether it's a generic
14424 method (so we'd need to create a MethodSpec), then do the other
14426 (mono_reflection_bind_generic_method_parameters): Return a
14427 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
14428 called directly from the interncall.
14430 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
14432 * reflection.c (load_public_key): Move loading of the public key
14435 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
14437 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
14440 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
14441 culture, hash_alg and public_key. Fixes #49555.
14443 2003-10-17 Martin Baulig <martin@ximian.com>
14445 * class.h (MonoGenericInst): Moved this declaration here and added
14446 `MonoMethod *generic_method'.
14449 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
14450 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
14452 * metadata.c (mono_metadata_type_equal): Two types of
14453 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
14454 index; ie. don't compare the address of the `MonoGenericParam'
14456 (mono_metadata_load_generic_params): Removed the `MonoMethod
14459 * metadata.h (MonoGenericInst): Moved declaration to class.h.
14460 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
14462 * reflection.c (method_encode_signature): Encode the number of
14463 generic parameters.
14464 (encode_generic_method_sig): New static function.
14465 (method_encode_methodspec): New static function; creates an entry
14466 in the MethodSpec table for a generic method.
14467 (mono_image_get_methodspec_token): New static function.
14468 (mono_image_create_token): Call mono_image_get_methodspec_token()
14469 for generic methods.
14470 (mono_reflection_bind_generic_method_parameters): New public
14471 function. Instantiates a generic method.
14473 2003-10-16 Martin Baulig <martin@ximian.com>
14475 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
14476 *gen_params' here from MonoMethodHeader.
14478 * metadata.c (mono_metadata_parse_method_signature): If we have
14479 generic parameters, initialize `method->gen_params' and then set
14480 the correct `type->data.generic_param' in all the parameters.
14482 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
14484 * threads.c (mono_threads_get_default_stacksize): New function to
14485 return the default stacksize.
14487 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
14488 termination of the finalizer thread, since the previous method had
14489 race conditions. Fixes #49628.
14491 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
14492 as for the other managed threads.
14494 2003-10-16 Martin Baulig <martin@ximian.com>
14496 * class.c (inflate_generic_signature): Copy `generic_param_count'
14499 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
14502 * metadata.c (mono_metadata_parse_method_signature): Actually set
14503 the `method->generic_param_count' here.
14504 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
14506 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
14508 * object.h: Add a new field to TypedRef to simplify the implementation
14509 of the REFANY opcodes in the JIT.
14511 * icall.c: Make use of the new field.
14513 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
14516 2003-10-15 Martin Baulig <martin@ximian.com>
14518 * class.c (mono_class_from_gen_param): Renamed to
14519 mono_class_from_generic_parameter() and moved most of the
14520 functionality from mono_reflection_define_generic_parameter()
14521 here; ie. we create a "real" class here.
14522 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
14523 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
14524 previously been called.
14526 * class.h (MonoGenericParam): Moved the declaration of this struct
14527 here from metadata.h and added `MonoMethod *method'.
14529 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
14532 * loader.c (mono_get_method_from_token): If we have any generic
14533 parameters, call mono_metadata_load_generic_params() to read them
14534 from the MONO_TABLE_GENERICPAR.
14536 * metadata.c (mono_metadata_load_generic_params): Added
14537 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
14539 * metadata.h (MonoMethodSignature): Replaced
14540 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
14541 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
14543 * reflection.c (mono_reflection_define_generic_parameter): Moved
14544 most of the functionality into the new
14545 mono_class_from_generic_parameter(); set the `method' field if
14546 we're a method parameter.
14548 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
14550 * marshal.c (emit_struct_conv): if native size is 0
14553 2003-10-14 Martin Baulig <martin@ximian.com>
14555 * icall.c: The generics API has changed in the spec since it was
14556 added to System.Type; these modifications make it match the spec
14558 (ves_icall_Type_GetGenericParameters): Renamed to
14559 `ves_icall_Type_GetGenericArguments'.
14560 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
14561 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
14562 `ves_icall_MonoType_get_HasGenericArguments'.
14563 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
14564 `ves_icall_MonoType_get_IsGenericParameter'.
14565 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
14566 this is no interncall anymore.
14567 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
14568 `ves_icall_TypeBuilder_get_IsGenericParameter'.
14570 2003-10-14 Martin Baulig <martin@ximian.com>
14572 * reflection.c (mono_reflection_bind_generic_parameters): Also
14573 inflate generic methods if we're reading the class from IL.
14575 2003-10-13 Martin Baulig <martin@ximian.com>
14577 * reflection.c (mono_reflection_define_generic_parameter): This
14578 method isn't called directly from the icall anymore; take a
14579 `MonoReflectionAssemblyBuilder *' so we can use this for type and
14580 method generic parameters.
14581 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
14582 (method_builder_encode_signature): Encode generic parameters.
14583 (mono_image_get_method_info): Write generic params to the
14584 MONO_TABLE_GENERICPARAM table.
14586 * reflection.h (MonoReflectionMethodBuilder): Added
14587 `MonoArray *generic_params'.
14589 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
14591 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
14592 wrapper for mono_reflection_define_generic_parameter().
14593 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
14595 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
14597 * marshal.h: Add missing function to fix build.
14599 * marshal.c (mono_marshal_get_native_wrapper): Add support for
14600 the SetLastError pinvoke attribute.
14602 * marshal.c (mono_marshal_set_last_error): New helper function called
14603 by the generated code.
14605 * marshal.c (mono_mb_emit_branch): New helper function.
14607 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
14609 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14610 classes as parameters and return values of delegates. Fixes #29256.
14612 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
14614 * locales.c: use gint32 in non HAVE_ICU case
14616 2003-10-11 Martin Baulig <martin@ximian.com>
14618 * mono-debug.c (mono_debug_add_method): Added a workaround for
14621 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
14623 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
14624 delegates passed to native code must use the STDCALL calling
14625 convention. Fixes #35987.
14627 2003-10-10 Martin Baulig <martin@ximian.com>
14629 * class.c (inflate_generic_type): If we're inflating for a generic
14630 type instance (and not for a generic method), return
14631 MONO_TYPE_MVAR unchanged.
14633 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14635 * string-icalls.c: Join ignores null strings in the source array.
14636 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
14637 * threads.c: GetAvailableTheads is slightly more accurate.
14639 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
14641 * threads.h threads.c : add mono_threads_set_default_stacksize
14642 and pass default to CreateThread calls.
14644 2003-10-09 Dick Porter <dick@ximian.com>
14648 * locales.c: Internal calls for constructing CultureInfo and
14649 related objects from libicu (if its available.)
14651 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
14653 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
14655 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14657 * threadpool.c: added an argument to async_invoke_thread that is the
14658 item to process, pass the MonoAsyncResult to the thread start function
14659 when creating a new thread. This way we don't need to acquire any lock
14660 when we're creating a new thread. Readded a semaphore for faster
14661 response times (instead of that Sleep i added).
14663 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
14665 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
14666 get daylight change dates better on Windows, fix handling
14667 of platforms without tm_gmtoff.
14669 2003-10-06 Martin Baulig <martin@ximian.com>
14671 * class.c (inflate_generic_method): Renamed to
14672 mono_class_inflate_generic_method() and made public.
14673 (mono_class_init): Don't inflate the generic methods here.
14674 (mono_class_from_generic): Added `gboolean inflate_methods'
14675 argument. Inflate the methods here.
14677 * loader.c (mono_method_get_param_names): Ignore instances of
14678 generic types for the moment.
14680 * reflection.c (fixup_method): Added support for inflated methods.
14681 (mono_image_create_token): Use mono_image_get_methodref_token()
14682 for inflated methods.
14683 (mono_custom_attrs_from_param): Ignore instances of generic types
14685 (mono_reflection_bind_generic_parameters): New public function.
14686 Moved all the functionality from
14687 ves_icall_Type_BindGenericParameters() here and added support for
14689 (mono_reflection_define_generic_parameter): Initialize
14690 `klass->methods' here.
14692 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
14693 functionality into mono_reflection_define_generic_parameter().
14694 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
14695 TypeBuilder, return that TypeBuilder.
14697 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14699 * appdomain.c: removed mono_delegate_semaphore.
14702 (mono_thread_pool_add): moved hash table creation inside and the thread
14703 creation outside of the critical region.
14704 (mono_thread_pool_finish): removed obsolete code.
14705 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
14706 continue or exit the thread depending on the queue.
14708 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
14710 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
14711 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
14712 handle more bool marshalling options
14714 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
14716 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
14717 arrays of structs. Also add a more descriptive error message when
14718 a structure member is marshalled as LPArray.
14720 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
14722 * marshal.c (mono_marshal_get_native_wrapper): Add support for
14723 marshalling arrays of complex types. Fixes #29098. Also remove an
14724 usused and incomplete function.
14726 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
14728 * gc.c: report heap_size - free_bytes as total memory allocated
14731 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
14733 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
14734 fix timezone handling problems on Windows.
14736 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
14737 asserts when the year is outside the range handled by ms the functions.
14739 * class.c (setup_interface_offsets): If the class is an interface,
14740 fill out its interface_offsets slot.
14742 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14744 * threadpool.c: mark threadpool threads as background.
14746 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
14748 * decimal.c - define DECINLINE to nothing if not using GCC
14750 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
14752 * assembly.c: More refcount fixes.
14754 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14756 * string-icalls.c: if we're not trimming, return the same string.
14757 When not splitting, don't create a new string.
14759 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14762 (mono_image_open): increment the ref_count inside the critical section.
14764 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
14766 * image.c (mono_image_open): Fix reference counting bug.
14768 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
14770 * marshal.c (mono_marshal_type_size) struct alignment changed for
14771 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
14772 64bits. Avoid leak in mono_marshal_get_native_wrapper when
14773 mono_lookup_pinvoke_call throws.
14775 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
14777 * reflection.c (mono_reflection_parse_type): Fix #49114.
14779 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
14780 temporary workaround for cygwin header problem.
14782 * object.c (mono_object_isinst): Synchronize this with the code
14783 generated by the JIT for casts.
14785 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
14787 * reflection.c (encode_type): Fix #38332.
14789 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
14791 * marshal.c (mono_marshal_method_from_wrapper): New function to return
14792 the original method from the wrapper method.
14794 2003-09-25 Martin Baulig <martin@ximian.com>
14796 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
14797 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
14798 (ves_icall_Type_get_IsGenericInstance): New interncall.
14800 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
14802 * object.c: fix cast warning in big endian code.
14804 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
14806 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
14808 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14810 * assembly.c: don't call check_env from mono_assembly_load. It's
14811 already done once in mono_assemblies_init and may cause headaches when
14812 multiple threads are loading assemblies.
14814 2003-09-19 Martin Baulig <martin@ximian.com>
14816 * reflection.c (mono_reflection_define_generic_parameter): Don't
14817 allocate `klass->methods', set `klass->flags' to
14818 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
14820 2003-09-18 Martin Baulig <martin@ximian.com>
14822 * class.c (mono_class_init): Don't create `class->methods' if it's
14823 already initialized.
14825 * metadata.c (mono_metadata_load_generic_params): Make this
14828 * reflection.c (mono_reflection_define_generic_parameter): Set
14829 parent class and interfaces from the constraints.
14831 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
14832 to keep this struct in sync with the declaration in TypeBuilder.cs.
14834 2003-09-17 Martin Baulig <martin@ximian.com>
14836 * metadata.h (MonoType): Replaced the data's `int type_param'
14837 field with `MonoGenericParam *generic_param'.
14838 (MonoGenericParam): Added `MonoClass *klass'.
14840 * class.c (mono_class_from_gen_param): Removed the
14841 `MonoImage *image' and `int type_num' arguments.
14843 * metadata.c (mono_metadata_parse_generic_param): New static
14844 method; creates a MonoGenericParam which just contains the index.
14845 (do_mono_metadata_parse_type): Call
14846 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
14849 * reflection.c (mono_image_typedef_or_ref): Generic type
14850 parameters may be in the same assembly, but never use a typedef
14852 (mono_reflection_define_generic_parameter): We're now creating a
14853 "real" class for the type parameter; it's now safe to call
14854 mono_class_from_mono_type() on the class'es type, it'll do the
14857 2003-09-16 Martin Baulig <martin@ximian.com>
14859 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
14860 `symfile->range_entry_size' and `symfile->class_entry_size' here;
14861 the `symfile' data structure must be fully initialized before it
14862 gets added to the table.
14864 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
14866 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
14868 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
14869 class init trampolines.
14871 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
14873 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
14874 to the built-in profiler to turn off time and allocation profiling
14877 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
14879 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
14882 * debug-helpers.c (mono_method_full_name): Print the wrapper type
14883 in human readable form.
14885 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
14887 * reflection.c icall.c: Fixed warnings.
14889 * image.c (load_class_names): Use a temporary hash table to hold the
14890 namespaces in order to avoid doing many string comparisons.
14892 * image.h: Fix typo.
14894 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
14895 Pass NULL instead of g_direct_equal to the GHashTable constructor
14896 since the NULL case is short-circuited inside g_hash_table_lookup,
14897 leading to better performance.
14899 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
14900 obtain the first custom attribute for a given index. Depends on the
14901 CustomAttribute table being sorted by the parent field.
14903 * reflection.c (mono_custom_attrs_from_index): Use the new function
14904 for better performance.
14906 2003-09-07 Martin Baulig <martin@ximian.com>
14908 * class.c (mono_class_init): If we're a generic instance, inflate
14909 all our methods instead of loading them from the image.
14910 (mono_class_from_generic): Set `class->methods = gklass->methods'.
14912 2003-09-07 Martin Baulig <martin@ximian.com>
14914 * mono-debug-debugger.c: Added support for constructors.
14916 2003-09-06 Martin Baulig <martin@ximian.com>
14918 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
14921 * reflection.c (mono_reflection_setup_generic_class): Call
14922 ensure_runtime_vtable() to create the vtable.
14924 2003-09-05 Martin Baulig <martin@ximian.com>
14926 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
14929 2003-09-04 Martin Baulig <martin@ximian.com>
14931 * reflection.c (mono_reflection_define_generic_parameter): Generic
14932 parameters start with zero.
14934 2003-09-04 Martin Baulig <martin@ximian.com>
14936 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14938 * reflection.h (MonoReflectionGenericParam): New typedef.
14939 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
14940 the generic parameters from the managed TypeBuilder.
14942 * reflection.c (mono_reflection_define_generic_parameter): New function.
14943 (mono_reflection_create_runtime_class): Encode generic parameters.
14944 (mono_reflection_setup_generic_class): New function; this is
14945 called after adding adding all generic params to the TypeBuilder.
14946 (encode_type): Added MONO_TYPE_VAR.
14948 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
14950 * class.h class.c (mono_class_needs_cctor_run): Moved this method
14953 * assembly.h assembly.c: Moved the AOT loading code into an assembly
14956 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
14958 * reflection.h reflection.c class.h class.c: Delete duplicate
14959 definition of mono_type_get_name () from reflection.c and export the
14962 * class.c: Class loading fixes from Bernie Solomon
14963 (bernard@ugsolutions.com).
14965 * reflection.c: Endianness fixes from Bernie Solomon
14966 (bernard@ugsolutions.com).
14968 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
14970 * assembly.h assembly.c: Define a file format version for AOT
14973 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
14975 * appdomain.h (MonoJitInfo): New field to determine whenever the
14976 code is domain neutral.
14978 2003-08-31 Miguel de Icaza <miguel@ximian.com>
14980 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
14982 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
14984 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
14985 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
14986 Avoid caching the result since strings must be domain specific. Fixes
14989 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
14991 * marshal.c (mono_marshal_init): Make this callable multiple times
14992 since it is hard to find a correct place to call it.
14994 * object.c (mono_runtime_class_init): Execute static constructors in
14995 the correct appdomain.
14997 * image.c (build_guid_table): Handle the case when multiple images have
15000 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15002 * icall.c: added a couple of icalls for System.Web.
15004 2003-08-28 Martin Baulig <martin@ximian.com>
15006 * icall.c (ves_icall_Type_BindGenericParameters): Use
15007 `klass->generic_inst' instead of `&klass->byval_arg' in the
15008 mono_type_get_object() call. The returned type must be
15009 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
15011 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
15015 * object.c (mono_class_proxy_vtable): Make it thread safe.
15017 * pedump.c: Fix warning.
15019 * object.c appdomain.h: Get rid of metadata_section.
15020 It is no longer needed and it was causing deadlocks with domain->lock.
15022 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
15024 2003-08-26 Martin Baulig <martin@ximian.com>
15026 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
15028 2003-08-26 Martin Baulig <martin@ximian.com>
15030 * pedump.c (main): Call mono_metadata_init(),
15031 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
15032 and mono_loader_init().
15034 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
15036 * loader.h: Add missing include to fix build.
15038 * image.h: mono_image_load_references is no more.
15040 * assembly.c: Reworked assembly loading to make it really thread safe.
15041 After these changes, the assembly returned by mono_assembly_open is
15042 fully initialized, i.e. all its references assemblies are loaded.
15044 * assembly.c (mono_image_load_references): Renamed to
15045 mono_assembly_load_references, and made private, since clients no
15046 longer need to call it.
15048 * class.c: Removed calls to mono_assembly_load_references, since it was
15049 a source of deadlocks.
15051 * loader.h loader.c class.h class.c: Protect data structures using a
15052 new lock, the loader lock.
15054 * class.c (mono_class_setup_vtable): Create temporary hash tables and
15055 GPtrArrays only when needed.
15057 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
15058 into empty structures by mcs. Fixes pinvoke7.cs.
15060 * domain.c (mono_init): Call a new initialization function.
15062 * appdomain.c (mono_runtime_init): Call the new initializer function
15063 of the marshal module.
15065 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
15066 inserted into empty structures by mcs. Fixes pinvoke7.cs.
15068 * marshal.h marshal.c: Added locks around the wrapper caches to make
15069 this module thread safe.
15071 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
15072 this argument. Fixes pinvoke1.exe.
15074 2003-08-25 Lluis Sanchez <lluis@ximian.com>
15076 * object.h: Added call_type field to MonoMethodMessage and the corresponding
15077 enumeration of values. Removed fields to store remote call output values in
15078 MonoAsyncResult. Not needed any more.
15079 * object.c: Initialize call_type and async_result fields in mono_message_init.
15080 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
15081 dispatching the message.
15082 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
15083 async call to finish. To do it use a message with EndInvoke call type.
15085 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
15087 * loader.h loader.c (mono_method_hash_marhal_info): New function which
15088 determines whenever a method has marshalling info.
15090 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15092 * assembly.c: fix the build on windows.
15094 2003-08-22 Lluis Sanchez <lluis@ximian.com>
15096 * object.cs: Fixed bug #47785.
15098 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
15100 * string-icalls.c (StringReplace): If their are no occurances of
15101 the old string found return a reference to the supplied
15102 string. This saves some memory and matches MS behavoir.
15104 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15106 * socket-io.c: fixed compilation for systems that define AF_INET6
15107 and don't define SOL_IP/SOL_IPV6.
15109 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
15111 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
15112 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
15114 * rawbuffer.c rawbuffer.h: Make this module thread safe.
15116 * domain.c: Make this module thread safe.
15118 * domain.c (mono_init): Call new initialization function.
15120 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
15121 reference types too. Fixes #38812.
15123 * image.c (mono_image_init): Fixed warnings.
15125 * class.c (mono_class_from_typeref): Handle assembly load failure
15128 * appdomain.c (add_assemblies_to_domain): Handle the case when
15129 the references of an assembly are not yet loaded.
15131 * metadata.c image.c assembly.c: Moved initialization of global
15132 variables to a separate function called at startup since lazy
15133 initialization of these variables is not thread safe.
15135 * image.c assembly.c: Made this module thread safe by adding locks in
15136 the appropriate places.
15138 * domain.c (mono_init): Call the new initialization functions of the
15141 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
15143 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
15144 make a direct call. It is proxy's work to make the call asynchronous.
15145 mono_delegate_end_invoke(): If the targe is a proxy, just collect
15147 * object.cs: mono_method_call_message_new(): read AsyncResult and
15148 state object from parameters list, if this info is requested.
15149 * object.h: Added fields to store remote call output values in
15150 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
15152 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15154 * object.h: add needed fields to MonoThread.
15155 * threads.c, threads.h: allow registering a function to cleanup data
15156 allocated per thread by the JIT.
15158 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15160 * loader.h: portability fix by Bernie Solomon
15161 * <bernard@ugsolutions.com>.
15163 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
15165 * reflection.h reflection.c (mono_param_get_objects): Changed this to
15166 return a MonoArray. This simplifies the code and also ensures that
15167 the cache allways contains an object reference as a value.
15169 * icall.c (ves_icall_get_parameter_info): Simplified using the new
15172 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15174 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
15175 fixes a problem with byte ordering when getting the address family for
15178 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
15180 * .cvsignore: Added monosn.
15182 * reflection.h reflection.c loader.c: Added support for parameter
15183 marshalling to dynamically created types. Fixes #47295.
15185 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15187 * rand.c: remove useless warnings.
15189 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15191 * class.c: implemented ldtoken for methods and fieldrefs.
15193 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15195 * threadpool.c: when mono_async_invoke was called, no one took care of
15196 monitoring the queue. So if the method invoked took some time and we
15197 got new async invoke requests after 500 ms (the thread created waited
15198 that long in WaitForSingleObject), the new async invoke was not called
15199 until the previous one finished.
15201 This is fixed now. Thanks to Totte for helping with it.
15203 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15205 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
15207 2003-08-11 Martin Baulig <martin@ximian.com>
15209 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
15211 2003-08-06 Martin Baulig <martin@ximian.com>
15213 * mono-debug-debugger.c: Added support for static fields,
15214 properties and methods.
15216 2003-08-06 Martin Baulig <martin@ximian.com>
15218 * mono-debug-debugger.c: Don't store the MonoString's vtable to
15219 make this work for applications with multiple application domains.
15221 2003-08-04 Martin Baulig <martin@ximian.com>
15223 * mono-debug-debugger.c: Completely reworked the type support; the
15224 most important thing is that we're now just using one single
15225 `MonoType' instance per type.
15227 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
15229 * mono-endian.h, mono-endian.c, icall.c: Added icall
15230 ves_icall_System_Double_AssertEndianity to assert double word endianity
15231 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
15233 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15235 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
15236 support, icalls and fixes.
15238 2003-07-31 Miguel de Icaza <miguel@ximian.com>
15240 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
15241 classes that are a punctuation character in .NET is not the same a
15244 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15246 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
15248 2003-07-29 Miguel de Icaza <miguel@ximian.com>
15250 * icall.c: Add new MemCopy internalcall.
15251 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
15252 Simplified code; It is not necessary to handle all the cases here,
15253 as the C# code takes care of it. Only handle the case of the name
15254 resource embedded into the assembly.
15256 Changed signature to return the data pointer and the size of the
15259 2003-07-26 Miguel de Icaza <miguel@ximian.com>
15261 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
15262 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
15264 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
15266 * socket-io.c: ignore EINTR error in select.
15268 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
15270 * class.h, class.c: removed unused subclasses field in MonoClass.
15272 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
15274 * icall.c: improve fix of get_base_definition(). If the parent class
15275 doesn't have the mehod, look at the parent of the parent.
15276 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
15277 to check if a parameter is an in or out parameter
15278 (PARAM_ATTRIBUTE_IN is not set by default).
15279 mono_method_return_message_restore(): Use mono_class_value_size to
15280 get the size of a value type. mono_type_stack_size (parameterType)
15281 does not return the correct value if parameterType is byRef.
15282 mono_load_remote_field(), mono_load_remote_field_new(),
15283 mono_store_remote_field(), mono_store_remote_field_new():
15284 raise exception if the remote call returns an exception.
15286 2003-07-28 Martin Baulig <martin@ximian.com>
15288 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
15289 method. This is a wrapper around mono_runtime_invoke() which
15290 boxes the instance object if neccessary.
15292 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15294 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
15295 metadata.h, row-indexes.h, verify.c: first cut of generics support.
15297 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15299 * icall.c: disable mcs bug workaround.
15301 2003-07-21 Miguel de Icaza <miguel@ximian.com>
15303 * object.c (mono_runtime_class_init): Take the metadata_section
15304 mutex before obtaining the domain mutex.
15306 * appdomain.h: Added definition of metadata_section mutex here.
15308 * object.c: define metadata_mutex here.
15310 2003-07-24 Ravi Pratap <ravi@ximian.com>
15312 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
15315 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
15317 * reflection.c: Fix bug #46669
15319 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15324 * object.h: fill in the type name for TypeLoadException.
15326 2003-07-23 Ravi Pratap <ravi@ximian.com>
15328 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
15329 relationship between TypeBuilders while compiling corlib) and bug
15330 45993 (Array types returned from the runtime while compiling
15331 corlib were from the loaded corlib).
15333 2003-07-22 Martin Baulig <martin@ximian.com>
15335 * mono-debug-debugger.c: Reworked the type support a bit more;
15336 distinguish between types and classes.
15338 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
15340 * icall.c: add IsArrayImpl icall.
15342 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
15344 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
15345 initializing real_size only once. Also fix bug #46602.
15347 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
15349 * object.c: Renamed mono_metadata_section to metadata_section.
15351 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
15353 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
15354 empty array if the type is an array. Fixed.
15355 ves_icall_MonoMethod_get_base_definition: if the base method
15356 is abstract, get the MethodInfo from the list of methods of
15358 * reflection.c: ParameterInfo.PositionImpl should be zero-based
15359 and it was 1-based. Fixed in mono_param_get_objects.
15361 2003-07-20 Martin Baulig <martin@ximian.com>
15363 * mono-debug.h: Set version number to 31.
15364 (mono_debug_init): Added `MonoDomain *' argument.
15366 * mono-debug-debugger.c: Reworked the type support; explicitly
15367 tell the debugger about builtin types; pass the `klass' address to
15370 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
15372 * image.c: Allow new metadata tables to be loaded without a
15373 warning. Also update the warning message to give the new constant value.
15375 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15377 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
15378 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
15379 array type representation changes.
15381 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15383 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
15384 on Environment.Exit () call.
15386 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15388 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
15389 requires a matching corlib.
15391 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
15393 * Changelog: My editor decided to add a CR to each line. Sorry about that.
15394 Committed again without the CRs.
15396 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
15398 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
15399 getting it from the "this" socket instance. Did not work
15400 if the socket is a subclass of Socket.
15401 Also fixed bug #35371.
15403 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15405 * metadata.c: fixed size for TypedByRef.
15406 * loader.c: when searching for a method, consider the vararg amrker.
15407 * unicode.c, decimal.c: constify some arrays.
15409 2003-07-15 Dick Porter <dick@ximian.com>
15411 * socket-io.c: Fixed compilation for gcc < 3.2.
15413 Fixed compilation for machines that don't have AF_INET6 (thanks to
15414 Bernie Solomon <bernard@ugsolutions.com> for that part.)
15416 Fixed compile warnings.
15418 Fixed formatting and line endings.
15420 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
15423 * socket-io.c: Added IPv6 support.
15425 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
15427 * class.c (mono_class_is_assignable_from): New function to implement
15428 the is_assignable_from logic. Used by mono_object_isinst,
15429 Type::IsAssignableFrom () and the interpreter.
15431 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
15432 Object, even interfaces.
15434 * object.c (mono_object_isinst): Implement in terms of
15435 is_assignable_from.
15437 * icall.c (ves_icall_type_is_assignable_from): New icall.
15439 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
15441 * domain.c (foreach_domain): fix compiler warning.
15443 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
15445 * image.c (load_metadata_ptrs): use g_strndup because strndup is
15446 not available on all plattforms
15448 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
15450 * image.h image.c: Store the metadata version string in MonoImage.
15451 * icall.c: New icall to retrieve the image version.
15452 * reflection.c (create_dynamic_image): Fill in the image version field
15453 * reflection.c (build_compressed_metadata): Use the image version
15454 from the image structure.
15456 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15458 * appdomain.c: modified comment.
15459 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
15460 That will be its last iteration when mono_gc_cleanup is called from
15461 mono_runtime_cleanup and before the domain is unloaded.
15465 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
15467 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
15470 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15472 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
15473 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
15474 Bernie Solomon <bernard@ugsolutions.com>.
15476 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15478 * object.c, object.h: provide mono_object_new_fast() for faster
15479 allocation in some special cases.
15481 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15483 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
15484 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
15486 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15488 * threadpool.c: fix leaks.
15490 2003-07-01 Dick Porter <dick@ximian.com>
15492 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
15493 using MonoGHashTables. Fixes threadpool bug posted to list.
15495 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
15497 * image.h, image.c: added support to load an assembly from a byte array.
15498 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
15499 assembly bundle support.
15501 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
15503 * threadpool.c (mono_thread_pool_add): keep a reference to the
15504 AsyncResult to prevent GC
15506 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15508 * class.c: leak fix.
15510 2003-06-25 Dick Porter <dick@ximian.com>
15512 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
15513 for the async object, the WaitHandle object will close the handle.
15516 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15518 * class.c: in mono_array_class_get (), lookup from the hash with the
15519 same type we insert: this works around a bug in
15520 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
15521 lluis. The real fix will have to wait for after the release.
15523 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15525 * icall.c: fix memory leak when getting type members.
15527 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
15529 * reflection.c: added more pubtoken special cases.
15531 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15533 * class.c: handle field offset correctly when class size
15534 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
15536 2003-06-20 Martin Baulig <martin@ximian.com>
15538 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
15541 2003-06-20 Martin Baulig <martin@ximian.com>
15543 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
15545 2003-06-20 Martin Baulig <martin@ximian.com>
15547 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
15548 just distinguish between variables in registers and variables at
15549 an offset relative to a register.
15551 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15553 * icall.c: #ifdef out latest changes until mcs is fixed.
15555 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15557 * icall.c: return members in metadata order.
15559 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15561 * icall.c: avoid infinite loop in GetTimeZoneData.
15563 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15565 * icall.c: added Marshal.Prelink/All icalls.
15567 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
15569 * object.c, object.h: fix warnings and do some overflow checking
15570 when creating arrays.
15572 2003-06-17 Dick Porter <dick@ximian.com>
15575 * file-io.c: File attributes need to be tweaked slightly when
15576 passed from the managed to the w32 world.
15578 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15579 * profiler.h profiler-private.h profiler.c: Rework last patch
15580 based on suggestion by Paolo.
15582 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15584 * profiler.h profiler-private.h profiler.c: Added infrastructure for
15585 instruction level coverage data collection.
15586 * profiler.h profiler.c (: Added new callback function which can be
15587 used by the profiler to limit which functions should have coverage
15589 * profiler.c (mono_profiler_load): Call g_module_build_path to
15590 generate the file name of the profiler library.
15592 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15594 * profiler.c, profiler.h, profiler-private.h: added basic block
15595 coverage profiling API.
15597 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
15599 * reflection.c (mono_reflection_create_runtime_class): Add support
15600 for events in dynamically generated code.
15602 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
15605 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15607 * icall.c: when getting timezone info, return reasonable values if we
15608 can't get the actual data.
15610 2003-06-14 Dick Porter <dick@ximian.com>
15612 * threads.c (start_wrapper): Remove the reference to the thread
15613 object in the TLS data, so the thread object can be finalized.
15614 This won't be reached if the thread threw an uncaught exception,
15615 so those thread handles will stay referenced :-( (This is due to
15616 missing support for scanning thread-specific data in the Boehm GC
15617 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
15619 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
15621 * reflection.c: ensure streams and tables are first allocated with
15622 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
15624 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15626 * icall.c: fixed GetElementType for byrefs (bug# 44792).
15628 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
15630 * reflection.c (mono_reflection_create_runtime_class): Add support for
15631 properties to dynamically created classes.
15632 * reflection.c: Fix a few places where non-MonoObjects were inserted
15633 into the tokens hashtable.
15635 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15637 * object.c: some support to handle out of memory exceptions.
15639 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
15641 * marshal.c (mono_marshal_get_native_wrapper): support reference
15644 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15646 * object.h, object.c: more portability stuff from Bernie Solomon.
15647 Unexport mono_object_allocate(). Added mono_object_unbox ().
15648 Set exitcode when an unhandled exception is thrown.
15650 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
15652 * marshal.c (mono_marshal_get_native_wrapper): use custom
15653 marshaler for return types.
15655 2003-06-10 Dick Porter <dick@ximian.com>
15657 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
15658 ip_mreq is available
15660 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15662 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
15663 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
15664 by Bernie Solomon <bernard@ugsolutions.com>.
15666 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
15668 * gc.c (mono_gc_init): Avoid error message on shutdown when
15669 GC_DONT_GC=1 is used.
15671 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
15672 New icall to return the GUID of a module.
15674 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15676 * class.c: ensure instance size always includes the parent's size
15677 even whem class size is set explicitly (fixes bug#44294).
15679 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15681 * profiler.h, profiler.c: made the simple profiler thread-safe,
15682 get more accurate timing info. Allow the loading of an
15683 externally-developed profiler module.
15685 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
15687 * marshal.c (mono_marshal_get_native_wrapper): improved
15688 class/byref arguments.
15689 (mono_marshal_get_native_wrapper): better string marshaling support.
15691 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15693 * class.c: ensure .pack and .size are handled correctly and
15694 simplified layout of static fields.
15696 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
15699 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
15701 * loader.c (mono_lookup_pinvoke_call): look for modules in the
15702 current directory (fix bug 44008)
15704 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
15706 * marshal.c (mono_marshal_get_native_wrapper): started support for
15708 (mono_delegate_to_ftnptr): consider marshalling specifications
15710 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15712 * reflection.c, reflection.h: emit custom marshal info.
15714 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15716 * object.c: free the GError.
15717 * icall.c: added CloseEvent_internal.
15719 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
15722 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
15724 * loader.c (mono_method_get_signature): Add support for dynamic
15727 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15729 * reflection.c: fixed bug #43905.
15731 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15733 * class.c, domain.c, icall.c, metadata.h, object.h: support for
15734 handling TypedReference and ArgIterator.
15735 * loader.c, loader.h: added function to get signature at call site.
15737 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15739 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
15740 data readonly. Buglets and warning fixes. Some MethodSpec support.
15742 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15744 * class.h, class.c, object.c: remove relative numbering support.
15746 2003-05-26 Miguel de Icaza <miguel@ximian.com>
15748 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
15749 free the string, until we get a chance to fix Gtk#
15751 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15753 * marshal.c: revert last patch.
15755 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15757 * icall.c: updates for new mono_class_vtable() not calling
15758 the type constructor anymore.
15760 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15762 * object.h, object.c: separate vtable creation from type
15763 initialization. Make running the .cctor thread safe.
15765 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
15767 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
15769 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
15771 * loader.c (mono_get_method): consider calling convention
15773 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
15775 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
15776 to return the invisible global type for a module.
15778 * reflection.c (mono_image_build_metadata): Emit global fields too.
15780 2003-05-20 Peter Williams <peterw@ximian.com>
15782 * loader.c (mono_lookup_internal_call): Add a few newlines.
15784 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
15786 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
15789 * appdomain.c (set_domain_search_path): Recalculate search path when
15790 AppDomainSetup.PrivateBinPath changes.
15792 * object.c (mono_class_compute_gc_descriptor): It turns out some
15793 parts of the class libs (like System.Thread) holds pointers to
15794 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
15795 to treat native int a pointer type here.
15797 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
15799 * appdomain.h, domain.c: add hashtable for jump target resolution.
15801 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
15803 * reflection.h reflection.c icall.c: Added new icalls
15804 GetManifestResourceInfoInternal, GetModulesInternal and support
15807 2003-05-16 Dick Porter <dick@ximian.com>
15811 * file-io.c: Implement System.IO.MonoIO::GetTempPath
15813 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
15815 * object.c: mono_store_remote_field: little fix to previous patch.
15817 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15819 * class.c: add constructors to array classes.
15820 * icall.c: special case array construction for InternalInvoke (),
15822 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
15824 * class.h class.c reflection.c object.c: Added support for field
15825 defaults in dynamically generated classes.
15827 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15829 * reflection.c: properly encode charset for ddlimport.
15831 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15833 * threads.c: allow compiling without GC.
15835 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15837 * appdomain.h, object.c, object.h, threads.c, threads.h: added
15838 handling of thread static data.
15840 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15842 * reflection.h, reflection.c: added mono_custom_attrs_free ().
15844 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
15846 * class.c (mono_array_class_get): always set the serializable flags
15847 (mono_array_class_get): always set the SEALED attribute for array types
15849 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
15851 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
15852 attributes (fix for bug 42021).
15854 2003-05-12 Dick Porter <dick@ximian.com>
15856 * gc.c: Don't run finalizers when the finalizer thread is
15857 finishing up, because the default domain has already been
15860 2003-05-11 Miguel de Icaza <miguel@ximian.com>
15862 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
15863 value is null, we should throw an exception. This is slightly
15864 different than the other conventions used for the constructor.
15866 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15868 * socket-io.c: fixed windows build.
15870 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15872 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
15874 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
15876 * object.c (mono_string_new_wrapper): Compatibility fix for MS
15879 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
15881 * class.c (mono_class_layout_fields): Add experimental GC aware
15882 auto layout facility. Requires class library changes to work correctly.
15884 (mono_class_setup_vtable): Avoid overriding explicit interface
15885 method implementations. Fixes iface3.exe test.
15887 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
15889 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
15890 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
15892 * metadata.h: Add new type classification macro which determines
15893 whenever the type holds an object reference.
15895 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
15897 * marshal.c (mono_marshal_get_native_wrapper): cleanups
15899 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
15901 * gc.c (finalizer_thread): Work around a GC bug.
15903 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
15905 * marshal.c (emit_struct_conv): allow unions
15907 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
15909 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
15911 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
15913 2003-05-06 Martin Baulig <martin@ximian.com>
15915 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
15917 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15920 (Select_internal): allow NULLs, don't create arrays if not needed.
15921 Coupled with Socket.cs changes.
15924 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
15925 register a finalizer for it that will close the semaphore handle. This
15926 fixes the leak and make Lupus' test run with > 4080 loops.
15928 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
15930 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
15931 Jerome Laban (bug #42287)
15933 2003-05-02 Martin Baulig <martin@ximian.com>
15935 * debug-mono-symfile.h
15936 (MonoSymbolFile): Moved declaration into mono-debug.h.
15937 (MonoDebugMethodJitInfo): Likewise.
15938 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
15940 (_mono_debug_address_from_il_offset): Take a
15941 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
15944 (MonoDebugDomainData): New struct.
15945 (mono_debug_get_domain_data): New function.
15946 (mono_debug_add_method): Take an additional `MonoDomain *'
15948 (mono_debug_source_location_from_address): Likewise.
15949 (mono_debug_il_offset_from_address): Likewise.
15950 (mono_debug_address_from_il_offset): Likewise.
15952 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
15954 * reflection.c: one more check for null type in custom attrs.
15956 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15958 * reflection.c: avoid warning (comparison is always false due to limited
15959 range of data type).
15961 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15963 * icall.c: throw an exception in Type.GetField if the argument 'name'
15966 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
15968 * reflection.c: fixed handling of enums in named arguments to custom
15969 attributes (bug #42123).
15971 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15973 * reflection.c: use the right array element type and handle
15974 a null for a Type argument, too.
15976 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
15978 * reflection.c: handle arrays as arguments to custom attributes.
15980 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
15982 * reflection.c: handle a string value in a custom attr
15983 ctor that takes an object.
15985 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
15987 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
15990 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
15992 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
15994 2003-04-27 Martin Baulig <martin@ximian.com>
15996 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
15997 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
15998 MONO_DEBUGGER_EVENT_BREAKPOINT.
15999 (mono_breakpoint_trampoline_code): Removed.
16000 (mono_debugger_event_handler): The last argument is now a
16002 (mono_debugger_insert_breakpoint_full): Removed the
16003 `use_trampoline' argument.
16004 (mono_debugger_method_has_breakpoint): Likewise.
16005 (mono_debugger_trampoline_breakpoint_callback): Renamed to
16006 mono_debugger_breakpoint_callback(); take the method and
16007 breakpoint number as arguments.
16009 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16011 * metadata.c: fix off by one when loading parameters attributes.
16013 2003-04-24 Martin Baulig <martin@ximian.com>
16015 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
16017 2003-04-24 Martin Baulig <martin@ximian.com>
16019 * mono-debug-debugger.c: Moved all code which interacts with the
16020 Mono Debugger here.
16022 * debug-mono-symfile.c: This code now just deals with the symbol
16023 file itself, the debugger code is now in mono-debug-debugger.c.
16025 2003-04-23 Martin Baulig <martin@ximian.com>
16027 * mono-debug.c (mono_debug_source_location_from_il_offset):
16028 New method; like mono_debug_source_location_from_address(), but
16029 takes an IL offset instead of a machine address.
16031 2003-04-23 Martin Baulig <martin@ximian.com>
16033 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
16034 `line' field; this is now computed by the debugger.
16036 2003-04-23 Martin Baulig <martin@ximian.com>
16038 * mono-debug.[ch]: New files. This is the new debugging interface.
16040 * mono-debug-debugger.[ch]: New files. Moved all code which
16041 interacts with the Mono Debugger here.
16043 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
16045 * domain.c (mono_init): initialize mono_defaults.monitor_class
16047 2003-04-21 Miguel de Icaza <miguel@ximian.com>
16049 * reflection.c (method_encode_code): Add a spicy exception to help
16050 future compiler authors.
16052 2003-04-21 Martin Baulig <martin@ximian.com>
16055 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
16056 Make this work with relative pathnames; g_filename_to_uri() needs
16057 an absolute filename.
16059 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
16061 * icall.c: Track name changes in Object and ValueType.
16063 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
16065 * metadata.c (mono_type_stack_size): size should be a multiple of
16068 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16071 (internal_domain_finalize): moved into mono_domain_finalize. No need
16072 to create another thread because the finalizers will be run in the
16075 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
16076 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
16077 to be run (MS does this too).
16079 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
16081 * object.c (mono_class_compute_gc_descriptor): Update comment.
16083 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
16085 * image.h: Add synchronized wrapper cache.
16087 * image.c (do_mono_image_open): Initialize cache.
16089 * reflection.c (create_dynamic_mono_image): Initialize cache.
16091 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16093 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
16094 ves_icall_System_Buffer_ByteLengthInternal.
16096 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16098 * reflection.c: setup klass->nested_in earlier. Allow
16099 a dash in the assembly name.
16101 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
16103 * metadata.c (mono_type_to_unmanaged): dont access
16104 type->data.klass for MONO_TYPE_OBJECT
16105 (mono_type_to_unmanaged): consider System.Delegate class
16107 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
16109 * class.c: just setup supertypes in the proper place instead of
16110 initializing the full element class for arrays.
16112 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16114 * class.c: ensure the element class of arrays is initialized.
16115 Setup the supertype info for array classes, too.
16117 2003-04-14 Miguel de Icaza <miguel@ximian.com>
16119 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
16121 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16123 * Makefile.am: re-added -m option when running cygpath. This way,
16124 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
16126 * mono-config.c: same codepath for locating mono config file for WIN32
16128 * assembly.c: if mono_assembly_setrootdir is called, don't override
16131 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16133 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
16134 MONO_ASSEMBLIES variable.
16136 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16138 * icall.c: added Assembly::GetNamespaces() icall.
16140 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16142 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
16144 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
16146 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
16147 * object.c: fixed bug in the construction of vtable for proxies
16149 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
16151 * object.c (mono_array_new): Mark mono_array_new as an icall.
16153 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16155 * class.c: fixed test for public method when overriding interfaces.
16158 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16160 * appdomain.h, domain.c: added mono_domain_foreach() to
16161 be able to access the currently loaded appdomains.
16162 * object.c: make string interning work across sppdomains.
16163 Mark some functions for use as icalls.
16165 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
16167 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
16169 * reflection.h reflection.c: Allocate long living data using
16170 GC_MALLOC_ATOMIC so the collector does not need to scan it.
16172 * reflection.c: Double the allocation size in streams instead of
16173 increasing it, to prevent unneccesary copying on large assemblies.
16175 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
16176 creation if the assembly does not have the Run flag set.
16178 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16180 * class.h: avoid the C++ keywords in header files (Jerome Laban
16181 spotted and fixed this).
16183 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16186 (mono_unhandled_exception): fill in the arguments for the
16187 UnhandledException event. Only trigger that event for the default
16188 domain (as MS does).
16190 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
16192 * object.c: Improve typed allocation stuff based on suggestions from
16193 Paolo. Also turn it on if the GC library supports it.
16195 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
16197 * object.c object.h class.h: Added experimental typed allocation
16198 facility using the interfaces in gc_gcj.h.
16200 * os/gc_wrapper.h: Added new include files.
16202 2003-04-03 Martin Baulig <martin@ximian.com>
16204 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
16205 which is not yet enabled by default.
16207 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
16209 (mono_gc_lock, mono_gc_unlock): New static functions.
16211 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
16212 functions; stop/start the world for the garbage collector. This
16213 is using the windows API; we need to complete the SuspendThread()/
16214 ResumeThread() implementation in the io-layer to make this work on Unix.
16215 (mono_gc_push_all_stacks): New public function; tells the garbage
16216 collector about the stack pointers from all managed threads.
16218 2003-04-03 Martin Baulig <martin@ximian.com>
16220 * object.h (MonoThread): Added `gpointer stack_ptr'.
16222 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
16224 2003-04-03 Martin Baulig <martin@ximian.com>
16226 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
16228 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
16230 * reflection.c (typebuilder_setup_fields): Initialize field.first and
16233 2003-04-02 Miguel de Icaza <miguel@ximian.com>
16235 * loader.c (mono_lookup_internal_call): Report the corlib that is
16238 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
16240 * icall.c (ves_icall_type_GetTypeCode): fixed check for
16241 System.DBNull (it's class not valuetype).
16243 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16245 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
16246 if the array method was already assigned a token (fixes bug#40646).
16248 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
16250 * reflection.c (mono_reflection_get_type): Attempt type resolve even
16251 if no assembly is given.
16253 2003-04-01 Miguel de Icaza <miguel@ximian.com>
16255 * metadata.h: Added the new tables.
16257 * row-indexes.h: Added definitions for new tables.
16259 * metadata.c: Add schemas for new tables, and add support for
16260 computing the sizes of them.
16262 * class.c: Update for handling the new type cases.
16264 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
16266 * metadata.h (MONO_TYPE_IS_VOID): new macro
16268 2003-03-31 Martin Baulig <martin@ximian.com>
16270 * threads.h (MonoThreadCallbacks): Added `thread_created'.
16272 * threads.c (mono_thread_new_init): Call `thread_created' in the
16273 mono_thread_callbacks.
16275 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
16277 * loader.h: added marshalbyrefobject_class to mono_defaults
16278 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
16279 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
16280 generation of output parameters.
16281 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
16282 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
16283 contextbound and the target object belongs to the context of the caller.
16284 * object.h: added context and unwrapped_server variables in MonoRealProxy.
16285 * object.c: Implemented support for interfaces and abstract classes
16286 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
16287 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
16289 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
16291 * class.h class.c (mono_class_is_subclass_of): New function.
16293 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
16294 routines for most common case (calls from ArrayList::ToArray).
16296 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
16297 routine so programs which call Environment::Exit() can be profiled.
16299 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
16300 Added MONO_ARCH_SAVE_REGS.
16302 * icall.c (ves_icall_type_is_subtype_of): Use new function.
16304 2003-03-29 Miguel de Icaza <miguel@ximian.com>
16306 * blob.h: Add a couple of new MonoType types definitions.
16308 * tabledefs.h: Add a couple of new call convs.
16310 2003-03-27 Zoltan Varga <vargaz@freemail.h>
16312 * reflection.h (MonoReflectionDynamicAssembly): track changes in
16313 the layout of the class.
16315 * reflection.c (alloc_table): double the size on overflow to avoid
16316 unnecessary copying.
16318 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
16319 avoid filling out metadata tables and blobs. Also set mb->ilgen to
16320 null so it can be garbage collected.
16322 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
16324 * reflection.c (mono_reflection_get_type): Return the resolved type
16325 only if it is in the assembly we searched.
16327 * reflection.c (ensure_runtime_vtable): Initialize method slots.
16329 * class.c (mono_class_setup_vtable): Set the slot of the overriding
16332 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16335 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
16336 the right one is 'file:///blah', but MS allows it.
16338 (mono_assembly_open): allow 'file://blah'
16340 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
16342 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
16344 * socket-io.c: fixes bug #40310.
16346 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
16348 * reflection.c (mono_reflection_parse_type): handle deeply nested
16351 * reflection.c (mono_image_create_token): Use unique token values
16352 since they will be put into a hash table.
16354 * class.c (mono_class_setup_vtable): If a method occurs in more than
16355 one place in the vtable, and it gets overriden, then change the
16356 other occurances too.
16358 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
16359 object as return type.
16361 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
16363 * icall.c: Deleted "ToString" implementation for double and float
16364 because they are full implemented in managed code.
16366 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16368 * reflection.c, reflection.h: implemented and exported functions
16369 to retrieve info about custom attributes.
16371 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16373 * appdomain.c: moved Uri handling to assembly.c
16374 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
16375 work when using a file Uri in *nix and windows.
16377 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
16378 GetReferencedAssemblies.
16380 2003-03-18 Dick Porter <dick@ximian.com>
16382 * icall.c: Rename a couple of internal calls
16384 * threads.c: Set the thread state to Stopped when a thread exits.
16387 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
16389 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
16392 * object.c (mono_class_vtable): fix warning.
16394 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
16396 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
16398 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
16400 (method_encode_clauses): Create exception info structures in the right
16402 (mono_reflection_setup_internal_class): Initialize supertypes field.
16404 * class.c object.c: Handle interfaces which implement other interfaces
16407 * class.h class.c: Move the supertypes array initialization code into
16408 a separate function so it can be used for dynamic types too. Also call
16409 it earlier, in mono_class_init(), since it can be used before the
16410 type is initialized.
16412 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16416 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
16421 * object.c: remove warnings.
16423 2003-03-13 Martin Baulig <martin@ximian.com>
16425 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
16426 (MonoDebugLexicalBlockEntry): New types.
16428 * debug-mono-symfile.c
16429 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
16431 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16433 * process.c: ret can be any non-zero value accroding to MS doc.
16435 2003-03-07 Miguel de Icaza <miguel@ximian.com>
16437 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
16438 fixing a warning for a miss-used prototype, would have cause
16439 random memory corruption.
16441 2003-03-07 Martin Baulig <martin@ximian.com>
16443 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
16444 getting really annoying ....
16446 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
16448 * reflection.c (fixup_method): added support for array methods.
16450 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16452 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
16453 (pointed out by Michael Adams).
16455 2003-03-04 Dick Porter <dick@ximian.com>
16457 * icall.c: Temporarily reverted the Double and Single ToString()
16458 change, because it broke nunit.
16460 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
16462 * object.h, threads.h: make include files compatible with C++
16463 (patch by Jerome Laban <jlaban@wanadoo.fr>).
16465 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
16467 * icall.c: Erased ToString helper functions for Double and Single.
16468 Now, that implementations ar all in managed code (Double and Single
16471 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
16473 * appdomain.c: Added method for initializing the default context of
16474 a domain. Added internal call for getting the default context.
16475 * appdomain.h: Added context variable in MonoDomain struct.
16476 * domain.c: mono_domain_set also sets the default context of the domain
16477 * icall.c: Mapped internal method InternalGetDefaultContext.
16478 * object.c: mono_object_get_virtual_method returns always a remoting
16479 wrapper if the object is a transparent proxy.
16480 mono_runtime_invoke_array: when creating an object by calling the
16481 constructor, if the created object is a proxy, then the constructor should
16482 be called using the a remoting wrapper.
16484 2003-03-03 Dick Porter <dick@ximian.com>
16486 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
16487 variable so it compiles on solaris. Problem spotted by
16488 Christopher Taylor <ct@cs.clemson.edu>
16490 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16493 (get_info_from_assembly_name): don't leak value.
16496 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
16499 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
16501 * assembly.c: export mono_image_load_references ().
16502 * class.c: handle function pointers. mono_class_from_name() now
16503 supports nested type names directly.
16505 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
16507 * reflection.h reflection.c: Encode already created dynamic methods
16508 and fields correctly as a DEF instead of a REF.
16510 * reflection.c: Get rid of the force_ref argument to
16511 mono_image_typedef_or_ref since it was wrong in the first place.
16513 * string-icalls.c: add error checking to string constructors according
16516 * reflection.c: Emit types in the order their TypeBuilders were
16517 created. Previously, a new table index was assigned to each type before
16518 the tables were emitted. This was wrong because the signature blob
16519 might already refer to a type by its original table index.
16521 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
16523 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
16526 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16528 * Makefile.am: make assemblies dir have \ instead of / on windows.
16530 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
16532 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
16533 iterate over the NESTEDCLASS table using a linear search since the
16534 table is not guaranteed to be sorted by the secondary key.
16536 * class.c (mono_class_create_from_typedef): fixed up call to
16537 mono_metadata_nesting_typedef.
16539 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
16541 * marshal.c (mono_string_to_byvalstr): clear the memory as
16542 suggested by Jerome Laban <jlaban@wanadoo.fr>
16544 2003-02-26 Dick Porter <dick@ximian.com>
16546 * process.c: Cope with padding in .rsrc blocks
16548 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
16550 * metadata.h: reverted the filter_len change, it breaks reflection
16552 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
16554 * metadata.h: added a new field to store the filter_len
16557 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
16559 * reflection.c: handle custom attributes for types and members
16560 created with Reflection.Emit (bug#38422).
16562 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
16564 * reflection.c: define RTSpecialName automatically for constructors for
16565 compatibility with MS.NET.
16567 * reflection.c (mono_reflection_create_runtime_class): initialize
16568 nested_in field of dynamically created classes.
16570 2003-02-22 Martin Baulig <martin@ximian.com>
16572 * debug-mono-symfile.h: Incremented version number.
16574 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
16576 * object.h icall.c process.c: fix warnings.
16578 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
16580 * appdomain.h appdomain.c:
16581 (mono_domain_try_type_resolve): split the
16582 name_or_tb argument into a name and a tb argument.
16583 (mono_domain_has_type_resolve): new function to check whenever the
16584 application has registered a TypeResolve event handler.
16586 * icall.c reflection.h reflection.c: move the type resolve logic into
16587 mono_reflection_get_type () so it will be invoked when
16588 Assembly::GetType () is called.
16591 (mono_reflection_get_type): renamed to get_type_internal.
16592 (mono_reflection_get_type): fixed type name generation so it works
16593 for nested types too.
16594 (mono_reflection_get_type): call has_type_resolve () to avoid the
16595 costly type name generation if there is no resolve event handler.
16597 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16599 * class.c, image.c: load exported types from file references.
16601 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
16603 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
16604 used to cache the managed methods used to create proxies and make
16605 remote invocation of methods.
16606 * class.h: Added in MonoVTable a flag to indicate that a class needs
16607 to be remotely created.
16608 * object.c: Modified the method mono_class_vtable(). It now initializes
16609 the remote flag of the vtable. Modified mono_object_new_specific(),
16610 so now it checks the remote flag.
16611 * icall.c: Added a couple of internal methods, one for enabling instance
16612 creation interception for a type, and one for creating objects bypassing
16615 2003-02-18 Martin Baulig <martin@ximian.com>
16617 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
16618 New interncall to get a method's metadata token.
16620 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
16621 New interncall for the debugger.
16623 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
16625 * class.c (mono_class_setup_vtable): allocate supertype array
16627 2003-02-18 Martin Baulig <martin@ximian.com>
16629 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
16631 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16634 (assembly_name_to_aname): jump over unknown properties (i've found
16635 something like: 'type, assembly, version=xxx, custom=null, public...',
16636 so now will ignore custom=null and still get the rest of the values).
16638 2003-02-17 Dick Porter <dick@ximian.com>
16640 * threads.c: Have Thread.Start() wait for a semaphore to signal
16641 that the thread has set up all its local data. This fixes bug
16642 34323, where Abort() raced the new thread's TLS data.
16644 Also removes the handle_store() call from start_wrapper, because
16645 threads are now always created suspended and there is no longer a
16646 race between the parent and child threads to store the info.
16648 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
16650 * image.c: explain the #- heap issue in a message, hopefully
16651 avoiding FAQs on mono-list.
16653 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16656 (GetEntryAssembly): if the domain has not invoked
16657 AppDomain.ExecuteAssembly yet, return the assembly of the default
16660 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
16662 * class.c (mono_ldtoken): make it work in dynamic assemblies.
16664 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
16666 * metadata.c, reflection.c: simple speedup to type hash
16669 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
16671 * image.c, image.h, class.c, assembly.c: move module loading
16672 to MonoImage. When loading metadata, consider alignemnet from
16673 the start of metadata, not from the metadata address in memory.
16675 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
16677 * reflection.c (mono_reflection_get_custom_attrs): Added support for
16678 AssemblyBuilder objects. Factored out custom attribute creation into
16679 a separate function.
16680 (create_custom_attr): new function to create custom attributes.
16682 2003-02-12 Miguel de Icaza <miguel@ximian.com>
16684 * Makefile.am: Got tired of typing the full pathname to pedump.
16685 Until there is another option, am installing this.
16687 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
16689 * class.c (class_compute_field_layout): always set field->parent
16690 (mono_ldtoken): use mono_defaults.fieldhandle_class;
16692 2003-02-11 Dick Porter <dick@ximian.com>
16695 * monitor.c: Rewrote Monitor, making lock much faster and
16696 Pulse/Wait work as specified. Also uses much fewer handles, and only
16697 creates them as needed.
16699 * exception.c: Added SynchronizationLockException
16701 * threads.c: Deleted old Monitor implementation. The new one is
16704 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16706 * class.c: handled TypedReference type code. Set the correct size for
16707 class data. Setup interface_offsets for interface classes, too.
16709 2003-02-09 Martin Baulig <martin@ximian.com>
16711 * debug-mono-symfile.h: Reflect latest symbol writer changes.
16713 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
16715 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
16716 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
16717 * object.c: fixed mono_object_get_virtual_method () for interfaces.
16718 * verify.c: check for code that runs after the end of the method.
16720 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
16722 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
16723 "System.Math::Round2".
16724 * sysmath.h: Added Floor, Round and Round2 definitions.
16725 * sysmath.c: Modified certain functions that were not 100% compliant
16726 with MS.NET (math precision) and added the implementation of Floor,
16729 2003-02-07 Martin Baulig <martin@ximian.com>
16731 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
16733 2003-02-07 Martin Baulig <martin@ximian.com>
16735 * debug-mono-symfile.c: Reflected latest symwriter changes.
16736 (mono_debug_create_mono_symbol_file): Removed.
16737 (mono_debug_open_mono_symbol_file): Take an argument which
16738 specifies whether to create a dynamic symbol file.
16740 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
16742 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
16744 2003-02-05 Martin Baulig <martin@ximian.com>
16746 * reflection.c (mono_image_build_metadata): Make this public,
16747 protect it against being called multiple times, don't create
16748 resources and don't build the compressed metadata here.
16749 (mono_image_create_pefile): Do this here.
16752 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
16754 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16756 * socket-io.c: fixed bug #36322.
16758 2003-02-06 Piers Haken <piersh@friskit.com>
16762 * debug-mono-symfile.c:
16768 * socket-io.c: warning cleanups
16770 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
16772 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
16773 function. works like remoting invoke, but does a check for the Proxy first.
16775 2003-02-05 Miguel de Icaza <miguel@ximian.com>
16777 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
16779 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
16781 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
16783 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
16784 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
16786 * object.c (mono_store_remote_field_new): used by the new jit
16787 instead of mono_store_remote_field
16788 (mono_load_remote_field_new): used by the new jit
16789 instead of mono_load_remote_field
16791 2003-02-05 Patrik Torstensson
16793 * appdomain.c: changed unload to take the domain id instead
16796 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
16799 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16801 * appdomain.c: don't look for assemblies in ApplicationBase if
16802 PrivateBinPathProbe is set.
16804 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16806 * object.c: make the first argument in main_args contain the absolute
16807 path to the assembly. Fixes bug #37511.
16809 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16811 * icall.c: get correct UTC offset for countries not using daylight
16812 time saving. Fixes bug #30030.
16814 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16816 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
16817 and 1 are the family).
16819 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
16821 * icall.c (ves_icall_InternalExecute): removed wrong assertion
16823 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
16825 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
16827 * reflection.c: added support for SignatureHelper tokens, which is
16828 needed by the Calli opcode.
16830 * reflection.h: track changes to SignatureHelper class.
16832 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
16834 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16836 * appdomain.c: fixed loading assemblies from PrivateBinPath.
16838 2003-02-03 Patrik Torstensson
16839 * appdomain.[c|h], domain.c :
16840 - Added support for getting a domain via domain id
16841 - Support for setting and getting domain from System.AppDomain
16842 (used in cross appdomain channel)
16843 - Added support for get/set for a MonoAppContext on a thread
16844 (Context class in System.Runtime.Remoting.Contexts),
16845 - Removed hack in Get/SetData and ExecuteAssembly.
16847 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
16848 the managed world to get control when a proxy is created.
16850 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
16852 2003-02-03 Miguel de Icaza <miguel@ximian.com>
16855 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
16856 Populate the codebase field as well.
16858 2003-02-02 Martin Baulig <martin@ximian.com>
16860 * debug-mono-symfile.c
16861 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
16862 (mono_debug_symfile_add_method): Allow interncalls.
16864 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16866 * icall.c: throw parse exception if strtod fails or the string is empty.
16868 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
16870 * marshal.c: handle object type separately from defined
16873 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
16875 * marshal.c: handle NATIVE_LPSTR for strings when it's
16876 explicitly specified.
16878 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
16880 * reflection.c, reflection.h, icall.c: setup the reflection
16881 handle cache for ModuleBuilders and AssemblyBuilders.
16883 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
16885 * reflection.c (reflection_methodbuilder_to_mono_method): set
16888 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16890 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
16892 2003-01-29 Dick Porter <dick@ximian.com>
16894 * threads.c: No need for the fake_thread kludge now that Thread
16895 doesn't run a class constructor
16897 2003-01-29 Dick Porter <dick@ximian.com>
16899 * threads.c: Use g_direct_hash instead of the rather bogus
16902 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
16904 * marshal.c (mono_marshal_get_native_wrapper): add check for null
16905 (fix pinvoke12.exe)
16906 (mono_marshal_get_struct_to_ptr): generate valid IL code
16907 (mono_marshal_get_ptr_to_struct): generate valid IL code
16908 (*): correctly set sig->pinvoke, we need to memdup the signature
16911 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16913 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
16914 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
16916 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
16918 * profiler.c: provide more callers information.
16920 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
16922 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
16924 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
16926 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
16928 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16930 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
16931 exception instead of going into an infinite loop on dates which it
16934 * string-icalls.c (ves_icall_System_String_get_Chars): raise
16935 out-of-range exception if needed.
16937 * class.c (mono_class_setup_vtable): allow a virtual method to provide
16938 an implementation for an interface method and to override an inherited
16939 method at the same time.
16940 Imagine a scenario when a virtual method is used to override a
16941 virtual abstract method in a parent class, and this same method
16942 provides an implementation for an method inherited from an interface.
16943 In this case, the interface resolution code will set im->slot, which
16944 means that the virtual method override pass will skip this method
16945 which means a pointer to the abstract method inherited from the parent
16946 will remain in the vtable of this non-abstract class.
16948 * class.c: (mono_class_setup_vtable): continue search for a real
16949 method if only an abstract method is found.
16951 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
16953 * reflection.c: add size to encoding for ByValStr and ByValArray
16954 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
16956 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16958 * class.c (mono_class_setup_vtable): pass the override info as an
16961 * class.c (mono_class_setup_vtable): set the slot of overriding methods
16964 * reflection.c (ensure_runtime_vtable); add support for method
16967 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16969 * reflection.c (resolution_scope_from_image): Hack to work to work with
16970 dynamic assemblies.
16972 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
16973 added a 'force_ref' argument to force this function to allways return
16974 a TypeRef. This is needed by mono_image_get_memberref_token ().
16976 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16978 * reflection.c (mono_image_get_type_info): interfaces really don't have
16981 * reflection.c (mono_image_basic_init): fill out missing fields of
16984 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
16985 dynamic assemblies. This is required so dynamic assemblies show up in
16986 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
16987 Type::GetType() etc. This is consistent with MS behaviour.
16989 * image.c image.h reflection.c: add newly created classes to the name
16990 cache so mono_class_get () will find them.
16992 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16994 First part of changes to get IKVM.NET running under mono.
16996 * appdomain.h, appdomain.c: added new function
16997 mono_domain_try_type_resolve() which will emit TypeResolve events.
16998 This function will call AppDomain::DoTypeResolve to do the actual work.
17000 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
17001 moved existing code dealing with dynamic tokens to a new function
17002 called mono_reflection_lookup_dynamic_token (). This function will
17003 raise TypeResolve events when appropriate. Since reflection.c is not
17004 part of libmetadata, a new hook function called
17005 mono_lookup_dynamic_token() is added to class.c which will call this.
17007 * assembly.h assembly.c: make the invoke_load_hook function public,
17008 so it can be called for dynamic assemblies.
17010 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
17012 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
17015 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
17016 MonoGHashTable, since it contains pointers to objects which the GC
17019 * assembly.c (search_loaded): remove unused variable.
17021 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
17023 * object.c: fixed issue exposed by gcc-generated IL programs
17024 that use RVA data for pointers.
17026 2003-01-25 Martin Baulig <martin@ximian.com>
17028 * threads.c (start_wrapper): Moved the initialization of
17029 `start_func' above the mono_new_thread_init() call to which we
17030 pass it as argument.
17032 2003-01-24 Martin Baulig <martin@ximian.com>
17034 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
17035 the MonoThread pointer.
17037 2003-01-21 Miguel de Icaza <miguel@ximian.com>
17039 * icall.c: Rename `PowImpl' to Pow.
17041 2003-01-23 Dick Porter <dick@ximian.com>
17043 * threads.c (start_wrapper): Create a Thread object if needed, so
17044 the Main() thread can do the class initialisation in a subthread
17045 that has been set up to allow managed code execution.
17047 Pass the thread ID instead of the MonoThread pointer to the thread
17048 start and attach callbacks. This change is required, because the
17049 jit thread start callback must be called _before_ the Thread
17050 object can be created.
17052 (mono_thread_init): Removed much object creation code that is no
17053 longer needed. No managed code is called from here now.
17055 * object.c (mono_runtime_exec_managed_code): Create a subthread
17056 for Main, and call back to the runtime to use it.
17057 Set the exit code when Main exits.
17059 * gc.c: Make sure domain finalisation happens in a subthread.
17060 Re-enable threaded GC, fixing bug 31333 (again).
17062 * environment.c: System.Environment internall calls (so far just
17063 ExitCode is here, the others are still in icall.c)
17065 * appdomain.c (mono_runtime_cleanup): All threads running managed
17066 code should have finished before mono_runtime_cleanup() is
17067 reached, so no need to clean up threads.
17069 2003-01-22 Martin Baulig <martin@ximian.com>
17071 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
17072 `gpointer func' arguments.
17073 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
17074 but added `MonoThread *thread' argument.
17075 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
17077 * threads.c (mono_new_thread_init): Added `gpointer func' argument
17078 and pass it to the mono_thread_start_cb callback.
17079 (mono_install_thread_callbacks): New public function to install a
17080 set of callbacks which are set by the debugger.
17081 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
17083 2003-01-22 Martin Baulig <martin@ximian.com>
17085 * Makefile.am: Install debug-mono-symfile.h.
17087 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
17089 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
17091 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
17093 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
17094 * class.c (mono_ptr_class_get): correctly set access levels of pointers
17095 (mono_array_class_get): correctly set access levels of arrays
17097 2003-01-20 Patrik Torstensson
17098 * image.h (MonoAssemblyName): changed major, minor, build, revision
17099 from signed to unsigned.
17101 2003-01-20 sean kasun <skasun@azstarnet.com>
17103 * reflection.c (load_cattr_value): Now this handles
17104 MONO_TYPE_SZARRAY. Fixes bug #35629
17106 2003-01-20 Miguel de Icaza <miguel@ximian.com>
17108 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
17111 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17113 * decimal.c: fixed bug #26056.
17115 2003-01-17 Martin Baulig <martin@ximian.com>
17117 * gc.c: Raise an ExecutionEngineException instead of using g_error().
17119 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17122 (mono_get_exception_type_initialization): new function.
17124 * object.c: throw a TypeInitializationException when an exception is
17125 thrown invoking the class constructor.
17127 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17129 * reflection.c: fixed attribute reading.
17131 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17134 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
17135 provided, look for the type in the calling assembly and then in
17136 mscorlib; if the assembly name is provided, only try that one.
17138 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17140 * object.c: register the vtable before there is a chance it's
17141 queried again recursively.
17143 2003-01-13 Duncan Mak <duncan@ximian.com>
17145 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
17148 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
17150 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
17152 2003-01-11 Martin Baulig <martin@ximian.com>
17154 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
17155 this to 20 for the release.
17157 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
17159 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
17161 * loader.c (mono_method_get_marshal_info): bug fix
17163 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
17164 structures with explicit layout
17166 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17168 * profiler.c: made the output more readable (and sorted).
17169 Added caller information for the allocation profiler.
17171 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
17173 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
17175 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17177 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
17178 to get value types.
17180 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
17182 * object.c, profiler.h, profiler.c, profiler-private.h:
17183 Added object allocation profiler.
17185 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
17187 * reflection.h, reflection.c: handle global methods.
17188 Compress blob entries.
17190 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
17192 * marshal.c: fix compilation.
17194 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
17196 * loader.c (mono_method_get_marshal_info): impl.
17198 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
17200 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17202 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
17203 for reference types.
17205 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
17207 * loader.c: fixed off by one error in loaded parameter names.
17209 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
17211 * marshal.c (mono_marshal_get_icall_wrapper): like
17212 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
17213 instead of a MonoMethod.
17215 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17217 * decimal.c: fixed bug #36537.
17219 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
17221 * marshal.c: throw a missing method exception if a
17222 P/Invoke method is not found.
17224 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17226 * icall.c: allow a null this for constructors.
17228 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17230 * icall.c: raise the proper exceptions if the arguments to the
17231 internal Invoke are incorrect.
17233 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
17235 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
17237 2003-01-03 Martin Baulig <martin@ximian.com>
17239 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
17241 2002-12-31 Martin Baulig <martin@ximian.com>
17243 * debug-mono-symfile.c: Completely rewrote the type section.
17244 Instead of using individual malloc()ed fields, we use one big
17245 continuous memory area and offsets into this area.
17246 See the comments in the source code for details.
17248 2002-12-30 Martin Baulig <martin@ximian.com>
17250 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
17252 2002-12-30 Martin Baulig <martin@ximian.com>
17254 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
17255 line number table in this data blob instead of using an external
17258 2002-12-28 Martin Baulig <martin@ximian.com>
17260 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
17262 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
17264 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
17265 as a boxed return type.
17267 2002-12-21 Miguel de Icaza <miguel@ximian.com>
17270 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
17271 g_build_filename to properly get separators on the filename created.
17273 * object.h: Small change, introduce MonoMarshalByRefObject to
17274 track the layout of that structure in the C# universe as we make
17277 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
17279 * object.c: removed assert to allow static fields on interfaces.
17280 * loader.c: a TypeSpec may be used for any type, not just arrays.
17282 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17284 * class.c, class.h: added mono_class_array_element_size ().
17285 Ignore static methods in interfaces.
17287 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17289 * threads.c: fixed the build under cygwin.
17291 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
17293 * reflection.c: handle nullref constants. Allocate keys for
17294 reflection handles with the GC.
17296 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17298 * threads.c, threads.h: added mono_thread_get_abort_signal()
17299 to get a suitable signal for thread abort.
17301 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17303 * metadata.c: fix handling of ExportedType table.
17305 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17307 * icall.c: added WriteWindowsDebugString internal call.
17309 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17311 * reflection.h: added fields to match C# implementation.
17313 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17315 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
17317 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
17319 * gc.h, gc-internal.h: Rename header for GC internal calls to
17320 gc-internal.h from gc.h as to not clash with Boehm GC having its
17321 header installed as <gc.h> in outside include paths.
17322 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
17323 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
17325 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17327 * icall.c: assign minor, build and revision in FillName.
17329 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
17331 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
17332 Added support for running code generated by Reflection.Emit.
17334 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17336 * appdomain.c: check for NULL argument in LoadFrom.
17338 2002-12-10 Dick Porter <dick@ximian.com>
17340 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
17342 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17344 * appdomain.c: fix buglet when building exe file name. Handle full
17345 assembly name (needed after latest changes to AssemblyName).
17347 (mono_image_close): free some hashtables.
17349 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
17351 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
17352 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
17353 on some systems (redhat 7.3)
17355 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
17357 * threads.c: delete the critical section of a sync block,
17358 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
17360 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
17362 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
17364 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17366 * appdomain.[ch]: handle the assembly preload event to try loading the
17367 assemblies using the paths we have in the current domain.
17369 * assembly.[ch]: created an assembly preload hook that is called to try
17370 loading the assembly by other means that the ones provided here.
17372 * domain.c: initialize the domain search path.
17374 From now on, assemblies (TODO: except corlib and System) are loaded
17375 according to these rules when using mono_assembly_load ():
17377 1. It tries to load the assembly from the ApplicationBase
17378 of the current domain appending .dll and .exe (TODO: have to
17379 try loading from name/name.dll and name/name.exe).
17381 2. It tries the search path specified in PrivateBinPath for the
17382 current domain (if any).
17384 3. Previous behavior.
17386 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
17388 * icall.c: implemented GetInterfaceMap() related icall.
17389 * domain.c, loader.h: load MethodInfo in mono_defaults.
17391 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17393 * gc.c: disable the finalizer thread for now, untill all the issues
17394 with it are resolved.
17396 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17398 * string-icalls.c: handle embedded nulls in string ctor when the
17399 length is specified.
17401 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17403 * class.c: look for explicit interface implementation in parent
17406 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
17408 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
17410 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17412 * gc.c: protect handles with a critical section.
17414 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17417 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
17418 parameters. If no assembly specified, try getting the type from all
17419 the assemblies in the current domain, else, load the assembly and get
17422 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17424 * marshal.c: applied patch from Aleksey Demakov that fixes
17425 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
17427 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17429 * icall.c: fixed get_location.
17431 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
17433 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
17434 declarations to make it work with older gcc.
17436 * loader.c (mono_get_method): set signature->pinvoke for native calls
17438 2002-11-20 Dick Porter <dick@ximian.com>
17440 * threads.c (mono_thread_init): Set the main thread's handle
17442 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17444 * gc.c: allow compilation without GC support. Changed to match the
17447 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17449 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
17451 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
17453 * reflection.c: set a public key token on the core assemblies.
17455 2002-11-18 Dick Porter <dick@ximian.com>
17457 * threads.c: Split out some thread initialisation so that other
17458 files can set the start callback function.
17460 * gc.c: Run finalisers in a separate thread, to avoid stack
17461 overflow. Fixes bug 31333.
17463 * appdomain.c: Set up GC finalisation thread.
17467 * domain.c: Use gc.h macros for GC_malloc
17469 2002-11-15 Dick Porter <dick@ximian.com>
17473 * appdomain.c: Removed mono_runtime_init_with_attach(),
17474 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
17475 merging the extra parameter with the existing function. Removed
17476 unneeded code in mono_thread_attach().
17478 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
17480 * image.c (mono_image_loaded_by_guid): a method to get loaded
17482 (load_metadata_ptrs): we store the guid as string.
17484 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
17486 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
17488 * metadata.c (mono_guid_to_string): imported method form Zoltan
17489 Varga (slightly modified)
17491 * assembly.c (mono_assembly_open): load precompiled code
17493 * loader.h (MonoMethod): we store the method token for use in the
17496 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17498 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
17499 the hook function called when an assembly is loaded.
17501 * domain.c: Modified file.
17502 (mono_domain_assembly_load): removed hash table insertion of assemblies.
17506 2002-11-07 Miguel de Icaza <miguel@ximian.com>
17508 * reflection.c: Map PEFileKind to the value expected by the WinNT
17511 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17513 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
17514 Read until the buffer is filled completely.
17516 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17518 * icall.c: implemented MonoType.InternalGetEvent ().
17520 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17522 * appdomain.c: implemented InitAppDomainSetup. Delayed
17523 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
17524 the entry_assembly.
17526 * assembly.c: base_dir is now an absolute path ending with
17529 * icall.c: modified get_location according to the above changes.
17531 * object.c: init AppDomain.SetupInformation for the default domain after
17532 we have the entry assembly.
17534 * domain.c: when unloading a domain, setup = NULL.
17536 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
17538 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
17540 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
17542 * object.h, object.c: introduced mono_object_get_virtual_method ()
17543 to lookup the method invoked on an object when a callvirt is done on
17545 * icall.c: make MethodInfo::Invoke() always do a virtual call.
17547 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17549 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
17550 current domain when loaded an assembly and failed to load it.
17552 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
17554 2002-10-31 Dick Porter <dick@ximian.com>
17558 * file-io.c: Return the error status in a parameter, as the
17559 GetLastError() value has long since been blown away if we try and
17560 look it up in a subsequent internal call invocation. Delete the
17561 GetLastError() internal call, because it's useless.
17563 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
17565 * class.[ch]: added cast_class to fix bug 29517
17567 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
17569 * marshal.c: create valid IL code in the filter clause:
17570 the new JIT is less forgiving:-)
17572 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17574 * icall.c: removed get_property internal call.
17576 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
17578 * appdomain.h domain.c: Added an ID to appdomains.
17580 * threads.c threads.h icall.c: Implement icall
17581 Thread:GetDomainID(), and remove unused icall
17582 CurrentThreadDomain_internal.
17584 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17586 * icall.c: Don't recurse through the base types in GetConstructor.
17589 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17591 * mempool.h, mempool.c: added mono_mempool_empty() and
17592 mono_mempool_stats().
17594 2002-10-23 Dick Porter <dick@ximian.com>
17598 * icall.c: Added MonoIO.GetFileType internal call
17600 2002-10-17 Dick Porter <dick@ximian.com>
17602 * appdomain.c (mono_runtime_cleanup): Don't signal the async
17603 delegate semaphore before waiting for all threads to finish,
17604 because new threads can also call async delegates. Fixes bug
17607 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
17608 of 3 seconds, in case another async job is queued. (This part is
17609 needed because the bug fix reintroduced the 3s exit lag.) This
17610 makes the mono_runtime_shutdown flag superfluous.
17612 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17614 * reflection.c: include ehader size in method section headers.
17615 Really check for suplicated modules entries.
17617 2002-10-17 Martin Baulig <martin@gnome.org>
17619 * debug-mono-symfile.c: Added back support for locals.
17621 2002-10-14 Martin Baulig <martin@gnome.org>
17623 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
17626 2002-10-14 Martin Baulig <martin@gnome.org>
17628 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
17629 mono_class_get() instead of looking in the class cache.
17631 2002-10-13 Martin Baulig <martin@gnome.org>
17633 * debug-mono-symfile.c: Set version number to 28, include the
17634 signature in method names.
17636 2002-10-13 Martin Baulig <martin@gnome.org>
17638 * debug-mono-symfile.h: Set version number to 27.
17640 2002-10-11 Martin Baulig <martin@gnome.org>
17642 * gc.c: Don't register/unregister NULL pointers as disappearing links.
17644 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17646 * metadata.c, metadata.h: added helper function to allocate signatures.
17648 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17650 * icall.c: added internal call to get the location of machine.config.
17652 2002-10-08 Martin Baulig <martin@gnome.org>
17654 * debug-mono-symfile.c: Ignore classes with a pending init for the
17657 2002-10-03 Dick Porter <dick@ximian.com>
17659 * threads.c: Freebsd pthread_t is a pointer
17661 2002-10-03 Dick Porter <dick@ximian.com>
17663 * socket-io.c: Implemented GetHostName_internal
17665 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17668 (mono_config_parse_file): don't leak the text.
17670 2002-10-02 Martin Baulig <martin@gnome.org>
17672 * debug-mono-symfile.c: Added support for methods.
17674 2002-10-01 Martin Baulig <martin@gnome.org>
17676 * debug-mono-symfile.c: Don't emit methods and line numbers for
17677 the dynamic symbol file, just write the type table. We can easily
17678 have an external helper program which creates a symbol file for an
17681 2002-10-01 Dick Porter <dick@ximian.com>
17683 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
17684 Only add the handle to the cleanup array when we're about to
17685 launch the thread. Bug 31425 deadlocked when the test was run on
17688 2002-10-01 Martin Baulig <martin@gnome.org>
17690 * debug-mono-symfile.c: Added support for properties.
17692 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17694 * reflection.c: unaligned store fix from Mark Crichton
17695 <crichton@gimp.org>.
17697 2002-09-27 Martin Baulig <martin@gnome.org>
17699 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
17702 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17704 * assembly.h, assembly.c: use a sane API to hook into the assembly
17705 loading process instead of a useless special-purpouse hack
17706 (ngen needs a hook, too, for example).
17708 2002-09-27 Dick Porter <dick@ximian.com>
17710 * threads.c (mono_thread_init): Call GetCurrentProcess() so
17711 io-layer can set up some process handle info. Not needed on w32,
17712 but doesn't hurt either.
17714 * process.c: Pass the program name in the second parameter to
17715 CreateProcess, so the path is searched. Include the working
17716 directory. Implemented process name, process enumeration, and some
17717 process detail internal calls.
17719 * icall.c: Added internal calls for process lookup, and some
17722 2002-09-26 Martin Baulig <martin@gnome.org>
17724 * assembly.c (mono_install_open_assembly_hook): New global
17725 function to install a function to be invoked each time a new
17726 assembly is loaded.
17727 (mono_assembly_open): Run this callback function if set.
17729 * debug-mono-symfile.c: Put back line numbers for the dynamic
17730 symbol file and also record the .il file as source file. This
17731 allows us to install the temporary symbol file as `file.dbg' just
17732 like a compiler-generated one.
17734 2002-09-26 Nick Zigarovich <nick@chemlab.org>
17736 * Corrected typo in gc.c (BOHEM vs BOEHM).
17738 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17740 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
17741 GetProperties. Also avoid calling g_slist_length in GetProperties and
17744 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17746 * reflection.c: avoid unaligned stores (bug spotted by
17747 Mark Crichton <crichton@gimp.org>).
17749 2002-09-25 Martin Baulig <martin@gnome.org>
17751 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
17752 instead of guint64 for addresses and added prologue/epilogue info.
17754 2002-09-25 Martin Baulig <martin@gnome.org>
17756 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
17757 store line number info. For the dynamic symbol file, we only need
17758 to provide the JIT generated dynamic line number info for the dynamic
17761 2002-09-25 Martin Baulig <martin@gnome.org>
17763 * debug-mono-symfile.h: Incremented version number.
17765 2002-09-24 Martin Baulig <martin@gnome.org>
17767 * class.c (mono_debugger_class_init_func): New global function
17769 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
17772 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
17773 function. This is called via the mono_debugger_class_init_func
17774 hook to add all types to the dynamic type table.
17775 (ves_icall_MonoDebugger_GetType): New interncall to get a class
17776 from its metadata token.
17778 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
17779 New interncall for the debugger.
17781 2002-09-24 Nick Drochak <ndrochak@gol.com>
17783 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
17784 before using it in case it is null.
17786 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17788 * metadata.c: allow custom modifiers in local var signatures
17789 (bug spotted by Zoltan Varga).
17791 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17793 * class.c: deal with the <Module> class that may have a NULL vtable.
17794 Eliminate warnings.
17796 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17798 * image.c, image.h: more strong name helpers.
17799 * monosn.c: more work: convert pem keys to cryptoapi format.
17801 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17803 * string-icalls.c: speedup IndexOf.
17805 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17807 * icall.c: updates from Zoltan.2.Varga@nokia.com.
17809 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
17811 * icall.c: cleanup: use mono_object_domain ().
17813 2002-09-23 Martin Baulig <martin@gnome.org>
17815 * debug-mono-symfile.c: Improved type support.
17817 2002-09-22 Martin Baulig <martin@gnome.org>
17819 * debug-mono-symfile.c: Added support for reference types and strings.
17821 2002-09-22 Martin Baulig <martin@gnome.org>
17823 * debug-mono-symfile.c: Started to work on the type table.
17825 2002-09-21 Martin Baulig <martin@gnome.org>
17827 * debug-mono-symfile.c: Largely reworked the symbol table format.
17828 The symbol table is now incrementally updated each time a new
17829 method is added. We're now also using our own magic and version
17830 so that you don't need to recompile all your classes if the
17831 dynamic table changes.
17832 (mono_debug_update_mono_symbol_file): Removed.
17833 (mono_debug_symfile_add_method): New function to add a method.
17835 2002-09-21 Martin Baulig <martin@gnome.org>
17838 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
17841 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
17842 New interncall to get a method from its metadata token.
17844 2002-09-21 Martin Baulig <martin@gnome.org>
17846 * debug-mono-symfile.c: Create type table.
17848 2002-09-20 Martin Baulig <martin@gnome.org>
17850 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
17852 2002-09-20 Martin Baulig <martin@gnome.org>
17854 * debug-mono-symfile.c: Provide information about params and locals.
17856 2002-09-20 Martin Baulig <martin@gnome.org>
17858 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
17861 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
17862 interncall to get a method from its metadata token.
17864 2002-09-20 Martin Baulig <martin@gnome.org>
17866 * debug-mono-symfile.c: Added a few checks for method->header
17867 being non-NULL. This should never happen, but for the moment
17868 let's use a g_warning() rather than a g_assert().
17870 2002-09-19 Mark Crichton <crichton@gimp.org>
17872 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
17873 even if support for it isn't present. Added an #ifdef to fix this.
17875 * socket-io.c: Added checks back for Solaris support.
17877 2002-09-19 Martin Baulig <martin@gnome.org>
17879 * debug-mono-symfile.c (read_string, write_string): Reflect latest
17880 changes in the symbol file format.
17882 2002-09-18 Martin Baulig <martin@gnome.org>
17884 * debug-mono-symfile.c: Set version number to 21.
17886 2002-09-18 Dick Porter <dick@ximian.com>
17888 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
17889 on netbsd. Fixes bug 30051.
17891 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17894 (set_version_from_string): little fix.
17896 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17898 * monosn.c, Makefile.am: added strong name utility.
17899 * reflection.h, reflection.c: implemented delayed signing,
17900 locale, version and hash id assembly attributes.
17902 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17904 * loader.c, metadata.c: load param attributes in signatures.
17906 2002-09-16 Martin Baulig <martin@gnome.org>
17908 * debug-mono-symfile.c: Added string table with all method names.
17910 2002-09-14 Martin Baulig <martin@gnome.org>
17912 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
17913 fast method lookup.
17915 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17917 * reflection.c: record the public key token of referenced assemblies.
17919 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17921 * image.c, image.h: added functions to get the strong name and the
17922 public key of an assembly.
17923 * pedump.c: use them.
17925 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
17927 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
17929 2002-09-12 Miguel de Icaza <miguel@ximian.com>
17931 * marshal.c (mono_marshal_get_managed_wrapper): Added
17934 2002-09-11 Martin Baulig <martin@gnome.org>
17936 * gc.c: Call GC_unregister_disappearing_link() on all links when
17937 finalizing them, this is necessary to aviod a crash in boehm's
17940 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17942 * gc.c: handle GetTarget for finalized objects spotted and fixed by
17945 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17947 * icall.c: implemented MonoType::Module.
17948 * reflection.c, reflection.h: mono_module_get_object () from
17949 Tomi Pakarinen <tomi.pakarinen@welho.com>.
17951 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17953 * icall.c: ignore overridden methods in GetMethods ().
17954 Fix for FieldInfo::SetValue().
17955 * object.c: handle float/double in runtime invoke.
17957 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17959 * object.c: allow a constructor to be called again on an object.
17961 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17963 * class.h, class.c: move field layout code to it's own function and
17964 export it. Get an interface id earlier. Move fields in MonoClass
17965 so they are more cache friendly and align the bitfields.
17966 * loader.c: temporary handle get_param_names() for a runtime method.
17967 * reflection.c, reflection.h: more code to handle runtime creation of
17970 2002-09-09 Martin Baulig <martin@gnome.org>
17972 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
17973 signature with the pinvoke field being set for the actual call.
17975 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17977 * icall.c: removed some unused icalls. Start of map of glib charsets
17978 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
17980 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17982 * debug-helpers.c: break infinite loop (found and fixed by
17983 Holger Arnold <harnold@gmx.de>).
17985 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17987 * icall.c: target may be null in create_delegate.
17989 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17991 * marshal.c: handle a boolean return type.
17993 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17995 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
17997 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17999 * gc.c: fix weakreferences.
18001 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
18003 * icall.c: added icall to get default codepage.
18005 2002-09-03 Dick Porter <dick@ximian.com>
18008 * threads.c: Use MonoThread instead of MonoObject where
18011 Store running thread objects in a hash table, so that we have all
18012 the info to hand when waiting for them to finish
18013 (means we don't need OpenThread() any more, so mingw builds should
18014 be fully functional again.)
18017 * object.h: Added thread ID to MonoThread
18019 2002-09-03 Martin Baulig <martin@gnome.org>
18021 * icall.c (System.Reflection.Assembly::get_location): New interncall.
18023 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18025 * icall.c: fixed leak in get_temp_path. Thanks lupus.
18027 2002-09-03 Martin Baulig <martin@gnome.org>
18029 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
18030 argument to store the end address of the disassembled instruction.
18032 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
18033 here from debug-symfile.h.
18034 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
18035 JIT into this struct.
18036 (MonoSymbolFile): Added `char *image_file' field.
18037 (MonoDebugGetMethodFunc): Removed.
18038 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
18039 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
18040 (mono_debug_find_method): New method.
18042 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
18043 create a full symbol file.
18044 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
18045 and static symbol files.
18046 (mono_debug_find_method): The symbol file keeps an internal method hash,
18047 call this to get a MonoDebugMethodInfo from a MonoMethod.
18049 * debug-symfile.[ch]: Removed.
18051 2002-08-29 Miguel de Icaza <miguel@ximian.com>
18053 * image.c (do_mono_image_open): Remove linker version check.
18055 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
18057 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
18058 wrappers for instance methods.
18060 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18062 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
18064 2002-08-28 Dick Porter <dick@ximian.com>
18066 * Makefile.am: Export HOST_CC for w32 builds
18068 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
18070 * file-io.c process.c: MonoString are null terminated, no
18071 need for mono_string_to_utf16() anymore.
18073 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18075 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
18077 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
18079 * icall.c, reflection.h: speedup System.MonoType.
18081 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
18083 * reflection.c: allow null as the value of a string argument in
18084 custom attributes constructors.
18086 2002-08-27 Martin Baulig <martin@gnome.org>
18088 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
18089 `trampoline_address' field.
18091 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
18093 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
18094 check (fixes bug #29486)
18096 2002-08-27 Martin Baulig <martin@gnome.org>
18098 * debug-mono-symfile.c: Changed the file format in a way that allows us
18099 open it read-only and to use a specially malloced area for all the
18100 dynamic data. We can now also generate a symbol file on-the-fly if we're
18101 debugging IL code and there is no MCS generated symbol file for it.
18103 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18105 * object.c: added a define for a good string and array
18106 creation speedup (not enabled by default because we need to deal with
18109 2002-08-26 Martin Baulig <martin@gnome.org>
18111 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
18112 function to create a dynamic symbol file. This is used by the
18113 debugger to create a symbol file for IL code on-the-fly.
18115 2002-08-26 Martin Baulig <martin@gnome.org>
18117 * loader.c (mono_lookup_pinvoke_call): Include the error message
18118 from g_module_error() in the error message.
18120 2002-08-24 Martin Baulig <martin@gnome.org>
18122 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
18123 function to update the symbol file. The symbol file is mmap()ed
18124 writable, but private. This allows us to install the symbol file
18125 together with the assembly.
18127 2002-08-24 Martin Baulig <martin@gnome.org>
18129 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
18130 but they can read the new symbol file format which mcs is now creating.
18132 * debug-symfile.c (mono_debug_find_source_location): Moved to
18133 debug-mono-symfile.c; this is now operating on the new symbol file.
18135 2002-08-23 Martin Baulig <martin@gnome.org>
18137 * debug-helpers.c (mono_method_desc_from_method): New function to get
18138 a MonoMethodDesc from a MonoMethod.
18140 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18142 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
18143 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
18145 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
18147 * string-icalls.[ch]: make helper methods static.
18149 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18151 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
18152 types to it and to SetValueInternal.
18154 * object.c: Moved handle_enum label to its proper place. This was the
18157 This time i compiled mcs and gtk-sharp and they both work.
18159 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18161 * icall.c: reverted partially my previous patch until
18162 object.c:set_value handles enums correcly.
18164 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18167 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
18168 (ves_icall_System_Environment_get_MachineName): removed warning when
18169 compiling under cygwin.
18171 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18173 * object.c: fixed field_get_value() for reference types.
18175 2002-08-22 Dick Porter <dick@ximian.com>
18177 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
18178 Don't free a buffer while it's still needed. Patch from Jonathan
18179 Liger <Jonathan.liger@wanadoo.fr>
18181 2002-08-21 Miguel de Icaza <miguel@ximian.com>
18183 * icall.c (ves_icall_System_Environment_get_Platform): Add new
18186 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
18188 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
18189 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
18191 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
18192 we call unmanaged code which throws exceptions.
18194 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18196 * appdomain.h: added per-domain entry_assembly.
18197 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
18199 * icall.c: Assembly::GetEntryAssembly icall.
18200 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
18201 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
18203 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18205 * appdomain.h, gc.c: added mono_domain_finalize ().
18207 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18210 (mono_print_unhandled_exception): changed g_warning by g_printerr
18211 because g_log has a 1024 characters limit (yeah, i got a big stack
18212 trace). Don't print exception name, that should be in ToString
18215 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18217 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
18218 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
18220 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18223 (mono_print_unhandled_exception): after previous commit, i realized
18224 that MS calls ToString on the exception. I changed this function to
18225 do that. This way we get stack_trace for free.
18227 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18230 (mono_print_unhandled_exception): invoke Message property instead of
18231 getting 'message' field from Exception. Don't allocate memory for
18232 'trace' and 'message' if not needed.
18234 2002-08-18 Dick Porter <dick@ximian.com>
18236 * unicode.c: Fix asserts to match Encoder.cs checks
18238 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18240 * marshal.c: fix unaligned store issue and a few wrong
18241 opcode argument types.
18243 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18245 * icall.c: added GetUninitializedObjectInternal internal call.
18247 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
18249 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
18250 to the right domain.
18252 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
18254 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
18256 * class.c (class_compute_field_layout): set blittable to false for Strings
18258 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
18260 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18262 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
18263 first chunk of code to create types at runtime. Code to
18264 handle ReflectedType/DeclaringType. Make reflection handles
18267 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
18269 * class.c: set correct name in arrays.
18271 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
18273 * appdomain.c (mono_domain_transfer_object): make it work with
18274 valuetypes. bug fixes.
18276 2002-08-12 Dick Porter <dick@ximian.com>
18278 * object.h: Rename some parameters to avoid c++ keywords (Patch
18279 from Joseph Wenninger <kde@jowenn.at>)
18281 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
18283 * icall.c: added icall to implement Assembly.GetFile*.
18285 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18287 * reflection.h, reflection.c: code to embed managed resources.
18289 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
18291 * class.c: move all the type size stuff into
18292 class_compute_field_layout().
18294 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18296 * class.c: ensure enums have always the correct instance size.
18297 * unicode.c: remove wrong assert.
18299 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18301 * assembly.c: fix mem corruption issue.
18302 * image.h, image.c: added mono_image_get_resource () to access
18304 * icall.c: implemented Assembly.EntryPoint property and some
18305 Managed Resources related internalcalls.
18308 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
18310 * image.c, image.h: impemented mono_image_get_entry_point ().
18311 * appdomain.c: use mono_image_get_entry_point.
18313 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18315 * reflection.c: support the object type argument when loading
18318 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
18320 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
18321 String as return type.
18323 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
18325 * reflection.c: fix encoding of named args for custom attrs to match
18326 the ms implementation. Read them back when instantiating custom
18329 2002-08-02 Radek Doulik <rodo@ximian.com>
18331 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
18332 by Dietmar as quick fix
18333 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
18334 16 as stack size, used on more places as quick fix before Dietmar
18335 will fix it properly
18337 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18339 * object.h, object.c: added accessors for fields and properties.
18341 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18343 * class.c, class.h: made mono_class_get_field_from_name ()
18344 loop on parent types.
18345 Added mono_class_get_property_from_name ().
18347 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18349 * class.c, class.h: move the code to setup the type vtable in its own
18350 function so that it can be reused also for types created at runtime.
18351 Eliminate the "class" identifier from the header file.
18352 * reflection.c: setup the vtable for enums so that we can create
18353 objects for use in SetConstant ().
18355 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
18357 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
18358 instead of the delegate itself as this pointer (bug #28383)
18360 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
18362 * marshal.c (mono_marshal_get_managed_wrapper): added return type
18365 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18367 * loader.c: don't set the pinvoke bit on icalls.
18369 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
18371 * debug-helpers.c (mono_method_full_name): only print a number to
18372 indicate wrapper type (so that the output is more readable in traces).
18374 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
18376 * class.c (mono_class_init): include method override patch from Paolo
18378 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
18380 * icall.c: fixed GetTypeCode().
18382 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
18384 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
18385 use real delegate invoke function to make it work with multicast
18386 delegates (fix bug# 28291).
18388 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18390 * object.c: load constant strings.
18392 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18394 * reflection.c: no magic numbers.
18395 * tabledefs.h: security action enum.
18397 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18399 * assembly.c: fix possible memory corruption.
18401 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
18403 * reflection.h, reflection.c: added support for linking resources.
18404 * verify.c: check we have an updated corlib.
18406 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
18408 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
18410 (mono_marshal_string_array): null terminate unmanaged string arrays.
18411 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
18413 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18415 * icall.c: Type.GetType () can now return also types from the
18418 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
18420 * loader.h, loader.c: stack walking support.
18421 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
18422 GetCallingAssembly.
18424 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
18426 * marshal.c: added optimisations for blittable types
18428 * class.c (mono_array_class_get): do not set blittable attribute on arrays
18429 (mono_class_setup_mono_type): set blittable attribute for single
18432 * marshal.c (mono_string_utf8_to_builder): impl.
18433 (mono_string_builder_to_utf8): impl.
18434 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
18436 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
18438 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
18439 (mono_marshal_get_managed_wrapper): impl. byref types
18441 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18444 (search_method): don't display debug message.
18446 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
18448 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
18450 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
18452 * appdomain.c: set the missing filename when throwing exception.
18454 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
18456 * metadata.c (mono_type_size): code cleanup
18457 (mono_type_stack_size): removed some test code
18459 2002-07-21 Miguel de Icaza <miguel@ximian.com>
18461 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
18462 mono_get_exception_file_not_found now.
18464 * exception.c (mono_exception_from_name_two_strings): New version
18465 that will call a constructor with two string arguments.
18466 (mono_get_exception_file_not_found): New helper routine, used to
18467 report file-not-found errors.
18469 2002-07-20 Dick Porter <dick@ximian.com>
18472 * process.c: Pass file handles to CreateProcess
18476 * file-io.c: Implemented CreatePipe
18478 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
18480 * metadata.c (mono_get_param_info): set alignment for value types
18482 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18484 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
18485 Constify mono_domain_assembly_open().
18486 * loader.c: handle null namespace in icalls.
18488 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
18490 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
18491 (emit_str_to_ptr_conv): marshal object as structs
18493 * metadata.c (mono_type_to_unmanaged): marshal object as structs
18495 * marshal.c (mono_marshal_get_runtime_invoke): support value types
18497 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
18499 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
18500 (mono_marshal_get_native_wrapper): we an now return value types
18502 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18504 * verify.c: more checks implemented.
18506 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
18508 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
18510 (mono_marshal_get_native_wrapper): allow byref arguments
18511 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
18512 impl. PtrToStringXXX methods
18513 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
18514 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
18515 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
18516 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
18517 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
18519 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18521 * reflection.c: fix buglet in parsing an assembly name.
18523 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
18525 * marshal.c (emit_ptr_to_str_conv): first impl.
18527 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18529 * object.c, class.h: cache the vtable in the class as suggested by
18530 vargaz@freemail.hu (Zoltan Varga).
18532 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18534 * class.h, loader.c: added mono_field_from_token().
18535 * verify.c: first cut of type checking code.
18537 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
18539 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
18541 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
18543 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
18545 (mono_marshal_get_remoting_invoke): impl.
18546 (mono_delegate_begin_invoke): impl.
18547 (mono_mb_emit_save_args): impl.
18548 (mono_delegate_end_invoke): impl.
18549 (mono_marshal_get_delegate_begin_invoke):
18550 (mono_marshal_get_delegate_end_invoke):
18551 (mono_marshal_get_delegate_invoke): generate a special name for
18552 those methods (including the signature) and associate them whith
18553 the delegate class.
18555 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
18558 (mono_reflection_type_from_name): now it has a MonoImage parameter
18559 which is used as the default image to search the type in. If the image
18560 is NULL or getting the type from it fails, it defaults to corlib.
18562 * icall.c: changed 1 call to mono_reflection_type_from_name to match
18565 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18567 * reflection.c: update the parameter table index.
18569 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18571 * domain.c: don't include the mark byte in the string hash.
18573 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18575 * icall.cs: icall for Type.GetTypeCode ().
18576 * verify: a couple of fixes and disabled local initialization checks.
18578 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
18580 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
18582 * debug-helpers.c (mono_method_full_name): print the type of the
18585 * metadata.c (mono_signature_hash): a hash function for signatures
18586 (mono_signature_hash): better hash algorithm
18588 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
18590 * debug-helpers.c (mono_method_full_name): this can now generate
18591 method names with signatures
18593 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
18594 method dont have this pointers.
18596 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18598 * reflection.c: fixup typebuilder tokens.
18599 * image.c: fix buglet.
18600 * marshal.h: remove whitespace.
18601 * metadata.h, metadata.c: reinstate code that was removed.
18602 * verify.c: handle catch directives and fix another couple of bugs.
18604 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
18606 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
18607 (mono_marshal_get_native_wrapper): make it comp. with the old code
18608 (mono_marshal_get_native_wrapper): support boolean
18609 (mono_marshal_get_managed_wrapper): support more types
18611 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
18613 * class.c (class_compute_field_layout): compute class->blittable attribute.
18615 2002-07-09 Dick Porter <dick@ximian.com>
18617 * threads.c: Make the thread cleaning up cope with threads that
18620 2002-07-08 Radek Doulik <rodo@ximian.com>
18622 * reflection.c (method_encode_code): use non-translated values to
18623 compute finally_start, this fixes exception handling on ppc, yay!
18625 * decimal.h (struct signscale): fix endianess
18627 2002-07-07 Radek Doulik <rodo@ximian.com>
18629 * reflection.c: swap box_val and not val
18631 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
18633 * reflection.c, reflection.h: handle full assembly info in type name.
18634 Handle Type arguments when loading custom attributes.
18635 * icall.c: updated to use new mono_reflection_type_from_name () method.
18637 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18640 (method_from_memberref): also print assembly name when method not found.
18642 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18645 (ves_icall_TypeGetProperties): fixed bug #27473.
18647 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18649 * reflection.c: display image name and token when cannot find the
18650 .ctor for an attribute.
18652 2002-07-05 Martin Baulig <martin@gnome.org>
18654 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
18656 2002-07-04 Dick Porter <dick@ximian.com>
18658 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
18659 compile on mingw. This will cause mingw builds to not wait for
18660 subthreads to terminate after the main thread does. I've lodged a
18661 bug with the mingw developers for them to wrap OpenThread().
18663 2002-07-03 Dick Porter <dick@ximian.com>
18665 * threads.c: Store thread IDs instead of handles, because
18666 GetCurrentThread() returns a pseudohandle and therefore stores
18667 useless values. mono_thread_cleanup() continues checking the
18668 array of threads until it is empty, to cope with subthreads
18669 spawning new threads after the main thread has finished.
18673 * profiler-private.h: Pass the thread ID to thread profiler
18674 functions, instead of a handle
18676 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18678 * verify.c: fixes to make it more usable.
18679 * pedump.c: added --verify code to verify IL code in an assembly.
18681 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18683 * reflection.c: turn errors into warnings to allow compiling corlib.
18685 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
18687 * reflection.c: add special cases to compile corlib.
18689 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18691 * reflection.c: handle properties with only a set method.
18693 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18695 * opcodes.h: add enum with opcodes in opval order.
18697 2002-07-01 Dick Porter <dick@ximian.com>
18700 * object.c (mono_runtime_run_main): Removed unneeded argument
18702 2002-06-28 Martin Baulig <martin@gnome.org>
18704 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
18706 2002-06-27 Dick Porter <dick@ximian.com>
18708 * threads.c: Store the handle in both the parent thread and in the
18709 subthread, to minimise the time between starting a new thread and
18712 2002-06-26 Dick Porter <dick@ximian.com>
18714 * appdomain.c (mono_runtime_cleanup): Close the socket library
18715 after all the threads have finished, not before
18717 2002-06-26 Martin Baulig <martin@gnome.org>
18719 * debug-symfile.c (mono_debug_find_source_location): Added
18720 `guint32 *line_number' argument. If it's not NULL, store the line number
18721 there and return the file name without the line number.
18723 2002-06-25 Dick Porter <dick@ximian.com>
18727 * process.c: Process forking and other support functions
18729 2002-06-25 Dick Porter <dick@ximian.com>
18731 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
18732 things dont happen when the image is closed.
18733 (mono_image_lookup_resource): Walk the resource section looking
18734 for a particular entry
18736 * cil-coff.h: PE resource section decoding
18738 2002-06-25 Dick Porter <dick@ximian.com>
18742 (mono_assembly_foreach): Accessor functions to walk the list of
18744 (mono_assembly_set_main):
18745 (mono_assembly_get_main): Process methods need to know which
18746 assembly is the "main" one
18748 * object.c (mono_runtime_run_main): Record the main assembly
18750 * debug-helpers.c: Fix typo
18752 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
18754 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
18755 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
18757 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18759 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
18761 2002-06-21 Miguel de Icaza <miguel@ximian.com>
18763 * image.c (do_mono_image_open): Initialize reference count,
18764 otherwise we leak the MonoImage.
18766 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18768 * reflection.c: small tweak to handle self-hosting.
18770 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
18772 * reflection.c: fix type name parse code.
18774 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18776 * reflection.c: break out of the loop.
18777 * image.c: special case corlib.
18779 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18781 * reflection.c: add all the custom attrs at the end to ensure the
18782 ctors have been properly initialized when the attributes are defined
18783 in the current assembly.
18785 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18787 * reflection.c: handle correctly multiple-nested types.
18789 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
18791 * row-indexes.h: fix typos.
18792 * reflection.c: adjust for typos and fix method_def_or_ref
18793 encoding in MethodImpl table.
18795 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18797 * reflection.c: fix entry point patching (thanks Serge!).
18799 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
18801 * verify.c: add check for System.Exception
18803 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18805 * image.c, class.c: minifix for code just c&p'ed.
18806 * reflection.c: warning fix.
18807 * object.h, loader.h, domain.c: load also StringBuilder.
18809 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18811 * marshal.h, marshal.c: some support code to handle complex marshaling.
18813 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18815 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
18816 Better signatures with vtable error dump.
18818 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
18820 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
18822 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
18824 * icall.c (ves_icall_Type_GetField): impl.
18826 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18828 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
18829 to retrieve a marshal description blob for a field or param.
18831 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
18833 * reflection.h, reflection.c: change order of nested type emission
18834 to avoid table corruption. The NestedTypes table is sorted.
18835 * icall.c: change order of GetConstructor results to workaround mcs bug.
18837 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18839 * reflection.h, reflection.c: handle field and param marshal
18842 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18844 * icall.c, marshal.c marshal.h: more Marshal class implementation.
18846 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18848 * reflection.c: fix call convention.
18850 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18852 * reflection.h, reflection.c: mono_image_get_memberref_token()
18853 takes a type instead of a class, now. Added
18854 mono_image_get_array_token() to create tokens for the special
18855 multi-dim array methods.
18857 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
18859 * assembly.c: handle modules (no assembly table). Split
18860 loading references in its own function.
18861 * class.c: handle moduleref resolution scope.
18862 * image.c, image.h: cache module name in image.
18864 2002-06-07 Martin Baulig <martin@gnome.org>
18866 * reflection.c (mono_image_get_type_info): Only add a class layout entry
18867 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
18869 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18871 * icall.c: more signature fixes that used uint instead of int.
18873 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18875 * reflection.c: fixed signature of field refs.
18877 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18879 * class.c, reflection.c: handle typerefs of nested types
18880 (both on read and when writing files).
18882 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
18884 * icall.c: fix method signatures that tried to workaround the previous
18887 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18889 * debug-helpers.c: fix typo.
18891 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18893 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
18894 rewrote the PE/COFF writing code (our programs are understood by the
18897 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18899 * gc.c, gc.h, icall.c: weakreference support.
18901 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18903 * Makefile.am, mono-config.c: use $(sysconfdir).
18905 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18907 * icall.c: changed default precision of Double.ToString() to 15.
18908 Fixed memory leak. Unified with Single.ToString.
18910 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
18912 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
18914 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
18916 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
18917 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
18918 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
18921 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18923 * debug-symfile.c, sysmath.c: yet more compilation fixes.
18925 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18927 * reflection.c, socket-io.c: more compilation fixes.
18929 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18931 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
18932 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
18933 unicode.c: warning and compiler compatibility fixes.
18935 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18937 * class.h, metadata.c: fixed warnings/compilation errors.
18939 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18941 * Makefile.am, mono-config.c, mono-config.h: configuration file
18943 * loader.c, loader.h: make Dll mapping configurable at runtime in the
18944 config file. Export methods to insert and lookup mappings.
18946 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
18948 * reflection.c: handle types and boxed objects in custom attr
18951 2002-05-30 Martin Baulig <martin@gnome.org>
18954 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
18956 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
18958 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
18959 to lookup the implmap row for a P/Invoke method.
18960 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
18961 P/Invoke method from the runtime on an as needed basis.
18963 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
18965 * metadata.c (mono_metadata_parse_signature): impl.
18967 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18969 * class.c: handle .pack directive.
18971 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
18973 * object.c: initialize static fields with RVA data.
18975 2002-05-25 Martin Baulig <martin@gnome.org>
18978 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
18980 2002-05-24 Martin Baulig <martin@gnome.org>
18983 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
18984 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
18985 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
18987 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18989 * object.c: special case string ctros in invoke.
18990 * gc.c: silly whitespace changes.
18992 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
18994 * threadpool.[ch]: impl. a threadpool that can
18995 be used by mint and mono.
18997 2002-05-22 Martin Baulig <martin@gnome.org>
18999 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
19000 The first argument is now a `MonoReflectionModuleBuilder *', the return
19001 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
19002 `methods' field to get the method builder. The `token' argument is the
19005 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
19006 invalid characters instead of g_assert_not_reached()ing. This seems
19007 to be the behaviour of mscorlib.
19009 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
19011 * object.c (mono_runtime_invoke_array): applied patch from Rachel
19012 Hestilow to fix bug #25104
19014 2002-05-21 Martin Baulig <martin@gnome.org>
19016 * debug-symfile.c (mono_debug_find_source_location): New function.
19017 Looks up an IL offset in the line number table and returns the source
19018 location as a string.
19020 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19023 (mono_double_ToStringImpl): changed %f by %g until we have something
19026 2002-05-21 Nick Drochak <ndrochak@gol.com>
19028 * icall.c : Use different name for Math.Pow's icall. Needed to check
19029 parameters first in C#.
19031 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19033 * icall.c, reflection.h: added icall to get info about an event.
19035 2002-05-20 Radek Doulik <rodo@ximian.com>
19037 * object.c (mono_value_box): don't use memcpy for boxing on BIG
19039 (mono_value_box): don't use memcpy for small sizes on
19040 architectures with unaligned access
19042 2002-05-20 Martin Baulig <martin@gnome.org>
19044 * reflection.c (mono_reflection_setup_internal_class): Don't crash
19045 if `tb->parent == NULL'.
19046 (mono_reflection_create_internal_class): New function. This is
19047 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
19050 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
19053 2002-05-19 Martin Baulig <martin@gnome.org>
19055 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
19056 argument to get the length, don't default to the array length.
19058 2002-05-18 Miguel de Icaza <miguel@ximian.com>
19060 * assembly.c (mono_assembly_setrootdir): New function used to
19061 override the MONO_ASSEMBLIES directory.
19063 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19065 * icall.c: ValueType_GetHashCode() initialize local var.
19067 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19069 * reflection.c: sort custom attributes table.
19071 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19073 * reflection.c: support named args in custom attributes (write support).
19075 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
19077 * reflection.c: fix finally position calculation.
19079 2002-05-15 Radek Doulik <rodo@ximian.com>
19081 * reflection.c: fixed endianess at many places
19083 * icall.c (ves_icall_InitializeArray): comment out debug msg
19085 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
19087 * object.c (mono_unhandled_exception): new function to handle
19088 unhandled exceptions.
19089 (mono_unhandled_exception): call the UnhandledException event.
19090 (mono_runtime_delegate_invoke): impl.
19092 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
19094 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
19095 returns the RVA, not the direct pointer to the data. Handle the case
19096 when the class size is fixed.
19098 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
19100 * reflection.c: fix some endianess issues.
19102 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
19104 * object.c (mono_runtime_invoke): is now able to catch exceptions.
19106 * threads.c (mono_thread_init): added a callback which is invoked
19109 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
19111 * icall.c: make GetHashCode return non-negative values.
19113 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
19115 * object.c, icall.c, gc.c: revert to address-based hashcode.
19117 2002-05-13 Miguel de Icaza <miguel@ximian.com>
19119 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
19121 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19123 * icall.c, class.c: special case <Module>.
19125 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
19127 * icall.c: fix bug in GetNow().
19129 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
19131 * object.c (mono_runtime_class_init): make sure that we call all
19132 static class constructors.
19134 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19136 * reflection.c: sort methodsemantics table.
19138 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19140 * reflection.h, reflection.c: honour init locals setting.
19142 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
19144 * icall.c: copied Double ToStringImpl for Single ToStringImpl
19146 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19148 * reflection.c: support ContructorBuilders in attribute blob creation.
19150 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19152 * reflection.c: some changes to build a binary that can be run
19153 directly in windows.
19155 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
19157 * loader.c: print a big message when an icall can't be found.
19159 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19161 * string-icalls.c: fix bug 24248.
19163 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
19165 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
19166 icall.c, reflection.h: separate assembly loading by pathname and by
19167 assembly name. Use the MONO_PATH env var to search for assemblies.
19169 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19171 * assembly.c, image.h: add some support for assemblies
19172 with multiple modules.
19173 * class.c, class.h: export mono_class_from_typeref().
19174 * loader.c: remove duplicated code and use mono_class_from_typeref(),
19177 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19179 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
19180 documentation says (the ECMA one is correct).
19182 2002-05-02 Dick Porter <dick@ximian.com>
19184 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
19185 Don't name the synchronisation mutex.
19187 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
19190 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
19191 Make the prototypes match.
19192 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
19196 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
19197 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
19198 all systems have tm.tm_zone, so use strftime() with %Z to print
19199 the timezone abreviation into a temp string.
19201 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
19202 rather than mono_array_addr() on a MonoString on Big Endian
19205 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
19207 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
19210 2002-04-30 Dick Porter <dick@ximian.com>
19212 * socket-io.c: Cope with SOCKET being an integer rather than a
19215 * threads.c: Added Thread_free_internal, to deal with thread
19216 handle cleanup. Moved calls to handle_store() and handle_remove()
19217 to start_wrapper(), so each can only be called once. Allocate
19218 synchronisation blocks with GC_malloc(), and use GC finalisation
19219 to close the handles.
19221 * icall.c: added System.Threading.Thread::Thread_free_internal
19223 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19225 * icall.c: support Environment.Exit, CommandLineArgs().
19227 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19229 * object.c, object.h: added mono_runtime_run_main () and
19230 mono_runtime_get_main_args () for use in System.Environment.
19232 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19234 * gc.c: fix thinko, enable actual finalization since the jit is now
19237 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19239 * gc.c, object.c: take into account that an object may be offset wrt the address
19240 returned by GC_malloc().
19242 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
19244 * image.c: handle files without entries in the assembly table (modules).
19246 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
19248 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
19249 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
19250 allowed to be null when it's System.Object class setup.
19252 2002-04-27 Martin Baulig <martin@gnome.org>
19254 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
19255 if `tb->parent == NULL' rather than crashing.
19257 2002-04-28 Nick Drochak <ndrochak@gol.com>
19259 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
19260 calling acos() where asin() should have been called.
19262 2002-04-26 Martin Baulig <martin@gnome.org>
19264 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
19265 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
19266 there's a subdirectory called `System', but we don't want to read that
19267 subdirectory as an assembly.
19269 2002-04-25 Martin Baulig <martin@gnome.org>
19271 * debug-symfile.c: Reflect latest MonoString changes.
19273 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19275 * rand.c, rand.h: instance method icalls need to have an explicit
19276 this pointer as first argument in the C implementation.
19278 2002-04-25 Nick Drochak <ndrochak@gol.com>
19280 * icall.c: Fix typo in map for GetNonZeroBytes
19282 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
19284 * string-icalls.c : String does now passes unit tests without any
19285 errors, the following changes has been made:
19287 Implemented replace methods.
19288 Renaming of methods to (try) follow the standard.
19289 Fixed compare ordinal
19290 Made all memory allocated directly to function instead of via icall function.
19291 Small performance fix in is_in_array function
19293 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
19295 c (mono_string_Internal_ctor_charp_int_int):
19296 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
19297 sindex < 0, throw ArgumentOutOfRangeException instead of
19298 ArgumentNullException.
19300 Added new check for length == 0, however
19301 I need to make it return String.Empty from the C code.
19303 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
19304 that calculate the length for us here.
19306 (mono_string_Internal_ctor_sbytep_int_int): Replaced
19307 mono_string_new_utf16 with mono_string_new, since value is utf8.
19309 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19311 * object.c: register the object for finalization if needed.
19312 Allocate one more char in the string for the terminating 0 char.
19314 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19316 * class.c, class.h, image.c: check if a type implemenst a destructor.
19317 Use the proper key for array class lookups.
19318 * icall.c: register the icalls in the System.GC class.
19319 * gc.c, gc.h: GC-related functions and icalls.
19321 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19325 * unicode.c: free some strings gotten from mono_string_to_utf8 and
19326 changed a couple of free () by g_free ().
19328 * decimal.c: one-liner in the comments for decimal2string ().
19330 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
19332 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
19334 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
19336 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
19337 * object.c (mono_runtime_invoke_array) : handle null in params
19339 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
19341 * string-icalls.c: fixed bug in split (one off bug)
19343 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
19345 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
19346 * icalls.c: added String::Equals as internal method
19348 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
19350 * threads.c: fixed bug in the double interlocked functions
19352 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
19354 * threads.c: implemented all of the new interlocked icalls.
19355 * string-icalls.c: fix a bug in insert.
19356 * icalls.c: added the icalls for interlocked, removed old string functions.
19358 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19360 * loader.c: fix off-by-one error when reading argument names.
19362 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19364 * profiler.c: win32 counter implementation (untested).
19365 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
19366 (the latter needs testing and more complete impl. from win32 folks).
19368 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
19370 * object.c: mono_array_new_full workaround mono_array_class_get
19373 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
19375 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
19376 * object.h (mono_string_chars): Changed casting type.
19378 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
19380 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
19381 method signatures to use gunichar2 instead of gint16.
19383 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
19385 * object.h, object.c: domain-specific versions of mono_object_new and
19388 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
19390 * object.c: changed String layout
19392 * string-icalls.c (mono_string_Internal_ctor_chara): added
19393 internal string constructors.
19395 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
19397 * threads.c: pass 'this' to the thread start routine.
19399 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19401 * string-icalls.c: fix IndexOf and LastIndexOf. Now
19402 InternalCompareStr don't call twice mono_string_cmp_char for the last
19403 character. Improved performance in mono_string_cmp_char.
19405 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19407 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
19408 code into its own library: libmonoruntime.
19410 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
19412 * object.h, object.c: changed array format so that szarrays do not
19413 require a bounds structure.
19414 * icall.c, appdomain.c: support for new szarray format.
19416 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
19418 * metadata.c: compare also the retuns type when comparing signatures:
19419 we didn't do this as an optimization since really overloaded methods
19420 must differ also in the arguments, but this doesn't work with
19421 low-level IL code (or when using explicit conversion operators: see
19422 bug#23498 for an example).
19424 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19426 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
19428 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
19430 * icall.c: make MonoType::GetElementType its own icall.
19432 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19434 * icall.c: remove MonoMethod_get_Name().
19435 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
19438 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
19440 * string-icalls.c: optimized a few methods.
19442 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
19444 * icall.c: added all new string internal calls
19445 * string-icalls.c: added, new string internal call implementation.
19446 * object.c: added mono_string_new_size for allocating a string a size
19448 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
19450 * object.c (mono_object_isinst): use the same code as in the
19451 optimized x86 version.
19453 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19455 * profiler.c: TSC-based timer code (faster and more accurate).
19456 Not hooked up in configure, yet (set USE_X86TSC to 1).
19458 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
19460 * profiler.c, profiler.h: track time spent compiling methods.
19461 * threads.c: track thread creation/destruction.
19463 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
19465 * profiler.c, profiler.h, profiler-private.h: profiling interface
19466 and sample implementation. Moved here so that it can be used also by
19469 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
19471 * reflection.c, reflection.h: keep types and other handles separate in
19472 the hash tables for referred tokens. Add guid for modules.
19474 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
19476 * assembly.c: fix bugs found with valgrind.
19477 * metadata.h, metadata.c: added mono_metadata_guid_heap().
19479 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
19481 * threads: added icall support for getting current domain for
19484 2002-04-13 Martin Baulig <martin@gnome.org>
19486 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
19487 (MonoDebugVarInfo): Added `index' field for register based addresses.
19488 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
19489 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
19490 `MonoDebugVarInfo *params' and `guint32 this_offset' with
19491 `MonoDebugVarInfo *this_var'.
19493 * debug-symfile.c (relocate_variable): New static function to write
19494 a location description for a local variable or method parameter.
19496 2002-04-12 Martin Baulig <martin@gnome.org>
19498 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
19499 stack offset and begin/end scope address of a local variable.
19500 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
19501 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
19502 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
19504 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
19505 Added new relocation types for start/end scope of a local variable.
19507 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19509 * object.h: add mono_object_domain() macro.
19510 * reflection.c: handle typespecs.
19511 * icall.c: MonoMethod::get_Name() implementation.
19513 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19515 * icall.c: String::GetHashCode() icall implementation.
19517 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19519 * icall.c: String::IndexOfAny icall.
19520 * object.c, object.h: make array->max_length more useful.
19521 Intrduced mono_object_class() and mono_string_length() macros.
19523 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19525 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
19526 instead of g_unichar_isdigit.
19528 2002-04-11 Nick Drochak <ndrochak@gol.com>
19530 * icall.c: Implement a simple Double.ToString().
19532 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19534 * appdomain.h: only io-layer.h is supposed to be included.
19535 * icall.c: explicitly import environ. Fix warning.
19537 2002-04-10 Nick Drochak <ndrochak@gol.com>
19539 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
19540 return true even if it's not Daylight Savings time.
19541 Only return false for the case where the function isn't
19542 implemented for a plaform (read Windows).
19544 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19546 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
19549 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
19551 * mempool.c (mono_mempool_alloc): only use g_malloc when
19552 absolutely necessary.
19554 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
19556 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
19558 * class.c (mono_class_vtable): use domain mempool to allocate vtable
19559 (mono_class_proxy_vtable): use domain mempool
19561 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
19563 * appdomain.h, appdomain.c: split initialization that requires the
19564 execution engine support into mono_runtime_init().
19566 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
19568 * class.c (mono_class_init): don't include vtable inside MonoClass
19569 to save some memory, gather some statistics.
19570 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
19572 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19574 * icall.c: internalcall implementation for ValueType.Equals().
19576 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
19578 * object.c (mono_message_init): moved
19579 (mono_runtime_exec_main): new arch. independent impl.
19580 (mono_runtime_invoke_array): new method - like
19581 mono_runtime_invoke, but you can pass an array of objects.
19582 (mono_remoting_invoke): new arch. independent impl.
19583 (mono_message_invoke): new arch. independent impl.
19584 (mono_runtime_class_init): new arch. independent impl.
19585 (mono_runtime_object_init): new arch. independent impl.
19587 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19589 * metadata.c, object.c, reflection.c: documented the exported
19592 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
19594 * icall.c: simpler code to pass the assembly builder data to corlib.
19595 Implement GetNestedTypes() internalcall.
19597 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19599 * class.c: warn if a type can't be loaded.
19601 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
19603 * image.h: typedef MonoImageOpenStatus
19604 * types.h: removed unused file
19606 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
19608 * icall.c: Enum_ToObject accepts enum value arguments.
19610 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
19612 * class.c: move initialization of properties, events and nested
19613 classes, so that they happen for interfaces, too.
19615 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
19617 * icall.c: cleanup some ugly casts in Array_SetValue*.
19619 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19621 * icall.c: the values array fro enums is of the correct type, now.
19622 Implement (correctly) getFullName instead of assQualifiedName for
19624 * reflection.h, reflection.c: added mono_type_get_name ().
19626 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19628 * assembly.c, image.h: for each MonoImage, record from wich assembly
19630 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
19631 Make Type.Assembly work.
19633 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
19635 * debug-symfile.h: use char* instead of gpointer to avoid
19638 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
19640 * icall.c (ves_icall_InternalExecute): impl. FielSetter
19641 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
19643 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
19645 * icall.c (mono_message_init): impl. (code cleanup)
19646 (ves_icall_InternalExecute): impl. FieldGetter
19648 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
19649 defined we call all (non-static)methods through the vtable.
19651 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
19653 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
19654 finalizer even though the memory is still referenced (and the chunk of
19655 memory is not freed).
19657 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
19659 * assembly.c: fix brokeness.
19661 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
19663 * class.c: kill some warnings. Check explicit interface method
19664 implementation also without considering the namespace.
19665 Load also literal strings in static class data.
19667 2002-03-29 Miguel de Icaza <miguel@ximian.com>
19669 * assembly.c (default_assembly_name_resolver): Kill memory leak.
19670 (default_assembly_name_resolver): Make the resolver take the
19671 "base" directory where the assembly was originally defined, so we
19672 can load DLLs that are in the same directory as the assembly that
19673 is being referenced.
19675 2002-03-28 Dick Porter <dick@ximian.com>
19681 * unicode.c: Warning cleanups
19683 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
19685 * object.h, reflection.h: use the correct type instead of MonoObject.
19687 2002-03-28 Martin Baulig <martin@gnome.org>
19689 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
19690 (mono_debug_update_symbol_file): Initialize classes if necessary.
19692 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
19694 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
19695 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
19697 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
19699 * assembly.h: fix function prototype.
19700 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
19701 * mono-endian.h: use const cast.
19703 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
19705 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
19707 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
19709 * loader.c: don't assert when a typeref can't be loaded, give
19710 a chance to the runtime to trow an exception instead.
19711 * loader.h: fix warning.
19713 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
19715 * class.c (mono_class_proxy_vtable): added proxy support
19717 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
19719 * icall.c: removed last of PAL calls, added System.Environment
19720 * file-io.h, file-io.c: MonoIO implementation
19721 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
19723 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
19725 * appdomain.c: do not use the byte marker in ldstr table lookup.
19726 * debug-helpers.c: allow two ':' to separate class and method name.
19727 * object.c: allocate arrays bounds with the GC, too.
19728 * verify: add a few more checks.
19730 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
19732 * reflection.c: output also literal strings. Allocate parameter data
19733 with GC_malloc() (thanks, Martin, for catching this!).
19735 2002-03-26 Martin Baulig <martin@gnome.org>
19737 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
19738 include the `this' offset in the `param_offsets'.
19740 2002-03-25 Martin Baulig <martin@gnome.org>
19742 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
19743 mono_debug_get_class() function to get the classes. Added new
19744 relocation types for arrays and strings.
19745 (mono_debug_get_class): New static function to search in all
19746 referenced assemblies for a metadata token.
19748 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
19750 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
19752 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
19753 hold gc-allocated objects. Make the string heap a stream like the
19754 others. Removed duplicated code when writing stream info.
19755 Added asserts to catch possible buffer overflows. Set the sorted map
19756 for tables that need sorting. Added some documentation.
19758 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
19760 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
19761 for interned strings and vtables.
19763 2002-03-24 Martin Baulig <martin@gnome.org>
19765 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
19766 it in the array since it was created with g_slist_prepend().
19768 2002-03-24 Martin Baulig <martin@gnome.org>
19770 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
19771 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
19772 (mono_debug_method_from_token): Renamed to
19773 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
19774 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
19776 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
19779 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
19781 2002-03-24 Martin Baulig <martin@gnome.org>
19783 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
19784 (mono_debug_method_from_token): New func.
19786 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
19787 New interncall, calls mono_debug_local_type_from_signature().
19788 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
19789 calls mono_debug_method_from_token().
19791 2002-03-23 Martin Baulig <martin@gnome.org>
19793 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
19794 specifies the number of bytes to be converted, not the array size.
19795 Return the number of chars, not the number of bytes.
19796 (ves_icall_iconv_get_chars): The `byteCount' argument
19797 specifies the number of bytes to be converted, not the array size.
19799 2002-03-23 Martin Baulig <martin@gnome.org>
19801 * reflection.h (MonoReflectionSigHelper): New type.
19803 * reflection.c (mono_reflection_sighelper_get_signature_local),
19804 (mono_reflection_sighelper_get_signature_local): New functions.
19806 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
19807 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
19810 2002-03-23 Martin Baulig <martin@gnome.org>
19812 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
19813 is_writeable is set.
19814 (mono_raw_buffer_update): New function to write the modified map
19817 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
19819 * debug-symfile.c (mono_debug_update_symbol_file): Call
19820 mono_raw_buffer_update() when done writing.
19822 2002-03-23 Martin Baulig <martin@gnome.org>
19824 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
19826 * debug-symfile.c: Added support for arguments and local variables.
19828 2002-03-23 Dick Porter <dick@ximian.com>
19830 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
19831 protected by ifdefs, hence breaking the w32 build.
19833 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19835 * object.c: implement is_interned() the right way.
19837 2002-03-21 Martin Baulig <martin@gnome.org>
19839 * debug-symfile.[ch]: New files to handle debugging information
19840 files. There's also support to dynamically update these symbol
19841 files to include machine dependent information.
19843 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
19845 * threads.c (mono_thread_create): new function to create thread
19848 2002-03-20 Martin Baulig <martin@gnome.org>
19850 * icall.c (ves_icall_InternalInvoke): Create a new object if the
19851 method is a constructor.
19852 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
19853 points to ves_icall_InternalInvoke().
19855 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
19857 * file-io.c: Flush shouldn't throw exceptions.
19859 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
19861 * file-io.c: FileStream flush support; FileSetLength now
19862 restores file pointer.
19864 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
19866 * class.c: set image for pointer classes.
19868 2002/03/19 Nick Drochak <ndrochak@gol.com>
19870 * sysmath.c: Forgot one.
19872 2002-03-18 Miguel de Icaza <miguel@ximian.com>
19874 * sysmath.c: Avoid redefining existing names.
19876 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
19878 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
19879 handled by runtime as icall rather than dllimport from libm.so
19880 * file-io.c, file-io.h: fixed handle argument type.
19882 2002-03-18 Dick Porter <dick@ximian.com>
19884 * reflection.c (mono_image_get_type_info): rename interface to
19885 iface, because of "#define interface struct" on windows.
19887 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
19889 * class.c, class.h: rename and export mono_ptr_class_get().
19890 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
19891 * reflection.c, reflection.h, icall.c: better/saner type name
19892 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
19895 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
19897 * class.c (mono_class_init): removed hardcoded GHC_SLOT
19899 * icall.c (ves_icall_InternalInvoke): impl.
19901 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
19903 * reflection.c: output the interface map table, too.
19905 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
19907 * class.c (class_compute_field_layout): separate computation of
19908 static field layout
19910 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
19912 * icall.c: added System.Buffer support.
19913 * file-io.c: moved file icalls from PAL to FileStream.
19915 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
19917 * icall.c (ves_icall_System_Object_GetHashCode): impl.
19919 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
19921 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
19923 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19925 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
19927 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
19929 * debug-helpers.{c,h}: moved here from monograph some useful functions
19930 to locate a method by name/signature in a class or image. Included
19931 also a small and flexible IL disassembler.
19933 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
19935 * reflection.c: fixup tokens in methods with small header size, too.
19937 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
19939 * object.c (mono_string_to_utf8): remove assert(!error), instead
19942 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
19944 * icall.c: update to the new mono_Array_class_get interface.
19946 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
19948 * appdomain.c, object.c: Boehm-GC enable.
19949 * icall.c: make get_data_chunk() support split data requests.
19950 Ensure a class is initialized in more cases. Return only the first
19951 property found in GetProperties() or the compiler gets confused.
19952 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
19953 * reflection.h, reflection.c: add fixup mechanism for field and method
19954 tokens. Initialize assembly->typeref in a single place. Output
19955 properties after events. Support custom attributes for events, too.
19956 Typo fix for paramter custom attrs.
19958 2002-03-07 Martin Baulig <martin@gnome.org>
19960 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
19962 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
19964 * class.c (mono_array_class_get): fix. for multi. dim. arrays
19966 2002-03-06 Martin Baulig <martin@gnome.org>
19968 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
19969 non-zero lower bounds. See testcases #F10-#F13.
19971 2002-03-05 Martin Baulig <martin@gnome.org>
19973 * exception.c (mono_get_exception_argument_out_of_range): New exception.
19975 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
19976 ves_icall_System_Array_GetValue(), only calculate the absolute array position
19978 (ves_icall_System_Array_SetValue): Likewise.
19979 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
19980 as argument and does the actual work. This function is used when copying a
19981 multi-dimensional array.
19982 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
19983 now do all the widening conversions of value types.
19984 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
19986 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19988 * class.c: remove some magic numbers and use the smbolic names,
19989 instead. Added init_events() to load event info at class init time.
19990 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
19991 and mono_metadata_methods_from_event().
19992 * reflection.h, reflection.c: added support for writing out the evnets
19993 related information.
19995 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
19997 * reflection.h, icall.c: use a different method (GetInterfaces)
19998 to gather interface info and add isbyref, isprimitive and
19999 ispointer to the ves_icall_get_type_info() return value.
20001 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
20003 * class.h: stared adding support for events.
20004 * icall.c: split find_members implementation. Added debug icall to get
20005 the address of an object.
20006 * reflection.c: handle TypeBuilders in mono_type_get_object().
20008 2002-03-01 Martin Baulig <martin@gnome.org>
20010 * icall.c (ves_icall_System_Array_GetLength): This must throw an
20011 ArgumentOutOfRangeException(), not an ArgumentException().
20012 (ves_icall_System_Array_GetLowerBound): Likewise.
20013 (ves_icall_System_Array_GetValue): Improved argument checking.
20014 (ves_icall_System_Array_SetValue): Improved argument checking.
20016 2002-03-01 Martin Baulig <martin@gnome.org>
20018 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
20019 called with invalid arguments rather than just dying with g_assert().
20020 (ves_icall_System_Array_SetValue): Likewise.
20021 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
20022 raise a NotImplementedException instead.
20023 (ves_icall_System_Array_GetLength): Added argument checking.
20024 (ves_icall_System_Array_GetLowerBound): Added argument checking.
20026 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
20028 * object.h (mono_assert): new macros mono_assert and
20029 mono_assert_not_reached
20031 2002-02-28 Martin Baulig <martin@gnome.org>
20033 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
20034 and "System::String::IsInterned" to "System::String::_IsInterned".
20036 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
20038 * icall.c: remove hacks for typebuilder. Added icall to create a
20039 modified type from a tybebuilder.
20040 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
20041 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
20042 to create a backing MonoClass for a TypeBuilder.
20044 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20046 * class.c, class.h: more refactoring of class init.
20047 Export mono_class_setup_mono_type() and mono_class_setup_parent().
20049 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
20051 * marshal.c, marshal.h: start of marshaling interface.
20053 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
20055 * icall.c: fix order in assembly qualified name icall.
20057 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
20059 * class.c: do not free str, since we store it in the hash table.
20060 * reflection.h: add label field to MonoILExceptionInfo.
20061 * reflection.c: handle references to more than one assembly. Handle
20062 case when there isn't a module created in the assembly.
20064 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
20066 * class.c: Fix typo. Start refactoring of class init code.
20068 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
20070 * appdomain.c: exit with 1 on error.
20071 * class.c: we already have the name in MonoClassField.
20072 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
20073 MonoStreamHeader instead of an offset of image->raw_metadata.
20075 2002-02-26 Miguel de Icaza <miguel@ximian.com>
20077 * appdomain.c (mono_init): Be even more descriptive about the error.
20079 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
20081 * appdomain.c: give the user an informative message when corlib can't
20084 2002-02-26 Martin Baulig <martin@gnome.org>
20086 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
20087 New icall to get the time zone data.
20089 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20091 * reflection.c: set virtual and raw size of section correctly.
20092 * threads.c: transfer domain information to newly created threads.
20094 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
20096 * class.c: when instancing a class in a domain, load the default
20097 vaules for static fields from the constant table. Fix System.Enum to
20099 * icall.c: implement Object::GetType() internalcall. Implemented
20100 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
20101 Fixed checking of binding flags in find_members().
20102 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
20103 * reflection.c: handle enumerations when writing to the constant
20104 table. Use a different object cache for types.
20107 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
20109 * object.c (mono_object_isinst): fix for arrays
20111 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
20113 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
20115 * object.c: don't use mprotect () and fix intern pool hash table
20116 lookup for big endian systems.
20118 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20120 * icall.c: change type_is_subtype_of () signature.
20122 2002-02-21 Mark Crichton <crichton@gimp.org>
20124 * rand.c, rand.h: Added random number generator for
20125 System.Security.Cryptography classes.
20127 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
20129 * icall.c: Added System.Security.Cryptography calls.
20131 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20133 * class.c, icall.c, metadata.c: better support for pointer types.
20134 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
20135 * reflection.c: Add support for getting custom attrs for properties
20136 and simplify some code.
20138 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20140 * icall.c: change getToken () and add custom attribute GetBlob()helper
20142 * reflection.h: add custom attrs array to the reflection builder structures.
20143 * reflection.c: encode and emit custom attributes for all the relevant
20144 reflection objects. Cache fieldref and methodref tokens. Change
20145 mono_image_create_token() interface to take a MonoDynamicAssembly.
20146 More complete custom attributes decoder. Load custom attributes for
20147 Assembly, Field, Method and Constructor objects, too. Make the
20148 returned array an Attribute[] one, not object[]. Added
20149 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
20150 custom attribute constructor.
20152 2002-02-20 Dick Porter <dick@ximian.com>
20156 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
20157 problem code out for now).
20159 2002-02-19 Radek Doulik <rodo@ximian.com>
20161 * object.c (mono_ldstr): use hash table to avoid multiple swapping
20163 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
20165 * icall.c: register the GetCustomAttributes method.
20166 * object.c, object.h: add mono_string_new_len ().
20167 * reflection.h, reflection.c: added mono_runtime_invoke(),
20168 mono_install_runtime_invoke(). Added
20169 mono_reflection_get_custom_attrs () to load custom attributes and
20170 create the attribute objects.
20172 2002-02-19 Dick Porter <dick@ximian.com>
20173 * threads-dummy-types.c:
20174 * threads-dummy-types.h:
20177 * threads-pthread-types.c:
20178 * threads-pthread-types.h:
20179 * threads-pthread.c:
20180 * threads-pthread.h: Deleted obsolete files
20182 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
20184 * class.c (mono_class_vtable): runtime init the class when we
20185 allocate static class data.
20187 * icall.c (ves_icall_System_Array_SetValue): check for null values.
20189 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
20190 and String - but we will need generic marshalling support in the
20192 (mono_init): set the domain name in a ms compatible way
20194 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
20197 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
20199 * object.c (mono_array_clone): use alloca() instead of g_malloc
20202 * appdomain.c (mono_domain_unload): impl.
20204 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20206 * appdomain.c, object.c: fix intern pool implementation.
20207 * class.c: fix alignment code.
20209 2002-02-16 Radek Doulik <rodo@ximian.com>
20211 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
20212 and s2 > s1, just copy lower bytes to be compatible with little
20213 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
20214 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
20216 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
20217 force big_endian to be 1 for big endian machines
20218 (ves_icall_iconv_new_decoder): ditto
20220 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
20222 * socket-io.c (convert_sockopt_level_and_name): If the system
20223 doesn't define SOL_IP or SOL_TCP, get them by hand using
20224 getprotobyname() and caching the values (because this could be a
20226 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
20227 Use the appropriate struct when the system does support it. Ie,
20228 not all systems have struct ip_mreqn so use struct ip_mreq when
20231 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
20233 * reflection.c: handle finally clauses.
20235 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
20237 * socket-io.c: use g_snprintf() instead of snprintf.
20239 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
20241 * reflection.c (mono_param_get_objects): Cast second argument to
20242 mono_method_get_param_names to a const char** to silence the
20245 * appdomain.c (mono_domain_assembly_open): Put parens around the
20246 truth statement in the for-loop.
20248 * unicode.c (iconv_convert): Got rid of a compiler warning about
20249 int i being unused when the system has a new iconv.
20250 (iconv_get_length): Same.
20252 * image.c (load_class_names): Cast the second argument to
20253 g_hash_table_insert() to char* to hush compiler warnings about the
20255 (mono_image_open): Same here.
20257 * socket-io.c: Don't conditionally include sys/filio.h or
20258 sys/sockio.h here anymore since we now get them from
20259 io-layer/io-layer.h
20260 (inet_pton): If the system doesn't support inet_aton, implement
20261 using inet_addr and also #define INADDR_NONE if it isn't defined
20264 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20266 * metadata.c, metadata.h: added function to get packing and size info
20268 * reflection.h, reflection.c: handle field RVA data. Save info about
20269 the table layout if needed. Assign typedef indexes to all the types
20270 before dumping the info about them to avoid forward reference problems.
20272 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
20274 * socket-io.c (convert_sockopt_level_and_name): ifdef
20275 SO_ACCEPTCONN because it is not defined on my system (old debian)
20277 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20279 * opcode.c: use stddef.h to get NULL.
20281 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
20283 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
20284 for FIONBIO, FIONREAD and SIOCATMARK.
20285 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
20286 define INADDR_NONE and besides, inet_addr() is deprecated and
20287 should not be used. Use inet_pton() instead - it also has the
20288 added bonus that it can easily handle IPv6 addresses as well.
20289 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
20291 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
20293 * decimal.c: remove _MSC_VER conditional.
20295 2002-02-13 Dick Porter <dick@ximian.com>
20298 * icall.c: Internal calls for Blocking, Select, Shutdown,
20299 GetSocketOption and SetSocketOption
20301 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20303 * assembly.cs: better resolver: use it instead of some kludgy
20306 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
20308 * reflection.c: the best way to speed-up the compiler is to avoid
20311 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
20313 * class.c (mono_class_vtable): changed the object layout
20314 (obj->vtable->class).
20315 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
20317 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20319 * assembly.c: look for assemblies in the assembly dir, too.
20321 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20323 * class.c: fix thinko in mono_class_from_type().
20325 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20327 * exception.h, exception.c: added TypeLoadException.
20328 * object.h, object.c: added mono_array_clone ().
20329 * icall.c: handle throwOnError in AssemblyGetType().
20330 Added Array.Clone().
20331 * opcode.h, opcode.c: use a single value for the opcode val.
20332 Compile fix for non-gcc compilers.
20334 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
20336 * opcodes.c, opcodes.h: export interesting info about opcodes.
20338 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
20340 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
20343 * class.c (class_compute_field_layout): set element_class for enums
20344 (mono_class_create_from_typedef): set element_class for normal classes
20346 * icall.c (ves_icall_System_Enum_get_value): impl.
20348 * class.c (mono_class_create_from_typedef): do not set valuetype
20349 flag for System.ValueType and System.Enum
20351 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
20353 * unicode.c (iconv_convert): fix big endian problem.
20355 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20357 * class.c: add asserts if we are ever going to scribble over memory.
20358 * socket-io.c: not all systems have AF_IRDA defined.
20360 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
20362 * class.c (class_compute_field_layout): do not consider static
20363 fields to compute alignment
20365 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
20367 * appdomain.c (mono_appdomain_get): impl.
20368 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
20370 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
20372 * icall.c: ignore "file://" prefix when loading an assembly.
20374 2002-01-23 Dick Porter <dick@ximian.com>
20378 * Makefile.am: Added socket support
20380 2002-01-23 Miguel de Icaza <miguel@ximian.com>
20382 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
20383 code back. This should return the assemblies that are loaded by
20384 the runtime on behalf of an application domain.
20386 The current implementation is still broken, it just returns every
20387 assembly loaded, but until we get real applications domain this
20390 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
20392 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
20395 2002-01-23 Miguel de Icaza <miguel@ximian.com>
20397 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
20398 the mono_class_from_name lookup.
20399 (ves_icall_get_parameter_info): ditto.
20400 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
20402 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
20404 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20406 * class.c: load also nested classes on class init.
20407 System.ValueType instance methods gets passed boxed
20408 values, unless methods in derived classed that get a pointer to the
20410 * icall.c: use better name parsing code in GetType().
20411 * image.c, image.h: add mono_image_loaded ().
20412 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
20413 * reflection.c, reflection.h: added mono_reflection_parse_type().
20415 2002-01-22 Veronica De Santis <veron78@interfree.it>
20417 * icall.c : Added mapping of internal calls for Manual and Auto reset events
20418 * threads.c : Added the implementation of internal calls for events
20419 * threads.h : Added prototypes of internal calls for events
20421 2002-01-21 Radek Doulik <rodo@ximian.com>
20423 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
20425 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
20427 * class.c (mono_class_init): set min_align to 1 (instead of 0)
20428 (mono_class_value_size): use min_align
20430 2002-01-20 Dick Porter <dick@ximian.com>
20433 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
20434 so it compiles on w32.
20436 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
20438 * metadata.c (mono_type_stack_size): impl.
20440 * class.c (mono_class_get_field): impl. memberref token
20442 2002-01-16 Veronica De Santis <veron78@@interfree.it>
20444 * icall.h : Added the internal calls mapping for CreateMutex_internal
20445 and ReleaseMutex_internal.
20446 * threads.h : Added the prototype of mutexes internal calls.
20447 * threads.c : Added the implementations of mutexes internal calls.
20449 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
20451 * metaparse.h: removed unused file.
20452 * reflection.c, reflection.h: added stream_data_align () function
20453 to align data in streams and keep stream aligned. Add support for
20454 exception support in method headers.
20456 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
20458 * unicode.c: make iconv_convert () return the number of bytess written
20459 in the output buffer.
20461 2002-01-15 Dick Porter <dick@ximian.com>
20462 * threads.c: Make the runtime's idea of infinite timeouts coincide
20463 with the class library's
20465 Fix a particularly egregious bug in mono_thread_cleanup(). That
20466 code was so utterly bogus it must have been written on a Monday.
20468 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
20470 * reflection.h: add subtypes field to TypeBuilder.
20471 * reflection.c: encode constants for literal fields.
20472 Handle subtypes. Fix user string token (and add a zero byte)
20475 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
20477 * class.c (mono_class_init): bug fix: assign slot numbers for
20480 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20482 * reflection.c: don't try to output a code RVA for abstract methods.
20483 Small fixes for method header format. Output parameter info to the
20484 ParamDef table. Save method overriding info to MethodImpl table.
20485 Fix property support. Allow typedef.extends to be a type in the
20487 * verify.c: fix off-by-one error.
20489 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
20491 * class.c: fix mono_class_from_mono_type () for szarray types.
20492 Remove unused cache check in mono_class_from_type_spec().
20493 * icall.c: *type_from_name () functions handle simple arrays and byref.
20494 * reflection.c: handle byref and szarray types. Handle methods without
20495 body (gets P/Invoke compilation working). Handle types and fields in
20497 * reflection.h: add rank to MonoTypeInfo.
20499 2002-01-10 Dick Porter <dick@ximian.com>
20501 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
20504 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
20506 * icall.c: initialize class in type_from_handle ().
20507 Loop also in parent classes for get_method ().
20508 * reflection.c: properly encode class and valuetype types.
20509 Start on encoding TypeBuilder types. Handle fieldrefs.
20510 Use correct length when registering a user string.
20511 Handle ConstructorBuilder and MonoMethod in get_token ().
20512 Make mono_type_get_object () aware of cached types.
20513 * object.c: back out change to mono_string_new ().
20515 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
20516 * object.c: mono_string_new should return a NULL when the string
20517 passed in is NULL -- not try to deference it.
20519 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
20521 * icall.c: hack to make IsSubType work for TypeBuilders.
20522 * reflection.c: emit constructors before methods.
20523 Retrieve param names in mono_param_get_objects().
20525 2002/01/05 Nick Drochak <ndrochak@gol.com>
20527 * Makefile.am: fix list of headers and sources so automake 1.5
20528 doesn't complain. Removed \# at end of list.
20530 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
20532 * reflection.c: get token for a method ref. Set return type of
20533 constructor to void.
20534 * loader.c: debug message.
20535 * class.c: typo fix.
20537 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
20539 * icall.c: fix array init with rank > 1. FindMembers
20540 loops in parent class as well.
20541 * image.c: do not insert nested types in name cache.
20542 * reflection.c: warning fix.
20543 * reflection.h: add override method (for interface impl).
20545 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
20547 * metadata.c: fix customattr decoding.
20549 2001-12-21 Miguel de Icaza <miguel@ximian.com>
20551 * rawbuffer.cs: Added native Win32 implementation, avoids using
20552 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
20554 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
20556 * class.c: make the low-level routines handle the cache.
20558 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
20560 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
20562 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
20564 * class.c: fix mono_array_element_size() for objects.
20565 * class.h, class.c: add properties to MonoClass and load them
20567 * icall.c: check with isinst() when assigning a value to an array
20568 instead of requiring the classes to match exactly.
20569 Implemented icall for System.Type::GetType().
20570 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
20571 enums. Handle bindingflags when looking for methods and fields.
20572 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
20573 and mono_metadata_methods_from_property().
20574 * reflection.h, reflection.c: added structures for propreties,
20575 parameters and enums. Implemented mono_property_get_object() and
20576 mono_param_get_objects().
20578 2001-12-18 Dick Porter <dick@ximian.com>
20580 * file-io.c: Use mono_string_to_utf16() instead of
20581 mono_string_chars()
20583 * object.c: Added mono_string_to_utf16(), which copies the non
20584 NULL-terminated MonoString into a new double-null-terminated
20587 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
20589 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
20591 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
20593 * file-io.c: raise exceptions if handle is invalid.
20595 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
20597 * assembly.c: yet another check for mscorlib.
20598 * class.c, class.h: load nesting info for classes.
20599 * icall.c: many new functions to support the Reflection classes.
20600 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
20601 * reflection.h, reflection.c: mono_image_create_token(),
20602 mono_assembly_get_object(), mono_type_get_object(),
20603 mono_method_get_object(), mono_field_get_object(): methods to return
20604 objects that parallel the C representation of assemblies, types,
20607 2001-12-11 Dick Porter <dick@ximian.com>
20610 * file-io.c: Internal calls for file IO.
20612 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
20614 * tabledefs.h: missing FileAttributes.
20615 * verify.h, verify.c: use is_valid_string () to simplify and check for
20616 valid strings more correctly. Fix warnings and speeling.
20617 Check more tables: Filed, File, ModuleRef, StandAloneSig.
20618 Check code: branches, maxstack, method calls.
20620 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
20622 * object.c (mono_object_allocate): removed static, so that the jit
20623 can allocate value types.
20625 * icall.c (ves_icall_System_DateTime_GetNow): impl.
20627 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20629 * class.c: init enum types right away and register the
20630 token->MonoClass map in mono_class_create_from_typedef ().
20631 * verify.h, verify.c: first cut of the verifier.
20632 * pedump.c: add --verify switch to verify metadata tables.
20633 * tabledefs.h: add some missing enums.
20635 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
20637 * class.c (mono_install_runtime_class_init): impl.
20638 (mono_class_init): renamed mono_class_metadata_init to
20639 mono_class_init, also removed the metadata_inited flag
20641 * object.c (mono_object_isinst): use faster algorithm
20643 2001-11-30 Radek Doulik <rodo@ximian.com>
20645 * mono-endian.h: reverted last change
20646 added function prototypes
20648 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
20649 add mono-endian.c back
20651 * mono-endian.c: returned back, as Paolo pointed out, it's needed
20652 for unaligned access, I've mistaked it with endianess. I am
20654 (mono_read16): fix reverted endianess
20655 (mono_read64): ditto
20656 (mono_read32): ditto
20658 2001-11-30 Dick Porter <dick@ximian.com>
20660 * exception.c: Implement mono_exception_from_name()
20662 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
20664 * metadata.h, metadata.c: remove params_size and locals_size and their
20665 calculation from the metadata code: they are only usefult to the
20668 2001-11-29 Radek Doulik <rodo@ximian.com>
20670 * object.c (mono_ldstr): swap bytes here, it's probably not the
20671 best place, but works for me now, I'll redo it once I know mono
20672 better, also note that I add PROT_WRITE and don't reset back, also
20673 note that it's only affects big endians, so x86 should be OK
20675 * mono-endian.h (read16): use just glib macros for both endians
20677 * mono-endian.c: removed as glib macros are used in in
20678 mono-endian.h so we don't need to care about endianess for read
20679 macros as glib does that for us already
20681 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
20683 * class.h, class.h: take minimum alignment into consideration so
20684 that the fields of a class remain aligned also when in an array.
20686 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20688 * loader.h, loader.c: add mono_method_get_param_names().
20689 * class.c: 0-init class fields.
20691 2001-11-26 Dick Porter <dick@ximian.com>
20695 * threads.c: New file that handles System.Threading on all platforms
20698 * object.h: Remove the synchronisation struct from MonoObject,
20699 replace it with a pointer that gets initialised on demand
20701 * Makefile.am: Replace all the system-specific threading code with
20702 a single file that uses the new wrapper library
20704 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
20706 * class.c, class.h: add mono_install_trampoline() so that the runtime
20707 can register a function to create a trampoline: removes the ugly
20708 requirement that a runtime needed to export arch_create_jit_trampoline.
20709 * object.h, object.c: added mono_install_handler() so that the runtime
20710 can install an handler for exceptions generated in C code (with
20711 mono_raise_exception()). Added C struct for System.Delegate.
20712 * pedump.c: removed arch_create_jit_trampoline.
20713 * reflection.c: some cleanups to allow registering user strings and
20714 later getting a token for methodrefs and fieldrefs before the assembly
20716 * row-indexes.h: updates and fixes from the new ECMA specs.
20718 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
20720 * class.h, class.c: add enum_basetype field to MonoClass.
20721 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
20722 to get index in the constant table reated to a field, param or
20724 * reflection.h, reflection.c: handle constructors. Set public-key and
20725 version number of the built assembly to 0.
20726 * row-indexes.h: update from new ECMA spec.
20728 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
20730 * class.h, class.c: add a max_interface_id to MonoClass.
20731 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
20732 since it's used to do that. Added mono_type_type_from_obj().
20733 Make GetType() return NULL instead of segfaulting if the type was not
20734 found. Handle simple arrays in assQualifiedName.
20735 * object.h: add a struct to represent an Exception.
20736 * reflection.c: output call convention in method signature.
20737 Add code to support P/Invoke methods and fixed offsets for fields.
20739 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
20741 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
20743 * icall.c: use mono_array_addr instead of array->vector: fixes the
20744 reflection image writing.
20745 * reflection.c: init call convention byte to 0 in method signature.
20746 Encode the property signature. Don't output property-related methods
20747 twice. Really process the properties for a type (don't cast a field to
20748 a property, my mom always told me that).
20749 Fix 64 bit issues in pointer alignment in a different and more
20752 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
20754 * loader.h: Removed type class from MonoDefaults, added monotype
20756 * loader.c: Loaded MonoType, removed loading of Type
20758 * icall.c (my_mono_new_object): Now returns a System.MonoType,
20759 and fills in System.Type._impl with a RuntimeTypeHandle rather
20760 than the actual MonoClass *
20762 (ves_icall_type_from_handle): change from type_class to
20765 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
20768 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
20771 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
20773 (ves_icall_System_Reflection_Assembly_GetType): implemented
20775 (ves_icall_System_MonoType_assQualifiedName): implemented
20777 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
20779 2001-11-09 Miguel de Icaza <miguel@ximian.com>
20781 * assembly.c (mono_assembly_open): Implement a cache for the
20784 (mono_assembly_close): only destroy the assembly when the last
20787 2001-11-09 Dick Porter <dick@ximian.com>
20789 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
20791 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
20793 * class.c (mono_class_metadata_init): bug fix: compute the right slot
20795 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
20797 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
20798 from Martin Weindel.
20799 * object.h: add mono_string_chars ().
20801 2001-11-07 Miguel de Icaza <miguel@ximian.com>
20803 * reflection.c (build_compressed_metadata): Eliminates warnings
20804 and uses 64-bit clean code.
20806 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
20807 (mono_type_equal): Change signature to eliminate warnings.
20809 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20811 * icall.c, loader.c: remove the internalcall array constructors.
20812 Changes to match the new MonoArray structure.
20813 * object.h, object.c: an array object doesn't allocate an extra
20814 vector. Add mono_array_new_full () to create jagged arrays easily.
20816 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
20818 * metadata.h, metadata.c: add mono_metadata_field_info () to
20819 retreive all the info about a field from vairous tables.
20820 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
20821 * class.h, class.c: augment MonoClassField with more info.
20822 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
20823 policy and load a field's RVA if needed.
20825 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
20827 * class.c (mono_class_metadata_init): create a trampoline for all
20828 virtual functions instead of actually compiling them.
20830 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
20832 * class.h, class.c: include name in MonoClassField.
20833 * class.c: fix fundamental type of System.Object and System.String.
20834 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
20836 * icall.c: remove internalcalls for the Reflection stuff that is now
20838 * loader.c: mono_field_from_memberref () implementation.
20839 * mono-endian.c: thinko (s/struct/union/g).
20840 * object.c, object.h: make the mono_string_* prototypes actually use
20841 MonoString instead of MonoObject.
20842 * reflection.c, reflection.h: updates for changes in the reflection
20843 code in corlib: we use C structures that map to the actual C# classes.
20844 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
20845 fat method header if needed and use the info from the ILGenerator for
20846 methods. Handle fields in types. Misc fixes.
20848 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
20850 * class.c (mono_class_metadata_init): bug fix: always allocate
20851 space for static class data
20853 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
20855 * class.c (mono_compute_relative_numbering): use relative
20856 numbering to support fast runtime type checks.
20858 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
20860 * class.c (mono_class_create_from_typeref): added debugging output
20861 to print class name when MonoDummy is returned instead of real class
20863 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
20865 * class.c (mono_class_metadata_init): interface offset table now
20866 contains pointers into the vtable - this is more efficient for the jit
20868 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
20870 * class.c (mono_class_metadata_init): use a temporary vtable (the
20871 old algorithm only worked for the interpreter, but not for the jit)
20873 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
20875 * loader.c (method_from_memberref): use mono_class_get to get the
20876 class of an array instead of using System.Array directly.
20877 (mono_get_method): also add MEMBERREF methods to the method cache
20878 which usefull for arrays.
20880 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
20882 * pedump.c (arch_compile_method): added to compute vtable entry
20884 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
20885 number of interfaces.
20887 * class.h: merged MonoArrayClass into MonoClass
20889 * class.c (mono_class_create_from_typedef): compute the vtable size and
20890 allocate space to include the vtable inside MonoClass
20891 (mono_class_metadata_init): initialize the vtable
20893 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
20895 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
20896 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
20897 * image.c: endian fixes by Laurent Rioux.
20898 * object.h, object.c: rename MonoStringObject to MonoString and
20899 MonoArrayObject to MonoArray. Change some function names to conform to
20900 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
20901 guint16* as first argument, so don't use char*.
20902 Provide macros to do the interesting things on arrays in a portable way.
20903 * threads-pthread.c: updates for the API changes and #include <sched.h>
20904 (required for sched_yield()).
20905 * icall.c: updates for the API changes above.
20906 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
20907 platforms that need them.
20909 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
20911 * class.c: set the correct type for all the fundamental
20912 type when loading the class.
20914 2001-10-05 Dick Porter <dick@ximian.com>
20916 * threads-pthread.c (pthread_mutex_timedlock): Simple
20917 compatibility version for C libraries that lack this call.
20919 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20921 * class.c: MonoTypes stored in MonoClass are stored as
20922 fundamental MonoTypes when the class represents a
20923 fundamental type (System.Int32, ...).
20924 The TypeHandle return by ldtoken is a MonoType*.
20925 * icall.c: ves_icall_get_data_chunk () write out all the
20926 PE/COFF stuff. Implement ves_icall_define_method (),
20927 ves_icall_set_method_body (), ves_icall_type_from_handle ().
20928 * image.c: properly skip unknown streams.
20929 * loader.h, loader.c: add type_class to mono_defaults.
20930 * metadata.c, metadata.h: export compute_size () as
20931 mono_metadata_compute_size () with a better interface.
20932 Typo and C&P fixes.
20933 * pedump.c: don't try to print the entry point RVA if there is no entry point.
20934 * reflection.c, reflection.h: many cleanups, fixes, output method
20935 signatures and headers, typedef and typeref info, compress the metadata
20936 tables, output all the heap streams, cli header etc.
20937 * row-indexes.h: typo fixes.
20939 2001-10-04 Dick Porter <dick@ximian.com>
20941 * object.h: Add a synchronisation mutex struct to MonoObject
20943 * object.c (mono_new_object): Initialise the object
20944 synchronisation mutexes
20946 * icall.c: System.Threading.Monitor internal calls
20948 * threads-pthread.h:
20949 * threads-pthread.c: System.Threading.Monitor internal calls
20951 * threads-types.h: New file, includes the system-specific thread
20954 * threads-pthread-types.h:
20955 * threads-pthread-types.c: New files, handle pthread-specific
20956 synchronisation types
20958 * threads-dummy-types.h:
20959 * threads-dummy-types.c: New files of dummy support for
20960 thread-specific types
20964 * pedump.c: include mono-endian.h not endian.h
20966 * Makefile.am: More threads files.
20967 Name mono-endian.h not endian.h
20969 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
20971 * Makefile.am, reflection.h, reflection.c: move here the reflection related
20972 stuff and implement a few more bits.
20973 * icall.c: a field needs to be dereferenced twice. Do not use the same
20974 name for two variables in the same scope.
20975 * image.c, image.h: cleanups.
20977 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
20979 * class.c (mono_class_metadata_init): bug fix: compute the right size
20981 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
20983 * icall.c: implemented some of the Reflection internalcalls.
20984 * image.c, image.h: start writing out the PE/COFF image.
20985 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
20986 that does the reverse than decode_blob_size ().
20987 * object.c: use mono_metadata_encode_value (). Move here
20988 temporary implementation of mono_string_to_utf8 ().
20989 * rawbuffer.c: make malloc_map static.
20991 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20993 * metadata.c: fix type comparison for arrays.
20994 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
20995 Added a couple of new classes to monodefaults.
20996 * icall.c: added a couple of Reflection-related internalcalls.
20997 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
20998 Added a byval_arg MonoType to MonoClass.
21000 2001-09-28 Dick Porter <dick@ximian.com>
21003 * threads-pthread.h:
21004 * threads-pthread.c: Implemented internal calls for
21005 LocalDataStoreSlot operations. Applied mutexes around all shared
21006 data. Reworked the thread creation and Start() operations to
21007 avoid a race condition.
21010 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
21012 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
21014 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
21016 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
21018 * class.c, loader.c: warn and return NULL instead of erroring out.
21019 * icall.c: added System.AppDomain::getCurDomain().
21020 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
21022 2001-09-25 Dick Porter <dick@ximian.com>
21024 * threads-pthread.h:
21025 * threads-pthread.c: Implemented timed thread joining and added
21026 System.Threading.Thread::Join_internal internal call
21028 * icall.c: Added System.Threading.Thread::Join_internal internal call
21031 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
21033 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
21035 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
21036 mono_string_intern () to implement the semantics of the ldstr opcode
21037 and the interning of System.Strings.
21038 * icall.c: provide hooks to make String::IsIntern and String::Intern
21041 2001-09-23 Dick Porter <dick@ximian.com>
21044 * threads-dummy.h: New files of dummy threading routines
21046 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
21047 support code based on system specifics
21049 Rename PTHREAD_LIBS to THREAD_LIBS
21051 2001-09-23 Dick Porter <dick@ximian.com>
21053 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
21054 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
21056 (mono_thread_init): Set up a Thread object instance to return when
21057 the main thread calls Thread.CurrentThread
21058 (mono_thread_cleanup): Wait for all subthreads to exit
21060 * icall.c: New internal calls for System.Threading.Thread::Sleep
21061 (including Schedule) and CurrentThread
21063 * threads.h: New file, to insulate thread-specific stuff from the
21066 2001-09-21 Dick Porter <dick@ximian.com>
21068 * threads-pthread.h:
21069 * threads-pthread.c: New file, for handling pthreads-style
21070 threading support. Start() now starts a new thread and executes
21071 the ThreadStart delegate instance.
21073 * icall.c: Added the internalcall for
21074 System.Threading.Thread::Start_internal
21076 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
21078 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
21080 * loader.c: work around the different signatures for delegates
21081 constructors csc generates in compiled code vs the ones compiled in mscorlib.
21083 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
21085 * class.h, class.c: add mono_class_get_field_from_name ().
21086 * *: Fix C comments and other ANSI C issues.
21088 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
21090 * endian.h, assembly.c: fix some endianness issues.
21092 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
21094 * loader.h, load.c: add delegate_class to mono_defaults.
21095 Handle runtime provided methods in mono_get_method ().
21097 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
21099 * loader.c (mono_get_method): use pinvoke for internal call
21101 * icall.c: use pinvoke for internal call
21103 * loader.c (method_from_memberref): set the method name
21105 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
21107 * metadata.c: help the compiler generate better code for
21108 mono_class_from_mono_type ().
21110 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
21112 * class.c (mono_class_metadata_init): delayed computing of the
21113 class size to mono_class_metadata_init ()
21115 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
21117 * class.c, class.h: add an interfaces member to MonoClass.
21118 * image.c, image.h: add assembly_name field to MonoImage
21119 from the assembly table.
21120 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
21122 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
21124 * class.c: Handle Array in mono_class_from_mono_type ().
21125 * metadata.c, pedump.c: some endian fixes.
21127 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
21129 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
21130 * metadata.c: fix small problem introduced with the latest commit.
21132 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
21134 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
21135 We don't need a MonoMetadata pointer anymore to compare signatures in
21136 mono_metadata_signature_equal (), update callers.
21137 Reduced memory usage an number of allocations for MonoMethodHeader and
21138 MonoMethodSignature.
21140 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
21142 * metadata.c: added compare for szarray.
21144 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
21146 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
21147 and add a couple more types to it and mono_defaults. Give an hint on
21148 classes that need implementing in our corlib and are referenced
21151 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
21153 * class.h, class.c: keep track if a class is also an Enum.
21154 * loader.c: Implement a couple more types for use in libffi
21155 marshalling. Gives better diagnostics when failing to dlopen
21156 a library. Set method->klass for P/Invoke methods, too.
21158 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
21160 * class.c, class.h: add a MonoType this_arg to MonoClass that
21161 represents a pointer to an object of the class' type that
21162 can be used by the interpreter and later the type cache.
21163 Add best guess alignment info for valuetype objects.
21165 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
21167 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
21168 into MonoType: one less level of indirection and allocation and
21169 simplifies quite a bit of code. Added cache for MonoTypes that are
21170 used frequently, so that we don't need to allocate them all the time.
21172 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
21174 * class.c (mono_class_create_from_typedef): System.Enum is also a
21175 value type, although it does not derive from System.ValueType
21176 (maybe a bug in the ms compiler?)
21178 * metadata.c (mono_type_size): return the right size for value types
21180 * loader.c (mono_get_method): only initialize method header if not abstract
21182 * class.c (mono_class_from_mono_type): use mono_default values.
21184 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
21186 * *: use MonoClass pointers instead of <type_tokens>
21188 * class.h: new flag: metadata_inited.
21190 * class.c (mono_class_metadata_init): impl.
21191 (mono_class_instance_size): impl.
21192 (mono_class_data_size): impl.
21194 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
21196 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
21197 MonoClass now has the name and name_space fields.
21198 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
21199 mono_get_method () takes and optional MonoClass as argument.
21200 Removed mono_typedef_from_name() and added mono_class_token_from_name()
21201 instead that takes advantage of a map from class names to typedef
21202 tokens in MonoImage.
21204 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
21206 * metadata.c: zero is not a valid alignment boundary.
21207 Merge MONO_TYPE_VOID in default decoding code.
21209 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
21211 * image.h: merged MonoMetadata into MonoImage
21213 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
21214 identify the type of elements.
21216 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
21218 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
21219 * cil-coff.h: split MonoMSDOSHeader and add size info.
21220 * image.c: add some consistency checks.
21221 * metadata.c: fix row size computation: one programmer
21222 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
21223 add explanation for the locator routine.
21224 Fix decoding of size in method header.
21226 2001-08-20 Miguel de Icaza <miguel@ximian.com>
21228 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
21229 (g_concat_dir_and_file): Bring g_concat_dir_and_file
21230 function from gnome-libs. This uses the right path separator
21231 based on the OS, and also works around a bug in some systems where
21232 a double slash is not allowed.
21233 (default_assembly_name_resolver): Use g_concat_dir_and_file
21234 (mono_assembly_open): ditto.
21236 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
21238 * metadata.c (mono_metadata_signature_equal): impl.
21240 * *: void is now a realy MonoType (instead of using NULL)
21242 * metadata.c (do_mono_metadata_parse_type): use
21243 mono_metadata_parse_type to parse void value.
21245 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
21247 * metadata.c, metadata.h: in the signature and method header store
21248 only the space required for holding the loca vars and incoming arguments.
21250 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
21252 * metadata.c (do_mono_metadata_parse_type): treat void like any
21253 other type (instead of assigning NULL);
21255 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
21257 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
21259 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
21261 * image.c (do_mono_image_open): added a cache for arrays.
21263 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
21265 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
21266 decode a single column from a row in a metadata table and changes
21267 to take advantage of it in the typedef locator (gives a nice speed up).
21268 Store offset info for function params.
21270 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
21272 * image.h (MONO_IMAGE_IS_CORLIB): removed
21274 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
21276 * assembly.c: how could mono_assembly_close () had ever worked?
21277 * metadata.c, metadata.h: provide offset info for local vars.
21278 Implement mono_type_size () to take care of alignment as well
21279 as size (it was mono_field_type_size in cli/class.c before).
21281 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
21283 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
21285 * assembly.h (CORLIB_NAME): set to corlib.dll
21287 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
21289 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
21291 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
21292 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
21293 tokentype.h: massive namespace cleanup.
21295 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
21297 * metadata.h, metadata.c: decode exception clauses when parsing method header.
21299 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
21301 * metadata.c (mono_metadata_free_type): added check for type !=
21302 NULL (void) before calling mono_metadata_free_type()
21304 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
21306 * metadata.h, row_indexes.h: added header with enumerations to use
21307 to index in the columns from tables in metadata and to decode coded
21308 tokens: we should start using this instead of embedding magic numbers
21311 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
21313 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
21314 Move metadata_t info from cli_image_info_t to MonoImage, where
21315 it's easily accessible. Changed all the uses accordingly.
21316 Added the method and class caches to MonoImage.
21317 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
21318 and mono_metadata_decode_value () signature to be more consistent
21319 with the other parse functions (and simplify code). Taken advantage
21320 of zero-length array allocation with GCC. Removed reduntant (and
21321 wrong) MonoFieldType struct and use MonoParam instead. Changed
21322 mono_metadata_parse_field_type () to use common code for parsing.
21323 Added mono_metadata_typedef_from_field () and
21324 mono_metadata_typedef_from_method () to lookup a typedef index from a
21325 field or method token.
21326 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
21328 2001-07-23 Miguel de Icaza <miguel@ximian.com>
21330 * metadata.c (mono_metadata_parse_field_type): Implement.
21331 (do_mono_metadata_parse_type): Split engine from
21332 mono_metadata_parse_type, so that we can create smaller structures
21333 for things that just have one pointer to the MonoType (look at
21336 2001-07-20 Miguel de Icaza <miguel@ximian.com>
21338 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
21339 as Jan Gray found out, it is incorrect.
21341 2001-07-18 Miguel de Icaza <miguel@ximian.com>
21343 * assembly.c: Implement asssembly loading. This loads an image
21344 and loads all the referenced assemblies. Come to think of it, we
21345 could always do lazy loading of the assemblies.
21347 * image.c (mono_image_open): Keep loaded images in a hashtable.
21349 * image.h (MonoImage): Add reference count.
21351 2001-07-17 Miguel de Icaza <miguel@ximian.com>
21353 * assembly.c (mono_assembly_open): Keep track of the file name in
21354 case the assembly has no ASSEMBLY table.
21356 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
21359 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
21361 * metadata.c, metadata.h: decode local vars in method header
21362 parse function. Change callers accordingly.
21364 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
21366 * metadata.h, cil-coff.h: protect against multiple inclusion.
21367 Added some new structures to hold information decoded from metadata:
21368 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
21369 and relevant decoding/free functions.
21370 * metadata.c: implement decoding functions. Add warning for out of bounds
21371 index in mono_metadata_locate(). Implement mono_get_method () to retreive
21372 all the info about a method signature and invocation. Remove check on
21373 uninitialized local var in parse_mh() and fix memory leak.
21375 2001-07-12 Miguel de Icaza <miguel@ximian.com>
21377 * metadata.h: More macros.
21379 * tokentype.h: New file.
21381 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
21383 * assembly.c: added a consistency check and initialize
21384 some structures with g_new0().
21385 * metadata.c: fixed a couple more bugs in table size computation
21386 and add other checks for out-of bound access to metadata.
21388 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
21390 * metatada.c: fix bugs computing table sizes. Spew a
21391 warning when index in string heap is out of bounds.
21393 2001-07-04 Miguel de Icaza <miguel@ximian.com>
21395 * metadata.h: Add a couple of macros to manipulate tokens.
21397 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
21399 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
21400 cli_section_tables).
21402 2001-07-01 Miguel de Icaza <miguel@ximian.com>
21404 * metadata.c (mono_metadata_user_string): New function, provides
21405 access to the UserString heap.
21407 2001-06-27 Miguel de Icaza <miguel@ximian.com>
21409 * metadata.c: Add inline documentation.
21411 2001-06-26 Miguel de Icaza <miguel@ximian.com>
21413 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
21416 2001-06-22 Miguel de Icaza <miguel@ximian.com>
21418 * typeattr.h: New file, TypeAttribute flags.
21420 2001-06-21 Miguel de Icaza <miguel@ximian.com>
21422 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
21423 mono_assembly_ensure_section): Section loading code.
21424 (load_section_tables): Load the sections.
21426 * mono/metadata/metadata.c (mono_metadata_locate_token,
21427 mono_metadata_locate): Functions to locate the information
21428 definition given a token or a table and an index.
21429 (mono_metadata_compute_table_bases): New.
21430 (compute_size): New function to compute the sizes of the various
21433 * mono/metadata/metadata.h: Finish listing the different index
21436 * mono/metadata/pedump.c: Improve to dump new information.
21438 2001-06-19 Miguel de Icaza <miguel@ximian.com>
21440 * mono/metadata/metadata.c: Entered all the tables matching
21443 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2