1 2007-06-22 Zoltan Varga <vargaz@gmail.com>
3 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
4 to avoid crashes during assembly unloading.
6 2007-06-22 Raja R Harinath <rharinath@novell.com>
8 Fix MethodInfo.IsGenericMethodDefinition
9 * reflection.c (mono_reflection_bind_generic_method_parameters):
10 Rearrange code to ensure we always uses a generic method definition.
11 * class.c (mono_class_inflate_generic_method_full): Set
12 'generic_container' field only for generic method definitions.
13 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
14 Use presense of 'generic_container' field as indication of being a
15 generic method definition.
17 2007-06-21 Zoltan Varga <vargaz@gmail.com>
19 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21 * object-internals.h: Reflect changes in the layout of the managed Delegate
24 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
25 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
26 runtime memory used by the dynamic method. Fixes #77146.
28 2007-06-21 Dick Porter <dick@ximian.com>
31 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
32 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
35 2007-06-21 Raja R Harinath <rharinath@novell.com>
37 * reflection.c (method_encode_methodspec): Add a tripwire.
38 * class.c (inflate_generic_type): The fully open generic type is
39 not the same as the generic type definition.
41 2007-06-21 Martin Baulig <martin@ximian.com>
43 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
45 * mono-debug-debugger.h
46 (MonoDebuggerBreakpointInfo): Removed.
47 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
48 (mono_debugger_remove_breakpoint): Likewise.
49 (mono_debugger_breakpoint_callback): Likewise.
50 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
52 2007-06-21 Raja R Harinath <rharinath@novell.com>
54 * metadata.c (mono_metadata_lookup_generic_class): The fully open
55 generic type is not the same as the generic type definition.
56 * class.c (mono_generic_class_get_class): Likewise.
58 2007-06-20 Geoff Norton <gnorton@customerdna.com>
60 * icall.c: The second argument to
61 System.Reflection.MethodBase.GetMethodFromHandleInternalType
62 is a MonoType not a MonoClass.
64 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
66 * verify.c: support for function pointers in the verifier
68 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
70 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
72 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
74 * assembly.c: removed Mono.Data.SqliteClient from the list of
75 forward-compatible assemblies as it breaks the ABI (bug #81899).
77 2007-06-19 Raja R Harinath <rharinath@novell.com>
79 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
80 lookup/update with the loader lock.
81 * reflection.c (mono_class_bind_generic_parameters): No need to
82 protect mono_metadata_lookup_* with the loader lock.
83 * class.c (inflate_generic_type): Likewise.
85 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
86 on a generic instantiated type.
88 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
90 *verify.c: produce meanfull error messages on verification error
91 *verify.c: fixed some cases of verification errors reported as validation errors
92 *pedump.c: fixed the error name array, now it shows validation errors properly
93 *verify.h: fixed the contant that should be used for verification errors
95 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
97 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
98 for bug #77596, 81858 and 80743 (generics data structures on domain
101 2007-06-15 Raja R Harinath <rharinath@novell.com>
103 Avoid allocating 'MonoGenericContext' on the heap.
104 * class-internals (_MonoMethodInflated::context): Make field
105 inline, not a pointer.
106 * loader.c (method_from_methodspec): Allocate 'new_context' on the
107 stack. Use the context embedded within the inflated method as the
108 hash key, rather than 'new_context'.
109 * class.c (inflate_generic_context): Simplify. Return a struct
110 rather than allocating on the heap.
111 (mono_class_inflate_generic_method_full): Update to changes. Now,
112 doesn't salt away a copy of the context -- simplifying the
113 lifetime rules of a 'MonoGenericContext *'.
114 (mono_method_get_context): Return pointer to embedded context.
115 (setup_generic_array_ifaces): Allocate temporary context on stack.
116 * reflection.c (inflate_mono_method): Likewise.
117 (mono_reflection_bind_generic_method_parameters): Likewise.
118 Use the context embedded within the inflated method as the hash key.
120 Avoid a source of allocation of 'MonoGenericContext'.
121 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
122 and 'cached_context' fields into embedded 'MonoGenericContext' field.
123 * class.c: Update to changes.
124 (mono_generic_class_get_context): Simplify drastically. Now just
125 returns a pointer to the field.
126 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
127 argument as a const pointer.
128 (mono_metadata_generic_context_equal): Likewise.
129 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
132 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
134 * verify.c improved the handling of brtrue/brfalse, factored out common code
136 2007-06-14 Raja R Harinath <rharinath@novell.com>
138 Kill MonoGenericMethod.
139 * class-internals.h (MonoGenericContext::method_inst): Rename from
140 'gmethod' and convert to a MonoGenericInst.
141 (MonoGenericMethod): Remove.
142 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
143 * loader.c (method_from_methodspec): Update to changes. Use a
144 MonoGenericContext as the key to the hashtable.
145 * metadata.c (mono_metadata_generic_context_equal): Rename from
146 'mono_metadata_generic_method_equal' and take MonoGenericContext.
147 (mono_metadata_generic_context_hash): Likewise from
148 'mono_metadata_generic_method_hash'. Change hash function.
149 (mono_metadata_load_generic_params): Update to changes.
150 (mono_get_shared_generic_method): Remove.
151 * metadata-internals.h (mono_get_shared_generic_method): Remove.
152 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
153 (inflate_generic_context): Likewise.
154 (mono_class_inflate_generic_method_full): Likewise.
155 (setup_generic_array_ifaces): Likewise.
156 (mono_class_create_from_typespec): Likewise.
157 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
158 (method_encode_methodspec): Update callsite.
159 (reflection_methodbuilder_to_mono_method): Update to changes.
160 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
161 MonoGenericContext as the key to the hashtable.
162 (inflate_mono_method): Update to changes.
164 * class-internals.h (MonoGenericMethod::container): Remove.
165 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
167 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
169 * profiler-private.h, profiler.c, profiler.h: added API to profile
172 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
174 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
176 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
178 * verify.c: method invocation is now validated, now we verify parameter types on stack.
179 Fixed overflow and underflow not aborting the verification process.
181 2007-06-13 Mark Probst <mark.probst@gmail.com>
183 * class-internals.h (MonoStats): Added stats entries for dynamic
186 2007-06-12 Zoltan Varga <vargaz@gmail.com>
188 * loader.c (mono_free_method): Free header->locals and header->clauses.
190 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
193 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
195 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
197 2007-06-12 Raja R Harinath <rharinath@novell.com>
199 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
202 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
204 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
206 2007-06-11 Raja R Harinath <harinath@gmail.com>
208 MonoGenericMethod on a diet
209 * class-internals.h (_MonoMethodInflated::reflection_info): Move
211 (_MonoGenericMethod::reflection_info): ... from here.
212 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
214 * reflection.c (inflate_mono_method): Likewise.
215 (mono_reflection_bind_generic_method_parameters): Likewise.
217 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
219 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
220 *verify.c: factored long ldarg forms to share code with short forms
222 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
224 *verify.c: fixed code formating factored some duplicate code
227 *verify.h: fixed binary incompatibility introduced earlier
229 *pedump.c: fixed formating
231 2007-06-11 Raja R Harinath <harinath@gmail.com>
233 Fix assertion when disassembling Mono.C5.dll
234 * loader.c (method_from_methodspec): Avoid inflating a method
235 twice with the same context. If the methodref is inflated, use
236 the declaring method instead.
238 * class.c (mono_class_from_generic_parameter): Fix case similar to
239 bug #81830 handled below, but for method containers.
241 2007-06-10 Raja R Harinath <harinath@gmail.com>
243 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
244 get_shared_generic_class. Directly inflate the instance.
245 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
246 (inflate_generic_class): Delete.
247 (get_shared_generic_class): Delete. Move setting of
248 'cached_class' and 'cached_context' ...
249 * metadata.c (mono_metadata_lookup_generic_class): ... here.
251 * metadata.c (mono_metadata_lookup_generic_class): Change
252 signature to take the components of a MonoGenericClass rather than
253 an allocated MonoGenericClass. Change semantics to be intern-like.
254 * reflection.c (mono_class_bind_generic_parameters): Update to
255 changes. Make locking region tighter.
256 * class.c (inflate_generic_class): Update to changes.
257 (get_shared_generic_class): Likewise.
258 * metadata-internals.h: Likewise.
260 * reflection.c (mono_class_bind_generic_parameters): Take and
261 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
262 (mono_reflection_bind_generic_parameters): Use
263 'mono_class_bind_generic_parameters' rather than duplicate the code.
264 * class.c (mono_bounded_array_class_get): Update to changes.
265 * object-internals.h: Likewise.
267 * reflection.c (mono_class_bind_generic_parameters): Only support
268 parameterizing generic type definitions. Remove support for other
271 2007-06-08 Zoltan Varga <vargaz@gmail.com>
273 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
275 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
278 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
280 * threads.c: When cleaning up thread, reset the Background bit.
283 2007-06-08 Jonathan Chambers <joncham@gmail.com>
285 * metadata.c: Move variable declarations to top of scope.
286 * verify.c: Move variable declarations to top of scope.
288 Code is contributed under MIT/X11 license.
290 2007-06-08 Raja R Harinath <rharinath@novell.com>
292 * reflection.c (mono_class_bind_generic_parameters): Replace
293 open-coded loop with mono_metadata_inflate_generic_inst.
295 * class.c (get_shared_generic_class): Don't call
296 mono_get_shared_generic_inst. Use the container's own
299 * metadata.c (mono_metadata_load_generic_params): Move
300 initialization of 'context' field here from ...
301 * class.c (mono_class_create_from_typedef): ... here, and ...
302 * loader.c (mono_get_method_from_token): ... here.
304 * class.c (get_shared_generic_class): Rename from
305 mono_get_shared_generic_class and make static.
306 (mono_get_shared_generic_inst): Move to metadata.c.
307 * loader.c (mono_get_shared_generic_method): Likewise.
308 * class-internals.h, metadata-internals.h: Update to changes.
311 * class.c (mono_class_from_generic_parameter): Don't assume a
312 generic container owner exists. Generic containers from monodis
315 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
317 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
318 * verify.h: new typedefs to returns the non-verifiable status
319 * verify.c: initial implementation of generics, stack merging and object compatibility check
321 2007-06-06 Mark Probst <mark.probst@gmail.com>
323 * class.c, image.c, class-internals.h (MonoImage): class_cache is
324 a MonoInternalHashTable again (fixed bug in internal hash table
327 2007-06-06 Mark Probst <mark.probst@gmail.com>
329 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
330 MonoInternalHashTable again (fixed bug in internal hash table
333 2007-06-06 Mark Probst <mark.probst@gmail.com>
335 * class.c, image.c, class-internals.h, domain.c,
336 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
337 changes. Have to figure out what makes them break the SWF
340 2007-06-04 Mark Probst <mark.probst@gmail.com>
342 * class.c, image.c, class-internals.h (MonoImage): class_cache is
343 a MonoInternalHashTable now.
345 2007-06-04 Mark Probst <mark.probst@gmail.com>
347 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
348 MonoInternalHashTable now.
350 2007-05-31 Zoltan Varga <vargaz@gmail.com>
352 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
355 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
357 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
358 dependent trampoline.
360 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
362 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
364 2007-05-29 Robert Jordan <robertj@gmx.net>
366 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
368 2007-05-28 Zoltan Varga <vargaz@gmail.com>
370 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
372 2007-05-25 Jonathan Chambers <joncham@gmail.com>
374 * marshal.c: Fix interface lookup loops for
375 cominterop_get_com_slot_for_method and
376 cominterop_get_method_interface. Only need to lookup
377 if type is a class, else use interface type method is on.
379 Code is contributed under MIT/X11 license.
381 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
383 * reflection.c: HasSecurity can be present even if no specially
384 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
385 SecurityAttribute). Fix CAS regression tests on buildbot.
387 2007-05-24 Jonathan Chambers <joncham@gmail.com>
389 * appdomain.c: Add configure checks for header files.
390 * image.c: Add configure checks for header files.
391 * file-io.c: Add configure checks for header files.
392 * debug-mono-symfile.c: Add configure checks for header files.
393 * threadpool.c: Add configure checks for header files.
394 * console-io.c: Add configure checks for header files.
395 * profiler.c: Add configure checks for header files.
396 * rawbuffer.c: Add configure checks for header files.
397 * icall.c: Add configure checks for header files.
398 * rand.c: Add configure checks for header files.
399 * socket-io.c: Add configure checks for header files.
401 Code is contributed under MIT/X11 license.
403 2007-05-24 Zoltan Varga <vargaz@gmail.com>
405 * reflection.c (mono_custom_attrs_from_builders): Remove the
406 assertion as it breaks the build.
408 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
410 * reflection.c (lookup_custom_attr): Make a copy here too.
412 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
415 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
418 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
421 2007-05-22 Zoltan Varga <vargaz@gmail.com>
423 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
424 (load_cattr_value): Ditto.
426 2007-05-20 Zoltan Varga <vargaz@gmail.com>
428 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
430 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
432 * threads.c: In "start_wrapper", set apartment_state to MTA if
433 apartment_state is Unknown and we're running on 2.0 profile or
435 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
436 to main method, then set apartment_state to Unknown on 1.0 profile,
437 and MTA on 2.0 profile.
439 2007-05-16 Jb Evain <jb@nurv.fr>
441 * class-internals.h (MonoDefaults): Add an attribute_class and
442 customattribute_data_class.
443 * domain.c (mono_init_internal): Populate them.
444 * reflection.c: Use them to remove duplicates. Make a vew
445 MonoClass variables `static'.
447 2007-05-15 Massimiliano Mantione <massi@ximian.com>
449 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
450 step in implementing IMT, so that all isinst checks now can go
452 This was needed because vtables for TransparentProxy need to look
453 like the vtable of the "target" class, so they need to point to
454 its interface bitmap directly.
456 * object.c: inside "mono_class_create_runtime_vtable" and
457 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
459 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
462 culture-info.h : added territory field in MonoCulture and
463 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
464 * locales.c : fill territory field above too.
465 * culture-info-table.h : regenerated.
467 2007-05-12 Zoltan Varga <vargaz@gmail.com>
469 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
472 2007-05-11 Jonathan Chambers <joncham@gmail.com>
474 * object.c: Always initialize apartment, even if
475 there is no custom attributes on entry point.
477 Code is contributed under MIT/X11 license.
479 2007-05-10 Jonathan Chambers <joncham@gmail.com>
481 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
482 * metadata.c: If no encoding is set, check for unicode
485 Code is contributed under MIT/X11 license.
487 2007-05-09 Jonathan Chambers <joncham@gmail.com>
489 * threads.c: Handle if mono_thread_current returns NULL
491 Code is contributed under MIT/X11 license.
493 2007-05-09 Jonathan Chambers <joncham@gmail.com>
495 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
496 in start_wrapper. Added mono_thread_init_apartment_state and
497 mono_thread_cleanup_apartment_state.
498 * object.c: Initialize thread apartment state on main thread
499 by checking for STAThreadAttribute on entry point.
500 * object-internals.h: Add apartment_state field to MonoThread.
501 * threads-types.h: Add unmanaged definition of
502 System.Threading.ApartmentState, MonoThreadApartmentState.
504 Code is contributed under MIT/X11 license.
506 2007-05-08 Jonathan Chambers <joncham@gmail.com>
508 * class.c: Fix windows build.
509 * class-internals.h: Fix windows build.
511 Code is contributed under MIT/X11 license.
513 2007-05-08 Robert Jordan <robertj@gmx.net>
515 * process.c (CreateProcess_internal):
516 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
517 .CreateNoWindow was specified. Fixes #81496.
519 2007-05-08 Massimiliano Mantione <massi@ximian.com>
521 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
522 step in implementing IMT, replaced it with two compact arrays
523 (interfaces_packed and interface_offsets_packed) and a bitmap that
524 is used for isinst checks (interface_bitmap).
526 * class.c: (compare_interface_ids): compare function to pass to
527 bsearch when looking for an interface with a given id.
528 (mono_class_interface_offset): reimplemented using bsearch on
529 interfaces_packed, getting the offset from interface_offsets_packed.
530 (print_implemented_interfaces): utility debugging function.
531 (setup_interface_offsets): reworked to initialize interfaces_packed,
532 interface_offsets_packed and interface_bitmap.
534 * object.c: replaced all accesses to "MonoClass.interface_offsets"
535 with uses of interfaces_packed and interface_offsets_packed.
537 2007-05-08 Massimiliano Mantione <massi@ximian.com>
539 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
540 mono_class_interface_offset prototype to wrap all accesses to
541 "MonoClass.interface_offsets".
543 * class.c: Implemented mono_class_interface_offset, and wrapped all
544 accesses to "MonoClass.interface_offsets".
546 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
547 "MonoClass.interface_offsets".
549 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
551 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
552 GetMethodFromHandle overloads (bug #78637).
554 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
556 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
557 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
559 2007-05-01 Zoltan Varga <vargaz@gmail.com>
561 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
564 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
566 (mono_custom_attrs_from_index): Ditto.
568 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
571 2007-04-30 Zoltan Varga <vargaz@gmail.com>
573 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
574 is now allocated from a mempool.
576 2007-04-28 Zoltan Varga <vargaz@gmail.com>
578 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
579 caller holds threads_lock, leading to deadlocks. Fixes #81476.
581 2007-04-26 Zoltan Varga <vargaz@gmail.com>
583 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
584 mono_loader_clear_error () too late. Fixes #81463.
586 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
588 * culture-info-table.h : regenerated.
590 2007-04-25 Zoltan Varga <vargaz@gmail.com>
592 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
595 2007-04-25 Dick Porter <dick@ximian.com>
597 * Makefile.am: Put the mingw enforced-optimisation back into the
598 PLATFORM_WIN32 section.
600 2007-04-24 Zoltan Varga <vargaz@gmail.com>
602 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
605 * image.c (mono_image_load_module): New API function to load a module reference.
607 * image.c (load_modules): Load modules lazily. Fixes #80812.
609 * class.c (mono_class_from_typeref): Use mono_image_load_module.
611 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
613 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
614 to mono_image_load_module_dynamic.
616 2007-04-23 Jonathan Chambers <joncham@gmail.com>
618 * marshal.c: Fix calling convention for CCW on non-windows
619 platforms. STDCALL on windows, CDECL everywhere else to work
620 with XPCOM and MainWin COM.
622 Code is contributed under MIT/X11 license.
624 2007-04-23 Martin Baulig <martin@ximian.com>
629 (method_from_memberref): Added `gboolean *used_context' argument.
630 (mono_get_method_from_token): Likewise.
631 (mono_get_method_full): Don't insert the method in the cache when
632 `used_context' is true.
634 2007-04-23 Raja R Harinath <rharinath@novell.com>
636 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
638 * reflection.c (mono_reflection_bind_generic_parameters): Don't
639 create new MonoTypes for returned types.
640 * class.c (mono_generic_class_get_class): Export mono-internal.
641 * class-internals.h: Update to changes.
643 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
645 * threadpool.c, threadpool.h, icall-def.h: patch from
646 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
648 2007-04-18 Zoltan Varga <vargaz@gmail.com>
650 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
652 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
654 * threads.c (mono_thread_get_stack_bounds): New helper function.
656 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
657 Correctly compute stack bounds when attaching. Fixes #81394.
659 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
661 * reflection.c: fix handling of doubles in custom attributes
662 for the arm-fpa format (bug #81368).
664 2007-04-18 Raja R Harinath <rharinath@novell.com>
666 * reflection.c (assembly_add_win32_resources): Mildly relax an
667 bounds check to let the end pointer point just past the end of the
668 allocated buffer. (may fix #81384)
670 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
672 * culture-info-table.h : regenerated.
674 2007-04-07 Zoltan Varga <vargaz@gmail.com>
676 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
677 the thread is aborted early.
679 2007-04-05 Dick Porter <dick@ximian.com>
681 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
682 FindFirstFile()/FindNextFile() to find entries. This lets the
683 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
686 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
688 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
690 2007-04-04 Martin Baulig <martin@ximian.com>
693 (mono_method_desc_full_match): Add support for nested classes.
695 2007-04-02 Zoltan Varga <vargaz@gmail.com>
697 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
699 2007-04-01 Zoltan Varga <vargaz@gmail.com>
701 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
702 waiting for too many threads.
704 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
706 * environment.c: Fix return value check on uname so we can get the
707 executing version on Solaris operating systems.
709 2007-03-28 Jb Evain <jbevain@gmail.com>
711 * class.c (mono_type_get_name_recurse): Complete the
712 fix for the creation of assembly qualified names for
713 pointer types. Fixes #81208.
715 2007-03-27 Dick Porter <dick@ximian.com>
717 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
718 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
722 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
723 the value of ReleaseMutex().
725 2007-03-27 Dick Porter <dick@ximian.com>
727 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
728 in little-endian order, not network endian, so must be converted
729 to host endian here. Fixes bug 80593.
731 2007-03-22 Jb Evain <jbevain@gmail.com>
733 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
734 qualified names for pointer types. Fixes #81208.
736 2007-03-21 Jonathan Chambers <joncham@gmail.com>
738 * marshal.c: Add support for PreserveSigAttribute.
740 Code is contributed under MIT/X11 license.
742 2007-03-14 Zoltan Varga <vargaz@gmail.com>
744 * process.c: Fix endianness issues. Fixes #81126.
746 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
747 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
749 * image.c (mono_image_lookup_resource): Make this work on big-endian
750 machines.Change API contract so the caller needs to free the return value.
752 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
755 2007-03-14 Martin Baulig <martin@ximian.com>
757 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
758 mono_type_get_desc() as well.
760 2007-03-13 Jonathan Chambers <joncham@gmail.com>
762 * icall.c: Fix environ access in VS.
764 2007-03-13 Alp Toker <alp@atoker.com>
766 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
767 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
770 2007-03-12 Zoltan Varga <vargaz@gmail.com>
772 * reflection.c (mono_reflection_create_dynamic_method): Add support for
773 circular references among dynamic methods. Fixes #81091.
775 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
777 2007-03-09 Martin Baulig <martin@ximian.com>
779 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
781 2007-03-09 Jonathan Chambers <joncham@gmail.com>
783 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
784 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
786 Code is contributed under MIT/X11 license.
788 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
790 * loader.c: Reapply patch for bug #79424.
792 2007-03-06 Zoltan Varga <vargaz@gmail.com>
794 * metadata.c (mono_type_to_unmanaged): Only convert object to
795 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
797 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
799 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
800 (and incorrectly set) is_reference field from MonoGenericInst.
802 2007-03-06 Zoltan Varga <vargaz@gmail.com>
804 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
807 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
809 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
811 2007-03-05 Miguel de Icaza <miguel@novell.com>
813 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
814 FileOptions.1 value to mean "temporary", map that to
815 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
819 2007-03-03 Marek Habersack <mhabersack@novell.com>
821 * appdomain.c: implement MS .Net style shadow copying. Copies of
822 the assemblies are made in a subdirectory of the dynamic base
823 directory, the assembly names are preserved.
824 Copy .mdb and .config files along with the assemblies being shadowed.
826 2007-02-28 Zoltan Varga <vargaz@gmail.com>
828 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
829 (emit_marshal_handleref): Ditto.
831 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
832 on Visual C++. Fixes #80671.
834 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
836 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
837 for clone operations.
839 2007-02-28 Zoltan Varga <vargaz@gmail.com>
841 * marshal.c: Fix warnings.
843 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
845 * loader.c: allow case-insensitive matching of the dll name
846 in dllmap handling when prefixed with "i:".
848 2007-02-20 Jonathan Chambers <joncham@gmail.com>
850 * threads.c: Fix #ifdef for dummy_apc function for VS.
852 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
854 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
856 2007-02-19 Massimiliano Mantione <massi@ximian.com>
857 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
858 giving precedence to the methods with a fully qualified name
859 (InterfaceName.MethodName) when building the interface sections
862 2007-02-16 Dick Porter <dick@ximian.com>
864 * threadpool.c (append_job): Fix fast-path array handling, so it's
865 less likely the array will grow exponentially when the load is
868 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
870 * metadata-internals.h, loader.c: fix dllmap lookup order
871 for non-function maps, too, and prepare for fallback code.
873 2007-02-12 Robert Jordan <robertj@gmx.net>
875 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
876 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
877 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
878 GlobalFree. Fixes a part of bug #77075.
880 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
882 * loader.c: implemented typedef parent in field memberref.
884 2007-02-11 Jonathan Chambers <joncham@gmail.com>
886 * marshal.c: Fix warnings and remember to call Release on
889 Code is contributed under MIT/X11 license.
891 2007-02-10 Miguel de Icaza <miguel@novell.com>
893 * class-internals.h: Add MonoHandleRef definition, and
894 handleref_class to mono_defaults.
896 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
897 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
899 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
900 (do nothing on this stage)
901 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
902 (emit_marshal_handleref): New method, used for argument handling
905 2007-02-08 Jonathan Chambers <joncham@gmail.com>
907 * class.c (mono_class_setup_parent): Lazily init com types.
908 * domain.c (mono_init_internal, mono_init_com_types): Lazily
910 * object.c (mono_remote_class_vtable): Lazily init com types.
911 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
912 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
913 * domain-internals.h: Expose mono_init_com_types.
914 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
915 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
916 Add support for COM Callable Wrapper marshalling.
917 * marshal.h: Add icall definitions.
918 * gc.c: Handle freeing of CCWs in finalizer code.
920 Code is contributed under MIT/X11 license.
922 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
924 * reflection.c: changed all the signature encoding code to use
925 a variable-sized buffer.
927 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
929 * marshal.c: locking fixes: never take the loader lock
930 or other runtime locks when holding the marshal lock
933 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
935 * marshal.c: make the delegate function pointer mapping
936 work for the moving GC.
938 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
940 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
943 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
945 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
948 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
950 * threadpool.c: made the code moving-GC safe.
952 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
954 * assembly.c, boehm-gc.c, class-internals.h, class.c,
955 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
956 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
958 * reflection.c: warning cleanup, some threading and moving GC fixes.
960 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
962 * class.c, loader.c: create the needed Set/Get/Address array methods
963 as well as the .ctors in mono_class_init (), fixes bug #80567.
965 2007-01-24 Zoltan Varga <vargaz@gmail.com>
967 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
968 we doesn't decrease its alignment. Should fix the sparc build.
970 2007-01-24 Dick Porter <dick@ximian.com>
973 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
974 Create the returned object if we need to ignore an unsupported
975 socket option. Fixes a segfault reported by Atsushi.
977 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
979 * class.c, object.c: restrict GC-tracked fields to
980 UIntPtr fields used inside corlib, so we provide better
981 type info to the GC and also allow broken packing as in
984 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
986 * sgen-gc.c: removed duplicated function.
988 2007-01-19 Miguel de Icaza <miguel@novell.com>
990 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
991 value that means that the value is not supported, but that we
992 should not return a failure, but instead report this as a
993 successful operation.
995 2007-01-19 Raja R Harinath <rharinath@novell.com>
997 Fix tests/bug79956.2.il
998 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
999 (mono_generic_class_get_class): If the generic definition in an
1000 enum, copy over other fields related to it.
1002 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
1004 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
1005 genericinst enums (bug #79215).
1007 2007-01-17 Massimiliano Mantione <massi@ximian.com>
1008 * class.c: Fix bug 80307.
1010 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
1012 * image.c: if the file table is not present, try to load
1013 all the modules, since we don't have info about them
1014 having or not metadata (bug #80517).
1015 * assembly.c: allow mono_assembly_load_references () to
1016 work for netmodules.
1018 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
1020 * image.c, metadata-internals.h, object.c: execute module
1021 cctors when running on the 2 runtime if present (bug #80487).
1023 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
1025 * icall.c: optimized InitializeArray() on bigendian.
1027 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
1029 * icall.c: fix for the broken ARM FPA double format.
1031 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
1033 * icall.c: handle endian issues for r4 and r8 types, too, in
1034 the InitializeArray() icall.
1036 2007-01-15 Miguel de Icaza <miguel@novell.com>
1038 * loader.c (mono_loader_error_prepare_exception): Clear the error
1039 once we have extracted the information from it, do this before we
1040 call into the JIT's class loading mechanisms.
1042 * object.c (mono_class_create_runtime_vtable): Do not clear the
1043 loader error before calling mono_class_get_exception_for_failure
1044 as the loader error is needed inside
1045 mono_class_get_exception_for_failure to throw the error (thinko).
1049 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
1051 * reflection.c: align fields rva data so it's faster to load at
1054 2007-01-12 Raja R Harinath <rharinath@novell.com>
1056 Prepare to simplify GenericMethod handling.
1057 * class-internals.h (mono_method_get_context): New accessor function.
1058 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
1059 rather than directly accessing '->context' field.
1061 * class-internals.h (_MonoGenericParam.method): Move ...
1062 (_MonoGenericContainer): ... here. Add into union with klass field.
1063 * class.c, icall.c, loader.c, metadata.c, reflection.c:
1066 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
1068 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
1069 the wrapper type enum and reduce relocations.
1071 2007-01-12 Raja R Harinath <rharinath@novell.com>
1073 * reflection.c (inflate_mono_method): Reuse method instantiation
1074 from the generic method, if available.
1076 2007-01-11 Jonathan Chambers <joncham@gmail.com>
1078 * marshal.c (emit_marshal_variant): Fix conv_arg
1079 type in last commit, based on whether parameter is byref.
1081 2007-01-11 Jonathan Chambers <joncham@gmail.com>
1083 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
1085 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
1086 MONO_TYPE_OBJECT back for VARIANT support.
1088 2007-01-11 Jonathan Chambers <joncham@gmail.com>
1090 * marshal.c, marshal.h, icall-def.h: Implement
1091 Marshal.ReAllocCoTaskMem.
1093 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
1095 * marshal.c: memory retention fixes: use the proper
1096 image cache for runtime_invoke method lookups.
1098 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
1100 * mempool.c: added code to help debug mempool allocations.
1102 2007-01-11 Dick Porter <dick@ximian.com>
1104 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
1105 support (experimenting with faking it with IP_MTU_DISCOVER for
1106 systems that don't have IP_DONTFRAGMENT.)
1107 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
1110 * icall-def.h: new System.Net.Sockets.Disconnect icall.
1112 * socket-io.h: Add new fields to MonoSocketAsyncResult
1113 corresponding to the new ones in Socket.cs.
1115 2007-01-11 Raja R Harinath <rharinath@novell.com>
1117 Fix IronPython regression mentioned in #80249
1118 * metadata.c (do_mono_metadata_parse_generic_class): Clear
1119 'cached_context' field, since it may have been initialized as a
1120 side-effect of metadata parsing.
1122 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
1123 (_MonoGenericClass.cached_class): Move here and rename from lone
1124 remaining field of ...
1125 (_MonoInflatedGenericClass): ... this. Remove.
1126 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
1129 Fix mcs/tests/test-128.cs regression.
1130 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
1131 2007-01-10 change below.
1132 [MONO_TYPE_OBJECT]: Recurse into array case.
1134 2007-01-11 Raja R Harinath <harinath@gmail.com>
1136 * class-internals.h (mono_get_inflated_generic_class): Remove.
1137 * class.c (mono_get_inflated_generic_class): Remove.
1138 (mono_generic_class_get_class): Rename from
1139 mono_class_create_generic.
1140 (mono_class_from_mono_type) [GENERICINST]: Use it.
1141 * reflection.c, metadata.c: Update to changes. Use
1142 'mono_class_from_mono_type'.
1144 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
1146 * reflection.c: use passed type when encoding an array element
1147 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
1149 2007-01-09 Robert Jordan <robertj@gmx.net>
1151 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
1152 result arguments (someDelegate.EndInvoke (unrelatedAres)).
1155 2007-01-09 Raja R Harinath <rharinath@novell.com>
1157 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
1159 * object.c (set_value): Avoid aliasing between type->data.klass
1160 and type->data.generic_class.
1162 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
1164 2007-01-08 Raja R Harinath <rharinath@novell.com>
1166 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
1167 between type->data.klass and type->data.generic_class.
1169 2007-01-08 Lluis Sanchez <lluis@ximian.com>
1171 * marshal.c: In MS.NET, StringBuilder objects are not copied by
1172 value in out parameters.
1174 2007-01-08 Raja R Harinath <rharinath@novell.com>
1176 Simplify invariant for MonoGenericClass::klass field.
1177 * class.c (mono_class_create_generic): Verify 'klass' is null.
1178 * metadata.c (do_mono_metadata_parse_generic_class): Don't
1179 initialize 'klass' field.
1181 2007-01-05 Raja R Harinath <rharinath@novell.com>
1183 Ongoing work to avoid redundant data and simplify invariants.
1184 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
1185 'generic_class', and change type to a GenericInst.
1186 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
1187 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
1189 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
1191 * class.c : skip io-layer under PLATFORM_WIN32.
1193 2007-01-03 Tor Lillqvist <tml@novell.com>
1195 Fix #80305: In a bundled executable, look in the bundled exe
1196 assembly to determine the runtime version. Add the possibility to
1197 bundle also the machine.config file.
1199 * assembly.c (mono_assembly_open_from_bundle): Make
1200 non-static. Allow being called even if we have no bundled
1201 assemblies, and return NULL right away in that case.
1203 * domain-internals.h: Declare mono_assembly_open_from_bundle()
1206 * domain.c (app_config_parse): Take an assembly exe file name as
1207 parameter instead of a config file name. Check for a bundled
1208 config file for that assembly by calling
1209 mono_config_string_for_assembly_file() (see below) before looking
1210 for one in the file system.
1211 (get_runtimes_from_exe): Corrsponding change to call of
1213 (get_runtimes_from_exe): Check for bundled assembly exe file first
1214 by calling mono_assembly_open_from_bundle(). If no bundled
1215 assembly exe file is found, call mono_image_open() as before to
1216 look it up in the file system.
1218 * mono-config.c: Add variable bundled_machinec_onfig.
1219 (mono_config_string_for_assembly_file): New function.
1220 (mono_config_for_assembly): Move code snippet that looks for a
1221 bundled assembly .config file into the above new function. Call
1223 (mono_register_machine_config, mono_get_machine_config): New
1224 functions to set and retrieve
1226 * assembly.h: Declare mono_register_machine_config().
1228 * mono-config.h: Declare mono_get_machine_config() and
1229 mono_config_string_for_assembly_file().
1231 * icall.c: No declaration of environ necessary on Win32. It is
1232 declared (as a macro expanding to a function call) in stdlib.h.
1233 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
1234 New internal mono function. Returns the value of
1235 mono_get_machine_config() as a Mono string.
1237 * icall-def.h: Add get_bundled_machine_config().
1239 2007-01-04 Raja R Harinath <rharinath@novell.com>
1241 Remove redundant field
1242 * class-internals.h (_MonoGenericContext.container): Remove field.
1243 * loader.c (mono_method_get_signature_full): Don't parse a
1244 "container" for a signature parse when the signature is inflated
1246 (method_from_methodspec): Likewise, for a generic_inst.
1247 * class.c, metadata.c, reflection.c: Update to changes.
1249 2006-01-04 Raja R Harinath <rharinath@novell.com>
1251 * class-internals.h (_MonoGenericClass): Rename 'context' field to
1252 'cached_context', and change semantics -- it starts off NULL, and
1253 is initialized on demand.
1254 * class.c (mono_generic_class_get_context): New accessor to
1255 replace 'context' field accesses.
1256 (mono_class_get_context): New helper.
1257 (*): Update to changes.
1258 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
1260 2007-01-03 Miguel de Icaza <miguel@novell.com>
1262 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
1263 before the memcpy. Fixes Marshal2 regression.
1265 2007-01-02 Jb Evain <jbevain@gmail.com>
1267 * blob.h: add a MONO_TYPE_ENUM definition
1268 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
1269 fix the encoding of arrays of enums in custom attributes.
1273 2007-01-01 Miguel de Icaza <miguel@novell.com>
1275 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
1276 string is null terminated, but only cut the string short if it
1277 overflows the buffer.
1279 (mono_string_to_byvalstr): Also fix this routine. The code here
1280 was not properly terminating a string (it was only terminated
1281 because of the previous catch-all memset).
1283 I left the memset, because I do not know if applications expect
1284 the runtime to clear this region.
1288 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1289 Clear the error before returning to unmanaged code to prevent the
1290 runtime from being confused later on (fixes 80420).
1291 (ves_icall_type_from_name): Always call mono_loader_clear_error
1292 after parsing a type that could have failed.
1293 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
1295 * loader.c (mono_loader_clear_error): Fix indentation.
1297 2006-12-28 Martin Baulig <martin@ximian.com>
1299 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
1301 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
1303 * reflection.c: patch from Rolf Bjarne Kvinge to fix
1304 getting a token for an EnumBuilder.
1306 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1308 * reflection.c: be more careful in case resource generation
1309 fails to create the data array.
1311 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
1313 * sgen-gc.c: write barrier for clone and fix unregister handles.
1315 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
1317 * reflection.c: some fixes needed in the generics code for the moving GC.
1319 2006-12-22 Robert Jordan <robertj@gmx.net>
1321 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
1322 account. Fixes bug #80299.
1324 2006-12-21 Raja R Harinath <rharinath@novell.com>
1326 Fix WaitHandle usage in delegates.
1327 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
1328 * object.c (mono_wait_handle_new): Use the property set method to
1329 initialize the handle.
1330 (mono_wait_handle_get_handle): New.
1331 * threadpool.c (mono_async_invoke): Use it.
1332 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
1334 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
1336 2006-12-21 Jonathan Chambers <joncham@gmail.com>
1338 * marshal.c (emit_marshal): Call emit_marshal_variant and
1339 emit_marshal_com_interface when applicable.
1340 (emit_marshal_variant, emit_marshal_com_interface): Add
1341 methods for this case and remove if's from emit_marshal_object.
1343 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
1345 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
1347 2006-12-19 Jonathan Chambers <joncham@gmail.com>
1349 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
1350 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
1351 and GlobalFree on Windows. Remove FIXME.
1353 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1355 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
1356 implementation for managed objects.
1358 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
1360 * object.c: implemented code to be used for checking
1361 that no reference field overlaps with non-references.
1363 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1365 * threadpool.c: fix queue code to be compatible with the
1368 2006-12-18 Miguel de Icaza <miguel@novell.com>
1370 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
1371 in structures by throwing ArgumentNullException.
1373 (emit_marshal_safehandle): Also when they are null parameters.
1375 (emit_marshal_safehandle): Add support for ref
1376 SafeHandles parameters
1378 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1380 * profiler.c: updated to use the mono-dl API instead of
1383 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1385 * profiler.c: updated to use the mono-dl dynamic loading
1386 API instead of gmodule.
1388 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
1390 * profiler.c: use readlink, older versions of glib don't have
1391 g_file_read_link ().
1393 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1395 * profiler.c: try to detect the path to mono if libc fails to provide
1396 a useful name (bug #80286).
1398 2006-12-16 Raja R Harinath <rharinath@novell.com>
1401 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
1402 instance, use the generic type definition instead.
1403 (ves_icall_Type_GetNestedTypes): Likewise.
1404 * class.c (mono_class_create_generic): Always set the
1405 nested_classes of a generic instance to NULL, even if the generic
1406 type definition has nested types.
1408 2006-12-15 Jonathan Chambers <joncham@gmail.com>
1410 * marshal.c (mono_string_from_bstr): Revert previous Windows change
1413 2006-12-15 Miguel de Icaza <miguel@novell.com>
1415 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
1416 my arguments were in the wrong order. I also fixed the Windows
1417 version which seems to have had the same issue.
1419 (mono_free_bstr): On Unix, this is g_free.
1420 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
1421 conversions (for the tests in corlib to pass).
1423 2006-12-14 Miguel de Icaza <miguel@novell.com>
1425 * marshal.c (emit_ptr_to_object_conv): For now, ignore
1426 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
1427 exception if a ref SafeHandle in a struct has changed).
1429 (emit_struct_conv): Do not perform layout checks for classes
1430 derived from SafeHandle, as those are specially handled.
1432 (emit_object_to_ptr_conv): Add support for
1433 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
1435 (emit_marshal_safehandle): Implement conversion of return values
1436 of safehandles (MARSHAL_ACTION_CONV_RESULT).
1438 * threads.c: WaitHandle now is compiled with two different handles
1439 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
1442 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
1443 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
1444 these routines to cope with both kinds of fields.
1446 2006-12-12 Miguel de Icaza <miguel@novell.com>
1448 * metadata.c (mono_type_to_unmanaged): Handle the case where
1449 type->data.klass is a SafeHandle, and in that case, return the
1450 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
1451 MONO_MARSHAL_CONV_SAFEHANDLE.
1453 2006-12-11 Miguel de Icaza <miguel@novell.com>
1455 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
1456 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
1457 calling emit_marshal_object.
1459 (emit_marshal_safehandle): Implement marshalling of
1460 SafeHandle parameters (no ref support yet).
1462 (MarshalAction): Document the defines as I implement
1463 them for SafeHandle.
1465 (emit_marshal_object): indentation police.
1467 * class-internals.h: Define MonoSafeHandle.
1468 Add safehandle_class to MonoDefaults type.
1470 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
1471 list of classes to check for fields.
1473 * domain.c (mono_init_internal): Add SafeHandle to the list of
1474 mono_defaults loaded.
1476 2006-12-15 Raja R Harinath <rharinath@novell.com>
1479 * reflection.c (mono_reflection_bind_generic_parameters): If the
1480 generic type definition is a type builder, ensure that it is fully
1481 initialized before instantiating it. Kill some dead code.
1483 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
1485 * object.c: clear the loader_error () before loading
1486 more metadata stuff (bug #80258).
1488 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
1490 * icall.c, icall-defs.h: type modifiers icalls for
1491 parameters and properties.
1493 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
1495 * object.c, icall.c: fixed warnings.
1497 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
1499 * marshal.c: fixed a couple of leaks and coding style in a few places.
1501 2006-12-08 Dick Porter <dick@ximian.com>
1503 * process.c: Cope with NULL ProcessStartInfo arguments on windows
1504 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
1507 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1509 * process.c: ProcessStartInfo may have only filename set and
1510 arguments can be NULL.
1512 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1514 * icall.c: fix leak found by Robert Jordan.
1516 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
1518 * marshal.c, marshal.h: generate managed method to access an element
1519 of a multi-dimensional array.
1521 2006-11-30 Paolo Molaro (lupus@ximian.com)
1523 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
1525 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1527 * icall.c: back out GetFields () fix until the serialization code is
1528 fixed to not depend on the incorrect behaviour.
1530 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
1532 * profiler.c: provide defaults if none are set.
1534 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
1536 * Makefile.am, attrdefs.h: new public header file with
1537 constants for attributes for use by embedders.
1539 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
1541 * icall.c: GetFields () fix for bug #80064.
1543 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
1545 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
1546 removed long unused icalls.
1548 2006-11-27 Jonathan Chambers <joncham@gmail.com>
1551 (mono_marshal_emit_managed_wrapper): Level of indirection for
1552 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
1553 can be generated without a delegate class.
1554 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
1556 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
1558 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1560 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
1563 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1565 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
1566 icall-def.h: added icalls needed by System.GC.
1568 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
1570 * loader.c: ensure the class in catch clauses is handled
1571 correctly for generics methods (fixes bug#79980).
1573 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
1575 * monitor.h, monitor.c: added mono_locks_dump () function
1576 to help debug deadlocks involving managed locks.
1578 2006-11-13 Dick Porter <dick@ximian.com>
1580 * file-io.c (get_file_attributes): If the file is a symlink try
1581 and get the stat data for the target, but also add the
1582 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
1583 the specs for the windows symlink support, but will probably have
1584 to be reworked when I have test data from a vista machine. Fixes
1587 2006-11-13 Dick Porter <dick@ximian.com>
1589 * gc.c (mono_domain_finalize):
1590 * marshal.c (mono_delegate_begin_invoke):
1591 * threadpool.c (socket_io_init, mono_thread_pool_init)
1592 (mono_thread_pool_finish):
1593 * monitor.c (mono_monitor_try_enter_internal):
1594 * threads.c (mono_thread_resume, mono_thread_init)
1595 (mono_thread_suspend_all_other_threads)
1596 (mono_thread_execute_interruption):
1597 * appdomain.c (mono_domain_unload): Check for NULL error returns
1598 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
1601 2006-11-11 Miguel de Icaza <miguel@novell.com>
1604 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
1605 Only close the handle if the value of the handle is not
1606 INVALID_HANDLE_VALUE. This just makes the process a bit more
1609 Improvement for #75733, so that we do not run into this problem.
1612 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
1613 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
1614 internal variables. Fixes #79462
1617 2006-11-09 Dick Porter <dick@ximian.com>
1619 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
1620 Use poll() not select(). Fixes bug 79397.
1622 2006-11-09 Raja R Harinath <rharinath@novell.com>
1625 * assembly.c (mono_assembly_load_from_full): Check that the given
1626 image has an assembly manifest.
1628 2006-11-09 Ankit Jain <jankit@novell.com>
1630 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
1631 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
1632 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
1634 2006-11-07 Dick Porter <dick@ximian.com>
1636 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
1637 Put the old resolver behaviour back for pre-2.0 profiles.
1639 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1641 * threadpool.c: precise GC and locking fixes.
1643 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
1645 * class.c: don't load types that have an explicit unaligned
1646 managed reference. Provide better info in the TypeLoad exception.
1647 Part of the fix for bug #79744.
1648 * object.c: use the correct check for class type load issues.
1650 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1652 * class.c: enforce alignment of fields with managed references
1653 even when Pack=1 is forced by the user (bug #77788).
1655 2006-11-03 Dick Porter <dick@ximian.com>
1657 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
1658 If the address reverse lookup fails, return it as the hostname
1659 anyway. Fixes bug 79721.
1661 2006-11-03 Dick Porter <dick@ximian.com>
1663 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
1664 Fix build on Windows.
1666 2006-11-02 Dick Porter <dick@ximian.com>
1669 * object-internals.h:
1670 * exception.c (mono_get_exception_thread_interrupted):
1671 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
1674 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
1675 Check for pending Thread.Interrupt.
1677 2006-10-27 Massimiliano Mantione <massi@ximian.com>
1678 * loader.c: Fixed bug 79684.
1680 2006-10-27 Dick Porter <dick@ximian.com>
1682 * file-io.c (get_file_attributes): Force symlinks to directories
1683 to be returned as a regular file. Fixes bug 79733.
1684 2006-10-26 Dick Porter <dick@ximian.com>
1686 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
1687 CreateFile to open a directory then we need to set the
1688 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
1690 2006-10-23 Zoltan Varga <vargaz@gmail.com>
1692 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
1695 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1697 * sgengc.c: small cleanup of timer code.
1699 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1701 * sgen-gc.c: fix some warnings and start adding support for
1702 complete object removal on domain unload.
1704 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
1706 * assembly.c: build_assembly_name should not consider a version
1707 number without build or revision number invalid. Fixes bug #79715.
1709 2006-10-18 Jonathan Chambers <joncham@gmail.com>
1711 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
1712 call kernel32 function OutputDebugString directly.
1714 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
1716 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
1718 * reflection.c: small cleanup, using a function to insert a MonoString
1721 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
1723 * reflection.c: moving GC fixes.
1725 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
1727 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
1728 all the objects with finalizers belonging to an unloading appdomain.
1730 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
1732 * sgen-gc.c: added ability to allocate even when the nursery is fully
1733 pinned and fixed a couple of bugs.
1735 2006-10-15 Zoltan Varga <vargaz@gmail.com>
1737 * threads.h: Revert the last change for now.
1739 * threads.h (mono_thread_get_pending_exception): Rename this to
1740 mono_thread_get_undeniable_exception ().
1742 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
1744 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
1745 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
1746 when fname does not refer to valid assembly. This result in a more
1747 meaningful error message.
1748 * exception.c: added mono_get_exception_bad_image_format2 which
1749 constructs a BadImageFormatException using the ctor taking a custom
1750 message and the file name. Passing in a NULL msg results in a default
1752 * exception.h: define mono_get_exception_bad_image_format2 function.
1753 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
1754 when file name pointed to an invalid IL image. Use
1755 mono_get_exception_file_not_found2 to construct FileNotFoundException,
1756 as this results in a more meaningful error message.
1758 2006-10-15 Zoltan Varga <vargaz@gmail.com>
1760 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
1763 2006-10-12 Zoltan Varga <vargaz@gmail.com>
1765 * metadata.c (mono_type_size): Change the align parameter to guint32 for
1766 consistency with the other _size functions.
1767 (mono_type_stack_size): Ditto.
1769 * class.c object.c icall.c: Fix warnings caused by the above change.
1771 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
1773 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
1775 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
1777 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1779 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
1780 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
1781 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
1782 threadpool.h, threads-types.h: mark more internal functions.
1784 2006-10-11 Dick Porter <dick@ximian.com>
1786 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
1787 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
1788 reproduce the bug even before applying the fix.)
1790 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
1792 * reflection.c: allow retrieving attributes for arguments in generic
1793 methods (bug #79241).
1795 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
1797 * debug-mono-symfile.c: properly check fopen () result (found by
1800 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
1802 * reflection.c: make error message clearer and fixed two
1803 issuelets found by Coverity.
1805 2006-10-10 Zoltan Varga <vargaz@gmail.com>
1807 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
1809 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1811 * object-internals.h, gc-internal.h, profiler-private.h:
1812 mark internal functions.
1814 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1816 * reflection.c: put data in the text section.
1817 * icall.c: recognize more types in type_from_typename ().
1818 * process.c, marshal.c: added some GC FIXMEs.
1820 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
1822 * loader.c: check for NULL before initializing.
1824 2006-10-09 Zoltan Varga <vargaz@gmail.com>
1826 * gc.c (finalizer_thread): Use a non-alertable wait here.
1828 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
1829 until the correct solution is found.
1831 2006-10-06 Zoltan Varga <vargaz@gmail.com>
1833 * reflection.c (mono_module_get_object): Avoid an assert when operating on
1834 modules with no metadata. Fixes #79596.
1836 * image.c (load_metadata_ptrs): Put back the error message when
1837 the #- heap is encountered since the support is not complete yet.
1839 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
1841 * gc.c: do not allow the user to SuppressFinalize () a
1842 delegate because it would leak the trampoline if present.
1844 2006-10-06 Zoltan Varga <vargaz@gmail.com>
1846 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
1849 2006-10-05 Zoltan Varga <vargaz@gmail.com>
1851 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
1853 * metadata.c (mono_metadata_get_param_attrs): Ditto.
1855 * row-indexes.h: Add definitions for *Ptr tables.
1857 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
1859 * metadata.c (mono_metadata_translate_token_index): New helper function to
1860 translate table indexes used in uncompressed metadata.
1861 (mono_metadata_decode_table_row): Ditto.
1862 (mono_metadata_decode_table_row_col): Ditto.
1864 * metadata.c: Add table schema for *Ptr tables.
1866 * class.c loader.c: Use the new helper function to access the affected metadata
1869 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
1872 2006-10-04 Zoltan Varga <vargaz@gmail.com>
1874 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
1875 sequences which can be unbounded in size. Fixes #79583.
1877 2006-10-02 Zoltan Varga <vargaz@gmail.com>
1879 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
1880 static initialization.
1882 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
1884 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
1886 * domain.c (mono_domain_free): Free up type_init_exception_hash.
1888 * object.c (mono_runtime_class_init): Implement correct semantics when a static
1889 ctor fails, i.e. throw the same exception on subsequent accesses.
1891 2006-09-0 Jonathan Chambers <joncham@gmail.com>
1893 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
1894 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
1895 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
1896 Handle marshalling of interfaces and VARIANTs contained in structs.
1898 Code is contributed under MIT/X11 license.
1900 2006-09-30 Zoltan Varga <vargaz@gmail.com>
1902 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
1904 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
1907 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1909 * console-io.c: ignore previous SIGINT handler.
1911 2006-09-27 Zoltan Varga <vargaz@gmail.com>
1913 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
1914 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
1915 #79460, #79461, #79485.
1917 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
1919 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
1922 2006-09-26 Zoltan Varga <vargaz@gmail.com>
1924 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
1925 could be generated from it.
1927 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
1929 * rand.c: fix read loop to correctly handle EINTR.
1931 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1933 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
1934 internal calls are defined to keep methods closer to the declaring
1935 type and allow a significant reduction in runtime relocations and
1938 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
1940 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
1941 exception message to have FileNotFoundException use the default
1942 assembly load error message. Fixes bug #79426.
1943 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
1945 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1947 * threadpool.c: (start_thread_or_queue) use the root domain when
1948 creating the thread instead of the async object one.
1950 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
1952 * class.c, object.c, class-internals.h, reflection.c:
1953 for arrays, store element_size inside MonoClass (speedup
1954 for array object creation).
1956 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
1958 * icall.c: fixed CodeBase to use the file name and not the module
1961 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
1963 * mono-debug.c, mono-debug.h: export find_method as
1964 mono_debug_find_method ().
1966 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1968 * debug-helpers.c, class-internals.h: added a few functions useful
1969 when debugging under gdb.
1971 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1973 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
1974 characters that need special handling.
1976 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
1978 * mono-config.c: make the os/cpu specification more flexible,
1979 allowing lists and negation.
1981 2006-09-18 Jonathan Chambers <joncham@gmail.com>
1983 * marshal.c: COM Interop fixes. Handle case where method->klass.
1984 is interface. Handle BSTR/MonoString when null. Use CDECL as
1985 calling convention on non-windows platforms. This is for
1986 compatibility with XPCOM and MainWin COM.
1988 Code is contributed under MIT/X11 license.
1991 2006-09-18 Zoltan Varga <vargaz@gmail.com>
1993 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
1994 correctly. Fixes #79217.
1996 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
1998 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
2000 * mono-config.c: allow both an os and cpu attribute for dllmap
2001 and dllentry elemnets to enable a single config file to be used
2002 for multiple architectures.
2004 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
2006 * loader.c: MonoLoaderError was cleared too soon on load failure.
2009 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
2011 * icall.c: use the defining class vtable when accessing a
2012 static field, not a pobblibly derived class.
2014 2006-09-17 Zoltan Varga <vargaz@gmail.com>
2016 * icall.c string-icalls.c: Remove references to unicode.h.
2018 * unicode.h unicode.c Makefile.am: Remove these unused source files.
2020 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
2022 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
2023 indicating the image where custom marshaller types should be looked up.
2024 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
2025 custom marshallers, instead of corlib. Fixes #79425.
2027 2006-09-14 Zoltan Varga <vargaz@gmail.com>
2029 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
2031 2006-09-14 Jonathan Chambers <joncham@gmail.com>
2033 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
2034 Implement Environment.ProcessorCount.
2036 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
2037 Implement Environment.ProcessorCount.
2040 Add Environment.ProcessorCount icall.
2042 Patch by Jason McFall.
2044 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2046 * assembly.c: don't append .exe/.dll when the filename already contains
2047 one of those extensions.
2049 2006-09-12 Martin Baulig <martin@ximian.com>
2051 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
2052 to array interfaces.
2054 2006-09-11 Martin Baulig <martin@ximian.com>
2056 * reflection.c (mono_image_build_metadata): Create the
2057 MethodImpl's after emitting all types and methods, so we don't
2058 need another fixup pass for them.
2060 2006-09-11 Zoltan Varga <vargaz@gmail.com>
2062 * class.c (mono_class_from_name_case): Fix regression introduced by the last
2065 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
2067 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
2070 2006-09-10 Zoltan Varga <vargaz@gmail.com>
2072 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
2073 args is not set. Fixes #78926.
2075 2006-09-08 Zoltan Varga <vargaz@gmail.com>
2077 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
2079 * image.c (load_class_names): Move this to class.c, and rename it to
2080 'mono_image_init_name_cache'.
2081 (load_modules): Fix a warning.
2083 * class.c icall.c image.c: Initialize image->name_cache lazily.
2085 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
2086 on its name using information in the AOT file.
2088 * class.c (mono_class_from_name): Use the new hook function.
2090 2006-09-06 Zoltan Varga <vargaz@gmail.com>
2092 * reflection.c (mono_param_get_objects): Handle enum default parameter values
2095 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
2098 2006-09-06 Martin Baulig <martin@ximian.com>
2100 * icall.c (mono_lookup_internal_call): Small fix.
2102 2006-09-05 Raja R Harinath <rharinath@novell.com>
2104 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
2107 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
2109 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
2110 when --debug is specified.
2112 2006-09-04 Zoltan Varga <vargaz@gmail.com>
2114 * class.c (setup_generic_array_ifaces): Fix a warning.
2116 2006-09-04 Miguel de Icaza <miguel@novell.com>
2118 * Temporarily remove the patch to assemly.c that checks the
2119 assembly versions as it breaks our gacutil.
2121 2006-09-03 Zoltan Varga <vargaz@gmail.com>
2123 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
2125 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
2128 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
2129 created using the default ctor. Fixes #79152.
2130 (mono_string_builder_to_utf16): Ditto.
2132 2006-09-01 Martin Baulig <martin@ximian.com>
2134 Fix handling of the generic array interfaces.
2137 (MonoDefaults): Removed `generic_array_class' and added
2138 `generic_ilist' class.
2141 (mono_bounded_array_class_get): Add the new generic array interfaces.
2142 (setup_generic_array_ifaces): New static method; create vtable
2143 entries for each method in the generic array interfaces.
2146 (select_container): Allow "parent-less" generic methods.
2149 (mono_marshal_get_generic_array_helper): New public method.
2152 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
2153 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
2154 moved the interncall into System.Array.
2156 2006-09-01 Raja R Harinath <rharinath@novell.com>
2158 A few more cases of avoiding work on types with ->byref set.
2159 Has the real fix for #79238
2160 * icall.c (is_generic_parameter): New helper.
2161 (ves_icall_Type_GetGenericParameterPosition): Use it.
2162 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
2163 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
2164 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2165 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
2167 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
2169 (ves_icall_Type_get_IsGenericInstance): Likewise.
2170 (ves_icall_Type_get_IsGenericType): Likewise.
2172 2006-09-01 Zoltan Varga <vargaz@gmail.com>
2174 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
2177 * mempool.h (mono_mempool_get_allocated): New helper function.
2179 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
2182 * mempool.c: Fix warnings and the calculation of stats.
2184 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
2186 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
2188 * loader.c (mono_get_method_from_token): Update method_count stat.
2190 * class-internals.h (MonoStats): Add some stats.
2192 2006-08-31 Robert Jordan <robertj@gmx.net>
2194 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
2195 with managed variants.
2196 All code is contributed under the MIT/X11 license.
2198 2006-08-31 Zoltan Varga <vargaz@gmail.com>
2200 * reflection.c (reflection_methodbuilder_to_mono_method): Set
2201 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
2203 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
2205 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
2206 with cycles in classes.
2208 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
2210 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
2211 missing a [MarshalAs] directive. Fixes #79203.
2213 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
2214 klass->marshal_info. Fixes #79217.
2216 2006-08-30 Martin Baulig <martin@ximian.com>
2218 Committing a patch from Joachim Ante <joe@otee.dk>:
2219 Add support for binary data symbol stores.
2221 * debug-mono-symfile.c
2222 (mono_debug_open_mono_symbol_file): Renamed into
2223 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
2227 (mono_debug_open_image): Added `raw_contents' and `size' args.
2228 (mono_debug_init_2_memory): New public function.
2230 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
2232 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
2234 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2236 * appdomain.c: implement support for ShadowCopyFiles.
2238 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
2240 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
2241 when value is NULL (and should remove CID #51).
2243 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2245 * image.c: moved 2 functions to ../utils.
2247 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
2249 * gc.c: cope with the target object of a GC handle being NULL
2252 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
2254 * class.c: recursively check parent's explicit implementations
2255 of interface methods (fixes bug #79125).
2257 2006-08-19 Miguel de Icaza <miguel@novell.com>
2259 * filewatcher.c: Avoid warnings when building, do not redefine
2260 constants that are defined.
2264 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2266 * image.c: don't fail when the link points to an absolute path.
2268 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
2270 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
2273 2006-08-17 Miguel de Icaza <miguel@novell.com>
2275 * image.c (full_path): A new method used to obtain the actual path
2276 of an assembly even in the presence of symbolic links.
2278 This is necessary for the case where we are running a binary that
2279 has been GACed, but we are using the "published" path name
2280 ($prefix/mono/1.0/blah.exe) which happens to point to the real
2283 This was the source of the failure for the `xsp' command with the
2284 recent AppDomain changes, as far as the runtime was concerned,
2285 there were two different assemblies: $prefix/mono/1.0/blah.exe and
2286 $prefix/mono/gac/blah/version/blah.exe.
2288 (do_mono_image_open): use full path
2290 2006-08-17 Zoltan Varga <vargaz@gmail.com>
2292 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
2294 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
2296 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
2297 domain_id is supplied. Fix CID #241 and corlib's unit tests.
2299 2006-08-17 Zoltan Varga <vargaz@gmail.com>
2301 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
2302 small structures. Fixes #78990.
2304 2006-08-17 Zoltan Varga <vargaz@gmail.com>
2306 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
2308 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
2310 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2313 * marshal.c: don't load all the assemblies from a domain into newly
2314 created ones. The new domains might have different rules and load
2315 assemblies from different locations. Fixes bug #76757.
2317 Patch by Lluis. Conflicts resolved by Brian Crowell.
2319 2006-08-16 Alp Toker <alp@atoker.com>
2321 * socket-io.c: First half of the fix for #79084.
2322 Set sa_size to the length of the content, not that of the struct.
2323 Don't add NULL suffix to the content, this should be done in
2324 managed code if needed.
2326 2006-08-14 Raja R Harinath <rharinath@novell.com>
2329 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
2330 mono_metadata_parse_type returns NULL.
2332 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
2334 * normalization-tables.h : new file for string normalization data.
2335 * locales.c, locales.h, icall.c :
2336 added load_normalization_resource() for string normalization,
2338 * Makefile.am : added normalization-tables.h to the sources.
2340 2006-08-13 Zoltan Varga <vargaz@gmail.com>
2342 * marshal.c: Add more helper functions to reduce code duplication and use them
2345 2006-08-12 Zoltan Varga <vargaz@gmail.com>
2347 * marshal.c: Fix non-x86 stdcall warnings.
2349 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
2352 2006-08-11 Jonathan Chambers <joncham@gmail.com>
2354 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
2355 type check on multi-dimensional arrays. Fixes #79000.
2357 2006-08-10 Jonathan Chambers <joncham@gmail.com>
2359 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
2360 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
2361 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
2362 * class-internals.h: add is_com_object to class structure.
2363 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
2364 null checks to COM object marshalling. Fix .ctor call on RCW.
2365 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
2367 All code is contributed under the MIT/X11 license.
2369 2006-08-09 Dick Porter <dick@ximian.com>
2371 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
2372 racing mono_monitor_allocator_lock() somewhere, so don't delete
2373 the critical section for now. Found by running and exiting
2376 2006-08-10 Zoltan Varga <vargaz@gmail.com>
2378 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
2379 (ves_icall_System_ComObject_FindInterface): Ditto.
2380 (ves_icall_System_ComObject_CacheInterface): Ditto.
2382 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
2383 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
2385 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2387 * threadpool.c: treat pipes from process asynchronous reads as sockets
2388 when reading from them, so we get select/poll or epoll to wait for
2391 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
2393 * loader.c: Fix a typo (CID #233) in the null check.
2395 2006-08-07 Zoltan Varga <vargaz@gmail.com>
2397 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
2398 Hopefully fixes #78949.
2400 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
2401 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
2402 bytes. Fixes #78972.
2404 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2406 * filewatcher.c: we need to set errno here.
2408 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2410 * filewatcher.c: let Win32Exception get the error value.
2412 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2414 * filewatcher.c: translate errno into win32 errors for Win32Exception
2415 to know what happened.
2417 2006-08-01 Zoltan Varga <vargaz@gmail.com>
2419 * threadpool.c: Fix more warnings.
2421 * assembly.c (search_loaded): Fix warnings.
2423 * threadpool.c (mono_thread_pool_finish): Fix warnings.
2424 (mono_async_invoke): Ditto.
2426 2006-07-28 Jonathan Chambers <joncham@gmail.com>
2428 * object.c (mono_remote_class_vtable): Need to create proxy vtable
2429 entries for __ComObject type in addition to ComImport types.
2430 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
2433 All code is contributed under the MIT/X11 license.
2435 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
2437 * image.c: avoid tentative loading of modulerefs that contain
2438 no metadata (P/Invoke library names).
2440 2006-07-28 Dick Porter <dick@ximian.com>
2442 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
2443 mono_loader_lock() somewhere, so don't delete the critical section
2444 for now. Found by running and exiting monodevelop.
2446 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2448 * filewatcher.c: define the inotify syscalls when we're building on
2449 linux and have sys/syscall.h. The build system might not have support
2450 for inotify but the target system might have it.
2452 2006-07-26 Miguel de Icaza <miguel@novell.com>
2454 * domain.c: Documentation updates.
2456 * loader.c (mono_free_method): Do not release the method
2457 information if we are being profiled, as profilers will use this
2458 information at shut down to present some data to the user.
2460 This is needed so that the profiler does not crash, as the
2461 profiler tends to keep MonoMethods around, and they might become
2462 invalid if we free these.
2464 (mono_get_method_constrained): Return the original CIL stream
2465 method as well, so verification can be performed against it.
2467 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2469 * filewatcher.[ch]: support for inotify file system watcher.
2470 * icall.c: add new internal calls for the inotify file system watcher.
2472 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2474 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
2477 2006-07-20 Dick Porter <dick@ximian.com>
2479 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
2482 2006-07-20 Dick Porter <dick@ximian.com>
2484 * threads.c (start_wrapper): Do the thread cleanup while we still
2485 hold a reference to its object. Fixes bug 78123.
2487 2006-07-18 Kornél Pál <kornelpal@gmail.com>
2489 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
2490 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
2491 "managed-to-managed".
2492 * icall.c: Redirect string constructors that take sbyte* to
2493 ves_icall_System_String_ctor_RedirectToCreateString.
2494 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
2495 to CreateString () methods with matching signature.
2496 * reflection.c: Use original security informations for
2497 MONO_WRAPPER_MANAGED_TO_MANAGED.
2498 * security-manager.c: Use original security informations for
2499 MONO_WRAPPER_MANAGED_TO_MANAGED.
2500 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
2501 that is a placeholder and only its address should be used.
2502 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
2503 that is a placeholder and only its address should be used.
2505 2006-07-15 Jonathan Chambers <joncham@gmail.com>
2507 Begin implementing COM Interop.
2508 * appdomain.c: Increment corlib version.
2509 * class.c: Set ComImport classes' parent to __ComObject.
2510 * loader.c: Mark cominterop methods as such.
2511 * domain.c: Add __ComObject class to MonoDefaults structure.
2512 * image.c: Add 2 hashtables to the image for COM Interop related methods
2513 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
2514 using the mempool allocator
2516 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
2517 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
2518 declaration for mono_metadata_type_dup_mp.
2520 * debug-helpers.c: Added strings for two additional wrapper types
2521 * object.c: Create proxy objects for ComImport classes
2522 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
2523 and added __ComObject class to MonoDefaults structure.
2525 * object-internals.h: Finish MonoRealProxy definition, and add definition of
2526 MonoComInteropProxy and MonoComObject.
2528 * marshal.c: Added support for COM Interop
2529 (signature_cominterop): Converts managed signature to corresponding
2530 unmanaged COM signature.
2531 (cominterop_get_function_pointer): gets unmanaged function pointer via
2533 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
2534 (cominterop_get_method_interface): returns interface type that method is defined on
2535 (mono_mb_emit_cominterop_call): emits native call to function pointer
2537 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
2538 that matches signature of unmanaged function.
2539 (cominterop_get_native_wrapper): wrapper around adjusted method call.
2540 (cominterop_get_invoke): forwards call from proxy to __ComObject
2541 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
2542 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
2543 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
2545 * marshal.h: Added Marshal icall declarations.
2546 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
2547 so we can access them in finalizer
2549 2006-07-14 Dick Porter <dick@ximian.com>
2551 * object.c (mono_type_initialization_cleanup): Fix a race
2552 condition by temporarily commenting out the critical section
2555 2006-07-14 Zoltan Varga <vargaz@gmail.com>
2557 * reflection.c (create_custom_attr): Fix some warnings.
2558 (create_custom_attr_data): Ditto.
2559 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
2560 types. Fixes #78855.
2562 2006-07-11 Zoltan Varga <vargaz@gmail.com>
2564 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
2566 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
2568 2006-07-08 Zoltan Varga <vargaz@gmail.com>
2570 * reflection.c (resolve_object): Add support for DynamicMethod.
2572 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
2573 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
2575 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
2577 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
2578 don't leak GPtrArray's pdata has we have no use (nor free) for it.
2580 2006-07-01 Zoltan Varga <vargaz@gmail.com>
2582 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
2585 2006-06-30 Raja R Harinath <rharinath@novell.com>
2587 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
2588 slightly: remove a shadow local variable.
2590 2006-06-29 Raja R Harinath <rharinath@novell.com>
2592 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
2593 definition that introduces the virtual function slot.
2594 Also fix Coverity #105.
2596 2006-06-29 Zoltan Varga <vargaz@gmail.com>
2598 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
2599 for dynamic assemblies. Fixes #78724.
2601 2006-06-28 Zoltan Varga <vargaz@gmail.com>
2603 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
2606 2006-06-21 Martin Baulig <martin@ximian.com>
2609 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
2612 2006-06-21 Zoltan Varga <vargaz@gmail.com>
2614 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
2616 2006-06-20 Raja R Harinath <rharinath@novell.com>
2618 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
2620 * class.c (mono_class_create_from_typespec): Add 'context' argument.
2621 Inflate result if necessary.
2622 (mono_class_get_full): Remove old version. Rename from
2623 'mono_class_get' and add 'context' argument. Pass it to
2624 ..._create_from_typespec.
2625 (mono_class_get): New. Simple wrapper to mono_class_get_full.
2626 (mono_ldtoken): Revert change below.
2628 2006-06-20 Martin Baulig <martin@ximian.com>
2630 * class.c (mono_ldtoken): Don't pass the generic context to
2631 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
2633 2006-06-15 Zoltan Varga <vargaz@gmail.com>
2635 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
2636 and later freeing it. Fixes #78638.
2638 2006-06-15 Miguel de Icaza <miguel@novell.com>
2640 * icall.c (mono_class_get_throw): Revert over-zealous error
2641 throwing, the caller for mono_class_get_throw will cope with
2642 errors when classes are not properly initialized already.
2644 The code still copes with loader exceptions though.
2646 Fixes the regression in reftype1 and reftype3 from the CAS tests.
2648 2006-06-14 Miguel de Icaza <miguel@novell.com>
2650 Fixes the `make run1' version of RuntimeAbort (to be commited,
2651 source is in Bugzilla).
2653 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
2654 FALSE on class loading failure instead of returning true.
2656 * class.c (mono_class_create_from_typedef): It is possible for
2657 mono_metadata_interfaces_from_typedef_full to fail if a class is
2658 not found, cope with this.
2661 2006-06-14 Dick Porter <dick@ximian.com>
2664 * process.c: Fix a bunch of signed/unsigned warnings from gcc
2667 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
2669 * culture-info-table.h : oops, forgot to make it nsync with r61548.
2671 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
2673 * icall.c: Another fix for building mono in Visual Studio.
2675 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
2677 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
2679 2006-06-09 Martin Baulig <martin@ximian.com>
2681 * debug-mono-symfile.c: Put this back and really fix it this
2682 time. Sorry for all the trouble.
2684 2006-06-08 Zoltan Varga <vargaz@gmail.com>
2686 * icall.c (mono_class_get_throw): Fix a warning.
2687 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
2688 ReflectionTypeLoadException if needed. Fixes #78606.
2690 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
2691 (mono_class_init): Ditto.
2693 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
2694 ref_only exceptions.
2695 (mono_loader_clear_error): Make this work even if there is no error.
2697 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
2699 * object-internals.h marshal.c marshal.h icall.c: Implement method
2700 Marshal.GetComSlotForMethodInfo using internal call.
2702 2006-06-07 Zoltan Varga <vargaz@gmail.com>
2704 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
2705 a function for signalling it.
2707 * class.c (mono_class_from_typeref): Use the new kind of loader error when
2708 a referenced assembly is not found.
2710 * loader.c (mono_loader_error_prepare_exception): Add support for
2711 LOADER_ERROR_ASSEMBLY. Fix formatting.
2713 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
2715 * domain.c appdomain.c class-internals.h marshal.c: Add support
2716 for VARIANT marshalling on windows and increment corlib version
2717 since Variant struct was added.
2719 2006-06-03 Miguel de Icaza <miguel@novell.com>
2721 * debug-mono-symfile.c: Revert Martin's previous patch which broke
2722 stack trace line information:
2724 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
2725 (Martin) when looking up B which is between A and C, return A not C.
2729 Thanks to Alexander Olk for tracking this down.
2731 2006-06-02 Zoltan Varga <vargaz@gmail.com>
2733 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
2735 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
2736 avoid clobbering its value.
2737 (mono_string_to_lpstr): Fix a warning on windows.
2739 2006-05-31 Zoltan Varga <vargaz@gmail.com>
2741 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
2743 * reflection.c loader.c: Removed references to 'dummy' flag.
2745 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
2747 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
2748 it gets GC tracking.
2750 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
2753 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
2755 * marshal.c threadpool.c: Update callers of mono_async_result_new.
2757 * appdomain.c: Bump corlib version.
2759 2006-05-30 Zoltan Varga <vargaz@gmail.com>
2761 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
2762 CEE_STIND_REF when working with object references.
2764 2006-05-31 Zoltan Varga <vargaz@gmail.com>
2766 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
2769 2006-05-30 Miguel de Icaza <miguel@novell.com>
2771 * loader.c (method_from_memberref): Fix argument value for
2772 mono_loader_set_error_method_load (I was passing the MonoClass
2773 instead of the class name char *).
2775 2006-05-30 Zoltan Varga <vargaz@gmail.com>
2777 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
2778 CEE_STIND_REF when working with object references.
2780 2006-05-30 Martin Baulig <martin@ximian.com>
2782 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
2783 mono_method_full_name() change and replace the ':' with a '.'
2786 2006-05-30 Martin Baulig <martin@ximian.com>
2788 * debug-mono-symfile.c
2789 (mono_debug_symfile_lookup_location): Fix the algorithm:
2790 when looking up B which is between A and C, return A not C.
2792 2006-05-29 Martin Baulig <martin@ximian.com>
2795 (MonoDebugMethodInfo): Make the typedef public.
2796 (MonoDebugSourceLocation): New public struct.
2799 (mono_debug_source_location_from_address): Removed.
2800 (mono_debug_source_location_from_il_offset): Removed.
2801 (mono_debug_il_offset_from_address): Removed.
2802 (mono_debug_address_from_il_offset): Removed.
2803 (mono_debug_lookup_method): New public function.
2804 (mono_debug_lookup_source_location): New public function; replaces
2805 the old mono_debug_source_location_from_*() functions; see the
2806 inline documentation.
2807 (mono_debug_free_source_location): New public function.
2808 (mono_debug_print_stack_frame): New public function; see the
2809 inline documentation.
2811 * debug-mono-symfile.c
2812 (mono_debug_find_source_location): Renamed into
2813 mono_debug_symfile_lookup_location(); only take a
2814 `MonoDebugMethodInfo *' and an `offset' argument; added inline
2816 (mono_debug_find_method): Renamed into
2817 mono_debug_symfile_lookup_method().
2819 2006-05-27 Zoltan Varga <vargaz@gmail.com>
2821 * assembly.c (mono_assembly_open_full): Dont overwrite the status
2822 returned by mono_image_open_full ().
2824 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
2825 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
2828 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
2831 2006-05-27 Miguel de Icaza <miguel@novell.com>
2833 * class.c (mono_class_from_typeref): handle missing images
2834 earlier, deals with bug #78418. Refactor code;
2836 Fix a warning introduced in my previous commit (some stale code
2837 from before I revisited my patch).
2839 * class.c (mono_class_create_from_typedef): On failure, remove the
2840 class from the MonoImage->class_cache as the class is not
2841 initialized; Fixes the leak pointed out by Paolo.
2843 2006-05-25 Dick Porter <dick@ximian.com>
2845 * threads.c (mono_thread_cleanup): Build fix. Comment out the
2846 DeleteCriticalSections until I figure out which one may still be
2847 sometimes locked when mono_thread_cleanup is called.
2849 2006-05-24 Dick Porter <dick@ximian.com>
2851 * threads.c (mono_thread_cleanup): Move the threading cleanup out
2852 of mono_thread_manage and back into its own function, so it can be
2853 called after the finalizer thread has finished.
2855 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
2857 2006-05-24 Zoltan Varga <vargaz@gmail.com>
2859 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
2862 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
2863 with non-blittable elements.
2864 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
2866 2006-05-24 Martin Baulig <martin@ximian.com>
2868 * mono-debug-debugger.h (MonoDebuggerEvent): Added
2869 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
2871 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
2872 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
2873 `mono_debugger_event_handler' to NULL.
2875 2006-05-24 Martin Baulig <martin@ximian.com>
2877 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
2879 2006-05-24 Martin Baulig <martin@ximian.com>
2881 * mono-debug-debugger.h
2882 (mono_debugger_create_notification_function): Added
2883 `MonoCodeManager *' argument.
2885 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
2887 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
2889 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
2891 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
2892 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
2895 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
2897 * icall.c: precise GC support: objects can't be stored in unmanaged
2898 memory anymore, even if they are kept alive by other references: since
2899 they can move the GC needs to be able to always find them.
2901 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
2903 * object.c: precise GC support for static fields. Support
2904 for moving GCs: write barriers and pinned allocation for interned
2907 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
2909 * domain.c, domain-internals.h: precise GC support for the MonoDomain
2912 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
2914 * class.c, gc.c: sgen and precise GC updates.
2916 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
2918 * marshal.h, marshal.c: added write barrier wrapper and precise type
2921 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
2923 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
2926 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
2928 * reflection.c: precise and sgen GC updates.
2930 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
2932 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
2934 2006-05-22 Zoltan Varga <vargaz@gmail.com>
2936 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
2938 2006-05-20 Zoltan Varga <vargaz@gmail.com>
2940 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
2941 MONO_TYPE_OBJECT. Fixes #78462.
2943 2006-05-18 Zoltan Varga <vargaz@gmail.com>
2945 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
2946 and blittable types.
2948 2006-05-17 Miguel de Icaza <miguel@novell.com>
2950 * class.c (mono_class_get_exception_for_failure): Implement parts
2951 of a TODO: if the loader error is set (instead of the class
2952 error), we return a Loader exception that can be properly thrown
2955 This was exposed by some Winforms 2.0 code that I tried to run
2956 (Atsushi pointed me to it).
2958 2006-05-17 Zoltan Varga <vargaz@gmail.com>
2960 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
2961 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
2963 * marshal.c (emit_marshal_vtype): Add limited support for
2964 UnmanagedType.LPStruct. Fixes #78427.
2966 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
2967 Applied a patch from kangaroo to fix #77523.
2969 2006-05-17 Martin Baulig <martin@ximian.com>
2972 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
2973 (debugger_thread_created): Removed.
2974 (debugger_thread_exited): Removed.
2976 2006-05-15 Zoltan Varga <vargaz@gmail.com>
2978 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2980 * object-internals.h (MonoReflectionResource): Sync with managed version.
2982 2006-05-12 Wade Berrier <wberrier@novell.com>
2984 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
2986 2006-05-12 Zoltan Varga <vargaz@gmail.com>
2988 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
2989 functions try to allocate from the image mempool.
2991 2006-05-12 Dick Porter <dick@ximian.com>
2993 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
2995 2006-05-12 Lluis Sanchez <lluis@ximian.com>
2997 * object.c: The FieldGetter and FieldSetter methods require the full
2998 name of the class, not only the name. Fixes bug #78277.
3000 2006-05-11 Miguel de Icaza <miguel@novell.com>
3002 * loader.c (method_from_memberref): Do not pass the NULL klass to
3003 mono_loader_set_error_() methods. Pass the non-NULL value
3006 2006-05-11 Zoltan Varga <vargaz@gmail.com>
3008 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
3009 (mono_assembly_close): Null out assembly->image->references after freeing it.
3011 * image.c (mono_image_close): Free image->references.
3013 * reflection.c (mono_image_basic_init): Fix a small memory leak.
3015 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
3017 * marshal.c: In function mono_mb_add_local don't use the mb pointer
3018 before checking if it's NULL (g_assert).
3020 2006-05-10 Martin Baulig <martin@ximian.com>
3022 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
3023 I thought I already killed that two months ago, but now it somehow reappeared.
3025 2006-05-10 Martin Baulig <martin@ximian.com>
3027 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
3029 2006-05-10 Zoltan Varga <vargaz@gmail.com>
3031 * reflection.c: Allocate memory for dynamically created methods in the image
3034 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
3036 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
3037 don't use the ad pointer before checking if it's NULL (g_assert).
3039 2006-05-09 Zoltan Varga <vargaz@gmail.com>
3041 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
3042 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
3044 * marshal.c: Allocate all signatures from mempools.
3046 * marshal.c: Allocate some more signatures from mempools.
3048 2006-05-09 Miguel de Icaza <miguel@novell.com>
3050 * object.c (mono_load_remote_field): The code used to provide a
3051 temporary variable for returning results if the user did not
3052 provide a result pointer. But our temporary variable was allocted
3055 Fix calling code to always pass a result area. Coverity ID 103.
3057 2006-05-06 Zoltan Varga <vargaz@gmail.com>
3059 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
3060 value, not the old. Fixes #78312.
3061 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
3063 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
3064 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
3067 * assembly.c (mono_assembly_close): Free image->references.
3069 * assembly.c (mono_assembly_names_equal): Fix a warning.
3070 (mono_assemblies_cleanup): Cleanup more global data.
3072 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
3074 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
3075 ptr_cache and image->modules.
3077 * image.c (mono_image_init): Allocate array_cache lazily.
3079 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3081 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
3082 behavior was changed recently and has bad side effects.
3084 2006-05-05 Zoltan Varga <vargaz@gmail.com>
3086 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
3088 * assembly.c (mono_assembly_close): Remove a debug printf.
3090 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
3092 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
3093 to also allow for temporary references between mono_image_open ()/close ().
3095 * domain.c (get_runtimes_from_exe): Add a FIXME.
3097 2006-05-04 Zoltan Varga <vargaz@gmail.com>
3099 * marshal.c: Fix support for dynamic methods.
3101 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
3103 * marshal.c (mono_marshal_cleanup): New cleanup function.
3105 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
3108 * class.c (mono_class_init): Fix leaking class->nested_classes.
3110 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
3112 * image.c (mono_image_init): Initialize the new cashes.
3114 * image.c (mono_image_close): Destroy the new cashes.
3116 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
3118 * mempool.c (mono_mempool_strdup): New helper function.
3120 * class-internals.h: Add prototype for mono_loader_unlock ().
3122 * domain.c (mono_jit_info_table_find): Fix a warning.
3123 (mono_debugger_check_runtime_version): Ditto.
3125 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
3126 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
3127 functions to these modules.
3129 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
3132 * marshal.c (mono_free_bstr): Fix a warning.
3134 * assembly.c (mono_assembly_open_full): Fix another small leak.
3136 * object.c: Fix some unload leaks in the remoting code.
3138 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
3141 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
3143 * reflection.c: Fix some unload leaks in dynamic assemblies.
3145 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
3147 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
3148 * marshal.h: Add BSTR support on Win32
3149 * icall.c: Add BSTR icalls
3150 * metadata.h: Add BSTR enums
3152 2006-04-28 Miguel de Icaza <miguel@novell.com>
3154 Work to catch the crash from #76795 and turn it into an
3155 exception. As I stubbed out pieces of the VisualBasic support,
3156 I found a number of places where the code was failing and I added
3157 checks to those places.
3159 * metadata.c (do_mono_metadata_parse_generic_class): Make this
3160 function return a status code. If we fail to parse the signature
3161 from mono_metadata_parse_generic_inst, return FALSE.
3163 * loader.c (mono_get_method_from_token): If we fail to load the
3164 method (mono_class_get) return NULL.
3166 * (method_from_memberref): Return NULL if we are unable to parse
3167 the method signature
3169 (mono_loader_error_prepare_exception): Since we now use the
3170 loader_error flag internally to stop processing, and obtaining
3171 exceptions that might be thrown will walk this code path the
3172 proper way of going from a MonoLoaderError into a
3173 MonoException was convoluted. This new routine encapsulates the
3174 process of turning the error into an exception and *clearing* the
3177 2006-04-27 Miguel de Icaza <miguel@novell.com>
3179 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
3180 with missing assemblies), and to cope with:
3182 * Missing fieldref from a non-existing assembly.
3183 * Missing methodref from a non-existing assembly.
3185 The first batch of work to address *some* of the issues from 76661.
3187 * object.c (mono_class_create_runtime_vtable): If we fail to
3188 initialize the class raise the exception here.
3190 * metadata.c (mono_class_get_overrides_full): If any methods fail
3191 to load return the failure to the caller.
3193 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
3194 flagging assemblies that failed to load.
3196 Do not crash if we are unable to load the assembly.
3198 (mono_assembly_close): Do nothing with REFERENCE_MISSING
3201 * loader.c (mono_loader_set_error_type_load): Change the
3202 convention to always pass unallocated strings, so we make our own
3203 copies (I know our own code had duplicated strings before, but
3204 this keeps the normal conventions).
3205 (method_from_memberref): Call mono_loader_set_error_method_load
3206 for all possible failures of loading the class.
3207 Remove assert, turn into a loader error.
3209 (mono_loader_error_to_exception): Move this routine from mini
3210 (mini_loader_error_to_exception) there was no need to have that in
3213 * class.c (mono_class_from_typeref): If we were not able to load
3214 the assembly with mono_assembly_load_reference, call the
3215 mono_loader_set_error_type_load to register the problem.
3217 (mono_class_setup_fields): If we fail to load the type from
3218 mono_metadata_parse_type_full, call mono_class_set_failure and
3219 break from the loop.
3221 If class->exception_type is set, we do not layout the fields as
3222 that might crash the runtime, and instead return (from breaking
3223 from the previous loop).
3225 (mono_class_setup_vtable): This now returns a boolean indicating
3226 whether the table was properly setup. The decision is driven by
3227 mono_class_get_overrides_full which might run into non-existing
3230 (mono_class_init): Returns TRUE on success or FALSE if there was a
3231 problem in loading the type (incorrect assemblies, missing
3232 assemblies, methods, etc).
3234 When we call mono_class_setup_fields we also check for a potential
3235 error inside this call (either a class exception or a general
3238 (mono_class_create_from_typedef): If the parent fails to load
3239 (calling mono_class_get_full) return NULL.
3243 calls to mono_metadata_parse_type_full should be checked
3244 everywhere and set the mono_class_set_failure
3245 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
3247 The current patch checks the places where my manually constructed
3248 tests show the errors are showing up, but we should do it
3253 mono_class_init return values should be tested everywhere, like
3254 the previous case this is something that we should audit
3255 everywhere and not only on the cases exposed by the tests I
3258 2006-04-26 Miguel de Icaza <miguel@novell.com>
3260 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
3261 boolean parameter and instead pass the information on `options'
3262 parameter (FileOptions).
3264 * icall.c: Register the new signature for MonoIO.Open.
3266 * debug-helpers.c (dis_one): Trying to understand how coverity
3267 works. Fix Run 5, item 78.
3269 2006-04-26 Dick Porter <dick@ximian.com>
3271 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
3274 2006-04-25 Martin Baulig <martin@ximian.com>
3276 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
3278 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
3279 debugger_thread_created().
3280 (debugger_gc_push_all_stacks): Don't handle the main thread in any
3282 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
3283 (mono_debugger_finalize_threads): New function; undo the effects
3284 of mono_debugger_init_threads().
3285 (mono_debugger_create_all_threads): Removed.
3287 2006-04-24 Zoltan Varga <vargaz@gmail.com>
3289 * image.c (mono_image_close): Tidy up trace messages.
3291 * assembly.c (mono_assembly_close): Ditto.
3293 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
3294 no longer references an already freed assembly. Fixes #78168.
3296 2006-04-21 Dick Porter <dick@ximian.com>
3298 * threads.c (mono_thread_detach): Fix reference counting when
3301 2006-04-21 Zoltan Varga <vargaz@gmail.com>
3303 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
3306 2006-04-19 Zoltan Varga <vargaz@gmail.com>
3308 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
3309 (mono_type_to_stind): Ditto.
3311 * marshal.c: Use the new helper functions to simplify code.
3313 * image.c (mono_image_close): Add some code for help debug assembly unloading
3316 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
3319 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
3320 assembly was already loaded in another appdomain. Fixes #78083.
3322 2006-04-13 Zoltan Varga <vargaz@gmail.com>
3324 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
3325 referenced assemblies.
3326 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
3328 * domain.c (mono_domain_free): Add a trace message.
3330 * appdomain.c (add_assemblies_to_domain): Ditto.
3332 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
3335 2006-04-12 Zoltan Varga <vargaz@gmail.com>
3337 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
3339 2006-04-12 Martin Baulig <martin@ximian.com>
3341 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
3342 `USE_INCLUDED_LIBGC'.
3344 2006-04-12 Zoltan Varga <vargaz@gmail.com>
3346 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
3347 the patch contains ../ and a small directory name later. Hopefully fixes
3350 2006-04-10 Martin Baulig <martin@ximian.com>
3352 Clean up the debugger's thread-handling code.
3354 The debugger's thread-handling code has been moved from
3355 ../mini/debug-debugger.c to threads.c. We now iterate directly
3356 over the `threads' hash, keep track of exiting threads and also
3359 We can now debug XSP and XSP based applications with the debugger.
3361 * object-internals.h (MonoThread): Added `gpointer end_stack'.
3364 (MonoThreadCallbacks): Removed; this was only used by the debugger.
3365 (mono_install_thread_callbacks): Likewise.
3367 * threads.c (mono_thread_callbacks): Removed.
3368 (debugger_thread_created, debugger_thread_exited): New static functions.
3369 (start_wrapper): Call debugger_thread_created().
3370 (thread_cleanup): Call debugger_thread_exited().
3371 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
3372 (mono_debugger_init_threads): New public function.
3373 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
3374 iterate directly over the `threads' hash and also use proper locking.
3376 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
3378 * mono-debug-debugger.h
3379 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
3381 2006-04-10 Zoltan Varga <vargaz@gmail.com>
3383 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
3384 argument type=array. Fixes #78057.
3386 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
3388 * culture-info-table.h : regenerated. Fixed bug #69652.
3390 2006-04-07 Zoltan Varga <vargaz@gmail.com>
3392 * loader.c metadata.c: Reapply a variant r59116.
3394 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
3396 * class.c (mono_class_setup_interface_offsets): New internal function.
3398 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
3399 interfaces too. Fixes #77398.
3401 * reflection.c (encode_cattr_value): Add support for
3402 parameter type=object, argument type=array.
3403 (load_cattr_value): Ditto. Fixes #77916.
3405 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
3406 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
3408 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
3409 a byval char array and CharSet is Ansi.
3411 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
3413 2006-04-06 Zoltan Varga <vargaz@gmail.com>
3415 * metadata.c: Add some locking comments.
3417 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
3419 (mono_metadata_free_method_signature): Don't free the signature itself.
3421 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
3423 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
3424 reference the same MonoImage.
3425 (mono_assembly_load_from_full): Add an assert.
3427 2006-04-05 Zoltan Varga <vargaz@gmail.com>
3429 * image.c (mono_image_close): Don't put the image we are about to free into the
3430 loaded_images_guid_hash.
3432 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
3433 to reduce code duplication.
3435 * marshal.c: Register the native functions called by this module as icalls, to
3436 somewhat centralize the creation of MonoMethodSignature's.
3438 * loader.c (mono_method_signature): Add a cache for method signatures.
3440 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
3441 the parameter attributes of a method.
3442 (mono_metadata_parse_method_signature_full): Refactored the computation of
3443 parameter attributes into a separate function. Also avoid one allocation in
3446 * assembly.c (mono_assembly_close): Ditto.
3448 * image.c (mono_image_close): Log trace messages with INFO level.
3450 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
3452 * image.c reflection.c: Correct reference counting of image modules.
3454 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
3455 of this function from the image mempool.
3457 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
3458 to allow more cached types to be used.
3460 * mono-debug.c (mono_debug_add_method): Appled patch from
3461 David S. Miller <davem@sunset.davemloft.net>: Access
3462 minfo->lexical_blocks[] entry elements using read32().
3464 2006-04-04 Zoltan Varga <vargaz@gmail.com>
3466 * loader.c (mono_free_method): No longer free the method header for non-dynamic
3467 methods as it is allocated from the mempool.
3469 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
3472 * metadata-internals.h: Add comments describing the reference counting scheme
3473 used for MonoImage and MonoAssembly.
3475 * image.c assembly.c reflection.c: Rework reference counting of images and
3476 assemblies so they are freed when the runtime is shut down. Free some
3477 additional memory structures when an image is unloaded.
3479 2006-04-03 Zoltan Varga <vargaz@gmail.com>
3481 * class.c loader.c reflection.c: Allocate more data structures in
3484 2006-03-31 Miguel de Icaza <miguel@novell.com>
3487 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
3488 build on pre glib 2.4 systems.
3490 2006-03-31 Zoltan Varga <vargaz@gmail.com>
3492 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
3494 * icall.c: Fix some warnings.
3496 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
3498 * culture-info-table.h : regenerated.
3500 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
3502 * threads.c, object-internals.h, verify.c: changed the culture caching
3503 code to use a normal MonoArray for storage so the GC can keep track of
3504 them easily. Fixed bits of the cache logic, too and simplified the
3507 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
3509 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
3510 thread for non-Boehm GCs.
3512 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
3514 * domain.c, object.c, domain-internals.h: reduce the amount of memory
3515 needed to keep track of the data for static fields.
3517 2006-03-29 Raja R Harinath <rharinath@novell.com>
3520 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
3521 for interface classes. Use 'num_methods' instead.
3522 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
3523 before using '->vtable_size' field.
3525 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
3527 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
3528 doesn't contain managed pointers, so use a normal hashtable.
3530 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
3532 * reflection.c, class-internals.h, domain.c: fixed handling of types
3533 used as values for objects in custom attributes (bug #77915):
3535 2006-03-24 Martin Baulig <martin@ximian.com>
3537 * class.c (mono_class_setup_fields): Added support for generic
3538 instances; fixes #77580.
3540 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3542 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
3544 2006-03-24 Dick Porter <dick@ximian.com>
3546 * file-io.c (get_file_attributes): More stat macro breakage.
3549 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
3551 * profiler.c: added the file=filename option in the default profiler
3552 to output the profile data to filename.
3554 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3556 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
3559 2006-03-22 Martin Baulig <martin@ximian.com>
3561 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
3562 allocated `MonoClassField *' in `fb->handle'.
3564 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3566 * class.c, image.c, metadata-internals.h: implemented new mechanism to
3567 allocate interface ID to save memory and allow better ID reuse on
3568 appdomain unload. setup_generic_vtable () removal from Martin.
3570 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
3572 * object.h, appdomain.c, domain.c, exception.c, icall.c,
3573 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
3574 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
3575 write barriers for reference stores with managed objects accessed with
3576 C structures in the runtime and in embedding programs.
3578 2006-03-20 Raja R Harinath <rharinath@novell.com>
3580 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
3581 'interface_id' and 'max_interface_id' fields of MonoClasses
3582 representing open generic types.
3584 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
3586 * object.h, object.c, icall.c: added functions to deal with
3587 storing valuetypes that contain references in managed objects.
3588 * reflection.c, string-icalls.c, threads.c, marshal.c: small
3589 fixes and comments around uses of mono_array_addr ().
3591 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
3593 * object.h, icall.c, monitor.c: object.GetHashCode ()
3594 implementation that supports the moving garbage collector.
3596 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
3598 * icall.c, threads-types.h, threads.c: implemented finalizer for
3601 2006-03-15 Zoltan Varga <vargaz@gmail.com>
3603 * metadata.c (mono_type_size): Add a fixme.
3604 (mono_type_stack_size): Ditto.
3606 * object-internals.h (MonoReflectionAssemblyBuilder): Added
3607 'type_forwarders' field.
3609 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
3610 attribute from net 2.0.
3612 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
3615 * class.c (mono_class_setup_fields): Fix a warning.
3617 * class.c (mono_class_from_name): Add support for assemblyref entries
3618 in the EXPORTEDTYPE table.
3620 * reflection.c: Add support for handling type forwarders under net 2.0.
3622 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3624 2006-03-14 Zoltan Varga <vargaz@gmail.com>
3626 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
3627 overwriting entries in ModuleBuild->types, also clean up the code
3628 a little. Fixes #77774.
3630 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
3632 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
3633 load friend assembly info when present.
3635 2006-03-14 Raja R Harinath <rharinath@novell.com>
3637 Fix crasher on gtest-158.cs.
3638 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
3639 the return value if the MonoClass we want is yet in an
3641 * class.c (mono_class_create_from_typedef): Add an comment
3642 explaining an order dependency between mono_class_setup_parent and
3643 mono_class_setup_mono_type.
3645 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
3647 * class.c: documentation updates and events bug fix.
3649 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
3651 * class.c: some cleanup, locking fixes.
3653 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3655 * class.c: fix the generics code to setup nested
3656 type info to the instantiated type (bug #77770).
3658 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
3660 * marshal.c: fixed a few type correctness issues.
3662 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3664 * loader.c: the Set/Get/Addrtess array methods should be public.
3666 2006-03-11 Zoltan Varga <vargaz@gmail.com>
3668 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
3670 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
3673 2006-03-10 Zoltan Varga <vargaz@gmail.com>
3675 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
3677 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
3679 * mempool.c (mono_mempool_alloc): Speed this up a bit.
3680 (mono_mempool_alloc0): Ditto.
3682 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3685 (create_object_from_sockaddr): it was allocating 4 extra bytes
3686 for the AF_UNIX data. Fixes bug #77747.
3688 2006-03-09 Zoltan Varga <vargaz@gmail.com>
3690 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
3692 2006-03-09 Dick Porter <dick@ximian.com>
3694 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
3695 Fixes bug 76966 again.
3697 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
3699 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
3701 * appdomain.c: Bumped corlib version to 48 (due to r57532)
3703 2006-03-07 Martin Baulig <martin@ximian.com>
3706 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
3708 2006-03-07 Martin Baulig <martin@ximian.com>
3711 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
3712 regression introduced in r56970; see gtest-252.cs.
3714 * loader.c (mono_get_method_constrained): Correctly handle generic
3715 methods; see gtest-253.cs.
3717 2006-03-04 Zoltan Varga <vargaz@gmail.com>
3719 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
3721 2006-03-04 Martin Baulig <martin@ximian.com>
3723 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
3724 compute the parent type at runtime, just like we're already doing
3728 (mono_reflection_bind_generic_parameters): Don't compute the
3729 parent type anymore.
3731 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
3733 2006-03-04 Martin Baulig <martin@ximian.com>
3735 * mono-debug-debugger.h
3736 (mono_debugger_create_notification_function): Allocate memory at
3737 runtime and return a pointer to it.
3739 2006-03-03 Zoltan Varga <vargaz@gmail.com>
3741 * assembly.c: Fix windows build.
3743 * assembly.c: Fix build.
3745 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
3747 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
3749 2006-03-03 Dick Porter <dick@ximian.com>
3752 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
3753 Check parameters before dereferencing them. Fixes Aaron's part of
3756 2006-03-03 Raja R Harinath <rharinath@novell.com>
3758 Fix performance regression.
3759 * loader.c (find_method_in_class): Add 'from_class' argument.
3760 Rename 'klass' argument to 'in_class'. The signature is compared
3761 against the method in 'in_class', and the corresponding method is
3762 returned from 'from_class'.
3763 (find_method): Walk both 'in_class' and 'from_class' in parallel.
3764 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
3765 type definition and generic instantiation in parallel.
3766 (mono_get_method_constrained): Update to changes.
3768 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
3770 * threads.c: make sure the domain is correct, too when doing
3771 mono_thread_attach ().
3773 2006-03-01 Zoltan Varga <vargaz@gmail.com>
3775 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
3776 windows. Fixes #77683.
3778 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
3780 * object.h, *: introduced specific way to set elements of an array
3781 of references to be used as write barrier. Still need to audit the
3782 uses of mono_array_addr.
3784 2006-03-01 Miguel de Icaza <miguel@novell.com>
3786 * object-internals.h: New field to cache the assmebly name, patch
3787 from Tambet Ingo (tambet@ximian.com)
3789 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
3791 * decimal.h, class-internals.h, metadata-internals.h,
3792 file-io.h: mark a few function declarations as internal, to
3793 reduce the number of PLT entries.
3795 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3797 * file-io.c: fix typo in warning message.
3799 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
3801 * loader.c: on unix, lookup the "*A" version of a function
3802 if charset is auto as a second option before failing.
3804 2006-02-28 Raja R Harinath <rharinath@novell.com>
3806 * class.h (mono_class_inflate_generic_method): Revert to two
3808 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
3809 (mono_class_inflate_generic_method_full): Add.
3810 * class.c (mono_class_inflate_generic_method_full): Rename from
3811 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
3812 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
3813 * loader.c, reflection.c: Update to changes.
3815 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
3817 * icall.c: const fixes and small improvements.
3819 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3821 * threadpool.c: for asynchronous connect(), enable the same workaround
3822 for BSD 6 as for the Mac. Fixes bug #77637.
3824 2006-02-24 Zoltan Varga <vargaz@gmail.com>
3826 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
3827 formatted classes. Fixes #77524.
3829 2006-02-24 Raja R Harinath <rharinath@novell.com>
3831 * class.c (inflate_generic_type): Add a couple more
3832 micro-optimizations.
3833 (inflate_generic_context): Don't use the 'gmethod' from
3835 (mono_class_inflate_generic_method): If the method has generic
3836 parameters, but the passed-in context doesn't have a 'gmethod',
3837 create one. Use the possibly simplified generic instantiation
3838 from the declaring class instead of the one passed in.
3840 2006-02-24 Raja R Harinath <harinath@gmail.com>
3842 Make generic method signature and method header handling lazy.
3843 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
3844 (inflate_generic_header): Likewise.
3845 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
3846 parameter to avoid inflating types.
3847 (mono_get_inflated_method): Empty out.
3848 * class.h (mono_class_inflate_generic_method): Update to changes.
3849 * loader.c (mono_get_method_from_token): Don't parse signature for
3850 generic methods, nor methods of generic classes.
3851 (mono_method_signature): Rename from 'mono_method_signature'.
3852 Inflate signature on demand.
3853 (mono_method_get_header): Inflate method header on demand.
3854 * reflection.c: Update to changes.
3856 2006-02-23 Raja R Harinath <rharinath@novell.com>
3858 * metadata.c (mono_metadata_inflate_generic_inst): If the
3859 instantiation is closed, don't bother expanding it in the new
3861 * class.c (inflate_generic_class): If the generic instantiation
3862 doesn't change after inflation, return the argument itself.
3863 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
3865 (inflate_generic_context): If neither the generic class nor the
3866 generic method instantiations change, return the original context.
3867 * reflection.c (mono_method_get_object): Do
3868 'mono_get_inflated_method' before accessing the ->klass field.
3869 (inflate_mono_method): Don't create a MonoGenericMethod unless
3871 (inflate_method): Don't pass a constructed type as the declaring
3872 type of a methodbuilder.
3874 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
3876 * object.c: fix memory overwrite.
3878 2006-02-22 Dick Porter <dick@ximian.com>
3880 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
3881 it doesn't work any more.
3882 (mono_threads_request_thread_dump): Fix unused variable warnings.
3884 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3886 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
3887 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
3888 the public header file.
3890 2006-02-21 Zoltan Varga <vargaz@gmail.com>
3892 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
3894 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
3896 * class-internals.h, object.c: reduce the size of MonoVTable
3897 and store the interface_offsets array at negative offsets.
3899 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
3901 * metadata.c: tweak table descriptors data structures to reduce
3902 size and runtime relocations.
3904 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3906 * marshal.c: fix some types and opcodes to be type-safe
3907 in marshaling wrappers.
3909 2006-02-21 Ankit Jain <jankit@novell.com>
3911 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
3913 2006-02-21 Raja R Harinath <rharinath@novell.com>
3915 * metadata.c (get_constraints): Relax debugging checks for monodis.
3917 2006-02-21 Ankit Jain <jankit@novell.com>
3919 * metadata.c (mono_metadata_load_generic_params): Move the code
3920 checking for ambiguous generic params from here to mono/dis/get.c
3921 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
3923 2006-02-21 Raja R Harinath <harinath@gmail.com>
3925 Fix assertion triggered when compiling nemerle.
3926 * class.c (mono_get_shared_generic_inst): Rename from
3927 get_shared_inst and make non-static.
3928 * loader.c (mono_get_shared_generic_method): New. Used to create
3929 the MonoGenericContext-equivalent of a MonoGenericContainer.
3930 (mono_get_method_from_token): Initialize the 'context' field of
3931 the created MonoGenericContainer.
3932 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
3933 * metadata.c (get_constraints): Add sanity check.
3934 * class-internals.h: Add new internal methods.
3936 * reflection.c (verify_safe_for_managed_space): New sanity check.
3937 Currently checks that owner-less generic parameters aren't allowed
3939 (mono_type_get_object): Use it.
3940 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
3941 that are now in mono_type_get_object.
3942 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
3944 2006-02-19 Raja R Harinath <harinath@gmail.com>
3946 * metadata.c (mono_type_create_from_typespec): Rename from
3947 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
3948 argument and caching of types in the generic container.
3949 (unwrap_arrays, find_generic_param): Remove.
3950 * metadata-internals.h: Update.
3951 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
3953 2006-02-18 Zoltan Varga <vargaz@gmail.com>
3955 * class.c (mono_class_get_exception_for_failure): Fix a warning.
3957 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
3958 return values. Fixes #77581.
3960 * class.c (mono_fnptr_class_get): Switch name and name_space.
3962 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
3963 classes and add support for [In, Out] attributes.
3964 (mono_marshal_free_asany): Ditto. Fixes #77524.
3966 2006-02-18 Raja R Harinath <harinath@gmail.com>
3968 * class.c (mono_class_from_generic_parameter): Make more robust to
3969 incomplete MonoGenericContainers from monodis.
3971 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3973 * class-internals.h: added some more exception types.
3974 * class.c, metadata.c: added a few checks to handle missing
3977 2006-02-17 Raja R Harinath <rharinath@novell.com>
3979 Use owner-less generic-params some more.
3980 * class.c (my_mono_class_from_generic_parameter): Remove.
3981 (mono_class_from_generic_parameter): Handle null image,
3982 param->name and param->owner.
3983 (mono_class_from_mono_type): Update.
3984 (mono_class_create_from_typespec): Remove 'container' parameter.
3985 If that parameter is non-null, the result is always inflated by
3986 'mono_class_get_full' anyway.
3987 (mono_class_get): Rename from _mono_class_get. Remove 'container'
3989 (mono_class_get_full): Update.
3991 * class.c (inflate_generic_type) [GENERICINST]: If the generic
3992 instance is not open, don't bother inflating.
3993 (mono_class_setup_fields): Hoist some loop-invariants. Don't
3994 parse metadata for inflated classes.
3995 (_mono_class_get): Change GenericContext* parameter to
3997 (mono_class_create_from_typespec): Likewise. Simplify, and
3998 implement trivially. All the cases are handled in
3999 mono_class_from_mono_type. Don't inflate returned class.
4000 (mono_class_get_full): Delegate GENERICINST optimization to
4001 inflate_generic_type.
4002 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
4004 2006-02-16 Dick Porter <dick@ximian.com>
4006 * socket-io.c (create_object_from_sockaddr): Fix typo.
4007 (create_sockaddr_from_object): Check array lengths before
4008 potentially accessing items off the end.
4009 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
4010 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
4011 (ves_icall_System_Net_Sockets_Socket_Send_internal)
4012 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
4013 length checks to avoid wraparound overflows.
4014 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
4015 contents of the array of sockets
4016 (hostent_to_IPHostEntry2)
4017 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
4018 Check return value of inet_ntop ().
4019 (addrinfo_to_IPHostEntry): Fix typo
4021 2006-02-16 Raja R Harinath <rharinath@novell.com>
4023 Type metadata parsing doesn't use generic-instantiation information.
4024 * metadata.c (mono_metadata_parse_array_full): Change
4025 MonoGenericContext* parameter to MonoGenericContainer*.
4026 (mono_metadata_parse_type_full): Likewise.
4027 (mono_type_create_from_typespec_full): Likewise.
4028 (mono_metadata_parse_mh_full): Likewise.
4029 (mono_metadata_parse_generic_inst): Likewise.
4030 (do_mono_metadata_parse_generic_class): Likewise.
4031 (do_mono_metadata_parse_type): Likewise.
4032 * metadata-internals.h: Update to changes.
4033 * class.c (mono_class_find_enum_basetype): Likewise.
4034 (mono_class_setup_fields): Likewise.
4035 (mono_class_create_from_typespec): Likewise.
4036 * loader.c (method_from_methodspec): Likewise.
4037 (mono_get_method_from_token): Likewise.
4038 (mono_method_get_header): Likewise.
4040 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4042 * marshal.c: handle additional GENERICINST case (patch from
4043 Thong Nguyen <tum@veridicus.com>).
4044 Fix a few cases where LDIND_I/STIND_I was used for references.
4046 2006-02-16 Raja R Harinath <rharinath@novell.com>
4048 * reflection.c (mono_reflection_get_token): Remove unused variable.
4050 2006-02-16 Martin Baulig <martin@ximian.com>
4052 * reflection.c (mono_reflection_get_token): Add support for fields
4053 in instantiated generic types.
4056 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
4058 2006-02-15 Martin Baulig <martin@ximian.com>
4061 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
4062 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
4063 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
4064 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
4066 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
4068 * class.c, metadata.c, metadata.h, object.c, icall.c,
4069 marshal.c: changed mono_type_get_underlying_type () to do
4070 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
4071 Fixed handling of instantiated generic valuetypes (bug #75479).
4073 2006-02-15 Raja R Harinath <rharinath@novell.com>
4075 * metadata.c (mono_metadata_decode_signed_value): Simplify.
4076 Delegate to mono_metadata_decode_value, and work on the returned value.
4078 * icall.c (ves_icall_MonoType_GetGenericArguments):
4079 Add consistency check here too.
4081 2006-02-15 Ankit Jain <jankit@novell.com>
4083 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
4086 2006-02-15 Ankit Jain <jankit@novell.com>
4088 * metadata.c (mono_metadata_decode_signed_value): New function to decode
4089 signed values, used only for representing lower bounds of arrays.
4090 (mono_metadata_parse_array_full): Use new
4091 mono_metadata_decode_signed_value to decode lower bounds.
4093 2006-02-14 Martin Baulig <martin@ximian.com>
4096 (mono_reflection_get_token): Support "MonoGenericMethod" and
4097 "MonoGenericCMethod" and allow generic instances / methods.
4099 2006-02-11 Zoltan Varga <vargaz@gmail.com>
4101 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
4102 to obtain the terminal size using an ioctl.
4104 * object.c (mono_nullable_init): Revert this as nullable reference
4105 types are not valid.
4106 (mono_nullable_box): Ditto.
4108 2006-02-09 Dick Porter <dick@ximian.com>
4110 * threads.c (mono_thread_detach): Drop a reference to the thread
4113 2006-02-09 Zoltan Varga <vargaz@gmail.com>
4115 * object.c (mono_nullable_init): Handle nullable reference types.
4116 (mono_nullable_box): Ditto. Fixes #77446.
4118 2006-02-07 Martin Baulig <martin@ximian.com>
4120 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
4122 2006-02-07 Ankit Jain <jankit@novell.com>
4124 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
4125 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
4126 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
4127 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
4128 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
4129 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
4131 2006-02-02 Zoltan Varga <vargaz@gmail.com>
4133 * class.c (mono_class_create_generic): Set type_token as well.
4135 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
4138 2006-02-02 Martin Baulig <martin@ximian.com>
4140 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
4141 has never been used so far.
4143 2006-02-02 Martin Baulig <martin@ximian.com>
4145 * mono-debug-debugger.h: Changed comment at the top of this file;
4146 the header is not installed, but it's safe to #include it from
4149 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
4150 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
4152 2006-02-02 Martin Baulig <martin@ximian.com>
4155 (MonoSymbolTable): Removed the `metadata_info' field.
4158 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
4160 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
4161 (mono_debugger_add_builtin_types): Removed.
4162 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
4163 (mono_debugger_create_notification_function): We now operate on a
4164 pre-allocated area; take a `gpointer' and return `void'.
4166 * mono-debug-debugger.c
4167 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
4168 (mono_debugger_add_builtin_types): Removed.
4170 2006-02-02 Martin Baulig <martin@ximian.com>
4172 * threads.c (mono_debugger_create_all_threads): New public method.
4174 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4176 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
4177 breaks on several platforms.
4179 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
4181 * assembly.c: the VS.NET build doesn't supply default values for
4182 MONO_ASSEMBLIES and MONO_CFG_DIR.
4184 2006-02-01 Zoltan Varga <vargaz@gmail.com>
4186 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
4189 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
4191 * loader.c (method_from_memberref): Fix a warning.
4193 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
4195 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
4196 with explicit layout. Fixes #77433.
4198 2006-01-31 Zoltan Varga <vargaz@gmail.com>
4200 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
4201 max_interface_id is initialized before using it. Fixes #77398.
4202 (ves_icall_Type_GetInterfaces): Ditto.
4204 2006-01-30 Raja R Harinath <rharinath@novell.com>
4206 * metadata.c (mono_metadata_parse_method_signature_full): Don't
4207 allocate memory for parameter attributes when parsing memberref
4209 * loader.c (mono_loader_set_error_method_load): Don't warn.
4210 (method_from_memberref): Ensure MissingMethodException gets thrown
4211 if method is not found. Make warning more informative.
4213 2006-01-29 Raja R Harinath <harinath@gmail.com>
4216 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
4217 return true if is byref.
4218 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
4219 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
4220 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
4222 2006-01-27 Raja R Harinath <rharinath@novell.com>
4224 Fix tests/find-method.2.il
4225 * loader.c (find_method, find_method_in_class): Remove is_inflated
4226 argument. Revert 2006-01-18 change.
4227 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
4228 is generic, search for method in its generic definition.
4229 * class.c (mono_class_setup_vtable_general): Print generic
4230 arguments of generic types in debugging printf.
4232 2006-01-26 Zoltan Varga <vargaz@gmail.com>
4234 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
4236 * threads.c (mono_threads_request_thread_dump): New helper function.
4238 2006-01-25 Raja R Harinath <rharinath@novell.com>
4240 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
4242 2006-01-25 Ankit Jain <jankit@novell.com>
4244 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
4245 move definition to ..
4246 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
4248 2006-01-25 Ankit Jain <jankit@novell.com>
4249 Raja R Harinath <rharinath@novell.com>
4251 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
4252 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
4255 2006-01-25 Martin Baulig <martin@ximian.com>
4257 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
4258 `MonoDebuggerThread' into debug-debugger.c.
4260 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4262 * profiler.c: fix printing of data.
4264 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
4266 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
4267 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
4269 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4271 * object.c: fix deadlock related to string interning.
4273 2006-01-23 Martin Baulig <martin@ximian.com>
4275 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
4277 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
4279 2006-01-23 Martin Baulig <martin@ximian.com>
4281 * mono-debug.h: Moved the prototypes of some functions which are
4282 used by the JIT here from mono-debug-debugger.h.
4284 2006-01-21 Martin Baulig <martin@ximian.com>
4286 * Makefile.am: Don't install mono-debug-debugger.h.
4288 2006-01-21 Martin Baulig <martin@ximian.com>
4290 * mono-debug-debugger.h: Enforce the private status of this header
4291 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
4292 Moved some stuff from mono-debugger-jit-wrapper.h here.
4294 2006-01-20 Raja R Harinath <rharinath@novell.com>
4296 * class.c (mono_class_from_typeref): Add a sanity test to help
4297 catch lack of assembly load/search hooks.
4299 2006-01-19 Zoltan Varga <vargaz@gmail.com>
4301 * marshal.c (emit_struct_conv): Relax the fields with same offset
4302 check even more. Fixes #77230.
4304 2006-01-18 Martin Baulig <martin@ximian.com>
4306 * loader.c (find_method_in_class): Added `gboolean is_inflated'
4307 argument; if false, we compare the uninstantiated signatures.
4308 (method_from_memberref): Compare the uninstantiated signatures;
4311 2006-01-18 Robert Jordan <robertj@gmx.net>
4313 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
4314 Clear the weak link. Fixes bug #77170.
4316 * gc.c (mono_gchandle_free):
4317 Reflect *-gc.c changes (tiny optimization).
4319 2006-01-18 Zoltan Varga <vargaz@gmail.com>
4321 * metadata.c (mono_metadata_signature_dup): Applied patch from
4322 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
4325 2006-01-17 Zoltan Varga <vargaz@gmail.com>
4327 * marshal.c (emit_struct_conv): Allow fields with the same offset when
4328 marshalling from native to managed code. Fixes #77230.
4330 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4332 * threadpool.c: fix problem (Mac only) when more than one asynchronous
4333 connect. Fixes bug #77020.
4335 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4337 * class.c: fixed id assignement for nested interfaces (bug #77275).
4338 Added also better info for --print-vtable debugging.
4340 2006-01-12 Martin Baulig <martin@ximian.com>
4342 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
4343 interfaces on-the-fly; fixes #76625.
4346 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
4347 don't need that anymore.
4349 2006-01-12 Miguel de Icaza <miguel@novell.com>
4352 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
4353 To avoid initing the nested_classes when not needed I turned the
4354 PeerCredData as a toplevel internal class, as it has to be shared
4357 Fixes the CASA issue.
4359 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
4361 * domain.c: Accessors for MonoJitInfo
4363 * profiler-private.h: Add jitinfo to the end jit hook
4365 * profiler.[ch]: Define new hooks, called after jitting which give
4366 the MonoJitInfo that was compiled
4368 2006-01-10 Martin Baulig <martin@ximian.com>
4370 * class.c (mono_class_setup_events): Add support for generic
4371 classes; fixes #76440.
4373 2006-01-06 Raja R Harinath <rharinath@novell.com>
4376 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
4377 on passed-in method.
4379 2006-01-03 Zoltan Varga <vargaz@gmail.com>
4381 * object.c (mono_runtime_invoke_array): Add Nullable support.
4383 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
4385 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
4387 * file-io.c: Don't consider sockets as directory and avoid an endless
4388 loop. Fix bug #76966.
4390 2006-01-03 Zoltan Varga <vargaz@gmail.com>
4392 * object.c (mono_nullable_init): New helper function.
4393 (mono_nullable_box): Ditto.
4395 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
4397 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
4399 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
4401 2006-01-02 Zoltan Varga <vargaz@gmail.com>
4403 * class.c (mono_class_is_assignable_from): Make T assignable to
4406 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
4408 * appdomain.c: Bump corlib version to 46.
4409 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
4410 serialization purpose) and changed ves_icall_System_Reflection_
4411 Assembly_get_code_base signature to accept a boolean (to escape, or
4412 not, the assembly code base).
4414 2005-12-23 Dick Porter <dick@ximian.com>
4418 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
4419 CreateEvent icall now returns "created" boolean parameter.
4421 2005-12-22 Zoltan Varga <vargaz@gmail.com>
4423 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
4426 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
4427 when attr_klass is an interface. Fixes #77045.
4429 2005-12-20 Zoltan Varga <vargaz@gmail.com>
4431 * marshal.c (emit_struct_conv): Fix previous patch.
4433 * marshal.c (emit_struct_conv): Add a check for fields with the same
4436 2005-12-20 Raja R Harinath <rharinath@novell.com>
4438 Fix regression in Mono.C5.
4439 * class.c (mono_class_create_generic): If 'klass' is an interface
4440 set up the interface offsets.
4441 (mono_class_is_assignable_from): Don't throw away generic arguments.
4443 2005-12-19 Raja R Harinath <rharinath@novell.com>
4445 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
4448 2005-12-15 Raja R Harinath <rharinath@novell.com>
4450 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
4452 (do_mono_metadata_parse_generic_class): Don't pass the current
4453 generic context when parsing the type being instantiated: it
4454 cannot use it, anyway.
4456 * loader.c (method_from_memberref): Don't inflate a signature if
4457 it doesn't contain any type parameters.
4459 2005-12-15 Zoltan Varga <vargaz@gmail.com>
4461 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
4463 2005-12-14 Martin Baulig <martin@ximian.com>
4466 (mono_type_get_name_recurse): Don't return null for type
4467 parameters and open generic classes.
4468 (mono_class_setup_methods): Don't exclude generic instances.
4469 (mono_get_unique_iid): Use different IDs for different
4470 instantiations of the same generic type.
4471 (mono_class_setup_vtable): Only use setup_generic_vtable() for
4472 open generic instances; create a normal vtable for closed generic
4474 (mono_class_setup_vtable_general): We're now also called for
4475 closed generic instances.
4478 (mono_reflection_bind_generic_parameters): Correctly use
4479 mono_metadata_lookup_generic_inst() everywhere.
4481 2005-12-14 Zoltan Varga <vargaz@gmail.com>
4483 * object.c (mono_class_create_runtime_vtable): Call
4484 mono_class_setup_vtable ().
4486 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
4488 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
4491 * loader.c (mono_loader_set_error_type_load): Print the type load
4492 warnings to the console so they are more visible to the user.
4493 (mono_loader_set_error_method_load): Ditto.
4495 * reflection.c (ensure_runtime_vtable): Revert the last change as it
4498 * reflection.c (ensure_runtime_vtable): Fix build.
4500 * reflection.c (ensure_runtime_vtable): Disable an optimization which
4501 doesn't work in all cases.
4503 2005-12-13 Zoltan Varga <vargaz@gmail.com>
4505 * object.c (mono_array_new_full): Treat a single dimensional array
4506 with 0 lower bounds as an szarray. Fixes #76973.
4508 * reflection.c (custom_attr_visible): Really fix this.
4510 2005-12-12 Zoltan Varga <vargaz@gmail.com>
4512 * reflection.c (custom_attr_visible): Allow nested public attributes
4515 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
4518 2005-12-12 Raja R Harinath <harinath@gmail.com>
4520 * class.c (set_generic_param_owner): Delete.
4521 (mono_class_create_from_typedef): Don't set ->owner field of
4522 generic parameters to "param containers" of enclosing classes.
4523 * reflection.c (mono_reflection_initialize_generic_parameter):
4526 2005-12-11 Zoltan Varga <vargaz@gmail.com>
4528 * reflection.c (custom_attr_visible): Fix build.
4530 2005-12-10 Zoltan Varga <vargaz@gmail.com>
4532 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
4535 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
4536 handling of null parameter defaults.
4538 2005-12-09 Raja R Harinath <rharinath@novell.com>
4540 * class.c (mono_class_from_generic_parameter): Don't set
4541 klass->generic_container.
4542 (my_mono_class_from_generic_parameter): Likewise.
4544 2005-12-07 Zoltan Varga <vargaz@gmail.com>
4546 * reflection.c (load_public_key): Fix a warning.
4547 (method_encode_code): Fix unaligned accesses.
4549 2005-12-07 Martin Baulig <martin@ximian.com>
4551 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
4554 (write_generic_param_entry): Encode our custom attrs.
4556 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
4558 2005-12-07 Martin Baulig <martin@ximian.com>
4560 * reflection.c (encode_new_constraint): Removed; we don't use the
4561 `NewConstraintAttribute' anymore.
4563 2005-12-06 Zoltan Varga <vargaz@gmail.com>
4565 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
4566 not fire a TypeResolve event when Assembly.GetType () is called.
4568 2005-12-05 Ben Maurer <bmaurer@ximian.com>
4570 Beginning of support for nullable types in the runtime. Parts of
4571 this patch are from Martin.
4573 * appdomain.c (MONO_CORLIB_VERSION): Bump
4575 * domain.c (mono_init_internal): get the nullable type
4577 * class.c (mono_class_is_nullable): New method
4578 (mono_class_get_nullable_param): New mehod
4579 (mono_class_create_generic): In types T? set cast_class to T
4581 * class-internals.h (MonoDefaults): new nullable default class
4582 (mono_class_get_nullable_param, mono_class_get_nullable_param):
4585 2005-12-05 Raja R Harinath <rharinath@novell.com>
4587 * metadata.c (select_container): New. Refactor code to select the
4588 appropriate GenericContainer given the type of generic parameter
4590 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
4591 not a MonoGenericContext. Use select_container. Update parameters.
4592 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
4594 (unwrap_arrays): Remove duplicate tests.
4595 (find_generic_param): Rename from 'has_same_context'. Now walks a
4596 generic instantiated class to find any arguments that are generic
4598 (mono_type_create_from_typespec_full): Use find_generic_param to
4599 avoid evicting some generic instantiations from the typespec
4602 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
4604 * reflection.c: fixed writing of doubles on ARM FPA.
4606 2005-12-02 Robert Jordan <robertj@gmx.net>
4608 * icall.c: Fixed EventInfo.ReflectedType (#76829).
4610 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4612 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
4613 least on SUSE 10 they are not the same (on debian, they are just the
4616 2005-12-01 Raja R Harinath <rharinath@novell.com>
4618 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
4619 DeclaringType for VARs and MVARs.
4620 * class.c (set_generic_param_owner): Fix initialization of owner
4623 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
4625 * icall.c: fixed Enum.ToObject() to correctly convert the values.
4627 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4629 * threadpool.c: workaround for a bug that shows up on the Mac:
4630 select()+connect() on a blocking socket is not like it should
4631 be, so we proceed to connect() in that case, wasting the I/O
4632 threadpool thread until connect succeedes. Fixes bug #75436.
4634 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4636 * threadpool.c: fix typo when setting file descriptor states.
4638 2005-11-28 Raja R Harinath <rharinath@novell.com>
4640 * class-internals.h (MonoGenericContainer.is_signature): Remove.
4641 * metadata.c (mono_metadata_parse_method_signature_full): Don't
4642 create a temporary signature container.
4643 (mono_metadata_parse_generic_param): Update to changes.
4644 (mono_type_create_from_typespec_full): Update to changes.
4645 * loader.c (method_from_memberref): Don't use a
4646 MonoGenericContainer while parsing a memberref signature.
4647 (method_from_methodspec): Remove dead-store of the 'container'
4648 variable. It's overwritten before use.
4650 * metadata.c (mono_type_create_from_typespec_full): Make debugging
4652 (mono_metadata_parse_generic_param): Likewise.
4653 * loader.c (find_method_in_class): Does not need a
4654 MonoGenericContainer. Use 'mono_method_signature' rather than
4655 'mono_method_signature_full'.
4656 (find_method, mono_get_method_constrained, method_from_memberref):
4659 * metadata.c (mono_type_create_from_typespec_full): Ensure that
4660 owner-less generic-parameters are never evicted from the typespec
4663 * loader.c (method_from_memberref): Don't use the current context
4664 when parsing signatures.
4665 (method_from_methodspec, mono_get_method_from_token): Update to changes.
4667 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
4668 side-effects in g_assert.
4669 * loader.c (mono_get_method_from_token): Resolve klass earlier so
4670 that we don't potentially lose information.
4672 2005-11-26 Dick Porter <dick@ximian.com>
4675 * threads.c: icalls to implement basic (ie, not named)
4676 System.Threading.Semaphore.
4678 2005-11-24 Dick Porter <dick@ximian.com>
4681 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
4682 Use GetProcessId() if it's available.
4684 2005-11-23 Zoltan Varga <vargaz@gmail.com>
4686 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
4688 2005-11-23 Raja R Harinath <rharinath@novell.com>
4689 Ankit Jain <jankit@novell.com>
4691 * loader.c (mono_get_method_from_token): Initialize 'method' field
4692 of all generic parameters before parsing the signature. Remove
4693 code that "fixed"-up MVAR references.
4695 2005-11-23 Ankit Jain <jankit@novell.com>
4697 * metadata.c (mono_metadata_has_generic_params):
4698 (mono_metadata_load_generic_param_constraints):
4699 (mono_metadata_load_generic_params): Move duplicate code ...
4700 (mono_metadata_get_generic_param_row): ... here. Returns the
4701 first row-id in GenericParam table for a given owner (token).
4702 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
4705 2005-11-23 Raja R Harinath <rharinath@novell.com>
4706 Ankit Jain <jankit@novell.com>
4708 * metadata.c (mono_metadata_class_equal): Pass signature_only when
4710 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
4711 type->data.generic_param only if the type is an MVAR.
4712 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
4713 leak owner-less VARs and MVARs into managed space.
4715 2005-11-21 Martin Baulig <martin@ximian.com>
4718 (MonoMethod): Moved the `generic_container' here from
4719 `MonoMethodNormal' since we now also need it for
4720 `MonoMethodPInvoke';
4721 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
4722 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
4723 an union containing both `MonoMethodNormal' and
4724 `MonoMethodPInvoke'.
4727 (mono_get_method_from_token): Allow implementing generic methods
4731 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
4734 2005-11-17 Dick Porter <dick@ximian.com>
4738 * process.c: Split the Process Start_internal icall into
4739 ShellExecuteEx_internal and CreateProcess_internal, which are
4740 called depending on whether UseShellExecute is true. Fixes bug
4743 * appdomain.c (MONO_CORLIB_VERSION): Incremented
4745 2005-11-17 Zoltan Varga <vargaz@gmail.com>
4747 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
4748 'msize' parameters, use the information in 'mspec' instead.
4749 (emit_object_to_ptr_conv): Ditto.
4751 * marshal.c (emit_struct_conv): Handle explicit layout structs with
4752 fields out of order. Fixes #76733.
4754 2005-11-17 Ankit Jain <jankit@novell.com>
4756 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
4758 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
4760 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
4763 2005-11-16 Zoltan Varga <vargaz@gmail.com>
4765 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
4766 for types with non-auto layout. Fixes #76717.
4768 2005-11-16 Ankit Jain <jankit@novell.com>
4770 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
4771 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
4772 if generic_context is null.
4773 (mono_metadata_generic_param_equal): param->owner can be null.
4774 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
4777 2005-11-16 Zoltan Varga <vargaz@gmail.com>
4779 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
4782 2005-11-15 Martin Baulig <martin@ximian.com>
4784 * object.c (set_value): Use mono_class_from_mono_type() instead of
4785 the hack for generic instances; fixes #76136.
4787 2005-11-15 Zoltan Varga <vargaz@gmail.com>
4789 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
4792 * image.c (load_metadata_ptrs): Initialize the new fields.
4794 * reflection.c (create_dynamic_mono_image): Ditto.
4796 * reflection.c (build_compressed_metadata): Use the new fields.
4798 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
4801 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
4804 2005-11-15 Ankit Jain <jankit@novell.com>
4805 Raja R Harinath <harinath@gmail.com>
4807 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
4808 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
4809 new per-generic_container cache if the cached MonoType's context matches
4810 the current context.
4811 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
4812 to the expected context.
4813 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
4815 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4817 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
4818 we changed the signature of an icall.
4819 * icall.c: Modify to mono_double_ParseImpl return true/false
4820 depending on the success, instead of throwing the exception. This will
4821 help us in Double.TryParse methods.
4823 2005-11-14 Zoltan Varga <vargaz@gmail.com>
4825 * marshal.c (emit_marshal_object): Throw an exception when
4826 marshalling 'object' instead of crashing. Fixes #76696.
4828 2005-11-11 Zoltan Varga <vargaz@gmail.com>
4830 * class-internals.h: Add prototype for mono_type_get_full_name ().
4832 2005-11-11 Dick Porter <dick@ximian.com>
4834 * threads.c (mono_thread_manage): Make sure the main thread has
4835 abandoned all its mutexes when cleaning up. Fixes bug 74680.
4837 2005-11-11 Zoltan Varga <vargaz@gmail.com>
4839 * loader.c (mono_loader_set_error_type_load): Log a warning to the
4840 console about the missing type.
4841 (mono_loader_set_error_method_load): Ditto.
4843 2005-11-09 Miguel de Icaza <miguel@novell.com>
4845 * mono-config.c (mono_get_config_dir): Set the system defaults if
4848 * assembly.c (mono_set_dirs): New API entry point to set the
4849 assembly and the config directory in one call
4851 2005-11-09 Zoltan Varga <vargaz@gmail.com>
4853 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
4854 the ftnptr was created from a delegate in a domain other than the
4855 current domain. Fixes #75377.
4857 * exception.h exception.c: Add mono_get_exception_not_supported ().
4859 2005-11-08 Martin Baulig <martin@ximian.com>
4861 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
4863 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
4865 * security-manager.h: Added definitions to deal with strongname key
4866 pairs bigger (and smaller) than 1024 bits.
4867 * reflection.c: Remove hardcoded strongname size (128 bytes) and
4868 adjust wrt the public key length being used.
4870 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
4872 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
4873 Windows build (r51396-51397).
4875 2005-11-03 Martin Baulig <martin@ximian.com>
4877 * class.c (mono_class_setup_vtable_general): Also add generic
4878 methods to the vtable; fixes #76581.
4880 2005-11-01 Miguel de Icaza <miguel@novell.com>
4882 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
4883 sure that we lookup GetString method from the System.Text.Encoding
4884 class, not the derived class or we get an empty method.
4888 2005-10-25 Miguel de Icaza <miguel@novell.com>
4890 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
4891 if it has been previously set (embedders).
4893 Make mono_set_rootdir available also on Unix.
4895 005-10-24 Robert Jordan <robertj@gmx.net>
4897 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
4899 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
4901 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
4902 only calls which are made to native code use this flag.
4904 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
4906 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
4908 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
4909 Add support for FieldBuilders.
4911 2005-10-29 Martin Baulig <martin@ximian.com>
4914 (mono_debug_using_mono_debugger): New public method; returns
4915 whether we're running inside the debugger.
4917 2005-10-27 Zoltan Varga <vargaz@gmail.com>
4919 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
4920 for Method/Constructor/FieldBuilders.
4922 2005-10-26 Zoltan Varga <vargaz@gmail.com>
4924 * reflection.c (module_add_cattrs): Save custom attributes for global methods
4927 2005-10-26 Martin Baulig <martin@ximian.com>
4929 * mono-debug-debugger.c
4930 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
4932 2005-10-24 Raja R Harinath <harinath@gmail.com>
4934 * icall.c (base64_to_byte_array): Don't pass an out-of-range
4937 2005-10-21 Zoltan Varga <vargaz@gmail.com>
4939 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
4940 when passing valuetypes byref. Fixes #76502.
4942 2005-10-19 Jackson Harper <jackson@ximian.com>
4944 * profiler.c: Don't put a . in front of types that are not in a
4947 2005-10-18 Zoltan Varga <vargaz@gmail.com>
4949 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
4951 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
4953 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
4955 (mono_marshal_get_ldflda_wrapper): Fix a warning.
4957 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4959 * assembly.c metadata-internals.h icall.c: Define an additional
4960 parameter for mono_assembly_name_parse_full, so we can avoid creating
4961 S.R.AssemblyName.Version when no version info wasn't passed.
4963 2005-10-09 Miguel de Icaza <miguel@novell.com>
4965 * class.c (mono_type_get_full_name): Reimplement method that was
4968 * image.c: Some docs
4970 2005-10-10 Zoltan Varga <vargaz@gmail.com>
4972 * profiler.c (output_newobj_profile): Fix printing of Total memory
4975 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
4977 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
4979 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
4981 * threads.c: remove debug output.
4983 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
4985 * threads.c (mono_thread_manage): Fix crashes if more than 64
4986 threads need to be aborted. Hopefully fixes #75899.
4988 * assembly.c (mono_stringify_assembly_name): New helper function.
4990 * class.c: Use mono_stringify_assembly_name instead of the similar
4993 * assembly.h assembly.c: Add support for calling a postload search
4994 hook if an assembly cannot be loaded.
4996 * appdomain.c: Register new search hooks which call the AssemblyResolve
4997 events in AppDomain. Fixes #75231
4999 2005-10-07 Martin Baulig <martin@ximian.com>
5001 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
5002 methods without debug info.
5004 2005-10-07 Zoltan Varga <vargaz@gmail.com>
5006 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
5009 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5011 * file-io.c: now that we return symlinks, use lstat and, when the file
5012 is a symbolic link, stat, to get the file attributes. Also avoid the
5013 conversion to/from utf16/external.
5015 2005-10-06 Zoltan Varga <vargaz@gmail.com>
5017 * class.c (mono_class_layout_fields): Compute klass->has_references
5018 correctly if an embedded valuetype is not yet initialized. Fixes
5021 2005-10-04 Martin Baulig <martin@ximian.com>
5024 (mono_metadata_load_generic_param_constraints): New public
5025 function; splitted the constraints loading out from
5026 mono_metadata_load_generic_params().
5028 * class.c (mono_class_create_from_typedef): Call
5029 mono_metadata_load_generic_param_constraints() after setting up
5030 the type and creating our parent; fixes #75329.
5032 2005-10-04 Martin Baulig <martin@ximian.com>
5034 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
5035 non-dynamic parent classes.
5037 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
5039 * file-io.c : win32 build fix (ETXTBSY seems not found).
5041 2005-10-04 Martin Baulig <martin@ximian.com>
5044 (mono_image_get_methodspec_token): Make the cache actually work;
5047 2005-10-04 Martin Baulig <martin@ximian.com>
5049 * class.c (mono_class_name_from_token): Removed the unneccessary
5050 `MonoGenericContext *' argument.
5052 2005-10-04 Martin Baulig <martin@ximian.com>
5055 (method_from_methodspec): Make the caching work again; fixes the
5056 performance regression from #76262.
5058 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5062 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
5063 GetFileSystemEntries that performs the same work but without going
5064 into io-layer, locking, etc.
5066 2005-09-30 Zoltan Varga <vargaz@gmail.com>
5068 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
5069 ThreadState_Stopped as well. Fixes #76047.
5071 2005-09-29 Martin Baulig <martin@ximian.com>
5074 (inflate_generic_context): If the new context has a `gmethod', set
5075 its `container' that that gmethod's `container'.
5078 (mono_metadata_parse_generic_param): Simplify things;
5079 `generic_container = generic_context->container;' is just fine.
5081 * loader.c (method_from_methodspec): Code cleanups.
5083 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
5085 * decimal.c: fix warning (and let gcc generate correct
5086 code on ARM with optimizations).
5088 2005-09-28 Martin Baulig <martin@ximian.com>
5091 (method_from_memberref): Added `MonoGenericContext *class_context'
5092 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
5093 (method_from_methodspec): If we're a memberref, use the enclosing
5094 context when parsing its parent. Fixes #76262; see gtest-206.cs.
5096 2005-09-28 Martin Baulig <martin@ximian.com>
5098 * object.c (mono_runtime_invoke_array): Added support for
5099 MONO_TYPE_GENERICINST; fixes #75917.
5101 2005-09-27 Martin Baulig <martin@ximian.com>
5103 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
5104 `k->byval_arg.type' to determine the actual type.
5106 * loader.c (method_from_methodspec): Removed some hacks.
5108 2005-09-27 Ben Maurer <bmaurer@ximian.com>
5110 * class-internals.h (mono_field_is_deleted): Do the test for
5111 rtspecialname before we check the actual name of the field. This
5112 prevents us from dereferencing a pointer into the string table,
5113 saving us from accessing a few pages
5115 * *.c: Replace the use of {Enter,Leave}CriticalSection with
5116 macros. This will allow a deadlock debugger to easily be plugged
5119 2005-09-27 Martin Baulig <martin@ximian.com>
5121 * loader.c (method_from_methodspec): Create a "signature"
5122 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
5124 2005-09-27 Martin Baulig <martin@ximian.com>
5127 (inflate_generic_class): Correctly set the new context's
5131 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
5132 instead of a `MonoGenericContext *'.
5133 (mono_method_signature_full): Take a `MonoGenericContainer *'
5134 instead of a `MonoGenericContext *'.
5137 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
5138 instead of a `MonoGenericContext *'.
5139 (mono_metadata_parse_method_signature_full): Likewise.
5141 2005-09-26 Martin Baulig <martin@ximian.com>
5144 (mono_class_from_generic_parameter): Set `klass->generic_container'
5145 (mono_class_from_generic_parameter): Likewise.
5146 (mono_bounded_array_class_get): We inherit the generic container
5147 from the element class.
5150 (find_method, find_method_in_class): Take a `MonoGenericContext *'
5151 argument rather than computing it here.
5152 (method_from_memberref): Correctly set the generic context before
5153 parsing the signature. Fixes #75681.
5155 2005-09-26 Zoltan Varga <vargaz@gmail.com>
5157 * object.c (mono_class_has_special_static_fields): Fix warnings.
5159 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5161 * assembly.c: Add parse_public_key function, to
5162 par the public keys. Also added mono_assembly_name_parse_full,
5163 to define it the parsed key should be freed or not.
5164 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
5165 to parse a long format assembly name.
5166 * metadata-internals.h: Keep mono_assembly_name_parse_full as
5167 private, since calling it to preserve the key requires
5168 freeing it manually.
5170 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
5172 * locales.c : removed HAVE_ICU part.
5174 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
5176 * object.c (mono_class_create_runtime_vtable): Avoid calling
5177 field_is_special_static if the klass has no special static fields.
5179 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
5180 (MonoCachedClassInfo): Likewise.
5182 * object.c (mono_class_has_special_static_fields): New helper function.
5184 2005-09-23 Zoltan Varga <vargaz@gmail.com>
5186 * class.c (mono_class_create_from_typedef): Don't call
5187 interfaces_from_typedef_full for enums.
5188 (mono_class_create_from_typedef): Compute the base types of enums directly
5189 without calling mono_class_setup_fields ().
5190 (mono_class_find_enum_basetype): New helper function.
5192 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
5193 one place inside the string heap.
5195 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
5197 * class.c: locking fixes, code cleanups, some docs added.
5198 Allocate some data structures in the image mempool.
5200 2005-09-23 Zoltan Varga <vargaz@gmail.com>
5202 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
5205 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
5207 * class-internals.h, class.c, reflection.c: reduce memory taken by
5210 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
5212 * metadata.c, metadata.h, loader.h: documentation updates, code and
5215 2005-09-23 Zoltan Varga <vargaz@gmail.com>
5217 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
5220 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
5221 page faults caused by the runtime while reading metadata.
5223 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5225 * socket-io.c: the field names were changed 3 months ago and no one
5226 realized until bug #76077 got filed!
5228 2005-09-20 Martin Baulig <martin@ximian.com>
5230 * icall.c (assembly_icalls): Removed some unused debugger icalls.
5232 2005-09-20 Martin Baulig <martin@ximian.com>
5234 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
5235 write the rank into the class entry.
5237 2005-09-20 Martin Baulig <martin@ximian.com>
5239 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
5241 2005-09-19 Zoltan Varga <vargaz@gmail.com>
5243 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5245 * icall.c (custom_attrs_defined_internal): New icall.
5247 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
5249 (mono_custom_attrs_construct_by_type): New helper function.
5251 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
5253 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
5254 terminate the resulting string. Fixes #76123.
5256 2005-09-16 Martin Baulig <martin@ximian.com>
5259 (mono_debug_add_method): Ignore inflated methods for the moment.
5261 2005-09-14 Martin Baulig <martin@ximian.com>
5263 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
5265 2005-09-13 Zoltan Varga <vargaz@gmail.com>
5267 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
5268 return a success/failure indication.
5269 (mono_metadata_interfaces_from_typedef_full): Ditto.
5270 (get_constraints): Ditto.
5272 2005-09-12 Zoltan Varga <vargaz@gmail.com>
5274 * marshal.c (emit_marshal_array): Fix handling of null arrays.
5276 * marshal.c (emit_marshal_array): Add support for returning string
5277 arrays from delegates. Fixes #76063.
5279 * marshal.c: Use the emit_ldloc/stloc macros where possible.
5281 2005-09-11 Zoltan Varga <vargaz@gmail.com>
5283 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
5286 2005-09-09 Zoltan Varga <vargaz@gmail.com>
5288 * reflection.c icall.c: Fix after mono_get_exception_type_load
5291 * assembly.c (mono_assembly_get_assemblyref): New helper function.
5292 (mono_assembly_load_reference): Use the new helper.
5294 * class-internals.h (MonoLoaderError): New structure containing
5295 information about type loading errors.
5297 * class-internals.h loader.c: Add APIs to store per-thread loader
5300 * loader.c class.c: Set the loader error if needed.
5302 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
5304 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
5306 * decimal.c: fixed to handle the broken ARM fp format.
5308 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
5310 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
5313 2005-09-06 Martin Baulig <martin@ximian.com>
5315 * domain.c (supported_runtimes): Added v2.0.50727.
5317 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
5319 * culture-info.h: reduce the size of some structures.
5321 2005-09-05 Martin Baulig <martin@ximian.com>
5323 Reflect latest API changes in the August CTP.
5326 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
5327 ("MonoType.HasGenericArguments"): Removed.
5328 ("MonoMethod.BindGenericParameters"): Renamed to
5329 "MakeGenericMethod".
5330 ("MethodBuilder.BindGenericParameters"): Renamed to
5331 "MakeGenericMethod".
5333 2005-09-05 Martin Baulig <martin@ximian.com>
5335 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
5337 2005-09-05 Martin Baulig <martin@ximian.com>
5339 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5341 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
5342 generic_container is non-NULL.
5344 2005-09-05 Martin Baulig <martin@ximian.com>
5346 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5348 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
5350 2005-08-29 Michal Moskal <malekith@nemerle.org>
5352 * reflection.c (encode_locals,
5353 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
5354 for large generic types.
5356 2005-09-05 Martin Baulig <martin@ximian.com>
5358 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5360 * class.c (mono_dup_array_type): New public method.
5361 (mono_metadata_signature_deep_dup): New public method.
5362 (dup_type): Correctly duplicate array and function types.
5364 2005-09-05 Martin Baulig <martin@ximian.com>
5366 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5368 * reflection.c (get_default_param_value_blobs): Handle generic types
5369 and generic methods.
5371 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
5373 * class.c: Fixed error reporting (method/class were inversed) for
5374 inheritance demands.
5375 * security-manager.c|h: Added the AppDomain when calling the managed
5376 System.Security.SecurityManager.InheritanceDemand method.
5378 2005-09-01 Raja R Harinath <rharinath@novell.com>
5380 * reflection.c (encode_marshal_blob): 'marshaltype' and
5381 'marshaltyperef' are alternate sources for the custom marshaler
5384 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
5386 * class.c: fix creation of array classes with rank == 1
5387 (patch by Ankit Jain <jankit@novell.com>).
5389 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
5391 * object.c: fix check for creating the bound data for arrays vs
5394 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5396 * object.c: configuration file name is now based on the executable name,
5397 not the image name. Fixes bug #75931.
5399 2005-08-29 Zoltan Varga <vargaz@gmail.com>
5401 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
5402 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
5404 2005-08-25 Zoltan Varga <vargaz@gmail.com>
5406 * rand.c: Use wincrypt.h instead of WinCrypt.h.
5408 2005-08-24 Ankit Jain <jankit@novell.com>
5409 Raja R Harinath <rharinath@novell.com>
5411 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
5412 called by it recursively.
5413 (mono_class_init): Remove special case in pending_init handling, since it's
5414 superseded by the fix to mono_class_from_typeref.
5416 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
5418 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
5419 BROKEN_THREAD_START stuff.
5421 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
5423 * class-internals.h object.c: Add a new kind of trampoline called a delegate
5426 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
5428 * object.c (mono_delegate_ctor): Replace the original function address with
5429 a delegate trampoline.
5431 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
5433 * icall.c: add boolean argument to base64_to_byte_array and
5434 InternalFromBase64String to control whether a whitespace-only string
5435 is allowed (or should casue a FormatException to be thrown). We need
5436 this as the behavior has changed between MS.NET 1.x and 2.0, and we
5437 to match the MS behaviour in both profiles.
5438 * appdomain.c: Bump corlib version.
5440 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5442 This patch implements a big portion of publisher policy
5443 support, used to bind assembly versions and redirect
5444 one assembly from version A to version B.
5447 New GSList loaded_assembly_bindings, for storing the cached
5449 (assembly_binding_maps_name): New static function for checking if a
5450 assembly binding information maps an assembly name.
5451 (mono_assembly_binding_info_free): New function for freeing
5452 assembly binding information resources.
5453 (get_publisher_policy_info): New static function for retrieving
5454 assembly binding information from a MonoImage.
5455 (compare_versions): New static function for comparing an assembly
5456 binding information data and the version of an assembly name.
5457 (check_policy_versions): New static function for checking if an
5458 assembly binding info mapping an assembly name is valid for it.
5459 (mono_assembly_load_publisher_policy): New static function for
5460 loading the 'policy.major.minor.MyAssembly' image for an assembly
5461 with an assembly name 'aname'.
5462 (mono_assembly_bind_version): New static function for updating
5463 assembly redirection.
5464 (mono_assembly_apply_binding): New static function for applying
5466 (search_binding_loaded): New static function for searching
5467 loaded assembly binding infos in the cache domain.
5468 (mono_assembly_load_full): Don't apply assembly binding for
5469 reflection only assemblies.
5471 * metadata-internals.h: Add MonoAssemblyBindingInfo,
5472 which contains information about assembly binding. Also
5473 declare signature for mono_config_parse_publisher_policy ()
5474 function, used to retrieve pub policy info.
5477 (publisher_policy_start): New static function used to parse publisher
5478 policy config files.
5479 (publisher_policy_parser): New static MonoParseHandler containing
5480 the functions used when parsing config files.
5481 (mono_config_parse_publisher_policy): New function for parsing
5482 publisher policy files.
5484 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
5486 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
5488 * marshal.c (mono_delegate_free_ftnptr): Ditto.
5490 * object.c (mono_get_addr_from_ftnptr): New helper function.
5492 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
5494 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5496 2005-08-19 Dick Porter <dick@ximian.com>
5498 * threads.c, threads.h, appdomain.c, appdomain.h,
5499 profiler-private.h, monitor.c, object.c, object-internals.h,
5500 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
5501 store the thread ID, so it can hold a 64 bit value if needed.
5503 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
5505 * reflection.c (mono_reflection_create_dynamic_method): Store the
5506 handle class into the method references as well so ldtoken works in
5509 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
5512 2005-08-19 Ankit Jain <jankit@novell.com>
5515 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
5516 here rather than using the method signature of a arbitrary function
5517 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
5519 Hack done with Harinath.
5521 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5523 * threadpool.c: disable printing stack traces when we get a exception
5524 in a threadpool thread. I need to do more testing to figure out which
5525 cases actually print this. Fixes bug #75828.
5527 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5529 * icall.c: there might be ignored whitespace after the last '='. This
5530 fixes length computation and bug #75840.
5532 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
5534 * assembly.c (mono_assembly_load_full): Consider .exe extension as
5537 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
5540 * reflection.c (create_custom_attr_data): Ditto.
5542 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
5544 * locales.c, culture-info.h : removed RegionLCIDMap.
5545 * culture-info-tables.h : regenerated.
5547 2005-08-16 Martin Baulig <martin@ximian.com>
5549 * class.c (mono_type_get_name_recurse): Small fix.
5551 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
5553 * locales.c : indentation fixie.
5555 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
5557 * object-internals.h,
5561 icall.c : added RegionInfo table support.
5562 * culture-info-table.h : regenerated for region support.
5564 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
5566 * reflection.c (resolve_object): handle all kinds of MonoMethod
5567 including generic ones
5569 2005-08-12 Ankit Jain <jankit@novell.com>
5571 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
5572 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
5574 2005-09-12 Lluis Sanchez <lluis@ximian.com>
5576 * process.c: Don't close a thread handle when it's NULL. This is a
5577 workaround for bug #75733.
5579 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
5581 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
5583 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
5585 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
5587 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5589 * threadpool.c: if a work item in the thread pool has a callback that
5590 catches a exception, don't propagate it after invoking the callback.
5593 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
5595 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
5597 * class-internals.h (MonoCachedClassInfo): Add some new fields.
5599 * class.c (mono_class_init): Load field info lazily in the AOT case.
5601 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
5603 2005-08-03 Ankit Jain <jankit@novell.com>
5606 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
5607 PInvoke calling convention is 0.
5609 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
5611 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
5612 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
5614 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
5616 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
5617 to handle threads not started by the GC (patch by Michael Meeks
5618 <michael.meeks@novell.com>).
5620 2005-07-31 Kamil Skalski <nazgul@omega.pl>
5622 * reflection.c: Make buffer used in emitting types larger for some
5623 big generic types (patch by Michal Moskal).
5625 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
5627 * mono-debug.c: Fix some (not all) alignment problems.
5629 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5631 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
5632 Invoke mono_image_load_from_data_full passing the refonly
5636 (mono_assembly_open_from_bundle): Add the refonly argument,
5637 in order to pass it to other methods it calls to.
5638 (do_mono_assembly_open): Add the refonly argument, in order
5639 to pass it to other methods it calls to.
5640 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
5641 the refonly parameter to it.
5643 * image.c: Add loaded_images_refonly_hash and
5644 loaded_images_refonly_guid_hash to cache the reflection
5646 (mono_images_init): Initialize the hash tables used for
5647 caching the reflection only images.
5648 (load_modules): Invoke mono_image_open_full passing the refonly
5649 parameter to load the modules the correct way.
5650 (build_guid_table): Add the refonly argument, to re-build the
5652 (do_mono_image_open): Added the refonly argument, in order to
5653 define it for the loaded image.
5654 (mono_image_loaded_full): New function, which receives an
5655 additional parameter to look for the image in the refonly or
5656 non-refonly section.
5657 (mono_image_loaded): Updated, using mono_image_loaded_full.
5658 (mono_image_loaded_by_guid_full): The same case that happens
5659 with mono_image_loaded_full.
5660 (mono_image_loaded_by_guid): Likewise.
5661 (register_image): Use the ref_only variable inside MonoImage
5662 to decide in which hash table store the current image.
5663 (mono_image_open_from_data_full): Rename
5664 mono_image_open_from_data to mono_image_open_from_data_full,
5665 adding the refonly argument, to define the ref_only variable
5667 (mono_image_open_from_data): Return
5668 mono_image_open_from_data_full.
5669 (mono_image_open_full): Rename mono_image_open to
5670 mono_image_open_full, receiving the new refonly argument,
5671 to pass it to inner methods.
5672 (mono_pe_file_open): Update this function, to open
5673 a MonoImage as a non-refonly image.
5674 (mono_image_close): Use the refonly variable inside
5675 MonoImage to remove the image from the correct caches.
5677 * image.h: Add the signatures of mono_image_open_full,
5678 mono_image_open_from_data_full, mono_image_loaded_full,
5679 mono_image_loaded_by_guid_full.
5681 * metadata-internals.h: Add the ref_only field to
5684 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5686 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
5687 Fix the last behavior, which used to load the assemblies and
5688 extract MonoReflectionAssemblyName information, instead of
5689 extract it from the metadata tables. Needed for Reflection
5692 2005-07-29 Martin Baulig <martin@ximian.com>
5694 * mono-debug-debugger.c
5695 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
5699 (mono_debug_address_from_il_offset): Check whether we have
5700 debugging support before attempting to take the lock.
5701 (mono_debug_source_location_from_address): Likewise.
5702 (mono_debug_source_location_from_il_offset): Likewise.
5703 (mono_debug_il_offset_from_address): Likewise.
5704 (mono_debug_address_from_il_offset): Likewise.
5706 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
5708 * class.c (mono_class_from_name_case): Add support for dynamic images.
5711 * object.c (mono_class_compute_gc_descriptor): Add a workaround
5714 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
5716 * reflection.c (mono_method_get_object): Fix warning.
5718 2005-07-28 Martin Baulig <martin@ximian.com>
5721 (mono_debug_add_wrapper): Also write the wrapper type.
5723 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
5725 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
5727 * class.c (mono_class_init): Avoid reading nested classes if the AOT
5728 data indicates the class has none.
5730 2005-07-26 Ben Maurer <bmaurer@ximian.com>
5732 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
5733 loader lock with the debugger lock. Prevents deadlocks for beagle.
5735 Beagle can now run on an smp box for a weekend without any
5738 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
5740 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
5741 in a module. Fixes #75629.
5743 2005-07-26 Martin Baulig <martin@ximian.com>
5745 * mono-debug.c (mono_debug_add_wrapper): New static method.
5746 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
5747 interncall or a wrapper.
5749 * mono-debug.h (MonoDebugWrapperData): New public typedef.
5750 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
5751 (MONO_DEBUGGER_VERSION): Bump to 51.
5753 * mono-debug-debugger.c
5754 (mono_debugger_add_type): Removed this empty function.
5755 (mono_debugger_add_method): Likewise.
5757 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
5759 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
5760 before accessing method->slot.
5762 2005-07-21 Jb Evain <jbevain@gmail.com>
5764 * reflection.c (method_encode_clauses/class): Handle filters clauses.
5767 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
5769 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
5772 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
5774 * image.h image.c: Add mono_image_get_guid () API function.
5776 2005-07-19 Ben Maurer <bmaurer@ximian.com>
5778 There were issues when multiple threads tried to load
5779 assemblies. A deadlock was created between assemblies_mutex and
5780 mono_domain_assemblies_lock. This fixes the issue by making the
5781 assembly ref counting be lock free. See bug 75586.
5783 * image.c (mono_image_close): The add ref function here was using
5784 Interlocked operations while the unref was using a mutex and a
5785 --. I don't think this was ever a bug that would be exposed in a
5786 non-pendantic way (ie, by an embedder doing a ref on one thread
5787 and an unref on another), but for the sake of correctness, this is
5790 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
5791 (mono_assembly_load_reference): Call mono_assembly_addref rather
5792 than touching the refcount ourselves.
5793 (mono_assembly_close): Use InterlockedDecrement to unref the
5794 assembly. Don't acquire the lock unless it is actually needed.
5796 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
5798 * class.c (mono_class_layout_fields): Fix calculation of has_references
5801 2005-07-12 Martin Baulig <martin@ximian.com>
5803 Applying a patch from Michal Moskal <malekith@nemerle.org>.
5806 (mono_type_hash): Provide better hashing for generic instances.
5807 (mono_generic_inst_hash): Improve hashing.
5808 (mono_generic_class_hash): Likewise.
5810 * reflection.c (mymono_metadata_type_hash): Improve hashing for
5813 2005-07-12 Martin Baulig <martin@ximian.com>
5815 * reflection.c (mono_reflection_create_runtime_class): Remove the
5816 hack for generic type definitions and non-`Run' assemblies.
5817 (mono_reflection_bind_generic_parameters): Also use
5818 `klass->wastypebuilder' to check for TypeBuilders.
5820 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
5822 * class.c (mono_class_layout_fields): Fix calculation of has_references
5825 * class.c (inflate_generic_class): Fix a leak.
5826 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
5829 2005-07-11 Martin Baulig <martin@ximian.com>
5831 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
5834 2005-07-11 Martin Baulig <martin@ximian.com>
5836 * loader.c (find_method): Also lookup in
5837 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
5839 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
5841 * appdomain.c (mono_domain_unload): Don't free the error message
5842 before passing it to mono_get_exception_...
5844 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
5846 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
5848 * threads.c: try to better guess an available RT signal (bug #75387).
5850 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
5852 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
5855 2005-07-07 Martin Baulig <martin@ximian.com>
5857 * class.c (mono_type_get_name_full): Return NULL for
5858 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
5861 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
5863 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
5864 exit the appdomain as well being aborted.
5866 * threadpool.c: Create all threadpool threads inside the root appdomain, and
5867 change back to the root domain after calling managed code. This enables
5868 appdomains using threadpools to be unloaded.
5870 2005-07-07 Martin Baulig <martin@ximian.com>
5873 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
5874 into `MonoDynamicGenericClass' since we only need it for dynamic
5877 * reflection.c (mono_class_bind_generic_parameters): We don't need
5878 to compute the `parent' here.
5880 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
5882 * culture-info-table.h : regenerated.
5884 2005-07-06 Martin Baulig <martin@ximian.com>
5887 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
5889 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
5891 2005-07-06 Martin Baulig <martin@ximian.com>
5893 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
5894 we're doing a signature-only comparision; fixes #74945.
5896 2005-07-06 Martin Baulig <martin@ximian.com>
5898 * class-internals.h (MonoGenericClass): Moved some things out into
5899 a new `MonoInflatedGenericClass' type.
5900 (MonoInflatedGenericClass): New type; the `klass' of a
5901 `MonoGenericClass' is now computed lazyly in
5902 mono_get_inflated_generic_class().
5904 * class.c (mono_get_inflated_generic_class): New public function.
5905 (mono_class_inflate_generic_method): Removed the unused
5906 `MonoClass *' argument.
5907 (setup_generic_vtable): Don't call mono_get_inflated_method() on
5909 (mono_class_create_generic): Make this static and merge it with
5910 mono_class_create_generic_2(); we're now called automatically from
5911 mono_get_inflated_generic_class().
5913 * loader.c (mono_method_signature): Call
5914 mono_get_inflated_method() here.
5916 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
5918 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
5919 type of fields with RVA.
5921 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
5922 for this pseudo class.
5923 (my_mono_class_from_generic_parameter): Likewise.
5924 (mono_class_init): Allow interfaces to have cctors.
5926 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
5928 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
5929 lazily for AOT methods.
5931 2005-07-05 Martin Baulig <martin@ximian.com>
5933 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
5934 returns FALSE for a successful match, not TRUE.
5936 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
5938 * loader.c (mono_method_get_index): Optimize this a bit.
5940 2005-07-04 Martin Baulig <martin@ximian.com>
5943 (class_compute_field_layout): Move the check for generic type
5944 definitions into mono_class_layout_fields(). Fixes #74684.
5945 (mono_class_from_generic_parameter): Correctly compute
5946 `klass->parent'; fixes #75457.
5948 * reflection.c (register_assembly, register_module): Make sure
5949 `domain->rejobject_hash' is already created.
5951 2005-07-02 Martin Baulig <martin@ximian.com>
5954 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
5955 `MonoDynamicGenericClass'.
5957 2005-07-01 Lluis Sanchez <lluis@ximian.com>
5959 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
5960 returned by a field getter is null, since null is a valid value.
5962 2005-07-01 Martin Baulig <martin@ximian.com>
5964 * reflection.c (mono_reflection_generic_class_initialize): Update
5965 the `dgclass->fields [i].parent' to the correct class.
5966 (mono_image_get_fieldref_token): Use the declaring type, not the
5969 2005-07-01 Martin Baulig <martin@ximian.com>
5971 * loader.c (find_method): Also look in the interfaces; fixes #75429.
5973 2005-06-30 Ben Maurer <bmaurer@ximian.com>
5975 * threads.c (thread_cleanup): assert that thread != NULL
5976 (wait_for_tids_or_state_change): We were using the wrong variable
5977 when accessing wait->threads. `i' was always out of the bounds of
5980 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5982 * loader.c: map user32 and kernel32 to libMonoSupportW
5984 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
5986 * appdomain.c (unload_thread_main): Mark this as WINAPI.
5988 2005-06-28 Martin Baulig <martin@ximian.com>
5990 * loader.c (method_from_methodspec): Fix #75334.
5992 2005-06-28 Martin Baulig <martin@ximian.com>
5994 Fix #74953 - Arrays now implement the generic IList<T> interface
5995 on the 2.0 platform.
5997 * class-internals.h (MonoDefaults): Added `generic_array_class'.
5999 * reflection.c (mono_class_bind_generic_parameters): New public
6000 function; similar to mono_reflection_bind_generic_parameters(),
6001 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
6003 * domain.c (mono_init_internal): Try to initialize.
6004 `mono_defaults.generic_array_class' here; this'll only succeed if
6005 we're using the 2.0 corlib.
6008 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
6009 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
6010 (mono_lookup_internal_call): Added support for nested classes.
6013 (mono_get_method_from_token): Set `result->signature->pinvoke' if
6014 we're an interncall and have generic arguments.
6017 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
6018 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
6019 instance of System.Array.InternalArray<T> for arrays, so they
6020 implement the generic IList<T> interface.
6022 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
6024 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
6025 (chastamar@yahoo.com). Fixes #75374.
6027 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
6029 * culture-info-table.h: regenerated.
6031 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6033 * icall.c: handle spaces correctly for base64 strings.
6035 2005-06-26 Ben Maurer <bmaurer@ximian.com>
6037 * *.c: Kill some warnings.
6039 2005-06-23 Duncan Mak <duncan@novell.com>
6041 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
6042 that this builds on Solaris 10 (x86).
6044 2005-06-23 Martin Baulig <martin@ximian.com>
6047 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
6048 generic type definitions.
6050 2005-06-23 Martin Baulig <martin@ximian.com>
6054 * metadata.c (mono_class_get_overrides): Renamed to
6055 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
6056 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
6057 pass it to mono_get_method_full().
6059 2005-06-22 Ben Maurer <bmaurer@ximian.com>
6061 * reflection.c (mono_reflection_create_runtime_class): take the
6062 mono_domain_lock in this method. Prevents deadlocks
6064 2005-06-22 Martin Baulig <martin@ximian.com>
6066 * loader.c (method_from_methodspec): Fix #75330.
6068 2005-06-22 Martin Baulig <martin@ximian.com>
6070 * reflection.c (type_get_qualified_name): Use
6071 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
6072 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
6073 argument; use it if we don't have an assembly name.
6075 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
6077 * object.c: In mono_message_init, set "copy out" flag for in
6078 parameters with the [Out] flag.
6080 2005-06-21 Martin Baulig <martin@ximian.com>
6083 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
6086 2005-06-21 Martin Baulig <martin@ximian.com>
6088 * class.c (mono_class_init): Don't initialize `class->fields' for
6089 generic instances since they're initialized again in
6090 compute_field_layout().
6091 (compute_field_layout): Set the field's `generic_info' here; fix
6094 2005-06-21 Martin Baulig <martin@ximian.com>
6097 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
6099 * metadata.c (mono_metadata_generic_method_equal): Also
6100 distinguish the `generic_class'; fixes #75334.
6102 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6106 * domain-internals.h:
6107 * reflection.c: 'domain_assemblies' field is now protected by its own
6108 lock. Don't call into managed code to run the AssemblyLoad event if we
6109 now there are no registered delegates for it.
6111 2005-06-20 Martin Baulig <martin@ximian.com>
6113 * class.c (mono_class_is_assignable_from): Use a custom version of
6114 mono_class_has_parent() to make things work for generic instances;
6117 2005-06-20 Martin Baulig <martin@ximian.com>
6119 * loader.c (method_from_methodspec): Apply a patch from
6120 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
6122 2005-06-20 Martin Baulig <martin@ximian.com>
6124 * class.c (mono_class_init): Reverted Zoltan's last change; it
6127 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
6129 * threads.c (wait_for_tids_or_state_change): Add missing locking.
6131 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6133 * socket-io.c: fix the index in the socket array for writable/error
6134 sockets. Fixes bug #75306.
6136 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
6138 * class.c (mono_class_init): Allow interfaces to have static ctors.
6140 2005-06-17 Martin Baulig <martin@ximian.com>
6142 * loader.c (method_from_methodspec): Use `context->container' when
6143 parsing the `gmethod->inst'.
6145 2005-06-17 Martin Baulig <martin@ximian.com>
6147 * class.c (mono_type_get_name_recurse): Don't add the assembly
6148 name for type arguments.
6150 2005-06-15 Martin Baulig <martin@ximian.com>
6152 * reflection.c (mono_image_get_inflated_method_token): Encode
6153 correct klass; fixes #75260.
6155 2005-06-13 Michal Moskal <malekith@nemerle.org>
6157 * icall.c: Make GetCorrespondingMethod/Constructor take
6158 MonoReflectionMethod method not MonoMethod. Removed
6159 MonoType.GetCorrespondingField, and make
6160 MonoGenericType.GetCorrespondingField take name not
6163 2005-06-13 Michal Moskal <malekith@nemerle.org>
6165 * reflection.c (field_encode_signature, encode_locals):
6166 Make sizes of buffers for types larger (for big generic types).
6167 (create_generic_typespec,
6168 mono_reflection_sighelper_get_signature_local,
6169 mono_reflection_sighelper_get_signature_field):
6170 Add asserts for too small buffers.
6172 2005-06-15 Martin Baulig <martin@ximian.com>
6174 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
6175 if our parent is not a dynamic type.
6177 2005-06-15 Martin Baulig <martin@ximian.com>
6179 * class-internals.h (MonoTypeNameFormat): New enum.
6182 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
6183 (mono_type_get_full_name): Removed.
6184 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
6185 argument instead of the boolean's.
6187 * icall.c (ves_icall_System_MonoType_getFullName):
6188 Added `gboolean assembly_qualified'.
6191 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
6193 * reflection.c (mono_reflection_parse_type): Parse the new type
6196 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6198 * icall.c: no need to convert from utf16 to utf8 and then back again
6199 after the call to GetLogicalDrives.
6201 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6203 * icall.c: frombase64. Fix problems exposed by new tests.
6205 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6207 * icall.c: added internal calls for converting char [] and strings in
6208 base64 into byte [].
6210 2005-06-10 Martin Baulig <martin@ximian.com>
6212 * class.c (mono_class_create_generic_2): Read the nested classes
6213 from the metadata rather than from `gklass->nested_classes' since
6214 `gklass' might not be initialized yet.
6216 2005-06-09 Duncan Mak <duncan@novell.com>
6218 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
6219 all public headers. Fixes #74919.
6221 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
6223 * domain.c: The key for proxy_vtable_hash is now a pointer
6224 array. Added new GHashFunc and GCompareFunc functions for this.
6226 * class.h: The list of interfaces in MonoRemoteClass is known in
6227 advance and can't grow (we create a new MonoRemoteClass if needed),
6228 so now the interface array can be allocated together with
6231 * object.c: Added a new method create_remote_class_key.
6232 Fixed mono_remote_class so it does not depend on
6233 mono_upgrade_remote_class.
6234 Removed extend_interface_array.
6235 Added new method clone_remote_class(), which makes a copy of a remote
6236 class and adds a new interface or class to it.
6237 mono_upgrade_remote_class() now creates a new remote class (or gets
6238 it from the cache) if an vtable upgrade is needed. In this way
6239 we make sure that other objects sharing the same remote class
6240 don't get the new vtable with unwanted interfaces.
6242 * object-internals.h:
6243 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
6245 * marshal.c: Track changes in mono_upgrade_remote_class().
6247 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
6248 * icall.c: Add runtime methods for obtaining members of inflated
6249 class, which were created from supplied non-inflated members. It
6250 is used in internal Get{Method,Constructor,Field} methods in
6253 2005-06-09 Martin Baulig <martin@ximian.com>
6256 (mono_reflection_bind_generic_method_parameters): Fix #75169.
6258 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6259 * reflection.c (mono_image_basic_init): Define
6260 Version in MonoDynamicAssembly.
6262 2005-06-08 Martin Baulig <martin@ximian.com>
6267 (mono_method_signature_full): New public method; takes a
6268 `MonoGenericContext *'.
6269 (find_method): Use mono_method_signature_full() and pass the
6270 klass'es context to it.
6272 * class.c (mono_class_is_inflated_method): Use
6273 mono_method_signature_full() and pass the context to it.
6275 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
6277 * object.c: add proper locking in mono_remote_class_vtable(),
6278 fixes possible memory corruption.
6280 2005-06-08 Michael Meeks <michael.meeks@novell.com>
6282 * marshal.c (mono_remoting_marshal_init): set
6283 initialized after initialization.
6285 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
6289 2005-06-06 Michael Meeks <michael.meeks@novell.com>
6291 * object.c (extend_interface_array): fix really silly
6292 memory corrupting / comparison bug.
6294 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6296 * reflection.c: Functions added to support the creation
6297 of CustomAttributeData, which includes Attribute data
6298 used by ReflectionOnly methods.
6300 * reflection.h: mono_reflection_get_custom_attrs_data and
6301 mono_custom_attrs_data_construct added (functions exposed).
6303 * icall.c: Added mono_reflection_get_custom_attrs_data
6306 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
6308 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
6311 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
6313 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
6315 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
6316 dynamic DllImportAttribute.
6318 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
6319 dynamic DllImportAttribute.
6321 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
6324 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6326 * threads.c: avoid segfault when an unstarted thread is aborted.
6328 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
6330 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
6331 Returns the name and version of the runtime for reporting.
6333 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6335 * appdomain.c: bump corlib version.
6336 * object-internals.h: new field in MonoReflectionAssembly.
6338 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6340 * object-internals.h: Carlos forgot to add this field.
6342 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6344 * icall.c: Added create_version to create instances
6345 of Version of MonoReflectionAssemblyName. This change helps
6346 the AssemblyName tests to keep running fine.
6348 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
6350 * object.c (mono_method_return_message_restore): A somehow less
6351 intrusive fix for #75138.
6353 2005-06-03 Raja R Harinath <rharinath@novell.com>
6355 * object.c (mono_method_return_message_restore): Fix computation
6356 of expected number of out args.
6358 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
6360 * reflection.c (mono_image_get_method_info): Fix the case when the
6363 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
6365 * object.c: Added missing null check in
6366 mono_method_return_message_restore.
6368 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
6370 * reflection.c (mono_image_get_method_info): Handle the case when
6373 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
6375 * object.c: When creating the vtable for a proxy, take into account
6376 all inherited interfaces, not only the ones registered in
6377 iclass->interfaces. This fixs bug #74996.
6378 Also, in mono_method_return_message_restore, verify that the array
6379 of out args has the expected lengh.
6381 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6383 * socket-io.c: update the timeout in Poll when the call is interrupte.
6385 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6387 * socket-io.c: support abort/suspend in Select_internal after last
6390 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6392 * threadpool.c: remove warning.
6394 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6397 * socket-io.[ch]: Select_internal uses poll() now when available, thus
6398 removing the 1024 limit from select(). Runtime part of the fix for
6401 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6403 * socket-io.c: when resolving the addresses for the same
6404 host returned by gethostname(), get the local IPs from the interface
6405 list. Loopback addresses are discarded if the are interfaces up with
6406 non-loopback ones. Fixes bug #63265.
6408 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
6410 * appdomain.c, verify.c, object-internals.h, reflection.c:
6411 bumped corlib number to 36, and added new extra_flags field
6412 to ReflectionMethodBuilder and friends. Fixes #75060.
6414 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
6416 * gc.c: register a new weak link only if the object is non-null
6419 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
6421 * culture-info.h : short time pattern too.
6423 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
6425 * culture-info.h : expand long time pattern string length.
6427 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
6429 * culture-info-table.h : update (more French date format; #72788).
6431 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
6433 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
6434 the method is static. Fixes #75029.
6436 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
6438 * reflection.c: Update the table_idx field of method builders after
6439 saving the module, since it can change. This is a workaround for
6442 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
6444 * culture-info-table.h : update (additional French date format).
6446 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
6448 * icall.c (ves_icall_type_Equals): Revert last change.
6450 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
6452 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
6454 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
6456 * class-internals.h: Added executioncontext_class field to
6457 MonoDefaults structure.
6458 * domain.c: Cache System.Threading.ExecutionContext class in
6460 * object.c: Capture the ExecutionContext for asynchroneous calls in
6461 mono_async_result_new.
6462 * object-internals.h: Added execution_context and original_context
6463 fields to MonoAsyncResult. Added execution_context to MonoThread.
6464 * security-manager.c|.h: Added mono_get_context_capture_method to
6465 return the capture method (if required by the security manager or by
6466 the framework version used).
6467 * threadpool.c: Apply capture (if present) ExecutionContext in
6468 mono_async_invoke and revert to original context after it completes.
6470 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
6472 * culture-info-table.h : updated (real hacky solution for zh-CHT).
6474 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
6476 * culture-info-table.h : zh-CHT related workaround.
6478 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
6480 * marshal.c (emit_marshal_custom): Add some error checking and call the
6481 methods in the ICustomMarshaler interface. Fixes #74875.
6483 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
6484 native->managed wrappers.
6486 2005-05-12 Martin Baulig <martin@ximian.com>
6488 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
6489 here and use the loader lock.
6491 * mono-debug.c: Properly lock when the debugger is not attached.
6492 (mono_debug_init): Release the initial lock if we're not running
6495 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
6497 * marshal.c (emit_marshal_custom): Pass through NULL values without
6498 calling the custom marshalling routines.
6500 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
6501 conversion in structures. Fixes #74882.
6503 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
6505 * culture-info-table.h : zh-* cultures were missing.
6507 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
6509 * threads.c: Added a new event background_change_event which is signaled
6510 when a thread changes its background mode.
6511 Moved here several checks previously done in managed code. The checks
6512 require the thread lock, and using the thread lock in managed code
6513 can result in deadlocks.
6514 Merged Start_internal and Thread_internal into a single method. Now
6515 Thread_internal does all work of creating and starting a thread.
6516 Added icalls for setting and getting the state of the object. Moved from
6517 managed code to avoid locking there.
6518 Added wait_for_tids_or_state_change() which is called instad of
6519 wait_for_tids when waiting for non-backround threads to end. This method
6520 will return if one of the threads ends or the background_change_event
6522 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
6523 the background mode. This method signals the background_change_event
6526 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
6527 removed Start_internal.
6529 2005-05-11 Martin Baulig <martin@ximian.com>
6531 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
6532 to order of some fields to get proper alignment on 64-bit machines.
6534 2005-05-11 Martin Baulig <martin@ximian.com>
6536 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
6537 changes as they're broken and completely fuck up the debugger.
6539 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
6541 2005-05-10 Martin Baulig <martin@ximian.com>
6543 * reflection.c (mono_reflection_generic_class_initialize): Don't
6544 call mono_class_setup_parent() here.
6546 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6548 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
6549 send/receive timeout use an integer in milliseconds. We were using a
6552 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6555 (internal_get_cultures): reserve the first slot of the array for the
6556 InvariantCulture, which will be filled in managed code.
6558 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
6560 * reflection.c (mono_image_fill_module_table): Initialize the
6561 GENERATION field as well.
6563 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6565 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
6566 Monitor.Enter on the object.
6568 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
6570 * threads.c: Enable the wait for running threads when exiting.
6571 * icall.c: Suspend all threads before exiting.
6573 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
6575 * assembly.c (mono_assembly_load_reference): Fix warning.
6577 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6579 * threadpool.c: changed the default number of threads per cpu. From now
6580 on, the default will be 20 + (5 * number of cpus) instead of 50.
6582 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
6584 * loader.c (mono_method_get_signature_full): Add locking here.
6586 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
6588 * appdomain.c: Moved methods for parsing and freeing assembly
6589 names to assembly.c.
6590 * assembly.c, domain-internals.h: Created public methods for parsing
6591 assembly names. Fixed mono_assembly_load_with_partial_name:
6592 it now finds the best match, taking into account the version,
6593 token and culture specified in the partial name. Also return
6594 the latest version if no version information is specified.
6596 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
6598 * threadpool.c: replace check for SocketAsyncCall class.
6600 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6602 * threadpool-internals.h:
6603 * Makefile.am: added threadpool-internals.h
6605 * threadpool.c: call mono_unhandled_exception on exceptions not handled
6606 that happen in threadpool threads (tested on MS).
6607 (mono_thread_pool_remove_socket): new function that dispatch any pending
6608 AIO call on a socket that is closing. By now only epoll really needs it,
6609 as select/poll wake up when the socket closes.
6612 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
6614 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
6616 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
6618 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
6620 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
6622 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
6624 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
6625 has an abort request, convert it into a suspend request.
6627 2005-04-30 Ben Maurer <bmaurer@ximian.com>
6629 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
6630 warning for the usage of `UnmanagedFunctionPointerAttribute' which
6631 is not supported yet.
6633 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6635 * image.c: register assemblies loaded from data (bundles) in the loaded
6636 assemblies hash. Fixes bug #74772.
6638 2005-04-29 Martin Baulig <martin@ximian.com>
6640 * class.c (mono_type_get_name_recurse): Update to the new naming
6641 schema from the latest .NET 2.x beta2.
6642 (mono_class_setup_vtable_general): If we're a generic instance,
6643 copy the vtable from our generic type definition and inflate all
6646 * loader.c (find_method): Update to the new naming schema from the
6647 latest .NET 2.x beta2.
6649 2005-04-29 Raja R Harinath <harinath@gmail.com>
6651 * class.c (mono_class_init): Add a mono_loader_unlock to the
6654 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
6656 * icall.c (ves_icall_System_Environment_Exit): Remove the
6657 suspend_all_other_threads () call for the time being, since it can hang.
6659 * threads.c (mono_thread_manage): Similarly, disable the waiting for
6660 the background threads to exit, since it can also hang.
6662 * class.c (mono_class_init): Applied patch from Ankit Jain
6663 (radical@gmail.com). Avoid pending init errors when a field refers
6664 to a nested class using a typeref. Fixes #74734.
6666 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
6667 this for dynamic modules.
6669 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6671 * threads.c: don't wait for threads that are in the process of aborting
6672 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
6673 and waiting for background threads to finish. This makes xsp and
6674 mod-mono-server exit without random length delays and/or hangs.
6676 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6678 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
6680 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
6682 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
6683 dynamic types to prevent infinite loops. Fixes #74727.
6685 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
6686 ..._is_assignable_to.
6688 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
6690 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
6692 2005-04-25 Martin Baulig <martin@ximian.com>
6694 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
6697 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
6699 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
6701 * reflection.c (build_compressed_metadata): Set metadata header
6704 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
6706 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
6707 number into an integral and a decimal part. Fixes #70473.
6709 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
6711 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
6713 * culture-info-table.h : reflected the latest locale-builder output.
6715 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6717 * threadpool.c: check for SuspendRequested too when deciding if
6718 mono_thread_interruption_checkpoint should be called.
6720 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6722 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
6723 * threads.c: remove interruption_mutex and use Interlocked instead. When
6724 suspending all the threads, wait for all the suspended events at once.
6725 If we're shutting down and get an APC that is going to be queued,
6726 call mono_thread_execute_interruption immediately, as the thread might
6727 be sleeping on a pthread condition or mutex.
6729 * icall.c: call mono_runtime_set_shutting_down before suspending the
6732 Fixes bug #74693. And now xsp is happier when exiting.
6734 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
6736 * loader.c (mono_stack_walk): Fix #74690.
6738 2005-04-22 Martin Baulig <martin@ximian.com>
6740 * mono-debug.h (MonoDebugMethodJitInfo): Added
6741 `MonoDebugMethodJitInfo *jit'.
6743 * mono-debug.c (mono_debug_read_method): Cache the
6744 MonoDebugMethodJitInfo in `address->jit'.
6745 (mono_debug_free_method_jit_info): New public method.
6747 2005-04-22 Martin Baulig <martin@ximian.com>
6749 * class.c (mono_class_is_assignable_from): Disallow
6750 type parameter -> interface.
6752 2005-04-21 Dick Porter <dick@ximian.com>
6754 * threads.c (mono_thread_create): Turn an assertion into an error.
6756 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
6758 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
6760 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
6761 Fix some gcc 4.0 warnings.
6763 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
6765 * file-io.c: fix alt dir separator char on unix systems
6766 and cleanup (fixes bug #71214).
6768 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
6770 * marshal.c: Use CALLVIRT instead of CALL when dispatching
6771 a call to a remote domain, since the method may be an
6772 interface method in the client domain. This fixes bug #74192.
6774 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6776 * threadpool.c: recv/send are now performed before going back to managed
6777 code to save one transition.
6779 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6781 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
6783 * metadata/threadpool.c: removed hack to workaround the bug above.
6787 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
6789 * reflection.c reflection.h: Fix handling of parameter defaults in
6790 dynamic methods. Also fixes handling of parameter attributes.
6793 * mono-debug.c (mono_debug_close_image): Fix warning.
6795 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6797 * socket-io.h: replaced old unused field with new 'blocking'.
6798 * threadpool.c: restore socket blocking state on windows(tm).
6800 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
6802 * icall.c: don't return the codebase in the AssemblyName[] returned by
6803 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
6804 * object-internals.h: Removed FIXME (fields were presents) and fixed
6805 versioncompat declaration.
6807 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6809 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
6810 not closed, so don't cleanup when it happens.
6812 2005-04-13 Chris Toshok <toshok@ximian.com>
6814 * mono-debug-debugger.h: change prototype for
6815 mono_debugger_lookup_type.
6817 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
6818 this function, although it should probably be named
6819 mono_debugger_init_type.
6821 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6823 * threadpool.c: fix non-AIO case.
6825 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
6827 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
6828 the built-in profiler to measure just JIT compilation times.
6830 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6832 * threadpool.c: the epollfd might be closed by another thread at
6833 any time, so ignore EBADF at treat it as a "we're closing" sign.
6835 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6837 * threadpool.c: release the semaphores with a count equals to the number
6838 of working threads in both IO and regular pools. Fixed typo that messed
6839 up the count of IO pool threads. Don't initialize the pipe handles if
6842 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6844 * threadpool.c: some systems don't like a NULL when deleting the socket
6847 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6849 * threadpool.c: fix semaphore allocation.
6851 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6853 * threadpool.c: added epoll() based implementation for asynchronous IO
6854 that is used instead of the default poll() when available.
6855 It can be disabled by setting MONO_DISABLE_AIO.
6857 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6859 * threadpool.c: windows needs 'closesocket' and instead of returning
6860 0 when the stream is closed while in select, it returns -1. Fixes bug
6863 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
6865 * class.c (class_compute_field_layout): Fix the regression caused by
6868 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6870 * threadpool.c: separate pool for socket async. IO.
6871 * threadpool.h: mono_max_worker_threads is not a global any more.
6873 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
6875 * class.c (class_compute_field_layout): Fix #74549.
6877 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6879 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
6880 use 2 connected sockets instead.
6882 2005-04-08 Miguel de Icaza <miguel@novell.com>
6884 * mono-config.c: Add new entry point for mkbundle
6885 mono_config_parse_memory.
6887 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6889 * threadpool.c: removed another unused function.
6891 2005-04-08 Ankit Jain <radical@corewars.org>
6893 * reflection.c (get_default_param_value_blobs): Add 'types'
6894 parameter to get the types encoded in the constant table.
6895 (mono_param_get_objects): Use the type from the constant table,
6896 not the type of the parameter, when creating default values.
6897 Handle null default values correctly.
6899 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6906 * socket-io.c: removed dead code for async IO.
6908 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6910 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
6912 * threadpool.c: intercept socket async. calls and pass them to a thread
6913 that is polling and dispatching the job items to the threadpool as
6914 socket become ready. Fixes bugs #71217, #71933.
6916 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
6917 between char and short/ushort arrays.
6919 * socket-io.c: remove dead code.
6921 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
6924 icall.c : removed InternalToUpper_Comp() and
6925 InternalToLower_Comp().
6927 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
6929 * char-conversions.h : The tables were incorrectly generated. Should
6930 be generated against invariant culture.
6932 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
6934 * object.c (mono_runtime_invoke_array): Fix return value when
6935 passing pre-created valuetype objects to ctors.
6937 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
6938 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
6941 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
6943 * domain.c: removed g_assert for runtimesecurityframe_class. This is
6944 only used with --security and hides the wrong corlib version error.
6946 2005-03-30 Joshua Tauberer <tauberer@for.net>
6948 * class.c: Changed mono_class_name_from_token so that types
6949 outside of a namespace don't have an initial period. Improved
6950 the g_warning message used in _mono_class_get when loading
6952 * assembly.c: In mono_assembly_load_reference, when an assembly
6953 can't be found, "No such file or directory" is misleading and
6954 unhelpful because a few paths were checked for the presence of
6955 the assembly. When that happens (ENOENT), display a nicer
6956 message indicating the directories that were searched. In all
6957 cases, the warning is made easier to read for non-hackers.
6959 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
6961 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
6963 * appdomain.h|domain.c: Removed inline from functions.
6964 * appdomain.c: Reduced warnings when compiling on windows.
6965 * icall.c: Fixed output_debug declaration to gunichar2*.
6966 * mono-config.c: Reduced warnings when compiling on windows.
6967 * rand.c: Added missing "windows.h". Added missing return value.
6968 * rawbuffer.c: Added missing winsock2.h for windows.
6969 * sysmath.h: Added mono-compiler.h header to allow/ease
6970 compilation with non-GCC compilers.
6971 * threads.c: Fixed declarations to compile with VS.NET C compiler.
6972 Removed cast warnings.
6974 Adapted from the work of J Lothian (for VC6).
6976 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
6978 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
6981 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
6983 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
6986 2005-03-27 Raja R Harinath <harinath@gmail.com>
6988 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
6989 has to be in $(exec_prefix). $(prefix) is for arch-independent
6990 stuff, and it would probably use $(prefix)/share rather than
6993 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6995 * console-io.c: added 2 includes that might be missing.
6997 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
6999 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
7002 * reflection.c (create_custom_attr): Allocate the params array using
7003 alloca so it gets GC tracking.
7005 2005-03-23 Chris Toshok <toshok@ximian.com>
7007 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
7010 2005-03-24 Raja R Harinath <rharinath@novell.com>
7012 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
7013 changes to pick up any changes in prefix, etc.
7015 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
7017 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
7019 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
7020 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
7022 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
7024 * class-internals.h object-internals.h class.c reflection.c: Extend the
7025 mono_lookup_dynamic_token () function to return the class of the
7028 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
7031 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
7033 * security-manager.c: Skip inheritance checks for intra-corlib
7034 class inheritance and method overrides. This skips a lot of checks
7035 and (anyway) permissions cannot work until corlib is loaded.
7037 2005-03-23 Martin Baulig <martin@ximian.com>
7039 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
7040 MONO_TYPE_GENERICINST.
7042 2005-03-23 Martin Baulig <martin@ximian.com>
7044 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
7046 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7048 * class.c: added locking comments to some functions.
7049 Cache the interface offsets arrays (saves about 20 KB
7050 of runtime memory in a typical app).
7051 Reduce the time overhead in mono_class_setup_supertypes ().
7053 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
7055 * icall.c: speedup and fix leaks in GetMethodsByName and
7056 GetPropertiesByName.
7058 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7060 * reflection.c: some locking fixes.
7062 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
7064 * metadata.c: added missing break in case statement.
7066 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
7068 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
7069 typedbyref return values. Fixes #73941.
7071 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
7073 * security-manager.c|h: Added demandunmanaged method and
7074 suppressunmanagedcodesecurity class to MonoSecurityManager.
7075 Renamed aptc class to allowpartiallytrustedcallers.
7077 2005-03-17 Martin Baulig <martin@ximian.com>
7079 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
7081 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7083 * file-io.c: disabled file async. IO using aio_*. It uses the
7084 threadpool now. Workaround for bug #73718.
7086 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7088 * assembly.h, mono-config.c: added code to deal with bundled configs
7089 for bundled assemblies.
7091 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
7093 * *.c, private.h: cleanup, removing old private.h header file.
7095 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
7097 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
7098 and throw_on_unmappable_char attributes.
7100 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
7102 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
7103 _ProcessName_internal.
7105 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
7107 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
7110 * icall.c threads.c threads-types.h: Remove slothash icalls as they
7113 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
7115 * object.c (compute_class_bitmap): Add support for generics. Fixes
7118 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
7120 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
7122 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7124 * filewatcher.c: commented out the code for windows watcher, as we don't
7125 use it (we use the managed implementation instead).
7127 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
7129 * object-internals.h (MonoThread): Remove 'unused1' field.
7131 * appdomain.c: Bump corlib version.
7133 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
7135 * reflection.c (mono_reflection_create_runtime_class): Remove the
7136 AssemblyBuilder.Save optimization since it causes too many problems.
7138 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
7140 * exception.c|h: Added mono_get_exception_reflection_type_load to
7141 create a ReflectionTypeLoadException object.
7142 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
7143 to return NULL is a InheritanceDemand fails during reflection. Updated
7144 ves_icall_System_Reflection_Assembly_GetTypes to throw a
7145 ReflectionTypeLoadException if an InheritanceDemand fails during
7146 reflection. Added icall mapping for GetLinkDemandSecurity.
7147 * security-manager.c|h: Added ves_icall_System_Security_
7148 SecurityManager_GetLinkDemandSecurity internal call to return the
7149 class and methods permissions set for a LinkDemand. Removed unused
7150 fields in MonoSecurityManager.
7152 2005-03-10 Martin Baulig <martin@ximian.com>
7154 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
7155 it's a generic instance.
7157 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
7159 * reflection.c (mono_get_object_from_blob): Applied patch from
7160 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
7162 * class.c (mono_class_is_assignable_from): Another try at fixing
7163 #73469 without breaking anything.
7165 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
7167 * class.c: (mono_class_is_assignable_from): Revert the last changes
7168 since they don't work with generics.
7170 * class.c (mono_class_is_assignable_from): Fix build bustage.
7172 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
7173 the managed IsAssignableFrom method. Fixes #73469.
7175 * reflection.c (mono_reflection_call_is_assignable_from): New helper
7178 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
7180 * object.c (mono_load_remote_field_new): Fix returning uninitialized
7181 memory when the remoting callback does not sets the out arguments.
7184 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
7187 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
7189 * object-internals.h (MonoStackFrame): Sync with managed object layout.
7191 * appdomain.c: Bump corlib version.
7193 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
7195 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
7198 * threads.c (mono_thread_attach): Detect threads which are not started
7199 by the GC pthread wrappers.
7201 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
7203 * icall.c: Added new icall for RNG.
7204 * rand.c|h: Added new icall to open the RNG. This allows to share a
7205 single handle on Linux to access /dev/urandom and fix #73183.
7207 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7209 * object.c: setting the new vtable in a transparent proxy object must
7210 not change the GC descriptor.
7212 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7214 * object.c: fixed compilation without GCJ support.
7215 * reflection.c: for runtime-created types ensure klass->has_references
7216 is correct (bug #73215).
7218 2005-03-02 Martin Baulig <martin@ximian.com>
7220 * class.c (mono_class_is_assignable_from): Make this work if
7221 `oklass' is a generic instance; fixes #72831.
7223 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
7225 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
7228 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
7230 * marshal.c: Reorganize native->managed marshalling code to also use
7231 the emit_marshal_... functions.
7233 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
7235 * object.c: typed allocs have issues with bitmap sizes > 30,
7236 so check for max_set >= 30.
7238 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
7240 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
7241 managed code. Fixes #73012.
7243 * metadata.h (MonoMarshalSpec): Add elem_mult field.
7245 * metadata.c reflection.c: Load/Emit elem_mult as well.
7247 * metadata.h (MonoMarshalSpec): Add comment.
7249 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
7251 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
7252 num_elem to -1 if not given.
7254 * object-internals.h (MonoReflectionMarshal): Add has_size field.
7256 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
7259 2005-03-01 Marek Safar <marek.safar@seznam.cz>
7261 * null-gc.c (mono_gc_free_fixed): Was not compilable.
7263 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
7265 * reflection.c (encode_marshal_blob): Encode param_num field as well.
7267 * object-internals.h (MonoReflectionMarshal): Add param_num field.
7269 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
7271 * object.c: generalized the reference bitmap creation
7272 and added hooks for the new GC.
7273 * class-internals.c: removed the gc_bitmap field from MonoClass.
7275 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7277 * domain.c: help the compiler to produce better code
7278 in mono_jit_info_table_find ().
7280 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
7282 * object.c: make all allocations look typed.
7284 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7286 * socket-io.c: load Mono.Posix if it's not loaded already
7289 2005-02-24 Martin Baulig <martin@ximian.com>
7291 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
7292 * reflection.c (dup_type): Likewise.
7294 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
7296 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
7297 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
7299 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7301 * domain.c, threads.c, object-internals.h: make the critical thread
7302 local vars use the fast access mode (even when we're compiled in
7303 a lib). Provide accessors to be used by the jit during codegen.
7305 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7307 * appdomain.c: Changed hook functios behavior to include
7308 support for the reflection only assemblies. Some icalls were changed
7309 to support the mentioned assemblies too. Signatures of static methods
7310 try_assembly_resolve and real_load now have an additional parameter:
7313 * assembly.c: General changes to mono_assembly_ methods to support
7314 reflection only api. Functions mono_assembly_open, mono_assembly_load,
7315 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
7316 suffix, to support an additional gbool parameter to specify whether
7317 the assembli is reflection only or not. Created some new hook functions
7318 to add support for reflection only assemblies. Signatures of static
7319 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
7320 have now an additional parameter: refonly.
7322 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
7323 indicating whether the assembly is reflection only or not.
7325 * exception.c: Add mono_get_exception_invalid_operation.
7327 * icall.c: Throw an InvalidOperationException when trying to invoke
7328 a property/method/event, or trying to set/get the value of a field.
7329 Also add an icall to retrieve the ref_only flag to the
7330 MonoReflectionAssembly.
7332 2005-02-23 Chris Toshok <toshok@ximian.com>
7334 Part of fix for #72827.
7335 * mono-debug.c (mono_debug_add_method): add lexical block data to
7336 the info we write. Kind of a hack at the moment - we copy the
7337 lexical block info from the MonoDebugMethodInfo to the
7338 MonoDebugMethodJitInfo here, before writing it.
7339 (mono_debug_read_method): read the lexical block info.
7341 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
7343 * debug-mono-symfile.h: add lexical block support.
7345 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
7348 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
7350 * loader.c (mono_lookup_pinvoke_call): Fix warning.
7352 * object.c (mono_runtime_free_method): Call mono_free_method () and
7353 put the TODOs there.
7355 * loader.c (mono_free_method): Free up most memory allocated for
7358 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7360 * reflection.c: properly flag a Type argument to a
7361 named custom attr value (bug #72248).
7363 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7365 * reflection.c: reduce code duplication in named custom
7368 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
7370 * reflection.c: properly encode custom attrs of type object
7373 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
7375 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
7377 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
7379 * socket-io.c: load System.dll if it's not loaded already
7380 (bug #72850 and #70477).
7382 2005-02-21 Martin Baulig <martin@ximian.com>
7384 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
7387 2005-02-21 Martin Baulig <martin@ximian.com>
7389 * reflection.c (mono_image_build_metadata): We also need to
7390 "fixup" the MethodImpl table after we computed the final method
7391 indices. Call fixup_methodimpl() to do that.
7392 (fixup_methodimpl): New private method.
7394 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
7396 * assembly.c: special case mscorlib.dll (bug#72536),
7397 patch from Carlos Alberto Cortez.
7399 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
7401 * threads-types.h threads.c: Fix build bustage.
7403 * threads.c: Use a union for long<->double conversions.
7405 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
7406 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
7408 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
7409 containing the checkpoint call with NOT_TAKEN.
7411 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
7412 checkpoint before pushing the arguments, so they won't have to be
7415 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7417 * domain.c, assembly.c, domain-internals.h: make some data
7418 const and relocation-free.
7420 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
7422 * object.c, appdomain.c, class-internals.h: introduce the
7423 MonoClassRuntimeInfo structure to hold the info needed to
7424 use a class at runtime. Made mono_class_vtable() lock-free
7425 for all the appdomains.
7427 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
7429 * metadata-internals.h, image.c: introduce a per-image mempool to
7430 be used for memory that has the same lifetime as the image.
7432 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
7434 * domain.c: In mono_init_internal(), instead of selecting the first
7435 runtime version supported by an executable, get a list of all
7436 supported versions and select the one for which an mscorlib exists
7437 (since even if the runtime supports a given version, it doesn't mean
7438 that the framework for that version is installed).
7439 Modified get_runtimes_from_exe to support this behavior.
7440 In supported_runtimes, added information about additional system
7443 * assembly.c: Added support for more than one system assembly version
7444 per runtime version. Updated the assembly list.
7445 In mono_assembly_remap_version, removed the initial version check,
7446 since we don't know to which version we need to compare until we
7447 get the version set on which the assembly is based.
7448 Moved the code for loading corlib into the new method
7449 mono_assembly_load_corlib(), so it can be used by the initialization
7452 * domain-internals.h: Updated data structures and added declaration
7453 for mono_assembly_load_corlib.
7455 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
7457 * reflection.c (resolve_object): Fix the creation of the signature in
7458 the SignatureHelper case.
7460 * assembly.c (mono_assembly_remap_version): Fix binary search.
7462 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
7464 * class.c: Added inheritance check when a method is overloaded (from a
7465 virtual method or when implementing an interface) and when a class is
7466 inherited. Added functions to set a failure for a class and to
7467 retreive the exception from a failure.
7468 * class-internals.h: Added fields to MonoClass to keep the exception
7469 information status for inheritance (or other exceptions) to be thrown
7470 later (i.e. not at load time).
7471 * object.c: Throw the inheritance SecurityException when a type is to
7472 be created with either class or method inheritance violations.
7473 * reflection.c|h: Fix when getting declsec from a class. Removed
7474 unrequired code for class. Improved sanity in parameter naming.
7475 * security-manager.c|h: Added functions to check for class and method
7478 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
7480 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
7481 and has_finalize in dynamic types as well.
7483 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
7485 * culture-info-table.h : fixed currency format for en-GB (and so on).
7487 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
7489 * gc.c: ensure the GC handles never have 0 as a value.
7491 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
7493 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
7494 a pointer to a struct to unmanaged code. Fixes #72625.
7496 2005-02-16 Martin Baulig <martin@ximian.com>
7498 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
7500 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
7502 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
7504 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
7506 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
7508 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
7509 UnmanagedFunctionPointerAttribute, use it for determining calling convention
7512 * reflection.c (mono_custom_attrs_get_attr): New helper function.
7514 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
7516 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
7518 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
7519 changes to make the current context a field in MonoThread.
7521 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
7523 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
7526 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
7527 extracted from mono_marshal_get_native_wrapper.
7529 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
7530 to create wrappers around native functions.
7532 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
7533 delegates for arbitrary function pointers. Fixes #71472.
7535 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
7537 * threads.c: cleaned up the code a little.
7539 2005-02-15 Martin Baulig <martin@ximian.com>
7541 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
7544 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
7545 allocate larger chunks if needed.
7547 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
7549 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
7552 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
7554 * domain.c: keep the domains in an array and ensure the domain ids
7555 are kept small, so they can be used as indexes to domain-specific data
7556 with a small memory overhead.
7558 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
7560 * icall.c: Handle byref types in Type icalls. Fixes #72544.
7562 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
7564 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
7566 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
7568 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
7570 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
7573 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
7575 2005-02-12 Ben Maurer <bmaurer@ximian.com>
7577 * domain-internals.h: add the hashtable here.
7579 * class-internals.h: Remove `info' from MonoMethod
7581 * domain.c: Add a new hashtable, jit_trampoline_hash
7583 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7585 * object.c: don't set the value of static fields
7588 2005-02-11 Martin Baulig <martin@ximian.com>
7590 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
7591 (mono_debug_add_method): Silently ignore the method if it's too big.
7592 (mono_debug_add_type): Likewise.
7594 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
7596 * threads.c, appdomain.c: remove #ifdefs from the code.
7598 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
7600 * metadata-internals.h: Added flags to MonoAssembly to cache the most
7601 common security informations. This allows us to stay in unmanaged code
7602 when doing LinkDemand and it's special cases (except for the first
7603 time for initialization). The flags a very much used with --security.
7604 * reflection.c|h: Added code to get declarative security attributes
7605 for LinkDemand and InheritanceDemand. This required to refactor the
7606 existing code for Demand.
7607 * security-manager.c|h: Added new method fields for the special cases
7610 2005-02-10 Martin Baulig <martin@ximian.com>
7612 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
7613 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
7615 2005-02-10 Martin Baulig <martin@ximian.com>
7617 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
7618 debugging code; this is almost a complete rewrite.
7620 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
7622 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7624 * domain.c, object.h: expose mono_string_equal () and
7625 mono_string_hash ().
7626 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
7627 it's implemented in managed code.
7629 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7631 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
7632 lo leak objects between appdomains.
7634 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7636 * assembly.c: old compilers compilation fix from
7637 robertj@gmx.net (Robert Jordan).
7639 2005-02-09 Ben Maurer <bmaurer@ximian.com>
7641 * class-internals.h: Little reminder for the future.
7643 * debug-helpers.c: Fix up wrapper_type_names
7645 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7647 * image.c, metadata-internals.h: when loading an image from a file,
7648 mmap all of it and use the same codepaths as when using a
7649 in-memory image: the code is simpler and we use less memory
7650 (both writable and readonly).
7652 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
7654 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
7655 API to alloc runtime data structures that need to be tracked by the
7656 GC and contain pointers.
7657 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
7658 make the code more readable and eventually use a different GC.
7660 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
7662 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
7665 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
7667 * object.c: In release_type_locks(), don't release the cctor lock
7668 if it has already been released. This fixes a crash in the
7671 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7673 * gc.c, marshal.c, icall.c: register a delegate for finalization
7674 only when the native function pointer has been allocated for it.
7676 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7678 * object.c: cleaned up some code, allocate objects that are
7679 pointer free with the atomic malloc variant. Allocate memory
7680 for static data from the mempool if it's pointer-free.
7681 Allocate the bounds array at the end of the array data, when needed.
7682 * object-internals.h, object.h: move a private function in a private
7684 * class.c: handle missing case in tracking references in fields.
7686 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
7688 * class.c, class-internals.h: keep track if a type has
7689 reference fields in either the instance or static fields.
7691 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
7693 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
7694 and renamed to MonoRuntimeInfo. Added fields to store the expected
7695 framework assembly version. Changed mono_get_framework_version and
7696 mono_get_runtime_version for a single mono_get_runtime_info method.
7698 * assembly.c: Added method to remap system assembly versions to the
7699 current executing runtime version. Removed old mapping code.
7700 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
7702 * icall.c, reflection.c: Track api changes.
7704 2005-02-06 Miguel de Icaza <miguel@novell.com>
7706 * loader.c (method_from_memberref): Improve error reporting,
7707 produce the class name instead of the typeref/typedef index.
7709 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
7711 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
7713 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
7715 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
7716 stdcall and charset name mangling. Reorganize the code and add
7719 2005-02-05 Ben Maurer <bmaurer@ximian.com>
7721 * monodiet.c: More iters!
7723 * marshal.c: Iter usage.
7725 * icall.c: Iter usage.
7727 * object.c: Use iters.
7729 * debug-helpers.c: More iters
7731 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
7733 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
7736 2005-02-05 Ben Maurer <bmaurer@ximian.com>
7738 * mono-debug-debugger.c: use iters
7740 * class.c, class-internals.h: mono_class_setup_events is static
7743 * All callers: use iters
7745 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
7747 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
7748 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
7750 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
7752 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
7754 * marshal.h: Add prototypes for ldfld/stfld_remote.
7756 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
7757 this is called during startup.
7759 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
7761 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
7762 MonoThreadsSync struct private in monitor.c. Changed the way
7763 MonoThreadsSync is allocated so it's faster and there is no
7764 need to keep track of it with a finalizer and it uses less memory.
7765 This also finally allows us to allocate mono objects as ptrfree when
7766 there are no reference fields.
7768 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
7770 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
7771 disappearing link to the GC interface and use them to simplify
7774 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
7776 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
7777 stfld_remote which call mono_load/store_field_new. This allows methods
7778 calling ldfld/stfld wrappers to be AOTed.
7780 * console-io.c: Include sys/filio.h under solaris.
7782 * console-io.c: Include curses.h if needed correctly.
7784 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
7786 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
7787 method->klass as well.
7789 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
7791 * class.c (mono_class_init): Switch on lazy initialization of
7794 * class.c (mono_class_get_finalizer): Handle the case when the
7795 finalizer is inherited.
7797 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7799 * console-io.c: <curses.h> is needed by term.h on solaris.
7801 2005-02-03 Ben Maurer <bmaurer@ximian.com>
7803 * icall.c, class-internals.h, monodiet.c, class.c: Remove
7804 mono_class_setup_properties where possible. Remove this ftn from
7805 the header file, and make it static.
7807 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
7809 * loader.c: Add missing setup_... call.
7811 * class.c: Add missing setup_... calls.
7813 * class.c (mono_class_init): Switch on lazy initialization of
7816 * class.c (mono_class_init): Fix generics broken by the recent changes.
7818 * monodiet.c (handle_type): Add missing setup_... calls.
7820 * class.c: Back out garbage in previous patch.
7822 * class.c: Add missing setup_... calls.
7824 * class.c (mono_class_get_method_from_name_flags): Avoid calling
7825 mono_class_setup_methods () if possible.
7827 * class-internals.h (MonoClass): Add 'has_cctor' flag.
7829 * class-internals.h (MonoCachedClassInfo): New structure.
7831 * class.c: Initialize properties and events fields of MonoClass lazily.
7833 * class.c: Add infrastructure for lazily initializing the methods and
7834 vtable fields of MonoClass. Not yet used.
7836 * class.c (mono_class_get_finalizer): New helper function.
7838 * class.c: Add infrastructure for loading some class related data from
7841 * object.c: Add infrastructure for initializing the vtable from data
7844 * gc.c (run_finalize): Use mono_class_get_finalizer ().
7846 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
7847 appropriate initialization function before accessing parts of the
7848 MonoClass structure.
7850 * marshal.c: Fix warnings.
7852 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
7854 * mono-debug-debugger.c (get_exception_message): Use
7855 mono_class_get_method_from_name_flags ().
7857 2005-02-02 Ben Maurer <bmaurer@ximian.com>
7859 * reflection.c, appdomain.c: Replace a few manual searches that
7860 Zoltan missed. (Paolo approved this part of my initial patch).
7862 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
7864 * profiler.c: disable recording statistical events at report time.
7866 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7868 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
7869 to byteswap arrays of enum values, too (bug #72080).
7871 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
7873 * appdomain.c (set_domain_search_path): Allow this to be called if
7874 domain->setup is not yet set.
7876 * loader.c (mono_method_get_index): New helper function.
7878 * loader.c reflection.c: Use mono_method_get_index ().
7880 * class.c (mono_class_get_method_from_name_flags): New helper method.
7882 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
7885 * class.c (mono_class_get_cctor): New helper method.
7887 * string-icalls.c object.c class.c marshal.c reflection.c: Use
7888 mono_class_get_method () to look up methods.
7890 2005-02-01 Miguel de Icaza <miguel@novell.com>
7892 * console-io.c: Fix the build, this should work on Windows.
7894 2005-01-31 Ben Maurer <bmaurer@ximian.com>
7896 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
7897 be set to null to keep things valid
7899 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7901 * icall.c: added Console 2.0 icalls.
7902 * Makefile.am: added console-io.[ch]
7903 * console-io.[ch]: internal calls for Console 2.0 API.
7905 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7907 * class.c: make sure we consider all the interfaces
7908 when calculating max_interface_id (bug found by
7909 Jeroen Frijters running ikvm).
7911 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
7913 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
7914 valuetype fields to null.
7916 * object.c (set_value): Ditto. Fixes #71669.
7918 2005-01-31 Martin Baulig <martin@ximian.com>
7920 * metadata.c (mono_metadata_has_generic_params): New public
7921 function; checks whether something is a generic method.
7923 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7925 * appdomain.c: fix infinite recursion when adding assemblies.
7927 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
7929 * object.c: Fix small typo to return all items for Environment.
7932 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7934 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
7935 reflection.c: more domain and assembly-unload related fixes
7936 and memory leaks plugs.
7938 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
7940 * 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.
7942 2005-01-29 Ben Maurer <bmaurer@ximian.com>
7944 * loader.c (mono_method_signature): Make this method lazy
7945 (mono_get_method_from_token): Don't computate the signature here.
7947 Doing this saves quite a bit of memory. I got 90 kb on starting up
7948 monodoc. It should also save some disk reads on startup.
7950 * *: MonoMethod->signature might be NULL now. You *MUST* use
7951 mono_method_signature.
7953 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
7955 * object.c (mono_runtime_get_main_args): Return an array from the
7956 current domain here. Fixes #71938.
7958 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
7960 * monitor.c: formatting changes to comply with the
7961 mono coding style and remove #ifdefs from the code.
7963 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
7965 * metadata.c, private.h: remove some unneeded data
7966 and use a more compact representation for table schemas.
7968 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
7970 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
7971 to get a better distribution in hash tables.
7972 * *.c: use mono_aligned_addr_hash() where appropriate.
7973 * assembly.c: make var static.
7975 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
7977 * domain-internals.h: Put MonoJitInfo on a diet.
7979 * domain.c: Fix a warning.
7981 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7983 * gc.c: rework the gc handles code to reuse handles
7986 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
7988 * domain.c: fixed long standing bug in mono_string_equal() which
7989 was brought to light with the ldstr changes.
7991 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
7993 * reflection.c: Remove warning by adding missing include for marshal.h
7995 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7997 * domain.c, object.c: change the ldstr_table to hold
7998 MonoString* as keys: makes the runtime isinterned lookup
7999 faster and simplifies memory management.
8001 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
8003 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
8004 possible to add imperative security checks before calling the icall.
8005 * reflection.c: Return security attributes on the original MonoMethod
8006 (and not the wrapped one). This fix permissions on icalls.
8008 2005-01-25 Dick Porter <dick@ximian.com>
8010 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
8011 the check for mktime() support actually test the mktime() return
8012 value. "Fixes" bug 71682, though the output is still different to
8015 2005-01-25 Martin Baulig <martin@ximian.com>
8017 * class.c (mono_class_is_assignable_from): Make this work for
8020 2005-01-24 Ben Maurer <bmaurer@ximian.com>
8022 * marshal.c (mono_string_utf8_to_builder)
8023 (mono_string_builder_to_utf16): We might not have ownership of the
8024 string. In thise case, we need to create a new buffer.
8026 * object-internals.h (mono_stringbuilder_capacity): sb->str might
8027 be null, in which case, use the default capacity.
8029 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
8031 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
8032 GC events to the profiler.
8034 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
8036 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
8037 if you don't want the GC to run.
8039 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
8041 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
8042 start providing a GC API and keeping different implementations in
8044 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
8046 2005-01-22 Ben Maurer <bmaurer@ximian.com>
8048 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
8049 mmap rather than allocating a huge buffer.
8050 (mono_debug_close_mono_symbol_file): Free the buffer allocated
8053 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
8055 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
8056 and CheckExecutionRights.
8057 * reflection.c|h: Keep the index of the declarative security to be
8058 used, instead of the pointer, when AOT compiler is used. Also add
8059 class initialization when requesting demands.
8060 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
8061 CheckExecutionRights. Both properties are now FALSE by default, and
8062 unmodifiable, unless the --security option is used.
8064 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8066 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
8067 reflection.c: properly refcount images and assemblies, many leaks fixed.
8069 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8071 * threadpool.c: increase the timeout for threads in the thread pool to
8072 10s. Fixes bug #67159.
8074 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
8076 * class-internals.h: Sun's compiler insists on explicit
8077 signed on bit fields to handle then correctly.
8079 2005-01-19 Miguel de Icaza <miguel@ximian.com>
8081 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
8082 Make the size of the array fit only the number of invalid path
8085 * class.c (_mono_class_get): Improve the error reporting when a
8086 class referenced is not found, to assist debugging.
8088 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
8090 * threads.c: fix off-by-one error.
8091 * domain.c: free data allocated in the domain.
8093 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
8095 * reflection.c (mono_method_body_get_object): Fill out exception info
8098 * object-internals.h: Add MonoReflectionExceptionHandlingClause
8101 2005-01-19 Martin Baulig <martin@ximian.com>
8103 * loader.c (mono_get_method_constrained): Make this work again.
8105 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
8107 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
8108 guint16 to match the managed side.
8110 * reflection.c (mono_reflection_body_get_object): Fill out local
8113 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
8116 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
8117 'local_var_sig_token'.
8119 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
8121 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
8124 * reflection.c (mono_method_body_get_object): Handle abstract and
8127 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
8129 * marshal.c, loader.c, class-internals.h, reflection.c:
8130 store the emthod data for a wrapper in an array instead of a list.
8132 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
8134 * marshal.c: change the code to allocate memory more
8135 conservatively for method wrappers.
8137 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
8139 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
8140 fields from MonoClass to the marshal info structure where they belong.
8142 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
8144 * class.c, object.c, class-internals.h, marshal.c: rearrange
8145 some fields and tweak some types to lower memory usage.
8147 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
8149 * threads.c (signal_thread_state_change): Handle the case when the
8150 target thread is the current thread.
8152 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
8154 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
8155 emit_ptr_to_object_conv.
8157 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
8158 marshalling. Fixes #71352.
8160 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8162 * metadata.h, blob.h: move table enum to blob.h so it can be included
8164 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
8165 cut the size of MonoImage/MonoDynamicImage.
8167 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
8169 * profiler.c (mono_profiler_install_simple): Fix default arguments.
8171 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
8173 * reflection.c, reflection.h, icall.c: add a function to check
8174 if an attribute type is defined for a metadata object.
8176 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
8178 * object-internals.h: Added some needed fields from StringBuilder class.
8179 * marshal.c: Set the maxCapacity when creating a StringBuilder.
8181 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
8183 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
8184 threads before shutting down the runtime.
8186 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
8188 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8190 * object-internal.h, threads.c: implement stacksize and
8191 parameterized thread start functionality (requires
8192 matching corlib). Marked broken code for later removal.
8194 2005-01-12 Martin Baulig <martin@ximian.com>
8196 * class-internals.h (MonoGenericClass): Moved the `initialized'
8197 flag to MonoDynamicGenericClass, removed `init_pending'.
8198 (MonoGenericInst): Added `is_reference' flag.
8200 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
8202 * reflection.c (mono_image_create_pefile): Only set the pe_offset
8203 inside the MSDOS header. Fixes #71201.
8205 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
8207 (mono_domain_finalize): Ditto.
8209 2005-01-12 Martin Baulig <martin@ximian.com>
8211 * class.c (mono_get_shared_generic_class): Use the cache for
8212 non-dynamic generic classes.
8214 * class-internals.h (mono_class_create_generic_2): Removed
8215 function prototype, this function is now static inside class.c.
8217 * class.c (mono_class_create_generic_2): Made this static, only
8218 call it from mono_class_init() and mono_class_setup_parent().
8219 (collect_implemented_interfaces_aux): Call mono_class_init() on
8220 the interfaces we collect.
8221 (mono_class_setup_vtable): Call mono_class_init (class->parent).
8223 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
8225 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
8226 it a real thread handle.
8228 * domain-internals.h: Move exvar_offset from MonoJitInfo to
8229 MonoJitExceptionInfo, since each catch clause needs its own variable.
8231 2005-01-11 Dick Porter <dick@ximian.com>
8233 * image.c (mono_pe_file_open): New variant on mono_image_open()
8234 that does not set up the CLI metadata; used for FileVersionInfo so
8235 it can get the data for windows binaries too.
8237 * process.c (process_read_string_block): Don't read off the end of
8238 the StringTable block.
8240 These both fix bug 70766.
8242 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
8244 * gc.c: set some fields to NULL at GC cleanup time.
8245 * threads.c: if we quit the main thread, call exit ().
8247 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
8249 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
8251 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
8253 * threads.h, threads.c, object.c: added accessor and settor for
8254 main_thread. Handle it specially when exiting from it: wait
8255 for other foreground threads to exit.
8257 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8259 * process.c, verify.c: remove some bloat.
8261 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
8263 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
8264 the calling convention to cdecl under win32.
8266 2005-01-08 Ben Maurer <bmaurer@ximian.com>
8268 * object.c (mono_object_get_size): New function to get the size of
8271 * profiler.c (simple_allocation): Use above.
8273 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
8275 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
8276 ves_icall_System_AppDomain_getRootDomain (as it's not required to
8277 get an appdomain by it's id and we can't assume the root's id is 0).
8278 * domain-internals.h: Change the function prototype to match.
8279 * icall.c: Change the icall table for AppDomain.
8281 2005-01-08 Miguel de Icaza <miguel@ximian.com>
8283 * locales.c (string_invariant_compare_char): Only compute
8284 GUnicodeTypes in the case where we need them. Test for ordinality
8285 first and return if so.
8290 * FIXME: here we must use the information from c1type and c2type
8291 * to find out the proper collation, even on the InvariantCulture, the
8292 * sorting is not done by computing the unicode values, but their
8293 * actual sort order.
8296 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8298 * loader.c: for P/Invoke methods, allow the "Internal" shared
8299 library name to refer to the calling process symbol namespace.
8301 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
8303 * Makefile.am: Add the security manager to the build.
8304 * security-manager.c|h: New. Initialization of the security manager.
8306 2005-01-07 Dick Porter <dick@ximian.com>
8309 * monitor.c: Update thread state during Monitor and WaitHandle
8310 waits. Fixes bug 71031.
8312 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
8314 * reflection.c (property_encode_signature): Correctly handle when the
8315 property has no methods.
8317 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
8319 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
8321 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
8322 fields from mb, not rmb. Fixes #71017.
8324 * marshal.c (emit_ptr_to_str_conv): Add support for
8325 ByValTStr -> string conversion. Fixes #71015.
8327 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
8329 * mempool.c (mono_mempool_contains_addr): New helper function.
8331 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
8333 * metadata.c (mono_metadata_compute_size): Fix size calculation of
8334 HasSematics encoded fields.
8336 * metadata.c (mono_type_to_unmanaged): Improve error message for
8337 invalid string marshalling.
8339 * metadata.c: Fix warnings.
8341 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8343 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
8346 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
8348 * domain.c object.c domain-internals.h: Revert part of r38077 since the
8349 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
8352 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
8354 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
8355 so methods containing these can be AOTed.
8357 2005-01-03 Martin Baulig <martin@ximian.com>
8359 * loader.c (find_method): Removed the hack for generic instances.
8360 (method_from_memberref): If our parent is a generic instance, pass
8361 its generic type definition to find_method() and then inflate the
8363 (mono_get_method_constrained): Pass the generic type definition to
8364 find_method() and inflate the method later.
8366 * class-internals.h (MonoStats): Added `generic_class_count'.
8368 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
8369 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
8371 * reflection.c (mono_custom_attrs_from_params): Don't ignore
8372 generic type definitions.
8374 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
8376 * loader.c icall.c: Fix warnings.
8378 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
8380 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
8381 blittable types. Fixes #70864.
8383 2004-12-29 Martin Baulig <martin@ximian.com>
8386 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
8388 * reflection.c (mono_method_get_object): Create a
8389 "System.Reflection.MonoGenericMethod" for inflated methods; don't
8390 call mono_get_inflated_method().
8392 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
8394 2004-12-27 Martin Baulig <martin@ximian.com>
8396 * class-internals.h (MonoMethod): Added `is_inflated' flag.
8397 (MonoMethodInflated): Added `inflated' field.
8399 * class.c (mono_class_inflate_generic_method): Don't really
8400 inflate the method here; just set the `is_inflated' flag in the
8402 (mono_class_get_inflated_method): Actually inflate the method here
8403 if it's not already inflated; we use the MonoMethodInflated's new
8404 `inflated' field as a cache.
8406 2004-12-26 Martin Baulig <martin@ximian.com>
8409 (inflate_generic_class): Moved some code out of inflate_generic_type().
8410 (mono_class_inflate_generic_method): If we're already inflated,
8411 inflate the context and use the declaring method; ie. make sure
8412 the declaring method of an inflated method is always the generic
8414 (mono_class_create_from_typedef): Create
8415 `class->generic_container->context->gclass'.
8417 2004-12-24 Ben Maurer <bmaurer@ximian.com>
8419 * metadata-internals.h, marshal.c, reflection.c: More
8420 MonoGHashTable->GHashTable.
8422 * domain-internals.h, class.c: Change MonoGHashTable's into
8423 GHashTables for some cases where no gc stuff is used
8425 All users: update apis
8427 2004-12-23 Ben Maurer <bmaurer@ximian.com>
8429 * metadata.c (builtin_types): Make this `const'. Makes this get
8430 put into the shareable section.
8431 (mono_metadata_init): Casts to make gcc happy.
8433 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
8435 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
8437 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
8439 * icall.c: Added an internal call to retrieve the position and length
8440 of assembly-level declarative security attributes (RequestMinimum,
8441 RequestOptional and RequestRefuse). This is used by the Assembly class
8442 to re-create the corresponding permission sets.
8444 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
8446 * marshal.c: fix the stelemref wrapper to be type correct
8449 2004-12-20 Ben Maurer <bmaurer@ximian.com>
8451 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
8452 to do key & 0x7fffffff. Hashtable already does this. It just
8453 results in longer code.
8455 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
8457 * appdomain.c: Bump corlib version.
8458 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
8459 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
8460 * reflection.c|h: Add functions to get declarative security infos
8461 (blob position and length) for assemblies, classes and methods.
8463 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
8465 * reflection.c: sort the constant table (bug #70693).
8467 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
8469 * object-internals.h, threads.c, domain.c: add accessors for
8470 the MonoThread and MonoDomain tls keys.
8472 2004-12-18 Martin Baulig <martin@ximian.com>
8474 * class.c (inflate_generic_type): If we're inflating a generic
8475 instance, set `ngclass->context->container = context->container';
8476 ie. the container we inflated into.
8478 * metadata.c (mono_metadata_parse_generic_param): Reflect above
8479 inflate_generic_type() changes.
8481 2004-12-17 Martin Baulig <martin@ximian.com>
8484 (MonoGenericClass): Replaced `MonoType *generic_type' with
8485 `MonoClass *generic_class'. Removed `dynamic_info'; if
8486 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
8487 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
8489 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
8491 * exception.c (mono_exception_from_token): New helper function.
8493 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
8495 * assembly.c (mono_assembly_load_with_partial_name): Call
8496 mono_assembly_loaded before invoking the preload hooks. Fixes
8499 * object-internals.h (MonoThread): Change culture_info and
8500 ui_culture_info into an array.
8502 * threads.c: Cache culture info objects from more than one appdomain.
8504 * threads.c threads-types.h icall.c: Add icalls for manipulating the
8507 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
8509 * threads.h threads.c appdomain.c: Clear the culture_info field of
8510 all threads during unloading if they point to an object in the dying
8513 2004-12-13 Ben Maurer <bmaurer@ximian.com>
8515 * culture-info.h (TextInfoEntry): New struct
8516 * object-internals.h: sync with managed
8517 * locales.c: fill the `text_info_data' field
8518 * culture-info-tables.h: update
8520 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
8522 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
8525 2004-12-12 Ben Maurer <bmaurer@ximian.com>
8527 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
8528 (ves_icall_ModuleBuilder_getMethodToken): Ditto
8530 2004-12-12 Martin Baulig <martin@ximian.com>
8532 * mono-debug-debugger.c (write_type): If we're an enum and the
8533 builtin types have already been initialized, call mono_class_init().
8535 2004-12-11 Martin Baulig <martin@ximian.com>
8537 * metadata.c (mono_metadata_load_generic_params): Added
8538 `MonoGenericContainer *parent_container' argument; automatically
8539 compute `container->is_method'; pass the correct owner to
8542 * reflection.c (compare_genericparam): Sort the GenericParam table
8543 according to increasing owners.
8545 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
8547 * profiler.c: allow disabling the default profiler.
8549 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
8551 * decimal.c, icall.c: allow disabling System.Decimal support.
8553 2004-12-09 Marek Safar <marek.safar@seznam.cz>
8555 * reflection.c: Add support for null attribute arguments.
8557 2004-12-09 Martin Baulig <martin@ximian.com>
8559 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
8560 names to get rid of compiler warnings.
8562 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
8564 * marshal.c (mono_marshal_get_struct_to_ptr): Call
8565 mono_marshal_load_type_info (). Fixes #69625.
8566 (mono_marshal_get_ptr_to_struct): Likewise.
8568 2004-12-08 Martin Baulig <martin@ximian.com>
8570 * mono-debug.h: Bumped version number to 47.
8572 * mono-debug-debugger.c
8573 (mono_debugger_event_handler, mono_debugger_event): Take two
8574 guint64 arguments insteed of a gpointer and a guint32.
8576 2004-12-08 Martin Baulig <martin@ximian.com>
8578 * debug-mono-symfile.h
8579 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
8580 `address' to `native_offset'.
8582 2004-12-08 Martin Baulig <martin@ximian.com>
8584 * class.c (mono_class_create_from_typespec): Only inflate if we
8585 either have `context->gclass' or `context->gmethod'.
8587 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
8589 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
8591 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
8593 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
8595 * reflection.c (mono_assembly_get_object): Remove the workaround put
8598 * appdomain.c: Use the corlib_internal field from MonoAssembly.
8600 * appdomain.c: Bump corlib version.
8602 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
8603 be visible in other appdomains.
8605 2004-12-07 Ben Maurer <bmaurer@ximian.com>
8607 * threads.c: Interlocked inc and dec for longs were messed up,
8608 use a KISS based impl for this. Fixes 70234
8610 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
8612 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
8614 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
8616 * icall.c: fix to follow policy not to allow struct
8617 arguments in icalls.
8619 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8621 * process.c: make the patch that handles spaces in file paths work
8622 on mono/windows too.
8624 2004-12-06 Martin Baulig <martin@ximian.com>
8626 * class.c (mono_class_create_generic): Call
8627 mono_class_setup_supertypes() if we're dynamic.
8628 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
8630 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
8632 * object-internals.h: Add new fields to MonoThread.
8634 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8636 * icall.c threads-types.h threads.c: Add new icalls.
8638 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
8640 * object-internals.h (MonoReflectionAssembly): Sync object layout with
8643 * appdomain.c: Bump corlib version.
8645 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
8646 internal assemblies. Fixes #69181.
8648 2004-12-05 Martin Baulig <martin@ximian.com>
8650 * class.c (mono_class_inflate_generic_signature): Make this a
8651 no-op if `context' is NULL or we don't have any type parameters;
8652 also copy `sentinelpos'.
8654 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
8656 * image.c: Add unbox_wrapper_cache.
8658 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
8660 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
8663 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
8666 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
8668 2004-12-04 Martin Baulig <martin@ximian.com>
8670 * loader.c (mono_method_get_signature_full): New public function;
8671 like mono_method_get_signature(), but with an additional
8672 `MonoGenericContext *' argument.
8674 * class.c (mono_class_inflate_generic_signature): Formerly known
8675 as inflate_generic_signature(); make this public.
8677 2004-12-04 Martin Baulig <martin@ximian.com>
8680 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
8681 instead of a `MonoGenericContainer *'.
8682 (mono_metadata_parse_array_full): Likewise.
8683 (mono_metadata_parse_signature_full): Likewise.
8684 (mono_metadata_parse_method_signature_full): Likewise.
8685 (mono_metadata_parse_generic_inst): Likewise.
8686 (mono_metadata_parse_generic_param): Likewise.
8687 (mono_metadata_parse_mh_full): Likewise.
8688 (mono_type_create_from_typespec_full): Likewise.
8690 2004-12-03 Martin Baulig <martin@ximian.com>
8692 * class-internals.h (MonoGenericContainer): Replaced the
8693 `MonoGenericContext * pointer with a `MonoGenericContext'
8694 structure and made it the first element.
8696 2004-12-03 Martin Baulig <martin@ximian.com>
8699 (inflate_generic_type): Set the `context->container' when creating
8700 a new MonoGenericContext.
8701 (mono_class_inflate_generic_method): Likewise.
8702 (mono_class_create_from_typespec): Just use `context->container'
8703 to get the container.
8705 * loader.c (method_from_methodspec): Set `context->parent' from
8706 `context->container' - and if that's a method container, use its
8707 parent. Also set the `context->container' when creating a new
8709 (mono_get_method_from_token): Use just `context->container' to get
8712 * metadata.c (do_mono_metadata_parse_generic_class): Also set
8713 `gclass->context->container'.
8715 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
8716 the `context->container' when creating a new MonoGenericContext.
8718 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
8720 * reflection.c (compare_genericparam): Sort params with identical
8721 owner by their number. Fixes gen-111 on sparc.
8723 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
8725 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
8726 around the domain changes.
8728 * appdomain.c (mono_domain_unload): Handle the case when the thread
8729 calling Unload is itself being aborted during unloading. Fixes #70022.
8731 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
8733 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
8734 checkpoint_func as an icall so it gets a wrapper.
8735 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
8736 in the cross-appdomain wrappers too.
8738 * threads.c (mono_thread_has_appdomain_ref): Make this public.
8740 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
8742 * reflection.c: Fix some memory leaks.
8744 2004-12-02 Martin Baulig <martin@ximian.com>
8746 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
8748 * metadata.c (generic_class_cache): New static hashtable.
8749 (mono_metadata_lookup_generic_class): New public method.
8751 2004-12-02 Martin Baulig <martin@ximian.com>
8753 * class.c (mono_class_create_from_typedef): Call
8754 mono_class_setup_parent() and mono_class_create_mono_type() before
8755 parsing the interfaces.
8757 2004-12-02 Martin Baulig <martin@ximian.com>
8759 * metadata.c (generic_inst_cache): New static hashtable.
8760 (mono_metadata_lookup_generic_inst): New public function.
8761 (mono_metadata_inflate_generic_inst): New public function.
8762 (mono_metadata_parse_generic_inst): New public function.
8763 (do_mono_metadata_parse_generic_class): Use the new
8764 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
8765 since this'll also use the cache.
8767 * reflection.c (mono_reflection_bind_generic_method_parameters):
8768 Use mono_metadata_lookup_generic_inst() to use the new cache.
8770 * class.c (inflate_mono_type): Use
8771 mono_metadata_inflate_generic_inst() to inflate a generic
8772 instance; this'll also use the new cache.
8774 * loader.c (method_from_methodspec): Use
8775 mono_metadata_parse_generic_inst() and
8776 mono_metadata_inflate_generic_inst() rather than parsing it
8777 manually, so we can use the new cache.
8779 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
8781 * threads.c (wait_for_tids): Do not incorrectly free threads when
8784 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8786 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
8787 iter->args based on whether parameters are passed in registers (i.e.
8788 MONO_ARCH_REGPARMS is defined)
8790 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
8792 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
8793 the exception message. Fixes #70070.
8794 (method_from_methodspec): Fix warnings.
8796 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8798 * process.c: (complete_path) return the path quoted
8800 2004-12-01 Martin Baulig <martin@ximian.com>
8802 * class-internals.h (MonoGenericInst): New structure.
8803 (MonoGenericClass): Replaced `type_argc', `type_argv' and
8804 `is_open' with `MonoGenericInst *inst'.
8805 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
8806 `is_open' with `MonoGenericInst *inst'.
8808 2004-11-30 Martin Baulig <martin@ximian.com>
8810 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
8812 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
8813 to `generic_class_cache'.
8816 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
8817 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
8818 (mono_generic_inst_is_valuetype): Renamed to
8819 mono_generic_class_is_valuetype().
8822 (MonoGenericInst): Renamed to MonoGenericClass.
8823 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
8824 (MonoClass): Renamed `generic_inst' to `generic_class'.
8825 (MonoGenericContext): Renamed `ginst' to `gclass'.
8827 * object-internals.h
8828 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
8830 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
8831 mono_reflection_generic_class_initialize().
8833 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
8834 now known as "System.Reflection.MonoGenericClass".
8835 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
8837 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
8839 * class-internals.h: Added a flag field to MonoClass to cache the
8840 declarative security attributes actions associated with the class.
8841 * domain-internals.h: Added booleans to MonoJitInfo to cache the
8842 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
8843 applicable to the JITted method.
8844 * reflection.c|h: Added functions to extract (as flags) which security
8845 actions are available (declaratively) for a method, class or assembly.
8846 * metadata.c|h: Added functions to search the declarative security
8847 table in the metadata.
8849 2004-11-29 Ben Maurer <bmaurer@ximian.com>
8851 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
8852 EXPORTEDTYPES are already in the class name cache, so there is no
8853 need to add extra code here to look at them. Just removes a bit of
8856 (ves_icall_System_Environment_get_TickCount): No need for #if
8857 WINDOWS. We already have the code in io-layer.
8859 2004-11-28 Martin Baulig <martin@ximian.com>
8862 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
8865 2004-11-27 Miguel de Icaza <miguel@ximian.com>
8867 * assembly.c (do_mono_assembly_open): Instead of having a
8868 conditional WITH_BUNDLE, incorporate support for bundles here, by
8869 having a global `bundles' variable holding a pointer to the actual
8872 (mono_register_bundled_assemblies): New API call used by the
8875 See mkbundle.1 for details.
8877 2004-11-27 Martin Baulig <martin@ximian.com>
8879 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
8880 the vtable for generic methods.
8882 2004-11-26 Martin Baulig <martin@ximian.com>
8885 (mono_metadata_generic_method_hash): New public function.
8886 (mono_metadata_generic_method_equal): Likewise.
8889 (MonoGenericContainer): Added `GHashTable *method_hash'.
8891 * reflection.c (ReflectionMethodBuilder): Added
8892 `MonoGenericContainer *generic_container'.
8893 (reflection_methodbuilder_to_mono_method): Don't create a new
8894 MonoGenericContainer each time we're called.
8895 (mono_reflection_bind_generic_method_parameters): Use
8896 `container->method_hash' to cache the results so we don't create a
8897 different method if we're called several times with the same
8900 * loader.c (method_from_methodspec): Use the new
8901 `container->method_hash' here, too.
8903 2004-11-26 Martin Baulig <martin@ximian.com>
8905 * class.c (inflate_generic_signature): Correctly compute
8906 `res->has_type_parameters'.
8907 (mono_class_vtable): Use the `has_type_parameters' flag to
8908 determine whether we're a generic method.
8910 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
8912 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
8914 * object.c (mono_runtime_run_main): Fix a small memory leak.
8916 2004-11-25 Martin Baulig <martin@ximian.com>
8918 * class.c (set_generic_param_owner): Fixed the loop.
8920 2004-11-25 Martin Baulig <martin@ximian.com>
8922 * object.c (mono_class_vtable): Don't create any JIT wrappers for
8925 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
8927 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
8928 names. Fixes #69787.
8930 2004-11-24 Martin Baulig <martin@ximian.com>
8932 * class.c (mono_class_create_generic_2): If we don't have a
8933 `ginst->parent', inflate `gklass->parent' to get our parent.
8935 2004-11-24 Martin Baulig <martin@ximian.com>
8937 * reflection.c (compare_genericparam): Correctly sort the
8938 GenericParam table; fixes #69779.
8940 2004-11-23 Ben Maurer <bmaurer@ximian.com>
8942 * reflection.c: When writing a PE file, don't create a huge
8943 buffer in memory. Just write the arrays we have to the file.
8944 This reduces memory usage.
8946 * metadata-internals.h: MonoDynamicStream pefile is no longer used
8949 2004-11-17 Martin Baulig <martin@ximian.com>
8951 * class.c (mono_class_init): Don't setup `class->parent' for
8952 dynamic instances; moved this to mono_class_generic_2().
8953 (mono_class_create_generic): Also set `klass->inited' for dynamic
8955 (mono_class_create_generic_2): Don't do anything for dynamic
8956 generic instances. Set `klass->parent' here and also call
8957 mono_class_setup_parent() here.
8959 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
8960 `MonoType *parent' argument; set `ginst->parent' before calling
8961 mono_class_create_generic_2(), so we set the correct parent.
8963 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
8965 * reflection.c: allow getting attributes from ModuleBuilder
8968 2004-11-17 Martin Baulig <martin@ximian.com>
8970 * class.c (mono_class_create_from_typedef): If a type parameter is
8971 inherited from an outer class, set its owner to that class.
8973 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
8975 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
8976 for (int*) written size. This fixes bug #69592.
8978 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
8980 * icall.c: Added IsAuthenticodePresnet internal call.
8981 * image.c|h: New function that check a MonoImage for an Authenticode
8982 signature in the certificate PE data directory.
8983 * security.c|h: New internal call to ask the runtime if an
8984 Authenticode signature seems referenced in the PE header.
8986 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
8988 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
8990 * reflection.c (mono_image_create_pefile): Free the assembly streams
8991 after writing out the assembly file.
8993 * object.c (mono_runtime_run_main): Fix small memory leak.
8995 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
8996 property access modifiers. Fixes #69389.
8998 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9000 * domain.c, object.c, object-internals.h, domain-internals.h,
9001 object.h, marshal.c: keep dynamic code info per domain.
9003 2004-11-15 Martin Baulig <martin@ximian.com>
9005 * class.c (mono_type_get_name_recurse): Put type arguments in
9006 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
9009 2004-11-15 Martin Baulig <martin@ximian.com>
9011 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
9012 (mono_class_setup_vtable): When computing `the_cname' for a
9013 generic instance, don't include the namespace since we'd otherwise
9016 2004-11-15 Martin Baulig <martin@ximian.com>
9018 * class.c (mono_class_create_generic): Changed return type to void.
9019 (mono_class_create_generic_2): New public function; setup
9020 `class->method', `class->field' and `class->interfaces' here
9021 instead of in mono_class_init().
9023 * class.h (mono_class_create_generic): Moved to class-internals.h.
9025 2004-11-14 Ben Maurer <bmaurer@ximian.com>
9027 * reflection.c (mono_image_create_pefile): take a file HANDLE.
9028 rather than writing to memory, write to this file. Right now,
9029 we are just writting into a buffer, and copying that. However
9030 we can avoid the buffer later.
9032 (mono_dynamic_stream_reset): new function
9034 * icall.c, object-internals.h: update for the above.
9036 2004-11-13 Ben Maurer <bmaurer@ximian.com>
9038 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
9039 have been using gc'd memory. First it is slower, unlikely
9040 the comment in the source code said, secondly, it increases
9041 our footprint to do it in the gc.
9043 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
9044 the method so that it does not have to copy to managed code.
9046 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
9048 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
9050 2004-11-12 Martin Baulig <martin@localhost>
9052 * reflection.c (mono_image_create_token): Allow generic method
9053 definitions here, since they may appear in an `.override'; see
9054 gen-98/gen-99 for an example.
9056 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
9058 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
9061 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
9064 2004-11-11 Martin Baulig <martin@ximian.com>
9066 * class.c (mono_class_setup_vtable): In an explicit interface
9067 implementation, the method name now includes the arity.
9069 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
9071 * object.c (mono_array_full_copy): Fix warning.
9073 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
9075 * appdomain.c: Removed look_for_method_by_name(). Use the new method
9076 mono_class_get_method_from_name() instead.
9078 * class-internals.h: Added two new types of wrappers.
9079 Added MonoRemotingTarget enum. Added new trampoline function type, which
9080 takes an additional MonoRemotingTarget value as parameter, so it is
9081 possible to request a trampoline for a specific target.
9083 * class.c: Added new mono_class_get_method_from_name() method.
9085 * class.h: In MonoRemoteClass, we can have now to vtables, one for
9086 general remoting sinks and one specific for cross domain calls.
9088 * debug-helpers.c: Added new wrapper names.
9090 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
9093 * image.c: Porperly delete value objects form the remoting invoke hashtable.
9095 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
9096 with several other methods (mono_marshal_get_xappdomain_dispatch,
9097 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
9098 and others) can generate a fast remoting wrapper for cross domain calls.
9099 More information can be found in docs/remoting.
9100 Other changes: Removed mono_find_method_by_name, and used
9101 mono_class_get_method_from_name instead.
9102 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
9103 is stored in the remoting invoke hashtable.
9105 * marshal.h: published the new method for getting the xdomain wrapper,
9106 and also added a method for getting the adequate wrapper for a given
9109 * object-internals.h, object.c: Added a couple of methods for capying and
9111 Modified mono_install_remoting_trampoline, which takes the new remoting
9112 trampoline that has a remoting target as parameter.
9113 mono_class_proxy_vtable now also takes a remoting target as parameter, and
9114 will return the most suitable vtable for the target.
9115 Added mono_remote_class_vtable, which returns the vtable of a remote class
9116 (which can be the normal remoting vtable or the xdomain vtable).
9118 * threads.c: the xdomain invoke and dispatch wrappers must also be
9119 protected against interruptions.
9121 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9123 * icall.c: use memmove in BlockCopyInternal when the source and
9124 destination arrays are the same.
9126 2004-11-09 Martin Baulig <martin@ximian.com>
9128 * class-internals.h (MonoGenericContainer): Removed `method' and
9129 `signature', replaced them with `is_method' and `is_signature'
9130 flags. Added `context'.
9132 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
9133 instead of a `MonoGenericContainer *'.
9135 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
9136 for dynamic type parameters.
9137 (mono_metadata_load_generic_params): Setup `container->context'.
9139 * reflection.c (mono_reflection_setup_generic_class): Setup
9140 `tb->generic_container->context'.
9141 (do_mono_reflection_bind_generic_parameters): Use
9142 mono_class_inflate_generic_type() to correctly inflate types,
9143 rather than using our own hack just for MONO_TYPE_VAR.
9145 2004-11-09 Martin Baulig <martin@ximian.com>
9147 * class.c (mono_class_inflate_generic_method): Small fix; don't
9151 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
9152 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
9153 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
9154 (ves_icall_Type_BindGenericParameters): Likewise.
9155 (ves_icall_Type_get_IsGenericInstance): Likewise.
9156 (ves_icall_Type_GetGenericParameterPosition): Likewise.
9157 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
9158 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
9159 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
9161 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
9163 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
9164 assembly versions and public key tokens. Fixes #69113.
9166 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
9168 * metadata.c: fix bug introduced with the type cache changes
9171 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
9173 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
9174 the MonoClass pointer instead of the token in exception clauses.
9175 * reflection.c: updates for the above and make the code not depend
9176 on the structure of MonoExceptionClause.
9178 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
9180 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9181 Add support for dynamic assemblies. Fixes #69114.
9183 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
9185 2004-11-07 Ben Maurer <bmaurer@ximian.com>
9187 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
9188 since most only those methods use it. the code member of
9189 MonoMethodPInvoke was dead, so that can be removed too. Also,
9190 remove inline_count (again, not used), and move slot so that it
9191 can share bits with some other flags. This saves 8 bytes in the
9192 structure and gives us about 50 kb back for mcs helloworld.cs
9194 * *.[ch]: Do naming changes for the above.
9196 * loader.c (mono_method_get_header): Lazily init the header
9198 (mono_get_method_from_token): don't init the header here
9199 (mono_free_method): the header may never be allocated
9201 Overall, this saves 150 kb of unmanaged allocations
9202 for mcs helloworld.cs. That accounts for 10% of the unmanaged
9205 * loader.c, loader.h (mono_method_get_header): new accessor.
9207 * *.[ch]: use the above method. Prepares us to lazily load
9210 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
9211 three warnings, which are actual bugs (see 69206).
9213 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
9214 unused. Saves a cool 4 bytes / method.
9216 2004-11-06 Ben Maurer <bmaurer@ximian.com>
9218 * metadata.c (builtin_types): Add types for System.Object here.
9219 (mono_metadata_parse_type_full): Cache MonoType*'s that are
9220 for a class or valuetype from klass->this_arg or klass->byval_arg.
9222 On mcs for a hello world, this gets us down from 21836 MonoType's
9225 (mono_metadata_free_type): Account for the above change.
9227 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
9229 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
9230 exception instead of asserting if name is null.
9231 (ves_icall_System_AppDomain_GetData): Ditto.
9233 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
9235 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
9238 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
9239 Return NULL when the domain does not have entry_assembly set.
9241 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
9242 Add a 'resource_modules' argument.
9243 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
9245 * reflection.c (mono_reflection_create_runtime_class): Move setting
9246 of wastypebuilder here, so mono_get_type_object () returns a MonoType
9249 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
9250 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
9251 Throw an ArgumentNullException if 'ptr' is null.
9253 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
9254 assemblies here. Fixes #69020.
9256 2004-11-05 Geoff Norton <gnorton@customerdna.com>
9258 * reflection.c (build_compressed_metadata): Fix the previous patch for
9259 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
9262 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
9264 * assembly.c (mono_assembly_names_equal): Allow a match if one of
9265 the cultures is false. Fixes #69090.
9267 * reflection.c (build_compressed_metadata): Fix invalid memory read
9268 detected by valgrind.
9270 * reflection.c (mono_reflection_get_type): Avoid triggering a
9271 TypeResolve multiple times for the same type. Fixes #65577.
9273 2004-11-04 Ben Maurer <bmaurer@ximian.com>
9275 * marshal.c: Avoid using ldftn to call managed functions. It is
9276 much slower than just a call.
9278 * reflection.c (mono_module_get_object): free the basename we
9279 allocate here from glib.
9281 * reflection.c (ensure_runtime_vtable): make sure to free
9282 overrides. Also, we were allocating an array of MonoMethod not an
9283 array of MonoMethod*.
9285 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
9287 * image.c (mono_image_close): free image->guid here.
9289 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
9291 * reflection.c: Fix some spec conformance issues with the PE file
9292 structures so mcs compiled apps run on the Net 2.0 beta.
9294 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
9296 * string-icalls.c (ves_icall_System_String_ctor_encoding):
9297 Implement this. Fixes #67264.
9299 * debug-helpers.h debug-helpers.c marshal.c: Move
9300 mono_find_method_by_name to debug-helpers.c.
9302 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
9304 * object.c (mono_release_type_locks): type_initialization_hash is
9307 * reflection.c object.c object-internals.h: Fix warnings.
9309 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
9310 without accessors. Fixes #61561.
9312 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
9313 application base from the root domain if not set. Fixes #65641.
9314 (mono_runtime_init): Fix warning.
9316 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9318 * appdomain.c: call mono_thread_pool_init.
9319 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
9320 of worker threads based on the number of CPUs and the environment
9321 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
9322 for non-windows (windows) systems.
9324 2004-10-27 Chris Toshok <toshok@ximian.com>
9326 * mono-debug-debugger.c (write_class): don't call mono_class_init
9327 here, as even with the check for (!klass->init_pending), we get
9328 into a situation where we're hitting cycles in class
9329 initialization. Fixes #68816.
9331 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
9333 * image.c: Avoid overwriting values in the loaded_images_hash when an
9334 assembly is loaded multiple times. Fixes #61152.
9336 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
9337 so multiple satellite assemblies for the same name can be loaded.
9340 * mono_domain_assembly_preload: Actually return the loaded assembly,
9343 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
9344 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
9346 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
9347 pending finalizers are not invoked after the appdomain has been
9348 unloaded. Fixes #67862.
9350 2004-10-22 Martin Baulig <martin@ximian.com>
9352 * mono-debug-debugger.c
9353 (mono_debugger_runtime_invoke): Don't box valuetypes.
9355 2004-10-22 Chris Toshok <toshok@ximian.com>
9357 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
9358 don't hide private methods.
9360 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
9362 * icall.c: Allows the runtime to "share" (when known) the public key
9363 token of an assembly. This avoid the need to recalculate the token
9364 (from the public key) in managed code.
9366 2004-10-21 Chris Toshok <toshok@ximian.com>
9368 * debug-helpers.c (append_class_name): argh, revert last patch.
9370 2004-10-21 Chris Toshok <toshok@ximian.com>
9372 * debug-helpers.c (append_class_name): use '+' as the delimiter,
9373 not '/', so that it matches what the debugger uses to look up
9376 2004-10-21 Martin Baulig <martin@ximian.com>
9378 * mono-debug-debugger.c (mono_debugger_throw_exception): New
9379 public method; this is called each time an exception is thrown and
9380 allows the debugger to use exception catch points.
9382 2004-10-21 Martin Baulig <martin@ximian.com>
9384 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
9385 the stack pointer and the exception object in some struct and pass
9386 that to the debugger.
9388 2004-10-21 Chris Toshok <toshok@ximian.com>
9390 * mono-debug-debugger.c (do_write_class): add instance/static
9391 event support. We don't expose "raise" or "other" yet.
9392 (event_is_static): new method.
9394 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
9396 * mono-debug-debugger.c
9397 (mono_debugger_handle_exception): Remove
9398 bogus return value for fussy compilers.
9400 2004-10-20 Martin Baulig <martin@ximian.com>
9402 * mono-debug-debugger.c
9403 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
9404 (mono_debugger_handled_exception): Likewise.
9406 2004-10-20 Martin Baulig <martin@ximian.com>
9408 * mono-debug-debugger.h (MonoDebuggerEvent): Added
9409 MONO_DEBUGGER_EVENT_EXCEPTION.
9411 * mono-debug-debugger.c (mono_debugger_handle_exception): New
9412 public function to send the debugger a notification for an
9413 exception and inform it about a catch/finally clause.
9415 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
9417 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
9418 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
9421 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
9423 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
9425 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
9426 marshalled as [In,Out]. Fixes #58325.
9428 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
9430 * reflection.c (mono_method_body_get_object): Implement some fields.
9432 2004-10-12 Martin Baulig <martin@ximian.com>
9434 * reflection.c (mono_reflection_bind_generic_parameters): Small
9435 fix, correctly retrieve our parent from a generic instance.
9437 2004-10-12 Martin Baulig <martin@ximian.com>
9439 * metadata.c (mono_metadata_generic_param_equal): We always have
9443 (mono_class_from_generic_parameter): We need to have an owner.
9444 (my_mono_class_from_generic_parameter): Likewise.
9446 * reflection.c (mono_reflection_setup_generic_class): Renamed to
9447 mono_reflection_create_generic_class() and added a new
9448 mono_reflection_setup_generic_class().
9449 (mono_reflection_initialize_generic_param): If we're a nested
9450 generic type and inherited from the containing class, set our
9451 owner to the outer class.
9453 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
9455 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
9457 * reflection.c (mono_method_body_get_object): New function to create
9458 a MethodBody object.
9460 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
9462 2004-10-11 Martin Baulig <martin@ximian.com>
9464 * metadata.c (_mono_metadata_type_equal): Renamed to
9465 do_mono_metadata_type_equal() and made static.
9467 2004-10-11 Martin Baulig <martin@ximian.com>
9469 * appdomain.c: Bump corlib version number to 28.
9471 2004-10-10 Martin Baulig <martin@ximian.com>
9474 (MonoGenericInst): Added `MonoGenericContainer *container'.
9475 (MonoGenericMethod): Likewise.
9476 (MonoGenericContext): Likewise.
9477 (MonoGenericParam): Added `MonoGenericContainer *owner'.
9480 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
9481 (do_mono_metadata_parse_generic_inst): Likewise.
9482 (mono_metadata_parse_type_full): New public method. This is the actual
9483 mono_metadata_parse_type() implementation - with an additional
9484 `MonoGenericContainer *' argument.
9485 (mono_metadata_parse_array_full): Likewise.
9486 (mono_metadata_parse_signature_full): Likewise.
9487 (mono_metadata_parse_method_signature_full): Likewise.
9488 (mono_metadata_parse_mh_full): Likewise.
9489 (mono_type_create_from_typespec): Likewise.
9490 (mono_metadata_interfaces_from_typedef_full): New public method;
9491 this is similar to the other _full() methods, but we take a
9492 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
9493 (mono_metadata_parse_generic_param): Take an additional
9494 `MonoGenericContainer *' argument and lookup the MonoGenericParam
9495 from that container.
9496 (mono_metadata_generic_param_equal): New static method to compare
9497 two type parameters.
9498 (_mono_metadata_type_equal): New static method; takes an
9499 additional `gboolean signature_only' argument - if true, we don't
9500 compare the owners of generic parameters.
9501 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
9502 with a TRUE argument - do a signature-only comparision.
9504 * loader.c: Use the new _full() methods and pass the
9505 MonoGenericContainer to them.
9507 * object-internals.h (MonoReflectionTypeBuilder): Added
9508 `MonoGenericContainer *generic_container' field.
9509 (MonoReflectionMethodBuilder): Likewise.
9511 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
9513 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
9514 case initial images of dynamic assemblies.
9516 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
9518 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
9520 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
9521 length of event->other array.
9522 (typebuilder_setup_events): Ditto.
9524 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
9525 'assembly_by_name' and add an 'assemblies' list.
9527 * assembly.h assembly.c: Add a new search hook for determining whenever
9528 an assembly is already loaded. Use this instead of searching in the
9529 loaded_assemblies list.
9531 * domain.c appdomain.c: Implement the new search hook so loaded
9532 assemblies are now scoped by appdomain. Fixes #67727.
9534 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
9536 * threads.c (mono_thread_attach): Initialize synch_lock field so
9537 mono_thread_detach works again.
9539 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
9540 'lib' too. Fixes #63130.
9542 2004-10-06 Jackson Harper <jackson@ximian.com>
9544 * culture-info-tables.h: regenerated.
9546 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
9548 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
9549 implemented by other interfaces in the result. Fixes #65764.
9551 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9552 Handle unloadable modules without crashing.
9554 * image.c (load_modules): Revert the previous patch since modules must
9555 have a fixed index inside the array.
9557 * image.c (load_modules): Don't include native modules in the modules
9560 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
9562 * reflection.h: Add param_defaults field.
9564 * reflection.c: Add support for parameter defaults in dynamic methods.
9567 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
9568 an empty string when a type has no namespace. Fixes #64230.
9570 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
9572 * tabledefs.h: Added "internal" security actions to support non-CAS
9573 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
9574 Note: they do not seems to be used anymore in 2.0 (new metadata format)
9576 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
9578 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
9579 constructor of abstract class. Fixes #61689.
9581 2004-10-04 Martin Baulig <martin@ximian.com>
9583 * class-internals.h (MonoGenericContainer): New type.
9584 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
9585 `MonoGenericContainer *generic_container'.
9586 (MonoClass): Replaced `gen_params' and `num_gen_params' with
9587 `MonoGenericContainer *generic_container'.
9589 * metadata.c (mono_metadata_load_generic_params): Return a
9590 `MonoGenericContainer *' instead of a `MonoGenericParam *';
9591 removed the `num' argument.
9593 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
9595 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
9598 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
9601 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
9603 * reflection.c: Save pe_kind and machine values into the generated
9606 * appdomain.c: Bump corlib version number.
9608 * object-internals.h: Reorganize layout of LocalBuilder.
9610 * class-internals.h class.c (mono_class_get_implemented_interfaces):
9611 New helper function.
9613 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
9614 created MonoType for dynamic types. Fixes #66180.
9616 2004-10-02 Ben Maurer <bmaurer@ximian.com>
9618 * threadpool.c: the ares hashtable needs a critical section around it.
9619 this prevents some nasty segfaults
9621 2004-10-02 Massimiliano Mantione <massi@ximian.com>
9623 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
9624 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
9627 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
9629 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
9631 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
9633 * image.c: Always canonicalize image file names, to avoid loading
9634 the same assembly twice when referenced using a relative path.
9636 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
9638 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
9640 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
9642 * marshal.c: Fix warnings.
9644 2004-09-29 Geoff Norton <gnorton@customerdna.com>
9646 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
9647 attempting to marshal the delegate_trampoline as the method_addr.
9648 This patch has a static hashtable of marshalled delegates so that
9649 we can map delegate_trampoline addresses back to delegates. This
9650 allows a delegate passed to managed code to be passed back into native
9653 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
9655 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
9657 * reflection.c (method_encode_code): Align method headers properly.
9660 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
9662 * marshal.c: In the runtime invoke wrapper, reset the abort
9663 exception if it is cached. This avoids the automatic rethrowal of
9664 the exception after the catch of the wrapper. Also check for pending
9665 interruptions before calling the managed method. This is done using
9666 the new method emit_thread_force_interrupt_checkpoint, since the
9667 normal checkpoint method is ignored when running the invoke wrapper.
9668 * object.c: If the abort exception is rethrown, set the abort_exc
9669 field of the thread, so it will be rethrown aftere every catch.
9670 * threadpool.c: Only run an interruption checkpoint if what has been
9671 requested is a stop of the thread (aborts will be ignored).
9672 * threads.c: By default, a thread will now never be interrumped while
9673 running the runtime invoke wrapper (this ensures that runtime_invoke
9674 will always return to the caller if an exception pointer is provided).
9675 There is a new special method mono_thread_force_interruption_checkpoint()
9676 to force an interruption checkpoint even if running a protected
9677 wrapper, which is used by the same runtime invoke wrapper to do a check
9680 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
9682 * object.c, object-internals.h: Implemented mono_release_type_locks,
9683 which releases the cctor locks held by a thread.
9684 * threads.c, threads.h: In thread_cleanup, release cctor locks held
9685 by a thread. Added mono_thread_exit() method to be used to safely stop
9688 2004-09-28 Raja R Harinath <rharinath@novell.com>
9690 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9691 Move null check before dereference. Avoid indexing beyond the end
9692 of the 'modules' array.
9694 2004-09-28 Raja R Harinath <rharinath@novell.com>
9696 * metadata-internals.h (MonoImage): Add module_count field.
9697 * image.c (load_modules): Set image->module_count.
9698 (mono_image_load_file_for_image): Use image->module_count.
9699 * reflection.c (mono_image_load_module): Append to image->modules array
9700 of dynamic assembly.
9701 (mono_module_get_object): Fix loop to actually increment index.
9702 Use image->module_count.
9703 * assembly.c (mono_assembly_load_references): Use image->module_count.
9704 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9707 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
9709 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
9710 Avoid assert on generic types.
9712 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
9714 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
9716 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
9718 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
9719 function to convert a MarshalSpec structure to its managed counterpart.
9721 * reflection.c: Fix warnings.
9723 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
9726 * icall.c (mono_create_icall_signature): Fix build.
9728 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
9730 * icall.c: Add MakePointType icall.
9732 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
9735 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9737 * threadpool.c: reuse allocated slots in the queue.
9739 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
9741 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
9743 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
9745 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
9748 * tabledefs.h: Add constants for pinvoke attributes BestFit and
9749 ThrowOnUnmappableChar.
9751 * icall.c (ves_icall_Type_GetPacking): New icall.
9753 2004-09-24 Martin Baulig <martin@ximian.com>
9755 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
9757 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9760 (mono_domain_set): allow setting a domain that is being unloaded.
9761 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
9764 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
9766 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
9767 the GetCustomAttributes icall.
9769 2004-09-23 Martin Baulig <martin@ximian.com>
9771 * object-internals.h (MonoReflectionGenericParam): Replaced
9772 'has_ctor_constraint', `has_reference_type' and `has_value_type'
9773 with `guint32 attrs'.
9775 2004-09-23 Martin Baulig <martin@ximian.com>
9777 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
9779 2004-09-23 Martin Baulig <martin@ximian.com>
9781 * object-internals.h (GenericParameterAttributes): New enum.
9783 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
9785 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
9787 * class.c (init_events): Fill out event->other field.
9789 * class.c: Fix warnings.
9791 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
9793 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
9795 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
9796 walk which doesn't supply the IL offset.
9798 2004-09-22 Martin Baulig <martin@ximian.com>
9800 * reflection.c (mono_reflection_setup_internal_class): If we're
9801 System.ValueType, System.Object or System.Enum, set
9802 `klass->instance_size' and create the vtable.
9803 (mono_reflection_create_internal_class): If we're an enum type,
9804 get the base class from our current corlib.
9806 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
9808 * reflection.h (MonoResolveTokenError): New type.
9810 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
9813 * icall.c: Add an 'error' argument to the ResolveToken icalls.
9815 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
9817 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
9818 Support also calling constructors, but only for already allocated objects.
9820 2004-09-17 Geoff Norton <gnorton@customerdna.com>
9822 * reflection.c (type_get_qualified_name): If the klass is null
9823 return the typename to avoid a NullRefEx.
9824 (encode_cattr_value): Get the qualified name of the boxed type,
9825 not the underlying enumtype. Fixes #62984.
9827 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
9829 * marshal.c: Fix problems with previous checkin.
9831 2004-09-21 <vargaz@freemail.hu>
9833 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
9834 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
9836 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
9838 2004-09-21 Geoff Norton <gnorton@customerdna.com>
9840 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
9841 should only return a type for pointers, arrays, and passbyref types.
9844 2004-09-21 Martin Baulig <martin@ximian.com>
9846 * domain.c (mono_debugger_check_runtime_version): New public
9849 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
9851 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
9853 * reflection.c: Added missing sort to the declarative security
9854 attributes table. MS implementation stops seeing the attributes if the
9855 token number regress in the table (as shown by ildasm and permview).
9857 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
9859 * object-internals.h (MonoReflectionModule): Add 'token' field.
9861 * reflection.c (mono_reflection_get_token): Add support for Module
9863 (mono_module_get_object): Set 'token' field.
9864 (mono_module_file_get_object): Set 'token' field.
9866 * icall.c: Add new Assembly and Module icalls.
9868 * appdomain.c: Bump corlib version.
9870 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
9872 * loader.h loader.c class.h class.c: Add helper functions for obtaining
9873 tokens of metadata objects.
9875 * reflection.h reflection.c (mono_reflection_get_token): New function
9876 to obtain the token of a metadata object.
9878 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
9880 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
9882 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
9884 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
9886 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
9888 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
9889 * object-internals.h: Added 3 MonoArray* members to MonoReflection
9890 AssemblyBuilder to access the permissions set in the class lib.
9891 * reflection.c: Added security attributes encoding step in
9892 mono_image_build_metadata.
9893 * tabledefs.h: Added new security actions defined in 2.0:
9894 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
9896 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
9898 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
9901 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
9903 * locales.c: nullify the ICU_collator member of CompareInfo when it is
9904 finalized. There where random SIGSEVs at program termination, when
9905 an object being finalized was trying to do a string comparison and
9906 the current culture was already finalized.
9908 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9910 * threads.c: call thread_cleanup before finishing the thread if we get
9913 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
9915 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
9916 assemblies from the parent. Fixes #65665.
9918 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
9920 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
9923 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
9925 * reflection.h: add prototype for mono_get_dbnull_object
9926 * reflection.c: add prototypes for get_default_param_value_blobs
9927 and mono_get_object_from_blob for fussier compilers
9929 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
9931 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
9932 false deadlock checks in class initialization.
9934 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
9936 * image.c (mono_image_addref): Fix comment.
9938 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
9941 2004-09-12 Jambunathan K <kjambunathan@novell.com>
9943 * reflection.c (mono_param_get_objects): Modified to return
9944 ParameterInfo.DefaultValue object.
9946 (get_default_param_value_blobs):
9947 (mono_get_object_from_blob):
9948 (mono_get_dbnull_object): New helper routines.
9950 * object.c (mono_get_constant_value_from_blob): New helper routine
9951 carved out from get_default_field_value ()
9953 * object-internals.h (mono_get_constant_value_from_blob): Added
9954 function declaration.
9956 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
9958 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
9959 referenced assemblies. Fixes #62135.
9961 * exception.h exception.c (mono_get_exception_file_not_found2): New
9964 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
9966 * class.h class.c: Add mono_type_get_underlying_type ().
9968 2004-09-09 Geoff Norton <gnorton@customerndna.com>
9970 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
9971 Fix GetTypes() to support dynamically created assemblies.
9973 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
9975 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
9977 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
9980 * reflection.h reflection.c loader.c: Allow dynamic construction of
9981 pinvoke methods. Fixes #65571.
9983 * reflection.c (mono_reflection_get_type): Revert previous change since
9984 it causes regressions.
9986 2004-09-08 Martin Baulig <martin@ximian.com>
9988 * class.c (class_compute_field_layout): Don't call
9989 mono_class_layout_fields() for open generic instances.
9991 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
9992 * threads.c appdomain.c: fix typo in GC macro
9994 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9996 * threads.c: don't call mono_thread_detach() in start_wrapper(),
9997 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
9999 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
10001 * image.c (mono_image_close): Applied patch from
10002 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
10003 assembly is loaded multiple times from data.
10005 * image.c (mono_image_open): Fix warning.
10007 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
10009 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
10010 once. Fixes #58334.
10012 * reflection.c (mono_reflection_create_runtime_class): Initialize
10013 klass->nested_classes. Fixes #61224.
10015 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10017 * threads.c: sched_yield() on exit, to allow threads to quit.
10019 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
10021 * object.c (mono_unhandled_exception): Remove leftover debug code.
10023 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
10025 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
10027 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
10029 * marshal.c (emit_marshal_array): Really null terminate string arrays.
10031 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
10033 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
10035 * marshal.c (emit_marshal_array): Null terminate string arrays.
10037 * marshal.c (raise_auto_layout_exception): Fix warning.
10039 * reflection.c (mono_param_get_objects): Initialize the default value
10040 with DBNull.Value, not null. Fixes #62123.
10042 2004-09-01 Miguel de Icaza <miguel@ximian.com>
10044 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
10045 throw an exception with a cute explanation.
10047 2004-09-06 Dick Porter <dick@ximian.com>
10049 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
10050 Close the new process's thread handle, as we don't use it. The
10051 handle stays around forever otherwise.
10053 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
10055 * object.c (arith_overflow): Fix warning.
10057 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
10058 calling conventions in method refs. Fixes #65352.
10060 * reflection.c: Fix warnings.
10062 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
10064 * icall.c: Add a new icall for Array.Clear
10066 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
10068 * object.c: When allocating an array, we have to throw
10069 an overflow exception if any of the lengths are < 0.
10071 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
10073 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
10074 properly. Also move implementation of string array marshalling to
10075 managed code. Fixes #42316.
10077 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10079 * assembly.c: provide more information when loading an assembly fails.
10081 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10083 * filewatcher.c: don't expect the development fam package to be
10086 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
10088 * marshal.c: Make a copy of the signature cookie since it will be
10089 freed by the caller.
10091 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
10093 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
10095 * metadata.c (mono_metadata_free_marshal_spec): New function to free
10098 * marshal.c: More refactoring.
10100 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
10103 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
10105 * object.c: In mono_message_invoke, fill the output parameter array after
10106 calling the managed method (it was done before the call). This fixes
10109 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
10111 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
10114 2004-09-02 Martin Baulig <martin@ximian.com>
10116 * class.c (mono_class_instance_size): Don't allow generic type
10117 definitions or open generic instances.
10118 (mono_class_array_element_size): If we're a value type, call
10119 mono_class_instance_size() on the original class.
10121 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
10122 handle generic instances.
10124 * mono-debug-debugger.c (write_type): Handle generic instances
10127 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
10129 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
10130 the allocation request fails. Fixes #65089.
10132 * object.c (mono_runtime_free_method): Do not call mono_free_method.
10134 * object.c (mono_runtime_free_method): New function to free a dynamic
10137 * marshal.c (mono_delegate_free_ftnptr): New function to free the
10138 delegate trampoline.
10140 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
10141 with hasthis as dynamic,
10143 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
10145 * domain.c (mono_jit_info_table_remove): New function to remove an
10146 entry from the jit info table.
10148 * class-internals.h (MonoMethod): Add 'dynamic' field.
10150 * loader.c: Fix warnings.
10152 2004-09-01 Martin Baulig <martin@ximian.com>
10154 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
10155 instead of mono_debugger_lock() because the latter one is a no-op
10156 unless running in the debugger.
10158 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
10160 * class.c (class_compute_field_layout): Classes with auto-layout or
10161 reference fields are not blittable.
10163 2004-09-01 Dick Porter <dick@ximian.com>
10165 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
10166 mono_image_get_filename() to get the assembly location.
10169 * metadata.h: Fix compile warnings
10171 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
10173 * class.c (class_compute_field_layout): System.Object is blittable.
10175 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
10176 as in/out. Fixes #59909.
10178 2004-09-01 Martin Baulig <martin@ximian.com>
10180 * metadata.h (MONO_TYPE_ISREFERENCE): Call
10181 mono_metadata_generic_inst_is_valuetype() if we're a generic
10182 instance to check whether our underlying type is a reference type.
10184 2004-09-01 Martin Baulig <martin@ximian.com>
10186 * metadata.c (mono_type_size): If we're a generic instance, call
10187 mono_class_value_size() for value types.
10189 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
10191 * marshal.c: Implement more custom marshalling functionality. Fixes
10194 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10196 * mono-debug.c, debug-mono-symfile.c: add some locking love.
10198 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
10200 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
10202 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
10204 * icall.c: Fix some warnings.
10206 * threads.c (abort_appdomain_thread): Fix unref errors.
10207 (mono_thread_current): Fix THREAD_DEBUG define.
10209 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
10211 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
10213 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
10215 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
10217 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
10220 2004-08-28 Martin Baulig <martin@ximian.com>
10223 (mono_metadata_generic_inst_is_valuetype): New public function.
10225 * metadata.h (MONO_TYPE_ISSTRUCT): Call
10226 mono_metadata_generic_inst_is_valuetype() if we're a generic
10227 instance to check whether our underlying type is a valuetype.
10229 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
10231 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
10234 2004-08-25 Martin Baulig <martin@ximian.com>
10236 * loader.c (mono_get_method_from_token): Abstract methods can also
10237 be generic and thus have type parameters.
10239 * metadata-internals.h
10240 (MonoDynamicImage): Added `GPtrArray *gen_params'.
10242 * reflection.c (mono_image_get_generic_param_info): Don't create a
10243 metadata row, just add an entry to the `gen_params' array.
10244 (build_compressed_metadata): Sort the `gen_params' array and then
10245 actually create the metadata.
10247 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10249 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
10251 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
10253 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
10255 2004-08-24 Martin Baulig <martin@ximian.com>
10257 * class.cs (mono_class_is_subclass_of): Like an interface, a
10258 generic instance also derives from System.Object.
10260 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
10262 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
10263 custom modifiers to be in any order. Fixes #61990.
10265 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
10267 * object.c: Register mono_object_new_fast icall.
10269 * object.c (mono_class_get_allocation_ftn): Return to calling
10270 mono_object_new_fast, since it seems faster to compute the object
10271 size in unmanaged code than passing it as a parameter.
10273 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
10275 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
10276 this function with Boehm as the oom handler, so we don't have to check
10277 the result of GC_malloc.
10279 * object.c: Remove checks for oom.
10281 * object.h object.c (mono_class_get_allocation_ftn): New function to
10282 return the icall which can be used to allocate an instance of a given
10285 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
10287 * class-internals.h: Add 'enabled' field.
10289 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
10291 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
10293 2004-08-18 Jambunathan K <kjambunathan@novell.com>
10294 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
10297 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
10299 * appdomain.c: use the Tls function for appdomain too,
10300 at Zoltan's request. Actually return in mono_context_get
10302 * appdomain.c, profiler.c, threads.c: use __thread
10304 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
10306 * appdomain.c threads.c: Call GC_CreateThread on windows.
10308 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
10309 multiple libraries since this don't work on windows.
10311 2004-08-18 Martin Baulig <martin@ximian.com>
10313 * class-internals.h
10314 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
10317 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
10318 MonoMethodNormal since we also need it for abstract and interface
10322 (build_compressed_metadata): Sort the GenericParam table.
10323 (mono_image_create_token): Added `gboolean create_methodspec'
10324 argument; this is false when generating a MethodImpl token.
10325 (reflection_methodbuilder_to_mono_method): Abstract and interface
10326 methods may also have generic parameters.
10328 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
10330 * appdomain.c: thread local alloc
10332 2004-08-17 Martin Baulig <martin@ximian.com>
10334 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
10337 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
10340 * class.c (mono_type_get_full_name): New public function.
10341 (mono_type_get_name): Don't include the type arguments.
10343 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
10345 * Makefile.am: Build static versions of libmetadata and libmonoruntime
10346 for inclusion into the mono executable.
10348 2004-08-16 Martin Baulig <martin@ximian.com>
10350 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
10351 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
10353 2004-08-14 Martin Baulig <martin@ximian.com>
10355 * class.c (dup_type): Also copy the `byref' field.
10357 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
10359 * reflection.c (create_dynamic_mono_image): Revert the last change
10360 since it breaks bootstrap.
10362 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
10364 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
10366 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
10367 not free them with g_free.
10369 2004-08-11 Martin Baulig <martin@ximian.com>
10371 * reflection.c (mono_reflection_setup_internal_class): Also call
10372 mono_class_setup_mono_type() if we already have a `tb->type.type'.
10374 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
10376 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
10377 called during default (first) AppDomain creation. Keep track of
10378 Evidence when loading assemblies.
10380 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10382 * opcodes.c, opcodes.h: reduce runtime relocations.
10384 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10386 * culture-info.h, locales.c: fixes and chages to sue the new
10387 optimized format of the locale data.
10388 * culture-info-tables.h: regenerated.
10390 2004-08-06 Geoff Norton <gnorton@customerdna.com>
10392 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
10394 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
10396 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
10397 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
10398 * domain-internals.h: icall declaration.
10399 * icall.c: icall registration.
10400 * object-internals.h: New fields in MonoAssembly for CAS.
10402 2004-08-05 Duncan Mak <duncan@ximian.com>
10404 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10407 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
10409 * reflection.c: fix to deal with object[] arrays in custom ctors
10412 2004-08-05 Martin Baulig <martin@ximian.com>
10414 * class.c (mono_class_array_element_size): Added support for
10415 generic instances and correctly handle "recursive" types.
10417 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
10419 * assembly.c: Fix warnings.
10421 2004-08-04 Martin Baulig <martin@ximian.com>
10424 (mono_type_get_name_recurse): Added `gboolean include_arity'
10425 argument specifying whether or not we should include the generic
10426 arity in the type name.
10427 (_mono_type_get_name): New static function.
10428 (mono_class_setup_vtable): If we're a generic instance, don't
10429 include the generic arity in the names of explicit method
10432 2004-08-03 Martin Baulig <martin@ximian.com>
10434 * class.c (mono_type_get_name_recurse): Enclose the generic type
10435 arguments in `<', '>'.
10437 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10439 * gc.c: make GC warning messages use the trace API, they are just
10440 noise to most of the users.
10442 2004-08-03 Martin Baulig <martin@ximian.com>
10444 * debug-mono-symfile.c (read_string): Correctly read the string.
10446 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
10448 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
10450 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
10452 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
10454 2004-07-30 Martin Baulig <martin@ximian.com>
10456 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
10457 Reflect latest symbol writer changes.
10459 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
10461 * object.c: always create an object if null is passed
10462 to Invoke() where a valuetype is expected.
10464 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
10466 * marshal.c (mono_marshal_init): make managed
10467 signatures match native ones better for 64bits.
10469 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10471 * appdomain.c: hack to build correctly the private bin path on windows.
10474 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
10476 * assembly.c: Load mscorlib from the correct framework directory
10477 (mono/<version>/mscorlib.dll).
10478 * appdomain.h: Added prototypes for new functions.
10479 * internals.h: Added some prototypes.
10480 * domain.c: When initializing the runtime, get from the executable and
10481 the configuration files the runtime version that the app supports.
10482 Added support methods for reading app.exe.config. Added list of versions
10483 supported by the JIT. Added two new methods: mono_init_from_assembly,
10484 which initializes the runtime and determines the required version from
10485 the provided exe file, and mono_init_version, which initializes
10486 the runtime using the provided version.
10487 * icall.c: Get machine.config from version-specific directory.
10488 * reflection.c: When generating an image, embed the version number
10489 of the current runtime.
10491 2004-07-28 Dick Porter <dick@ximian.com>
10494 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
10495 returned sockaddr size before creating the remote address object.
10496 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
10499 2004-07-28 Dick Porter <dick@ximian.com>
10501 * locales.c (string_invariant_compare_char): Fix invariant char
10502 compares between upper and lower cases. Fixes bug 61458.
10504 2004-07-27 Ben Maurer <bmaurer@ximain.com>
10506 * marshal.c: actually cache stelem.ref wrappers.
10508 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10510 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
10511 sections and remove the mono_cli_rva_map () function.
10513 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10515 * debug-mono-symfile.c: fix one more endianess issue, from a patch
10516 by Geoff Norton (<gnorton@customerdna.com>).
10518 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10520 * class.c: fix class loads for pointer types (typeof(int) !=
10523 2004-07-27 Martin Baulig <martin@ximian.com>
10525 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
10526 reading the debugging information from an external ".mdb" file.
10528 2004-07-24 Martin Baulig <martin@ximian.com>
10530 * reflection.c (mono_image_get_type_info): Only write a class
10531 layout entry if we actually have a size or a packing size.
10533 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
10535 * reflection.c (type_get_fully_qualified_name):
10536 insert cast to get type checking of ?: with non-gcc compilers
10538 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
10540 * rand.c: use g_getenv for both lookups of
10543 2004-07-17 Martin Baulig <martin@ximian.com>
10545 * reflection.c (mono_reflection_bind_generic_method_parameters):
10546 Set `gmethod->reflection_info'.
10548 2004-07-17 Martin Baulig <martin@ximian.com>
10550 * class.c (mono_class_create_from_typedef): Insert the newly
10551 created class into the hash table before computing the interfaces
10552 since we could be called recursively.
10554 2004-07-16 Ben Maurer <bmaurer@ximain.com>
10556 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
10557 function to implement stelem.ref in managed code
10558 * class-internals.h, debug-helpers.c: a new wrapper type
10561 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
10563 * gc.c: allow GC handles to work even when no GC is compiled in.
10564 Fix part of bug #61134 (GetAddrOfPinnedObject).
10566 2004-07-13 Peter Williams <peter@newton.cx>
10568 * process.c (complete_path): Make sure we don't attempt to execute
10571 2004-07-12 Geoff Norton <gnorton@customerdna.com>
10573 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
10574 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
10575 and will add/subtract the hour if needed
10577 2004-07-12 Martin Baulig <martin@ximian.com>
10579 * reflection.c (mono_field_get_object): If we have
10580 `field->generic_info', take the attributes from
10581 `field->generic_info->generic_type'.
10583 2004-07-12 Martin Baulig <martin@ximian.com>
10585 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
10586 This function must be called before initializing the runtime.
10587 (mono_debug_init_1): New function; call this after initializing
10588 the runtime, but before loading the assembly. It tells the
10589 debugger to load corlib and the builtin types.
10591 * mono-debug-debugger.c: Did some larger changes in the debugging
10592 code; support recursive class declarations, make sure we actually
10595 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10597 * debug-helpers.c: undo my previous patch and fixed the real issue in
10598 ../mini/exceptions-x86.c
10600 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10602 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
10603 when no HOME env. variable was set and a NullRef was thrown in a .cctor
10604 called from other .cctors.
10606 2004-07-09 Miguel de Icaza <miguel@ximian.com>
10608 * loader.c: Removed the mono_loader_wine_init hack now that we are
10609 doing a managed version of Windows.Forms.
10611 2004-07-09 Ben Maurer <bmaurer@ximian.com>
10613 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
10614 threadpool.c, threads.c: remove static data from rootset.
10616 2004-07-09 Dick Porter <dick@ximian.com>
10618 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
10619 Don't do any more processing if the matched length was 0. It was
10620 increasing the size of the string before. Fixes bug 61167.
10622 2004-07-09 Dick Porter <dick@ximian.com>
10626 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
10627 Add support for SO_PEERCRED if its available.
10629 2004-07-09 Peter Bartok <pbartok@novell.com>
10630 * loader.c: winelib.exe.so error message is now only displayed if
10631 MONO_DEBUG is set. To help us avoid questions when people are trying
10632 out the new Managed.Windows.Forms.
10634 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
10636 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
10637 for isinst and castclass wrappers.
10639 * class-internals.h icall.c: Move registration and lookup of JIT icalls
10640 to libmetadata from the JIT, so they could be used by the marshalling
10641 code and the interpreter.
10643 * marshal.c: Register marshalling related JIT icalls here instead of
10644 in mini.c. Use CEE_MONO_ICALL instead of the family of
10645 CEE_MONO_PROC<x> opcodes to call marshalling functions.
10647 * metadata.h: Remove unneeded marshalling conversions.
10649 * opcodes.c: Update for new opcodes.
10651 2004-07-08 Martin Baulig <martin@ximian.com>
10653 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
10654 (mono_debug_get_domain_data): Make this function static.
10656 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
10658 * gc.c, object.h: add nice GC handle API for embedders.
10660 2004-07-06 Ben Maurer <bmaurer@ximian.com>
10662 * reflection.c: more changes for the new api
10664 * object.c: When we reflect on a field w/ a constant value, it
10665 will not have a memory location, so we must access metadata. Also,
10666 allow easier reading of strings so that we can read them from
10669 * class.c (mono_class_layout_fields): no need for literal fields here.
10671 * class-internals.h: api changes for const fields
10673 * icall.c (ves_icall_get_enum_info): use new apis for const fields
10675 2004-07-06 Martin Baulig <martin@ximian.com>
10677 * mono-debug.h: Increment version number to 44.
10679 * mono-debug.c (mono_debug_add_wrapper): The second argument is
10680 now a gpointer, rewrote this whole method.
10682 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
10683 function. Add information about the wrapper in a new "misc table".
10685 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
10686 for the new misc table.
10688 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
10690 * metadata-internals.h image.c: Add a cache for helper signatures.
10692 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
10694 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
10696 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
10697 delegates from a delegate. Fixes #61033.
10699 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
10700 marshalling of stringbuilder arrays. Fixes #59900.
10702 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
10704 * icall.c: Add EnumBuilder:setup_enum_type icall.
10706 2004-06-30 Ben Maurer <bmaurer@ximian.com>
10708 * icall.c: Added a new icall for the property version of
10709 OffsetOfStringData.
10711 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
10713 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
10714 it has a constant size across platforms.
10716 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
10719 2004-06-29 Martin Baulig <martin@ximian.com>
10721 * mono-debug.c (mono_debug_add_method): Protect the whole function
10722 in mono_debugger_lock(), not just parts of it.
10724 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10726 * reflection.c: make sure padding bytes in heaps are zeroed.
10728 2004-06-24 David Waite <mass@akuma.org>
10730 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
10731 image.c, loader.c, locales.c, marshal.c, metadata.c,
10732 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
10733 string-icalls.c, threads.c: change to C90-style comments from C99 /
10736 2004-06-24 Dick Porter <dick@ximian.com>
10739 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
10740 return createdNew. Fixes bug 60412.
10743 * icall.c: Add createdNew parameter to CreateMutex icall
10745 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10747 * reflection.c, object-internals.h: save default value in params.
10749 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10751 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
10752 no need to build a new path combining that with the application base.
10755 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10757 * reflection.c: fixed minor standard compliance issues.
10759 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
10761 * reflection.c: fixed issue with encoding some custom attributes
10762 (arrays in properties and fields, bug #60411).
10764 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10766 * reflection.c: fix start address when copying the public key token.
10768 2004-06-23 Martin Baulig <martin@ximian.com>
10770 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
10771 the `exc' object in a static object to put it into the GC's root set.
10773 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
10775 * reflection.c: make mono_reflection_setup_internal_class ()
10776 callable a second time to setup a new parent class.
10778 2004-06-23 Dick Porter <dick@ximian.com>
10780 * threads.c: Check for WAIT_IO_COMPLETION return values.
10782 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
10784 * appdomain.c: Removed the g_free on the public key token. Now copy
10785 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
10786 * assembly.c: Added public key token string value when loading
10787 assemblies. Fix bug #60439.
10788 * icall.c: Added missing informations (like public key) in
10789 GetReferencedAssemblies. Fix #60519.
10790 * image.h: Changed definition for public key token from const char*
10791 public_tok_value to guchar public_key_token [17];
10792 * reflection.c: Updated for changes to public key token.
10794 2004-06-22 Lluis Sanchez Gual
10796 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
10797 for the field in base classes.
10799 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
10801 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
10802 mark headers as not supported, they are installed only for use by the
10805 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
10807 * *.c, *.h: avoid namespace pollution in public headers.
10809 2004-06-21 Martin Baulig <martin@ximian.com>
10811 * exception.c (mono_get_exception_security): It's in
10812 "System.Security", not in "System".
10814 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
10815 the exception classes.
10817 2004-06-21 Martin Baulig <martin@ximian.com>
10819 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
10820 Protect the exception object from being finalized.
10822 2004-06-21 Martin Baulig <martin@ximian.com>
10824 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
10827 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
10829 * reflection.c: Load the assembly in mono_reflection_type_from_name,
10830 if it was not loaded before. Fix parts of #60439.
10832 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
10834 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
10835 code that was broken since Ben's change: wrappers are now
10836 dependent on the method signature only again.
10838 2004-06-21 Martin Baulig <martin@ximian.com>
10840 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
10841 added interface support.
10843 2004-06-21 Martin Baulig <martin@ximian.com>
10845 * class.c (mono_vtable_get_static_field_data): New public method.
10847 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
10849 * filewatcher.c : Windows build fix to be compliant with API changes.
10851 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10853 * class.h, class.c: more accessors.
10854 * metadata.h, metadata.c: prepare for hiding MonoType and
10855 MonoMethodSignature: people should use the accessors from now on
10856 outside of the tree.
10858 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10860 * *.c, *.h: more API cleanups.
10862 2004-06-18 Jackson Harper <jackson@ximian.com>
10864 * assembly.c: Trace loading assemblies.
10865 * loader.c: Trace loading native libraries.
10866 * mono-config.c: Trace loading config files.
10868 2004-06-18 Dick Porter <dick@ximian.com>
10870 * locales.c: Tell ICU the lengths of strings, it can cope with
10871 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
10873 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10875 * image.c: swapped name/filename;
10877 2004-06-18 Martin Baulig <martin@ximian.com>
10879 * mono-debug-debugger.c (write_class): Write the parent class at
10880 the end of the header.
10882 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
10884 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
10886 2004-06-17 Raja R Harinath <rharinath@novell.com>
10888 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
10889 (bundle_obj): New conditional define.
10890 (BUILT_SOURCES): Remove.
10891 ($(bundle_srcs)): Make parallel-make safe.
10892 (libmonoruntime_la_LIBADD): Make unconditional.
10893 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
10894 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
10896 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
10898 * culture-info-tables.h: It was inconsistent with the latest
10901 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
10903 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
10906 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
10909 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10911 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
10912 cleaned up public header threads.h.
10914 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10916 * Makefile.am, *.c, *.h: more API cleanups.
10918 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10920 * Makefile.am: removed monosn from compilation.
10921 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
10922 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
10923 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
10924 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
10925 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
10926 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
10928 2004-06-15 Jackson Harper <jackson@ximian.com>
10930 * assembly.c: Make locales lower case when searching the GAC for
10931 assemblies. gacutil will always make locales lowercase when
10932 installing so this effectively makes them case insensitive.
10934 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
10936 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
10937 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
10938 parameter which allows to choose whether the wait can be interrupted or
10939 not. Also added the method mono_monitor_enter(), which locks the monitor
10940 using an infinite wait and without allowing interruption.
10941 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
10943 * object.h: Added new fields in MonoThread. suspend_event holds the event
10944 used to susped/resume the thread. synch_lock is the lock object to use for
10945 modifying the thread state.
10946 * threads.c: Use the new synch_lock object for locking, instead of "this",
10947 which can generate deadlocks.
10948 Moved thread state change in Thread.Sleep and Thread.Join from managed
10949 to unmanaged code. This avoids a deadlock when the thread was suspended
10950 just after acquiring the thread lock.
10951 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
10952 Implemented Thread.Suspend using an event instead of ThreadSuspend,
10953 which is not fully implemented in the io-layer.
10954 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
10956 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
10958 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
10959 threads-types.h: more API cleanups.
10961 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10963 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
10964 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
10965 threadpool.c, threads.c: first pass at the exported API cleanup.
10967 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10969 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
10971 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10973 * icall.c: added internalGetHome.
10975 2004-06-14 Dick Porter <dick@ximian.com>
10977 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
10978 possible to return successfully when '.' or '..' were the only
10979 entries in a directory, but were skipped. The MonoIOStat was not
10980 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
10983 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10985 * reflection.c: make binaries run on .Net 1.1 by default.
10987 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10989 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
10991 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
10993 * marshal.c: keep track of struct size with explicit layout
10996 2004-06-12 Martin Baulig <martin@ximian.com>
10998 * mono-debug-debugger.c: Comment out a debugging g_message().
11000 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
11002 * reflection.c, reflection.h: do not free custom attrs that are cached.
11003 * icall.c: use braces to make code clearer.
11005 2004-06-11 Martin Baulig <martin@ximian.com>
11007 * class.h (MonoInflatedField): New type.
11008 (MonoClassField): Replaced `MonoType *generic_type' with
11009 `MonoInflatedField *generic_info'.
11012 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
11014 2004-06-11 Martin Baulig <martin@ximian.com>
11016 * reflection.c (mono_image_create_method_token): Correctly encode
11019 2004-06-11 Martin Baulig <martin@ximian.com>
11021 * metadata.c (mono_metadata_parse_method_signature): When parsing
11022 a MethodDef which has VarArgs, also set sentinelpos if we don't
11023 have any parameters.
11025 2004-06-11 Martin Baulig <martin@ximian.com>
11027 * verify.c (mono_method_verify): In CEE_CALL, use
11028 mono_method_get_signature() to get the method's signature, unless
11029 we're a PInvoke method.
11031 2004-06-10 Jackson Harper <jackson@ximian.com>
11033 * assembly.c: Use <path>/lib/mono/gac for the extra paths
11034 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
11035 logical name as the supplied path is just a prefix to the gac not
11036 the direct path to it.
11038 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
11040 * reflection.c: make the token for a created method match
11041 the token of the MethodBuilder it was created from
11042 (IKVM requires this behaviour now).
11044 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
11046 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
11047 reflection.c, socket-io.c: leak fixes.
11049 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11051 * icall.c: handle sentinel pos in vararg methods in position different
11054 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11056 * culture-info-tables.h: freshly generated.
11058 2004-06-09 Martin Baulig <martin@ximian.com>
11060 * loader.c (mono_get_method_constrained): Call `mono_class_init
11061 (constrained_class)'.
11063 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
11065 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
11066 any methods. Fixes #59629.
11068 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
11070 * culture-info-tables.h: reflecting locale-builder updates.
11072 2004-06-08 Dick Porter <dick@ximian.com>
11075 * locales.c: Fixed compile warnings, including a real bug in
11076 CompareInfo_internal_compare.
11078 2004-06-08 Dick Porter <dick@ximian.com>
11081 (ves_icall_System_Globalization_CompareInfo_internal_index):
11082 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
11083 Double-check the resuls of usearches, because ICU currently
11084 ignores most of the collator settings here. Fixes bug 59720.
11086 2004-06-08 Dick Porter <dick@ximian.com>
11089 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
11090 Fix memory leak and segfault-causing typo. No idea how this one
11091 lasted so long without being noticed.
11093 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
11095 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
11096 any methods. Fixes #59629.
11098 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11101 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
11102 own the critical section before). Removed dead code (that's done
11103 in the preload hook).
11105 (mono_assembly_load_with_partial_name): call the preload hook.
11107 2004-06-08 Martin Baulig <martin@ximian.com>
11109 * metadata.c (mono_metadata_signature_alloc): Default
11110 `sentinelpos' to -1.
11112 * reflection.c (mono_image_get_array_token): Likewise.
11114 2004-06-08 Martin Baulig <martin@ximian.com>
11116 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
11118 * metadata.c (mono_metadata_parse_method_signature): When parsing
11119 a MethodDef which has VarArgs, set sentinelpos.
11121 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
11122 `gint16' since we're using -1 for non-varargs methods.
11125 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
11126 (method_encode_signature): Added varargs support.
11127 (method_builder_encode_signature): Likewise.
11128 (mono_image_get_varargs_method_token): New static method.
11129 (mono_image_create_method_token): New public method; this is
11130 called via an icall instead of mono_image_create_token() when
11131 calling a varargs method.
11133 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
11135 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
11137 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
11139 * culture-info-tables.h : Reflecting the latest locale-builder that
11140 fixed empty array representation ({} to {0}).
11142 2004-06-07 Jackson Harper <jackson@ximian.com>
11144 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
11145 looking up extra gac paths. This allows MONO_GAC_PATH to act
11146 exactly like a prefix.
11148 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
11150 * reflection.c (mono_reflection_type_from_name): Make a copy of the
11151 type name before modifying it. Fixes #59405.
11153 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
11155 * culture-info.h: added fields for "all datetime patterns".
11156 * locales.c: ( ves_icall_System_Globalization_CultureInfo
11157 _construct_datetime_format ()): fill xxx_patterns fields.
11158 * object.h: added fields for "all datetime patterns" to
11159 MonoDateTimeFormatInfo.
11160 * culture-info-tables.h: reflecting locale-builder updates.
11162 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
11164 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
11165 the event has no add and remove methods. Fixes #59629.
11167 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
11169 * object.c: Fixed possible integer overflow when allocating large
11172 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
11174 * culture-info-tables.h: reflecting locale-builder updates.
11176 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
11178 * culture-info-tables.h: reflecting locale-builder updates.
11180 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
11182 * culture-info-tables.h: reflecting locale-builder updates.
11184 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
11186 * threads.c: Made Thread.Sleep abortable.
11188 2004-06-02 Martin Baulig <martin@ximian.com>
11190 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
11192 * debug-mono-symfile.h: Bumped symbol file version number to 37.
11194 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
11196 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
11198 2004-05-30 Jackson Harper <jackson@ximian.com>
11200 * reflection.c: Do not hardcode assembly versions or public key
11201 tokens anymore. All of this except the corlib section was dead
11204 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
11206 * object.c (mono_runtime_invoke_array): Automatically create boxed
11207 objects for byref valuetypes if needed. Fixes #59300.
11209 * object.c (mono_method_return_message_restore): Handle
11210 MONO_TYPE_OBJECT as well.
11212 2004-05-28 Jackson Harper <jackson@ximian.com>
11214 * reflection.c: The modified type encoding was causing build
11215 problems. Reverted for now.
11217 2004-05-28 Jackson Harper <jackson@ximian.com>
11219 * reflection.c/h: Take an assembly ref so that we dont create
11220 fully qualified names when encoding types in the same assembly as
11221 the custom attribute being emitted.
11222 * appdomain.c: Increment version number.
11224 2004-05-26 Duncan Mak <duncan@ximian.com>
11227 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11228 Set the full version number (major, minor, build, revision).
11230 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
11232 * marshal.c (emit_struct_conv): increment src/dst after blit
11233 (mono_marshal_get_managed_wrapper,
11234 mono_marshal_get_native_wrapper): make sure we have marshalling
11235 info before marshalling params (info computation affects
11238 * class.c (class_compute_field_layout): correctly deal with
11240 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
11241 value types (as per what windows dows by default)
11242 (mono_class_setup_mono_type): System.ValueType is blittable
11243 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
11246 * marshal.c (mono_marshal_load_type_info): flag types as
11247 non-blittable if the native layout doesn't match the managed
11250 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11252 * appdomain.c: don't add stuff in the private search path that is
11253 above the application base. If application base is not set, there's
11254 no private search path.
11256 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
11258 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
11259 byref struct arguments in native->managed marshalling.
11261 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
11263 * marshal.c (mono_marshal_get_runtime_invoke): correctly
11264 cache methods using signature (special case for methods
11265 that are value type or string class)
11267 * image.c (mono_image_close): clean up allocated GSList's
11268 in runtime_invoke_cache.
11270 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11272 * mono-config.c: set the correct path for mono_cfg_dir on windows when
11273 there's no MONO_CFG_DIR environment variable defined.
11275 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11277 * threads.c: windows version must be >= 0x0500 to include OpenThread.
11279 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
11281 * threadpool.c: Really wait for 500ms after the async call, even if the wait
11283 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
11284 before waiting for it, and call CloseHandle after the wait to unref it.
11285 This will make sure that handles are not disposed too early.
11287 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11292 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
11295 * object.c: se the application_base only for the domain that runs
11296 Main. Fixes bug #59216,
11298 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11301 * object.c: only the domain in which Main is run have
11302 SetupInformation.ConfigurationFile set, so moved a few lines from
11303 appdomain.c to object.c.
11305 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11307 * appdomain.c: we tried to load [name].(dll|exe), but according
11308 to bug #57710, we must also try [culture]/[name].(dll|exe) and
11309 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
11310 There's a test case attached to bug #58922.
11312 2004-05-27 Dick Porter <dick@ximian.com>
11315 * file-io.c: Implemented icalls for locking and unlocking regions
11317 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
11318 FALSE on error (fixes both compiler warning and real bug.)
11320 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
11322 * culture-info-tables.h: reflecting locale-builder updates.
11324 (Added missing ChangeLog entry for 05/26)
11326 2004-05-27 Jackson Harper <jackson@ximian.com>
11328 * locales.c: Fix some cut and paste errors.
11330 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11332 * mono-config.c: set the correct path for config. directory on windows.
11334 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
11336 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
11339 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
11341 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
11342 from pinvoke functions.
11344 * marshal.c (mono_ftnptr_to_delegate): Implement this.
11346 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
11348 * culture-info-tables.h: reflecting locale-builder updates.
11350 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
11352 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
11355 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
11357 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
11358 * icall.c: Modified icalls for RNG.
11359 * rand.c|h: Changed RNG interface to allow thread-safe usage under
11360 Windows (CryptoAPI).
11362 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
11364 * locales.c: Fix build.
11366 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
11368 * culture-info-tables.h: reflecting locale-builder updates.
11370 2004-05-25 Jackson Harper <jackson@ximian.com>
11372 * locales.c: When creating the current culture use the $LANGs
11373 specific culture. So DateTimeFormat and NumberFormat entries are created.
11375 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
11377 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
11378 a char array as parameter.
11380 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
11382 * image.c: In mono_image_open(), always use an absolute path name to
11383 look for already loaded images.
11385 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
11387 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
11388 missing in the windows build (like older cygwin include files).
11390 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
11392 * icall.c: Fixed check for possible integer overflow in Buffer_
11393 BlockCopy icall. Replaced comments style // by /* */.
11395 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
11397 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
11399 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
11400 check after MONO_VTADDR. Fixes pinvoke2.exe.
11402 * marshal.h marshal.c metadata.h: Add beginnings of support for
11403 ftnptr -> delegate marshalling.
11405 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
11407 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
11408 * threads.c: Fix warnings.
11410 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
11412 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
11413 * icall.c: Registered icalls for Suspend and Resume.
11414 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
11416 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
11417 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
11418 * process.c: Use WaitForSingleObjectEx.
11419 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
11421 * threads.c, threads.h: Make use of new Ex wait methods. Improved
11422 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
11423 for Suspend and Resume. Added new mono_thread_stop, used for stoping
11424 background threads. Added basic support for Abort in Windows.
11425 Start new threads using a managed delegate invoke wrapper. This wrapper
11426 has an interruption checkpoint that is needed since an interruption
11427 can be requested before the thread leaves the unmanaged code that starts
11429 * marshal.c: Added interruption checkpoint after every native call, and
11430 also before managed calls for wrappers called from unmanaged code to
11431 go into managed code.
11432 * object.h: Added new field in MonoThread to keep track of interruption
11435 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
11437 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
11440 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11447 * rand.c: getenv -> g_getenv (windows!)
11449 * process.c: complete_path is also used on non-windows platforms.
11451 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11453 * icall.c: new signature for Process_Start.
11455 * process.[ch]: new signature for Process_Start. If we're on windows
11456 and UseShellExecute is false, we have to search for the program by
11457 ourselves if we don't get a full path.
11459 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
11461 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
11462 marshalling and call CleanUpNativeData if needed. Fixes #58646.
11464 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11466 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
11469 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11471 * process.c: use double quotes to quote program name and arguments on
11472 windows. Fixes bug #58575.
11474 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11476 * file-io.c: don't return "." and ".." when using windows Find*File.
11478 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
11480 * marshal.c: Don't pass wrappers to message init because method
11481 addressed used to lookup metadata. part of remoting[2|3] fix.
11483 2004-05-15 Jackson Harper <jackson@ximian.com>
11485 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
11486 path is essentially the same as MONO_PATH except that it points to
11487 GACs instead of lib directories.
11488 * loader.h: The user gac is gone so we dont need function to
11490 * mono-config.c: user gac option is now gone.
11492 2004-05-15 Jackson Harper <jackson@ximian.com>
11494 * culture-info.h: Make defines more consistent, add calendar data
11495 to the culture info table.
11496 * culture-info-tables.h: Add basic calendar data. Basically
11497 everyone gets default gregorian until all the data is
11499 * locales.c: Use the new consistent defines. Set calendar data for
11500 culture info objects.
11501 * object.h: add a field for calendar data to CultureInfo
11503 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
11505 * image.c: image->runtime_invoke_cache is keyed on signatures now.
11506 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
11508 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
11509 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
11510 an extra param that is the pointer of the method to invoke. The IL for
11511 the invoke method is no longer specific to the method, but to the
11512 signature of the method. Thus, we can share the same code for multiple
11513 methods. This reduces the number of methods that have to be compiled.
11515 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
11517 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
11519 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11521 * icall.c: Optimize Buffer.BlockCopy.
11523 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11525 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
11526 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
11527 quote). Changed them to "MMMM yyyy".
11529 2004-05-12 Miguel de Icaza <miguel@ximian.com>
11532 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
11534 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
11536 * reflection.h: Updated after changes to managed structures.
11538 * appdomain.c: Bump corlib version.
11540 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11542 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
11545 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11547 * Makefile.am: link to ../os/libmonoos.la on windows.
11550 -If MONO_DEBUG, warn about non-existing directories in
11552 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
11553 compile time variable.
11554 -Removed init_default_path and call mono_set_rootdir from
11555 libmonoos.a instead (windows only).
11557 * assembly.h: declare mono_assembly_getrootdir().
11560 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
11562 * loader.c: s/getenv/g_getenv/
11564 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
11566 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
11568 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
11570 * metadata.h: Add new marshalling conversions.
11572 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
11575 * reflection.c (mono_reflection_get_type): Lookup the type in all
11576 modules of a multi-module assembly. Fixes #58291.
11578 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
11580 * threads.c: Before aborting a background, set the StopRequested
11581 state. This avoids throwing the Abort exception.
11582 In mono_thread_manage, don't continue with the shutdown until all
11583 aborted threads have actually stopped.
11585 2004-05-10 Jackson Harper <jackson@ximian.com>
11587 * locales.c: Remove the modifier from culture names.
11589 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11591 * Makefile.am: monosn is not installed any more. It has been deprecated
11594 2004-05-07 Jackson Harper <jackson@ximian.com>
11597 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
11598 Fix array construction, add bailout if the length is 0.
11600 2004-05-07 Dick Porter <dick@ximian.com>
11602 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
11603 machine doesn't have a DNS entry. Patch by Urs Muff
11604 (umuff@quark.com), fixes bug 57928.
11606 2004-05-06 Jackson Harper <jackson@ximian.com>
11608 * reflection.c: Handle null PublicTokens properly. alloc mem for
11609 assembly names culture so we dont crash when freeing it.
11611 2004-05-06 Jackson Harper <jackson@ximian.com>
11613 * assembly.c: Check the usergac when loading with partial names.
11615 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
11617 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
11618 does nothing for now (not required for Linux/Windows) but the class
11619 library can call it (and a newer or modified runtime could need it).
11620 * icall.c: Registred icall.
11622 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11624 * loader.c: prints a message on module loading error we set MONO_DEBUG
11625 environment variable.
11627 2004-05-05 Jackson Harper <jackson@ximian.com>
11629 * appdomain.c: Handle PublicKeyToken=null properly.
11631 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
11633 * environment.c|h: Added icall ves_icall_System_Environment_
11634 GetOSVersionString to get the current OS version as a string.
11635 * icall.c: Registred icall.
11637 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
11639 * object.c: in mono_object_get_virtual_method(), take into account that
11640 non-virtual methods don't have a slot in the vtable. Check needed when
11641 the object is a proxy.
11643 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
11645 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
11646 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
11648 * object.c (mono_class_compute_gc_descriptor): Fix warning.
11650 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
11651 passed when a valuetype is expected.
11653 * object.c (mono_unhandled_exception): Only set the exit code if the
11654 exception happens in the main thread. Fixes thread5.exe.
11656 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
11657 invalid names. Fixes #58047.
11659 2004-05-03 Jackson Harper <jackson@ximian.com>
11661 * assembly.c: This line was committed accidently and is unneeded.
11663 2004-05-03 Jackson Harper <jackson@ximian.com>
11665 * icall.c: Add new icall for Assembly::LoadWithPartialName
11666 * assembly.c/.h: new function that probes the GAC to load partial
11667 assembly names by Paolo Molaro.
11669 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11671 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
11672 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
11673 (type_get_fully_qualified_name): Added PublicKeyToken when building a
11676 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11678 * appdomain.c: fixed check for 'neutral' culture and removed warning.
11679 * reflection.c: fix bug when parsing a full type name and Version is not
11680 the last thing in the string.
11682 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
11684 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
11685 crashes when it is freed.
11687 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11689 * assembly.c: print the compat warning to stderr.
11691 2004-05-01 Miguel de Icaza <miguel@ximian.com>
11693 * assembly.c (mono_assembly_load_references): Add a compatibility
11694 hack to run old applications that might be still referencing the
11695 3300-based assemblies, only do this for System.xxx.
11697 2004-05-01 Jackson Harper <jackson@ximian.com>
11699 * appdomain.c: If the culture is neutral we set it to "".
11701 2004-04-29 Jackson Harper <jackson@ximian.com>
11703 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
11705 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
11707 * string-icalls.c: added low overhead function for copying chars
11708 * icall.c: added needed icall for the above function
11710 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11712 * icall.c: fix return value of get_global_assembly_cache. Implemented
11713 Environment.GetLogicalDrives.
11715 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
11717 * rand.c: try and talk to egd or prngd
11718 for random bytes if opening devices fail.
11720 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
11722 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
11723 alignment for the type using the native alignment of its members
11724 instead of using klass->min_align.
11726 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
11728 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11731 * socket-io.c: added check for sys/aio.h.
11733 2004-04-28 Dick Porter <dick@ximian.com>
11735 * threads.c: Don't abort a thread thats already aborting, when
11736 terminating everything.
11738 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11740 * icall.c: added 2 new async calls for Socket.
11742 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
11743 IO on *nix systems.
11745 * threadpool.c: removed unused variable.
11747 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
11749 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
11751 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
11753 * locales.c: put back string_invariant_tolower () and
11754 string_invariant_toupper ().
11756 2004-04-26 David Waite <mass@akuma.org>
11761 * unicode.h: remove comma from end of enumeration declarations
11763 2004-04-26 David Waite <mass@akuma.org>
11765 * debug-mono-symfile.h:
11768 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
11771 2004-04-26 Jackson Harper <jackson@ximian.com>
11773 * appdomain.c: Increment version number.
11775 2004-04-26 Jackson Harper <jackson@ximian.com>
11777 * appdomain.c: Set assembly references public token value when
11778 PublicKeyToken is specified, not the hash_value. Free public token
11779 values when free assembly name data. Previously the public key
11780 token was hex decoded, however we are using hex encoded public key
11781 tokens, so this is not neccasary.
11782 * assembly.c: Lookup assemblies in the gac if their public token
11783 value is set. Add function to allow enabling user gac
11784 lookups. Specify whether or not the assembly was loaded from the
11785 GAC. Compare full assembly names when checking the cache for
11786 assemblies (Temporarily disabled see comment in code). Remove
11787 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
11788 specifies trace-loader they get extra info to stdout on the
11789 loading of assemblies.
11790 * image.h: Add a field for an assembly references public token
11791 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
11792 whether an assembly has been loaded from the GAC.
11793 * image.c: Remove a corlib -> mscorlib name mapping.
11794 * loader.h: Add function to enable/disable the user gac.
11795 * mono-config.c: Check if the usergac is enabled in the config
11797 * icall.c: New icall to determine whether or not an assembly has
11798 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
11799 * tabldefs.h: Add constant for assemblyref flag that specifies a
11800 full public key is used instead of a public token.
11801 * reflection.c: Remove mscorlib -> corlib mappings. Set
11802 PublicTokenValue instead of hash value. This value is a hex
11803 string so it does not need to be expanded.
11805 2004-04-26 Martin Baulig <martin@ximian.com>
11807 * mono-debug-debugger.c (mono_debugger_initialize): Set
11808 `mono_debugger_initialized' before calling mono_debug_lock().
11810 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
11812 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
11813 InternalToUpper/InternalToLower.
11814 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
11815 removed invariant culture shortcut. This is now done in managed code.
11816 * locales.c: (string_invariant_toupper/tolower) removed.
11818 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11820 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
11821 Added Poll internal call.
11823 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
11824 call for Poll. Select was too heavy for polling a single socket.
11826 * threadpool.[ch]: added mono_threadpool_cleanup.
11827 * threads.c: use it. Don't use Thread_Abort on windows.
11829 2004-04-23 Martin Baulig <martin@ximian.com>
11831 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
11833 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
11835 * icall.c: Registred new icalls for key pair protection and added an
11836 icall for Environment.GetFolderPath on Windows.
11837 * security.c|h: Added new icalls for key pair protection.
11839 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11841 * socket-io.c: don't display the non-supported family warning for known
11842 families. Now this is not displayed on windows when checking support
11845 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11847 * class.c: don't display the layout warning for static fields.
11849 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
11851 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
11852 * locales.c, locales.h: Added new icalls for culture-specific
11853 Char.ToLower and Char.ToUpper.
11855 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11857 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
11860 2004-04-20 Martin Baulig <martin@ximian.com>
11862 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
11863 of the type name before passing it to mono_reflection_type_from_name().
11865 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
11867 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
11868 encodings here. Fixes #56965.
11870 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
11872 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
11873 fix test on strstr result not that I can see anything that
11874 relies on the result.
11876 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
11878 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
11881 * marshal.c (mono_marshal_get_string_encoding): New helper function.
11883 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
11884 function to determine which marshalling to use for strings. Fixes
11887 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
11889 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
11891 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
11893 * icall.c: #include mono-config.h
11895 2004-04-15 Jackson Harper <jackson@ximian.com>
11897 * culture-info-tables.h: Fix date formats for en-US culture.
11899 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
11901 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
11902 ThreadPool.SetMinThreads.
11903 * threadpool.c: Implemented ThreadPool.GetMinThreads and
11904 ThreadPool.SetMinThreads.
11906 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11908 * mono-config.c: also load the .config file in the directory
11909 where the assembly was found.
11911 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
11913 * assembly.c: load per-assembly config files.
11914 * icall.c: decrapified code to get the config dir and moved to
11916 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
11917 per-assembly config files. When doing a dll map lookup give precedence
11918 to the per-assembly data.
11920 2004-04-14 Martin Baulig <martin@ximian.com>
11922 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
11923 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
11924 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
11926 * mono-debugger-debugger.c: While the debugger is locked, remember
11927 whether the symbol tables have changes and send one single
11928 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
11930 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
11932 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
11934 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
11937 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
11938 account when marshalling string arrays. Fixes #56965.
11940 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
11942 * icall.c: Add new icalls mapping for security.
11943 * security.c|h: Add internal calls for WindowsIdentity,
11944 WindowsImpersonationContext and WindowsPrincipal.
11946 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
11948 * class.c: Added comment to ensure the System.MonoDummy class
11949 is removed when no longer necessary
11951 2004-04-13 Miguel de Icaza <miguel@ximian.com>
11953 * appdomain.c: Pass arguments to the bootstraping exceptions to
11954 minimize JITed methods at boot
11956 * metadata.c (mono_exception_from_name_two_strings): Allow for the
11957 second string to be null.
11959 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
11960 Change the protocol to minimize the JIT methods at startup. Now
11961 it Returns the internal codepage, if the value of "int_code_page"
11962 is 1 at entry, and we can not compute a suitable code page
11963 number, returns the code page as a string.
11965 2004-04-13 Jackson Harper <jackson@ximian.com>
11967 * culture-info-tables.h: Fix number of decimal digits for all
11970 2004-04-13 Jackson Harper <jackson@ximian.com>
11972 * icall.c: Clairfy out of sync error message. It is not always
11973 your corlib that is out of sync.
11975 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
11977 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
11978 properties when only the set accessor is overriden. Fixes #55874.
11980 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
11982 * assembly.c (mono_assembly_load_references): Make this thread safe.
11985 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
11987 * monosn.c: Add missing initialization calls.
11989 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
11992 ves_icall_System_Globalization_CultureInfo_construct_number_format
11993 Fix g_assert so it compiles on fussier compilers re int/ptr
11996 2004-04-08 Dick Porter <dick@ximian.com>
11999 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
12000 53992. Also rearrange the code so that the internal calls return
12001 an error value and exceptions are thrown from managed code.
12003 * icall.c: Add type info to the socket icalls.
12005 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12007 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
12010 2004-04-07 Martin Baulig <martin@ximian.com>
12012 * class.c (mono_class_from_generic_parameter): Don't default
12013 `klass->parent' to `mono_defaults.object_type'.
12015 2004-04-07 Martin Baulig <martin@ximian.com>
12017 * reflection.c (mono_reflection_initialize_generic_parameter): Set
12018 `param->pklass->reflection_info'.
12020 2004-04-07 Jackson Harper <jackson@ximian.com>
12022 * culture-info-tables.h: Fix date separator symbol.
12024 2004-04-07 Martin Baulig <martin@ximian.com>
12026 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
12027 from System.Type to System.MonoType.
12029 2004-04-07 Martin Baulig <martin@ximian.com>
12032 (MonoReflectionGenericParam): Added `has_reference_type' and
12033 `has_value_type' fields.
12035 * reflection.c (mono_image_get_generic_param_info): Encode the
12036 correct flags if we have the `class' or `struct' constraint.
12038 2004-04-07 Martin Baulig <martin@ximian.com>
12041 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
12043 2004-04-07 Jackson Harper <jackson@ximian.com>
12045 * appdomain.c: Revert extra patches, just wanted to bump the
12048 2004-04-07 Jackson Harper <jackson@ximian.com>
12050 * Makefile.am: Add culture-info private headers.
12051 * icall.c: Add new icalls for contructing locales.
12052 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
12053 * locales.h: Declare new culture info construction methods.
12054 * object.h: Add new fields used to avoid the CultureMap to
12056 * culture-info.h: Definition of structs used in the culture info
12058 * culture-info-tables.h: Autogenerated tables that contain culture
12059 info data. This file was generated with the locale-builder tool.
12060 * appdomain.c: Incement corlib version number.
12062 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
12064 * appdomain.c: (mono_runtime_init) move mono_thread_init
12065 to before mono_object_new calls so critical sections
12066 are initialized before use.
12068 2004-04-07 Martin Baulig <martin@ximian.com>
12071 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
12072 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
12073 (ves_icall_MonoGenericParam_initialize): Removed.
12074 (monogenericparam_icalls): Removed.
12075 (generictypeparambuilder_icalls): Added new table for
12076 System.Reflection.Emit.GenericTypeParameterBuilder.
12079 (mono_reflection_define_generic_parameter): Removed.
12080 (mono_reflection_initialize_generic_parameter): This is now called
12081 from GenericTypeParameterBuilder's .ctor.
12083 2004-04-06 Martin Baulig <martin@ximian.com>
12085 * class.c (mono_class_init): Don't inflate nested classes in a
12087 (mono_type_get_name_recurse): Include the generic arguments for
12088 generic instances and generic type declarations.
12089 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
12090 (_mono_class_get_instantiation_name): Removed.
12091 (mono_class_create_generic): Always use `gklass->name' as our name.
12093 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
12095 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
12096 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
12097 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
12098 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
12099 closed generic methods here.
12102 (mono_reflection_generic_inst_get_nested_types): Removed.
12103 (inflate_mono_method): Copy the generic parameters from the
12104 MonoMethodHeader into out MonoGenericMethod.
12106 2004-04-06 Martin Baulig <martin@ximian.com>
12109 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
12111 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
12113 * reflection.c (build_compressed_metadata): If we have any entries
12114 in the GenericParam, MethodSpec or GenericParamConstraint tables,
12115 set the header version to 1.1.
12117 2004-04-06 Martin Baulig <martin@ximian.com>
12119 * class.c (mono_class_init): If we're a generic instance,
12120 initialize our nested classes, too.
12121 (_mono_class_get_instantiation_name): Deal with the new `!%d'
12124 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12126 * process.c: quote the argument passed to the shell on windows.
12128 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
12130 * threads.c (mono_alloc_special_static_data): Allow this to be
12131 called during startup.
12133 2004-04-02 Martin Baulig <martin@ximian.com>
12136 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
12138 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
12140 * icall.c: Fix build.
12142 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
12144 * Makefile.am: Added security.c|h.
12145 * icall.c: Added icall for get_UserName;
12146 * security.c: New file for security related icalls. Added function
12147 get_UserName for System.Environment (fix #56144).
12148 * security.h: New. Header file for security.c
12150 2004-04-02 Dick Porter <dick@ximian.com>
12152 * icall.c: Deleted the icalls that were obsoleted some time ago
12153 by the ICU string code, and which were mixed into the icall
12154 rearranging. Fixes bug 55969.
12157 * string-icalls.c: Deleted the code that those icalls reference.
12159 2004-04-01 Martin Baulig <martin@ximian.com>
12161 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
12163 * class.c (mono_class_from_generic_parameter): Don't set
12164 TYPE_ATTRIBUTE_INTERFACE.
12165 (my_mono_class_from_generic_parameter): Likewise.
12167 2004-04-01 Martin Baulig <martin@ximian.com>
12169 * loader.c (find_method): Added an optional `MonoClass *ic'
12170 argument to search in a specific interface.
12171 (mono_get_method_constrained): New public function.
12173 2004-04-01 Martin Baulig <martin@ximian.com>
12175 * reflection.c (mono_image_get_generic_field_token): Use the
12176 `handleref' cache here.
12178 2004-04-01 Martin Baulig <martin@ximian.com>
12180 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
12182 * reflection.c (create_generic_typespec): Use the `typespec' hash
12183 here, not the `typeref' one.
12185 2004-04-01 Martin Baulig <martin@ximian.com>
12187 * class.c (mono_class_inflate_generic_type): Moved the
12188 functionality into a new static inflate_generic_type() which
12189 returns NULL if it didn't do anything. Only increment the
12190 `mono_stats.inflated_type_count' if we actually inflated
12192 (mono_class_get_full): Check the classes type to see whether we
12193 need to inflate it; also inflate MONO_TYPE_(M)VAR.
12195 2004-04-01 Jackson Harper <jackson@ximian.com>
12197 * reflection.c: Set culture for assembly references.
12199 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
12201 * reflection.[ch], icall.[ch], Fix support for pinning variables.
12203 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12206 (do_mono_assembly_open): the critical section also covers
12207 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
12209 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12212 (mono_manage_threads): abort the background threads when finishing.
12215 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12217 * gc.c: only close the done_event handle if there was no timeout.
12220 2004-03-30 Martin Baulig <martin@ximian.com>
12222 * icall.c (icall_entries): It's called "System.Activator", not
12223 "System.Activation".
12225 2004-03-30 Martin Baulig <martin@ximian.com>
12227 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
12228 (mono_class_create_from_typespec): Likewise.
12230 2004-03-30 Martin Baulig <martin@ximian.com>
12232 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
12233 `has_ctor_constraint' and `initialized'.
12235 2004-03-30 Martin Baulig <martin@ximian.com>
12237 * reflection.c (encode_new_constraint): New static function to add
12238 the constructor constraint attribute to a type parameter.
12239 (encode_constraints): Call encode_new_constraint() if necessary.
12242 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
12244 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
12246 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
12248 * reflection.c, icall.c: add support for pinning variables.
12250 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
12252 * marshal.c (mono_marshal_get_managed_wrapper):
12253 init bool local with zero rather than null.
12255 2004-03-29 Martin Baulig <martin@ximian.com>
12257 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
12258 the "official" behavior here.
12259 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
12261 2004-03-29 Martin Baulig <martin@ximian.com>
12263 * icall.c: Reflect latest API changes.
12265 2004-03-29 Martin Baulig <martin@ximian.com>
12267 * loader.c (mono_get_method_from_token): Also call
12268 mono_metadata_load_generic_params () for abstract and interface
12269 methods; replace the type arguments in the method signature with
12270 the ones which are loaded from the metadata.
12272 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
12274 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
12275 of the lock is not the current thread. MS.NET don't do it, in spite of
12276 what the documentation says. See bug #56157.
12278 2004-03-28 Martin Baulig <martin@ximian.com>
12280 * class.c (mono_class_init): Don't call init_properties() and
12281 init_events() for generic instances; set `prop->parent' when
12282 inflating properties.
12284 * reflection.c (mono_generic_inst_get_object): Call
12285 `mono_class_init (ginst->klass)'.
12286 (mono_type_get_object): Only create a MonoGenericInst if your
12287 generic type is a TypeBuilder.
12288 (do_mono_reflection_bind_generic_parameters): Only set
12289 `ginst->is_dynamic' if our generic type is a TypeBuilder.
12291 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
12293 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
12296 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12298 * icall.c: added Kill_internal icall.
12299 * process.[ch]: added Kill_internal icall.
12301 2004-03-25 Martin Baulig <martin@ximian.com>
12303 * class.h (MonoStats): Added `generic_instance_count',
12304 `inflated_method_count', `inflated_type_count' and
12305 `generics_metadata_size'.
12307 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12309 * reflection.c: no warnings now.
12311 2004-03-25 Martin Baulig <martin@ximian.com>
12313 * class.c (mono_class_get_full): New public function; does a
12314 mono_class_get(), but also takes a `MonoGenericContext *'.
12316 * loader.c (mono_field_from_memberref): Renamed to
12317 `field_from_memberref', made static and added `MonoGenericContext *'
12319 (mono_field_from_token): Added `MonoGenericInst *' argument.
12320 (method_from_memberef): Likewise.
12321 (mono_get_method_from_token): Likewise.
12322 (mono_get_method_full): New public function; does a
12323 mono_get_method(), but also takes a `MonoGenericContext *'.
12325 * verify.c (mono_method_verify): Get the method's generic context
12326 and pass it to mono_field_from_token(), mono_get_method_full() and
12327 mono_class_get_full().
12329 2004-03-25 Martin Baulig <martin@ximian.com>
12331 * class.c (mono_class_inflate_generic_type): Take a
12332 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
12333 `MonoGenericMethod *'.
12335 2004-03-25 Martin Baulig <martin@ximian.com>
12337 * loader.h (MonoMethodInflated): Store the MonoGenericContext
12338 instead of the MonoGenericMethod here.
12340 2004-03-25 Martin Baulig <martin@ximian.com>
12342 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
12343 each time we create a new MonoGenericInst, we also create a new
12344 context which points back to us.
12346 * class.c (inflate_method): Use `ginst->context' instead of
12347 creating a new context.
12349 * loader.c (method_from_memberref): Use
12350 `klass->generic_inst->context' instead of creating a new context.
12352 2004-03-25 Martin Baulig <martin@ximian.com>
12354 * class.h (MonoGenericContext): New struct.
12355 (MonoGenericMethod): Removed `generic_inst'.
12357 * class.c (mono_class_inflate_generic_method): Take a
12358 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
12360 2004-03-25 Martin Baulig <martin@ximian.com>
12362 * loader.h (MonoMethodInflated): New typedef.
12364 * metadata.h (MonoMethodSignature): Removed `gen_method', make
12365 `generic_param_count' consume just 30 bits, added `is_inflated'
12366 and `has_type_parameters' flags (one bit each).
12368 * class.c (mono_class_inflate_generic_method): Create a
12369 MonoMethodInflated instead of a MonoMethodNormal and set
12370 `is_inflated' in the method signature.
12372 * class.h (MonoGenericMethod): Removed `generic_method'.
12374 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
12376 * image.c: Make sure the name of a MonoImage is always an absolute path.
12377 This fixes bug #54415.
12379 2004-03-24 Martin Baulig <martin@ximian.com>
12381 * class.c (mono_class_setup_vtable): If we're a generic instance,
12382 use our generic type's vtable size.
12384 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
12386 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
12387 MONO_NO_UNLOAD env var as a temporary workaround for unloading
12390 2004-03-23 Martin Baulig <martin@ximian.com>
12392 * class.h (MonoDynamicGenericInst): Added `int count_events' and
12393 `MonoEvent *events'.
12395 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
12396 (typebuilder_icalls): Added "get_event_info"; calls
12397 mono_reflection_event_builder_get_event_info().
12399 * reflection.c (mono_reflection_generic_inst_initialize): Added
12400 `MonoArray *events'.
12401 (mono_reflection_event_builder_get_event_info): New function.
12403 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
12405 * object.h: add mono_type_initialization_init
12407 * object.c (mono_runtime_class_init):
12408 implement class constructor synchronization rules
12409 to cope with threading issues.
12410 add mono_type_initialization_init
12412 * appdomain.c (mono_runtime_init): call
12413 mono_type_initialization_init
12415 * class.h: removing initializing field from MonoVTable
12417 2004-03-23 Martin Baulig <martin@ximian.com>
12419 * class.c (my_mono_class_from_generic_parameter): Use
12420 `param->name' if it's not NULL.
12422 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
12424 * class.c: do not insert non-virtual methods in the vtable.
12425 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
12426 that means the method is non-virtual. This never would have
12429 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
12431 * profiler.c: Added lock for accessing coverage_hash.
12433 2004-03-22 Martin Baulig <martin@ximian.com>
12435 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
12436 `method->method->signature->generic_param_count != 0' to make it
12437 work for interface methods.
12439 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12441 * process.c: quote the string passed to the shell using g_shell_quote.
12443 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12446 (mono_threads_manage): don't remove the finalizer thread and self
12447 from the threads hash table so that mono_thread_manage can be called
12450 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12452 * process.c: quote the arguments when UseShellExecute is true. Fixes
12455 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12457 * threads.c: set mono_thread_detach as a cleanup routine for every
12458 thread. This way it's always executed upon thread termination, either
12459 aborted or finished normally. No more xsp hangs!
12461 2004-03-17 Martin Baulig <martin@ximian.com>
12463 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
12464 `int count_nested' and a `MonoType **nested'.
12466 * reflection.c (mono_reflection_bind_generic_parameters): Moved
12467 most of the functionality into a new static
12468 do_mono_reflection_bind_generic_parameters() and don't take a
12469 `MonoType *nested_in' argument any more. Don't compute nested
12471 (mono_reflection_generic_inst_get_nested_types): New public method
12472 to get nested types.
12474 * class.c (mono_class_create_generic): Set `klass->nested_in' if
12475 we're a nested class.
12477 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
12478 mono_reflection_generic_inst_get_nested_types() to compute the
12481 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
12483 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
12484 descriptive error message under windows.
12486 2004-03-17 Martin Baulig <martin@ximian.com>
12488 * class.c (dup_type): Added `const MonoType *original' argument;
12489 copy the attrs from the original type.
12491 2004-03-17 Martin Baulig <martin@ximian.com>
12493 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
12494 `m->generic_inst_cache' here.
12496 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
12498 * exception.h exception.c: Add stack_overflow_exception.
12500 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12503 (overlapped_callback): call SetEvent *after* invoking the callback.
12504 No need to call CloseHandle.
12506 2004-03-16 Martin Baulig <martin@ximian.com>
12508 * reflection.c (mono_image_get_fieldref_token): Take a
12509 `MonoReflectionField *' instead of a `MonoClassField *' and a
12510 `MonoClass *'; store the `MonoReflectionField *' in the hash.
12512 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12514 * appdomain.c: don't add the culture to the filename we're looking for
12515 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
12517 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12519 * locales.c: don't ignore symbols when doing case insensitive compares.
12520 Thanks Dick! Fixes bug #54046.
12522 * threads.c: surround 'threads' usage with enter/leave in
12523 mono_thread_manage.
12525 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
12527 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
12528 implicitly marshalled as [Out]. Fixes #55450.
12530 (mono_marshal_get_runtime_invoke): Zero out the result if there is
12533 2004-03-16 Martin Baulig <martin@ximian.com>
12535 * class.c (mono_class_from_generic_parameter): Use the actual
12538 2004-03-16 Martin Baulig <martin@ximian.com>
12540 * reflection.c (type_get_signature_size): New static function.
12541 Compues the size of the type in a method signature.
12542 (method_get_signature_size): New static function; calls
12543 type_get_signature_size() to compute the actual size of the
12544 method's signature.
12545 (method_encode_signature): Use method_get_signature_size() to get
12546 the signature's size rather than using `nparams * 10'.
12548 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12550 * file-io.h: define here WapiOverlapped on windows. I don't want the
12551 regular OVERLAPPED one.
12554 * threadpool.c: somehow, BindIoCompletionCallback is not found.
12555 Disabling AIO on windows.
12557 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12559 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
12562 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12564 * appdomain.c: upgraded corlib version.
12566 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
12567 and BeginWrite. Allow opening files for asynchrnous operations.
12569 * file-io.h: new struct that maps FileStreamAsyncResult.
12570 * icall.c: added new icalls.
12571 * process.[ch]: support setting child process environment variables
12572 and use the SHELL or COMSPEC when UseShellExecute is true.
12574 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
12575 callback for async. IO is here and also BindHandle.
12577 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
12580 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
12582 * reflection.c (create_custom_attr): Allow len == 0.
12584 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
12585 computation on big-endian machines.
12587 2004-03-13 Martin Baulig <martin@ximian.com>
12589 * class.h (MonoGenericInst): Added `int count_ifaces'.
12591 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
12592 `ginst->count_ifaces' instead `klass->interface_count' since we
12593 may get called before the vtable is created.
12595 * loader.c (mono_method_get_param_names): If we're a generic
12596 instance, return and don't initialize the class.
12598 * reflection.c (mono_reflection_setup_generic_class): Don't call
12599 ensure_runtime_vtable().
12600 (mono_reflection_bind_generic_parameters): Set
12601 `ginst->count_ifaces'.
12603 2004-03-11 Jackson Harper <jackson@ximian.com>
12607 * unicode.h: Remove unused System.Char icalls.
12609 2004-03-11 Miguel de Icaza <miguel@ximian.com>
12611 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
12612 code when we P/Invoke the first library in Windows.Forms, instead
12613 of when we first open the assembly.
12615 * assembly.c: Drop the lookup from here.
12617 2004-03-10 Martin Baulig <martin@ximian.com>
12619 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
12620 class for properties, fields and events. Finally fixes #54945.
12622 2004-03-10 Martin Baulig <martin@ximian.com>
12624 * metadata.c (mono_metadata_class_equal): New static function;
12625 checks whether two generic instances or two generic parameters are
12627 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
12630 2004-03-10 Martin Baulig <martin@ximian.com>
12632 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
12634 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
12635 argument and write it into the `reflection_info' field.
12638 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
12639 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
12641 2004-03-09 Jackson Harper <jackson@ximian.com>
12643 * char-conversions.h: use 8 bits for numeric data its all we need
12644 * icall.c: numeric data is only 8 bits now.
12646 2004-03-09 Martin Baulig <martin@ximian.com>
12648 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
12650 * class.c (init_properties, init_events): Initialize the new
12653 * reflection.c (typebuilder_setup_properties): Likewise.
12654 (typebuilder_setup_events): Likewise.
12656 * reflection.h (MonoEventInfo): Replaced `parent with
12657 `declaring_type' and `reflected_type'.
12659 * icall.c (ves_icall_get_property_info): Distinguish between
12660 declaring and reflected type.
12661 (ves_icall_get_event_info): Likewise.
12663 2004-03-09 Martin Baulig <martin@ximian.com>
12665 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
12666 (ves_icall_Type_GetField): Correctly set field->klass.
12668 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
12670 * loader.h: Fix warning.
12672 2004-03-08 Miguel de Icaza <miguel@ximian.com>
12674 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
12675 library routine if present. Notice that it will still continue
12676 executing even if its missing, for those working on the Gtk#
12677 edition of Windows.Forms.
12679 * assembly.c (do_mono_assembly_open): If loading the
12680 System.Windows.Forms call mono_loader_wini_init.
12682 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
12684 * class.h: Added MonoRemoteClass struct.
12685 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
12686 function for MonoStrings.
12687 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
12688 Added internal call for getting the proxy type.
12689 * marshal.c: Get the type of transparent proxies from its remote_class.
12690 Added methods that generate the IL for type checks and casts:
12691 mono_marshal_get_isinst, mono_marshal_get_castclass,
12692 mono_marshal_get_proxy_cancast.
12693 * marshal.h: Declaration of the previous new methods.
12694 * object.c: Added new moethods for creating and updating MonoRemoteClass
12695 instances: mono_remote_class, mono_upgrade_remote_class,
12696 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
12697 * verify.c: FIx transparent_proxy_fields layout.
12698 * appdomain.c: Bump corlib version.
12700 2004-03-04 Jackson Harper <jackson@ximian.com>
12702 * icall.c: Add icall to access char conversion tables.
12703 * char-conversions.h: Character conversion tables.
12704 * Makefile.am: Add char-conversions.h private header file.
12706 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
12708 * appdomain.c (unload_thread_main): Increase unloading timeout to
12709 10 sec as a temporary workaround for Nant problems.
12711 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
12713 * gc.c: Add checks for GC_enable and GC_disable.
12715 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
12716 (jaak@zd.com.pl). Fix memory corruption in String.Replace
12719 2004-02-27 Martin Baulig <martin@ximian.com>
12721 * reflection.c (mono_reflection_bind_generic_parameters): Take a
12722 `MonoReflectionType *' instead of a `MonoType *'.
12724 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
12726 * gc.c (run_finalize): Avoid finalizing the object representing the
12728 (finalizer_thread): Fix warning.
12730 2004-02-25 Martin Baulig <martin@ximian.com>
12732 * class.c (_mono_class_get_instantiation_name): Added `int offset'
12733 argument for nested types.
12734 (mono_class_create_generic): Added support for nested generictypes.
12736 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
12739 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
12741 * reflection.c (method_encode_signature): Increase the minimum
12742 value of `size' from 10 to 11.
12743 (mono_reflection_bind_generic_parameters): Take `int type_argc'
12744 and `MonoType **types' arguments instead of the `MonoArray
12745 *types'; added `MonoType *nested_in'. Recursively instantiate
12748 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
12750 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
12751 stack_overflow_ex members which are used by exception handling.
12753 * appdomain.c (mono_runtime_init): Initialize the new members.
12755 * gc.c (mono_gc_enable): New helper function.
12756 * gc.c (mono_gc_disable): New helper function.
12758 2004-02-23 Martin Baulig <martin@ximian.com>
12760 * icall.c: I must have been really stupid - make it actually work
12763 2004-02-23 Martin Baulig <martin@ximian.com>
12765 * loader.c (method_from_memberref): Only inflate the method if
12766 it's in another klass.
12768 2004-02-23 Martin Baulig <martin@ximian.com>
12770 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
12771 (mono_class_init): If we're a generic instance and an interface,
12772 compute `class->interface_id'; also create `class->interfaces'
12773 here and inflate them.
12775 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
12777 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
12779 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
12781 2004-02-15 Miguel de Icaza <miguel@ximian.com>
12783 * reflection.c (method_encode_code): Improved the error message
12784 generated by the exception.
12786 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12788 * icall.c: Martin did not do what he said in the ChangeLog for
12789 2004-02-18, but put back the changes for properties and events.
12790 Commenting those changes out again and adding comment to bug #54518.
12792 * process.c: removed warning.
12794 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
12796 * marshal.c (emit_struct_conv): Print an error message instead of
12797 asserting when a type does not have the StructLayout attribute.
12799 2004-02-20 Martin Baulig <martin@ximian.com>
12801 * reflection.c (mono_type_get_object): Also use the cache for
12803 (mono_reflection_bind_generic_parameters): Always compute
12806 2004-02-20 Martin Baulig <martin@ximian.com>
12808 * class.h (MonoGenericMethod): Removed `klass'.
12810 * class.c (mono_class_inflate_generic_method): Added `MonoClass
12813 2004-02-20 Martin Baulig <martin@ximian.com>
12815 * reflection.c (method_encode_methodspec): Actually use the
12816 uninflated signature for the memberref.
12818 2004-02-20 Martin Baulig <martin@ximian.com>
12820 * class.h (MonoGenericMethod): Removed `declaring'.
12822 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
12823 is NULL, compute it here.
12825 2004-02-20 Martin Baulig <martin@ximian.com>
12827 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
12829 * metadata.c (mono_metadata_generic_inst_hash): New method.
12830 (mono_metadata_generic_inst_equal): New method.
12832 * reflection.c (mono_reflection_bind_generic_parameters): Use the
12833 `klass->image->generic_inst_cache' cache to avoid creating
12834 duplicate MonoGenericInst's.
12836 * class.c (mono_class_inflate_generic_type): Use the cache.
12838 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
12840 * object.c: fixed gc descriptor calculation for embedded valuetypes.
12842 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12844 * icall.c: added Socket.WSAIoctl icall.
12846 * socket-io.[ch]: implemented
12847 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
12849 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
12851 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
12853 2004-02-18 Urs C Muff <umuff@quark.com>
12855 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
12856 this work on PPC and other big-endian architectures.
12858 * debug-mono-symfile.h: Prepended the names of all the `guint32'
12859 fields with an underscore to make sure they're only accessed by
12860 the read32() macro.
12862 2004-02-18 Martin Baulig <martin@ximian.com>
12864 * icall.c: Put the klass->refclass changes back for methods and
12865 fields, but not for properties and events. We're currently not
12866 distinguishing between DeclaringType and ReflectedType for
12867 properties and events, that's what caused the regressions.
12869 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12872 (mono_async_result_new): the handle can be NULL.
12874 * threadpool.c: Use an event instead of a semaphore, don't initialize
12875 it until needed. This saves quite a few semaphores from being created
12876 when using the threadpool.
12878 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
12880 * object.c (mono_string_is_interned_lookup): Fix interning of long
12881 strings. Fixes #54473.
12883 * domain.c (ldstr_equal): Optimize if the two strings are equal.
12885 * icall.c: Revert the klass->refclass changes since they introduce
12886 regressions (bug #54518).
12888 2004-02-18 Martin Baulig <martin@ximian.com>
12890 * class.c (mono_class_init): If we're a generic instance and don't
12891 come from a TypeBuilder, inflate our members here.
12892 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
12893 (mono_class_create_generic): New public method.
12894 (mono_class_initialize_generic): Removed.
12895 (get_instantiation_name): Renamed to
12896 _mono_class_get_instantiation_name() and made it public.
12898 2004-02-18 Martin Baulig <martin@ximian.com>
12900 * class.c (mono_class_inflate_generic_type): Clear the new
12901 instance's `nginst->klass' when inflating a generic instance.
12902 (mono_class_is_subclass_of): Added (basic) support for generic
12905 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
12907 * appdomain.h, domain.c: use a MonoCodeManager instead of a
12908 MonoMempool to hold compiled native code.
12910 2004-02-17 Martin Baulig <martin@ximian.com>
12912 * class.h (MonoDynamicGenericInst): Added `count_properties' and
12915 * reflection.c (mono_reflection_generic_inst_initialize): Added
12916 `MonoArray *properties' argument.
12918 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
12920 2004-02-17 Martin Baulig <martin@ximian.com>
12922 * icall.c (ves_icall_Type_GetFields): Renamed to
12923 ves_icall_Type_GetFields_internal() and added a
12924 `MonoReflectionType *rtype' argument; pass it to
12925 mono_field_get_object() to set the field's "reflected" type.
12926 (ves_icall_Type_GetConstructors): Likewise.
12927 (ves_icall_Type_GetEvents): Likewise.
12928 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
12929 argument; pass it to mono_method_get_object() to set the method's
12932 2004-02-17 Martin Baulig <martin@ximian.com>
12934 * class.h (MonoDynamicGenericInst): New type.
12935 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
12937 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
12938 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
12939 (ves_icall_MonoGenericInst_GetFields): New interncall.
12941 * class.c (mono_class_from_generic): Don't call
12942 mono_class_initialize_generic() if this is a dynamic instance;
12943 ie. it's being created from a TypeBuilder.
12944 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
12945 `class->byval_arg.type'.
12947 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
12948 to `inflate_method' and made static.
12949 (mono_reflection_inflate_field): Removed.
12950 (mono_reflection_generic_inst_initialize): New public method.
12952 * reflection.h (MonoReflectionGenericInst): Removed `methods',
12953 `ctors' and `fields'; added `initialized'.
12955 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
12957 * debug-helpers.c (mono_method_full_name): Fix output for empty
12960 2004-02-12 Martin Baulig <martin@ximian.com>
12962 * class.h (MonoClassField): Added `MonoType *generic_type'.
12964 * reflection.c (mono_image_get_fieldref_token): Added support for
12965 instantiated generic types.
12966 (field_encode_inflated_field): Removed.
12967 (mono_image_get_inflated_field_token): Removed.
12968 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
12970 * reflection.h (MonoReflectionInflatedField): Removed.
12972 2004-02-12 Martin Baulig <martin@ximian.com>
12974 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
12975 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
12977 * reflection.c (mono_image_get_methodspec_token): Take a
12978 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
12979 (mono_image_create_token): Check whether we have a
12980 `method->signature->gen_method' and call
12981 mono_image_get_methodspec_token() if appropriate.
12982 (inflated_method_get_object): Removed.
12983 (mono_reflection_bind_generic_method_parameters): Return a
12984 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
12985 (mono_reflection_inflate_method_or_ctor): Likewise.
12987 * reflection.h (MonoReflectionInflatedMethod): Removed.
12989 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
12991 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
12992 for custom valuetype marshalling.
12994 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
12996 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12998 * icall.c: fixed WSAGetLastError_internal name.
13000 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
13002 * threads.c (mono_thread_attach): Allow this to be called multiple
13003 times for a thread.
13005 * threads.c (build_wait_tids): Do not wait for ourselves.
13007 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
13008 appdomain list is empty.
13010 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
13011 memory returned by mono_string_builder_to_utf16, since it points into
13012 managed memory. Thanks to Bernie Solomon for noticing this.
13014 * icall.c: Add AppDomainSetup icalls.
13016 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
13018 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
13021 * reflection.c (reflection_methodbuilder_to_mono_method): Save
13022 custom attributes to the method_aux struct. Also fix array indexes etc.
13024 * loader.c (mono_method_get_param_names): Make dynamic case work again.
13026 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
13028 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
13029 (both static and runtime) and reduce startup time.
13031 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
13033 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
13034 AsAny marshalling conversion instead of crashing.
13036 * marshal.c: Fix warnings.
13038 2004-02-09 Martin Baulig <martin@ximian.com>
13040 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
13042 * reflection.h (MonoReflectionInflatedMethod): Removed the
13043 `declaring' field, it's now in the unmanaged MonoGenericMethod.
13045 * reflection.c (method_encode_methodspec): Removed the `method'
13046 argument; we get it from `gmethod->declaring'.
13047 (inflated_method_get_object): Removed the `declaring' argument.
13049 2004-02-09 Martin Baulig <martin@ximian.com>
13051 * class.h (MonoGenericMethod): New type.
13052 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
13055 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
13056 a `MonoGenericMethod *gen_method' one.
13058 * class.c (mono_class_inflate_generic_type): Take an additional
13059 `MonoGenericMethod * argument. This is only non-NULL if we're
13060 inflating types for a generic method.
13061 (mono_class_inflate_generic_signature): Renamed to
13062 inflate_generic_signature() and made static; take a
13063 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
13064 (inflate_generic_header): Take a `MonoGenericMethod *' argument
13065 instead of a `MonoGenericInst *' one.
13066 (mono_class_inflate_generic_method): Likewise.
13068 * reflection.c (encode_generic_method_sig): Take a
13069 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
13070 (method_encode_methodspec): Likewise.
13071 (inflated_method_get_object): Likewise.
13073 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
13074 field with a `MonoGenericMethod *gmethod' one.
13076 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
13078 * class.h (mono_class_has_parent): add parens to expansion
13081 2004-02-08 Martin Baulig <martin@ximian.com>
13083 * image.h (MonoImage): Removed `generics_cache'.
13085 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
13086 instead of a `MonoType *' argument; removed the `inflate_methods'
13087 argument. Don't inflate methods here.
13089 * loader.c (find_method): If it's a generic instance, call
13090 mono_class_init() on the `sclass->generic_inst->generic_type'.
13092 * metadata.c (mono_type_size): Make this work on uninitialized
13093 generic instances; call it on the `ginst->generic_type's class.
13095 * reflection.c (mono_reflection_bind_generic_parameters): Call
13096 mono_class_from_generic() to create the `ginst->klass'.
13098 2004-02-08 Martin Baulig <martin@ximian.com>
13100 * class.h (MonoClass): Changed type of `generic_inst' from
13101 `MonoType *' to `MonoGenericInst *'.
13103 2004-02-08 Martin Baulig <martin@ximian.com>
13105 * icall.c (ves_icall_Type_BindGenericParameters): Just call
13106 mono_type_get_object(), this is now creating a `MonoGenericInst'
13107 for MONO_TYPE_GENERICINST.
13108 (ves_icall_MonoGenericInst_GetParentType): Likewise.
13109 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
13111 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
13112 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
13113 (inflated_method_get_object): Added `MonoClass *refclass' argument.
13114 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
13115 and reflected type.
13117 * reflection.h (MonoReflectionInflatedMethod): Removed
13118 `declaring_type' and `reflected_type'.
13120 2004-02-08 Martin Baulig <martin@ximian.com>
13122 * class.h (MonoGenericInst): Added `MonoType *parent' and
13123 `MonoType **ifaces'.
13125 * reflection.h (MonoReflectionGenericInst): Removed `klass',
13126 `parent' and `interfaces'.
13128 * reflection.c (mono_reflection_bind_generic_parameters): Take a
13129 `MonoType *' argument and return a `MonoType *'.
13132 (ves_icall_MonoGenericInst_GetParentType): New interncall.
13133 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
13135 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
13137 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
13138 valuetype marshalling.
13140 2004-02-06 Martin Baulig <martin@ximian.com>
13143 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
13144 (my_mono_class_from_generic_parameter): Likewise.
13146 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
13148 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
13149 contents of the symbol files lazily.
13151 * object.h (MonoThread): Add 'name' and 'name_len' fields.
13153 * threads.h threads.c icall.c: New icalls for getting and setting the
13156 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
13158 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
13159 Raise an exception when the domain is not found.
13161 2004-02-03 Martin Baulig <martin@ximian.com>
13163 * reflection.c (mono_image_get_methodspec_token): Use the
13164 uninflated signature; fixes gen-33.
13166 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
13168 * gc.c threads.c: Make the finalizer thread a normal managed thread so
13169 the finalizer code can use thread functionality.
13171 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
13172 the finalizer thread.
13174 * threads.c: Make some functions more robust.
13176 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
13178 * metadata.h: Add new marshalling conventions.
13180 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
13181 stringbuilder marshalling. Fixes #53700.
13183 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
13185 * reflection.c (mono_image_get_type_info): Save declarative security
13188 * reflection.c (mono_image_get_field_info): Handle uninitialized
13189 unmanaged fields as well.
13191 * appdomain.c: Bump corlib version.
13193 2004-02-01 Martin Baulig <martin@ximian.com>
13195 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
13196 method type arguments.
13198 2004-01-30 Duncan Mak <duncan@ximian.com>
13200 * marshal.h: Add prototype for
13201 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
13203 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
13206 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
13208 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
13209 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
13211 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
13213 * marshal.c (mono_marshal_get_native_wrapper): Add support for
13214 custom marshalling of valuetypes.
13216 * marshal.c: Fix some warnings.
13218 2004-01-29 Martin Baulig <martin@ximian.com>
13220 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
13221 for generic method parameters.
13223 * reflection.c (method_encode_methodspec): Write the uninflated
13224 signature into the methodspec table.
13225 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
13226 is always the uninflated method.
13227 (reflection_methodbuilder_to_mono_method): Copy the generic
13228 parameters from the MethodBuilder into `header->gen_params'.
13230 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
13232 * class.c (mono_class_from_generic_parameter): Fix warning.
13234 2004-01-27 Martin Baulig <martin@ximian.com>
13236 * class.c (mono_class_from_generic_parameter): Don't create
13237 `klass->methods' here.
13239 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
13241 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
13242 extension since it does not work with libraries named lib<FOO>.dll.so.
13244 2004-01-25 Martin Baulig <martin@ximian.com>
13246 * class.c (mono_class_inflate_generic_type): Added support for
13247 MONO_TYPE_GENERICINST.
13249 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
13250 inflate methods on open constructed types.
13252 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13254 * object.c: fire ProcessExit event in the root AppDomain after running
13255 Main. Fixes bug #53299.
13257 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13259 * socket-io.c: include the new socket-wrappers.h header.
13260 Use the wrappers instead of the unix socket functions to make the code
13263 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
13265 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
13267 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
13270 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
13272 * reflection.c (mono_image_create_pefile): Handle the case when the
13273 entry point is not a MethodBuilder.
13275 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
13276 field to ReflectionMethod since it is not allways a builder.
13278 * reflection.c (type_get_fully_qualified_name): New helper function to
13279 return the fully qualified name of a type.
13281 * reflection.c (encode_marshal_blob): Always emit the fully qualified
13282 type name for custom marshallers.
13284 * reflection.c (mono_marshal_spec_from_builder): Ditto.
13286 * class.c (mono_class_setup_vtable): If a parent class already
13287 implements an interface, use the implementing methods from that class.
13290 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13292 * threadpool.c: just return instead of ExitThread to allow for thread
13295 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
13297 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
13298 when closing resource modules.
13300 * reflection.c (mono_image_create_pefile): Handle the case when the
13301 entry point is not a MethodBuilder.
13303 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
13304 field to ReflectionMethod since it is not allways a builder.
13306 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
13308 * marshal.c (mono_marshal_get_managed_wrapper):
13309 mono_marshal_alloc takes native int so CONV_I
13310 the arg for 64bits.
13312 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
13314 * reflection.c (fixup_cattrs): New function to fixup the methoddef
13315 tokens in the cattr table. Fixes #53108.
13317 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13319 * loader.c: don't trim ".dll" before looking up in the config file.
13320 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
13322 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
13324 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13325 Return the module which contains the resource as well.
13326 (ves_icall_System_Reflection_Module_Close): New icall.
13328 * appdomain.c: Bump corlib version number.
13330 * image.c (mono_image_addref): New public function.
13332 * assembly.c: Call mono_image_addref.
13334 * reflection.c (mono_module_get_object): Increase reference count of
13337 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
13340 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
13341 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
13342 proper exceptions on DllImport problems.
13344 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
13346 * class.c, metadata.c: eliminate CSIZE macro.
13348 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
13350 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
13351 * object.h: Added async_callback field in MonoAsyncResult.
13352 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
13353 * verify.c: Added async_callback in MonoAsyncResult layout.
13355 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
13357 * reflection.c (mono_reflection_get_custom_attrs): Add support
13360 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
13362 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
13364 (mono_marshal_method_from_wrapper): Add null pointer check.
13366 2004-01-16 Martin Baulig <martin@ximian.com>
13368 * debug-mono-symfile.h: Set version number to 36 and reflect
13369 latest symbol writer changes.
13371 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
13373 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
13374 multi-dimensional arrays.
13375 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
13376 (mono_class_from_mono_type): Use bounded_array_class_get.
13378 * class.c (mono_bounded_array_class_get): New function which takes
13379 a 'bounded' bool argument to distinguish vectors from one dimensional
13382 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
13383 bounded_array_class_get if the array has bounds.
13385 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13386 Search modules loaded using AssemblyBuilder:AddModule as well.
13388 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13390 * appdomain.c: increased corlib version.
13391 * filewatcher.c: removed g_print.
13393 (get_property_info): only allocate what is actually requested.
13394 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
13396 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13398 * Makefile.am: added filewatcher.[ch]
13399 * filewatcher.[ch]: FileSystemWatcher runtime support.
13400 * icall.c: added new FSW icalls.
13402 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13404 * string-icalls.c: fix stringbuilder regression as suggested by
13405 Iain McCoy <iain@mccoy.id.au>.
13407 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
13409 * process.c (process_read_stringtable_block): Recognize '007f' as
13410 a language neutral stringtable block.
13412 2004-01-12 Patrik Torstensson
13414 * object.h (MonoStringBuilder) : Changed layout to support our
13415 new stringbuilder class.
13416 * marshal.c: Change marshalling to support the new layout of
13418 * appdomain.c: increased version number because new layout of
13421 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
13423 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
13424 assembly name as an string instead of an AssemblyName, since it is
13425 easier to extract info from it.
13427 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
13428 the culture subdirectories too. Fixes #52231.
13430 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13432 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
13433 It takes 2 new parameters with an optional name for the method to look
13434 for and case ignoring info.
13436 * threadpool.c: removed unused variable.
13438 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13440 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
13441 It takes 2 new parameters with an optional name for the property to look
13442 for and case ignoring info.
13445 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
13447 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
13450 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13453 * assembly.c: escape the uri before passing it to g_filename_from_uri.
13456 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
13458 * reflection.c: Add support for more than one unmanaged resource.
13460 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
13461 in field->def_value, as done in all other cases.
13463 * reflection.c (mono_reflection_get_custom_attrs): Add support for
13466 * reflection.c (mono_reflection_create_runtime_class): Remove
13467 errorneous assignment to klass->element_class, since it is already
13468 done in mono_reflection_setup_internal_class.
13470 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13472 * gc.c: added missing LeaveCriticalSection.
13473 * icall.c: indented a couple of lines.
13474 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
13475 if we call EndInvoke inside a callback. Fixes bug #52601.
13477 2004-01-07 Martin Baulig <martin@ximian.com>
13479 * mono-debug-debugger.h
13480 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
13482 2004-01-06 Miguel de Icaza <miguel@ximian.com>
13484 * appdomain.c: Use messages in NotImplementedException.
13486 * exception.c (mono_get_exception_not_implemented): Now this takes
13487 a message argument.
13489 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
13490 exception instead of g_asserting an aborting when something is not
13493 Add some inline docs.
13495 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
13497 * reflection.h: Update after changes to object layout.
13499 * reflection.c: Implement saving of unmanaged aka win32 resources.
13501 * appdomain.c: Bump version number.
13503 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
13504 Handle missing domains gracefully.
13506 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
13508 * file-io.c : On Windows, there are much more invalid_path_chars.
13510 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13512 * class.h, object.c: prepare for GetType () speedup.
13514 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
13516 * profiler.c: workaround for --profile null reference exception on
13517 cygwin. Patch by Patrik Torstensson.
13519 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
13521 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
13522 make work for unaligned access.
13524 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
13526 * class.c: small cleanup (class->fields [i] -> field).
13527 * image.c: check address of metadata is valid.
13529 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
13531 * assembly.h assembly.c (mono_assembly_loaded): New public function to
13532 search the list of loaded assemblies.
13534 * reflection.c (mono_reflection_type_from_name): Use
13535 mono_assembly_loaded instead of mono_image_loaded.
13537 * reflection.c: Fix warnings.
13539 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
13541 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
13542 is dynamic. This is needed since an assembly can contain both dynamic and
13543 non-dynamic images.
13545 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
13548 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
13550 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
13551 to store modules loaded using AddModule.
13553 * reflection.c (mono_image_fill_file_table): Generalize this so it works
13556 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
13558 * reflection.c (mono_image_fill_export_table_from_module): New function to
13559 fill out the EXPORTEDTYPES table from a module.
13561 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
13562 into a separate function. Also handle loaded non-dynamic modules.
13564 * reflection.c (mono_image_basic_init): Fix memory allocation.
13566 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13568 * assembly.c (mono_assembly_load_references): Make this public.
13570 2003-12-19 Martin Baulig <martin@ximian.com>
13572 * class.c (mono_class_initialize_generic): Made this static, take
13573 a `MonoGenericInst *' instead of a `MonoClass *'.
13574 (mono_class_from_generic): Call mono_class_initialize_generic()
13575 unless we're already initialized or being called from
13576 do_mono_metadata_parse_generic_inst().
13578 * class.h (MonoGenericInst): Added `initialized' and
13579 `init_pending' flags.
13581 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
13582 `mono_class_init (gklass)' or mono_class_initialize_generic()
13583 here; set `generic_inst->init_pending' while parsing the
13586 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
13588 * locales.c: include string.h for memxxx prototypes
13590 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
13592 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
13593 constructor when accessing literal fields.
13595 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
13597 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13599 * reflection.c (assembly_add_resource_manifest): New function to fill
13600 the MANIFESTRESOURCE table.
13602 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
13604 * reflection.h: Update to changes in class layout.
13606 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
13607 Reenable call to mono_runtime_is_shutting_down ().
13609 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
13610 determine if the runtime is shutting down.
13612 2003-12-16 Jackson Harper <jackson@ximian.com>
13614 * icall.c: comment out call to mono_runtime_is_shutting_down to
13617 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
13619 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
13620 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
13622 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
13624 * reflection.c: move definition of swap_with_size
13625 to before its first call
13627 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
13629 * appdomain.c (mono_runtime_is_shutting_down): New public function.
13631 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
13634 * object.c: Fix warnings.
13636 * icall.c (ves_icall_Type_Get...): Only consider inherited static
13637 members if FlattenHierarchy is set.
13639 * reflection.c (mono_image_add_decl_security): New function to emit
13640 declarative security.
13642 * reflection.h reflection.c: Add support for declarative security.
13644 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
13646 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
13648 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
13650 * appdomain.c verify.c: Moved corlib version checking into its own
13651 function in appdomain.c since it needs to create vtables etc.
13653 2003-12-13 Patrik Torstensson <p@rxc.se>
13655 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
13656 instead of unwrapped server.
13658 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
13660 * verify.c (check_corlib): Fix field index.
13662 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
13664 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
13667 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
13669 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
13670 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
13671 cope with sizeof(size_t) != sizeof(guint32).
13673 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13675 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
13676 in case of failure.
13678 2003-12-10 Mark Crichton <crichton@gimp.org>
13680 * icall.c: removed the GetNonZeroBytes. We now handle this case
13683 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
13685 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
13687 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
13690 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
13692 * verify.c (check_corlib): Handle the case when the version field is
13693 initialized by a static constructor.
13695 2003-12-08 Patrik Torstensson <p@rxc.se>
13697 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
13699 2003-12-08 Martin Baulig <martin@ximian.com>
13701 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
13702 a MonoReflectionGenericParameter, also take the parameter index
13703 and name as arguments.
13704 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
13705 (ves_icall_MonoGenericParam_initialize): New interncall.
13706 (ves_icall_Type_make_byref_type): New interncall.
13708 * reflection.h (MonoReflectionGenericParam): Derive from
13709 MonoReflectionType, not just from MonoObject. Added `refobj' and
13712 * reflection.c (mono_reflection_define_generic_parameter): Create
13713 and return a new MonoReflectionGenericParam; don't initialize the
13715 (mono_reflection_initialize_generic_parameter): New public method;
13716 initializes the constraints and creates the `param->pklass'.
13718 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
13720 * reflection.h reflection.c: Use the new fields 'num_types',
13721 'num_fields' and 'num_methods' to track the number of types etc.
13723 * verify.c (check_corlib): Check corlib version number.
13725 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
13727 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
13728 function works on all methods.
13730 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
13732 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
13733 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
13734 the custom_type_info flag of the transparent proxy.
13735 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
13736 objects that supports IRemotingTypeInfo.
13737 * object.h: Added custom_type_info field in transparent proxy.
13739 2003-12-06 Martin Baulig <martin@ximian.com>
13741 * class.c (mono_class_create_from_generic): Removed.
13742 (mono_class_from_generic): Check `ginst->klass' before doing
13743 anything else. This is important to fully support "recursive"
13746 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
13747 empty `generic_inst->klass' before doing anything else.
13749 2003-12-06 Dick Porter <dick@ximian.com>
13754 * locales.c: Use C structs to access class fields. Don't do a
13755 conversion between MonoString and UChar because both are
13756 platform-endian UTF-16. Compare now takes startindex and count
13757 parameters. Add a char overload for IndexOf. Speed up the
13758 invariant string IndexOf.
13760 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
13762 * Makefile.am (monosn_LDADD): Fix parallel build.
13764 2003-12-04 Martin Baulig <martin@ximian.com>
13767 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13768 (ves_icall_Type_make_array_type): New interncall.
13770 2003-12-04 Martin Baulig <martin@ximian.com>
13772 * locales.c: also change it in the !HAVE_ICU case.
13774 2003-12-04 Dick Porter <dick@ximian.com>
13777 * locales.c: construct_compareinfo is now in CompareInfo, not
13780 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
13782 * image.c (mono_image_load_file_for_image): Cache loaded images in the
13783 image->files array.
13785 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
13788 * assembly.c (mono_assembly_load_references): Only load references
13791 * class.c (mono_class_from_name): Avoid linear search of the
13792 EXPORTEDTYPE table.
13794 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
13796 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
13798 * image.h (MonoImage): Add 'field_cache' field.
13800 * loader.c (mono_field_from_token): Cache field lookups.
13802 * reflection.c (mono_module_get_object): Fix name property.
13804 * icall.c (ves_icall_get_enum_info): Update after changes to
13805 mono_metadata_get_constant_index ().
13807 * icall.c: Get rid of get_type_info icall, use a separate icall for
13808 each type property to avoid needless memory allocations. Fixes #51514.
13810 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
13811 to avoid needless binary searches.
13813 * class.c (class_compute_field_layout): Move the initialization of
13814 field->def_value to mono_class_vtable ().
13816 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
13819 * object.c (mono_object_allocate): Make it inline.
13821 * object.c (mono_object_allocate_spec): Make it inline.
13823 2003-12-02 Dick Porter <dick@ximian.com>
13825 * locales.c (create_NumberFormat): NumberFormatInfo construction.
13826 Patch by Mohammad DAMT (mdamt@cdl2000.com).
13828 2003-12-01 Dick Porter <dick@ximian.com>
13830 * threads.c: Fix signature and call in CreateMutex and
13833 2003-12-01 Dick Porter <dick@ximian.com>
13836 * locales.c: Implement string compares and searching
13838 * object.h: Add extra Thread field
13840 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
13842 * reflection.c (fixup_method): Add support for MonoCMethod.
13844 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
13846 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
13848 * reflection.c (assembly_name_to_aname): Allow extra characters in
13849 assembly names. Fixes #51468.
13851 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
13853 * exception.c (mono_exception_from_name_domain): New helper function.
13855 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
13856 exception object in the correct domain.
13858 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
13859 formatting + make a copy a the input data.
13861 * loader.c (mono_get_method_from_token): Methods which contain
13862 native code do not have entries in the ImplMap.
13864 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
13865 Thanks to Gonzalo for spotting this.
13867 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
13868 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
13870 * assembly.h (mono_assembly_load_from): Split the second part of
13871 assembly loading into a new public function.
13873 * exception.h (mono_get_exception_bad_image_format): New function.
13875 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
13877 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13878 Enumerate all modules inside a dynamic assembly. Fixes #51293.
13880 * icall.c: Add new icall for creating dynamic methods.
13882 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
13884 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
13886 * reflection.c (mono_reflection_create_dynamic_method): New icall to
13887 create a dynamic method.
13889 * reflection.c (resolve_object): New helper function.
13891 * reflection.c: Generalize ReflectionMethodBuilder and the functions
13892 which manipulate it so they can also work on dynamic methods.
13894 * reflection.c (reflection_method_builder_to_mono_method): Avoid
13895 creating the MonoReflectionMethodAux structure if it is not needed.
13897 * reflection.h verify.c: Update after changes to object layout.
13899 * reflection.c (method_builder_encode_signature): Fix compilation on
13902 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
13904 * appdomain.h: Added support for context static fields. Added static_data
13905 field to MonoAppContext and renamed thread_static_fields to a more
13906 generic special_static_fields in MonoAppDomain, since it can now contain
13907 context static fields.
13908 * domain.c: Updated hashtable name.
13909 * object.c: Replaced field_is_thread_static() for a more generic
13910 field_is_special_static() which also checks for context static attribute.
13911 In mono_class_vtable(), added support for static context fields.
13912 * threads.c: Changed methods that manage thread static fields to more
13913 generic methods so they can be reused both for thread and context static
13915 * threads.h: Declared some new methods.
13917 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
13919 * reflection.h: Update after changes to the managed types.
13921 * reflection.c (encode_custom_modifiers): New helper function.
13923 * reflection.c (method_encode_signature): Emit custom modifiers.
13925 * reflection.c (field_encode_signature): Emit custom modifiers.
13927 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
13929 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
13931 * icall.c (ves_icall_System_ValueType_Equals): New optimized
13934 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
13937 * object.c (mono_field_get_value_object): New function.
13939 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
13942 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
13944 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
13945 return a preallocated out-of-memory exception instance.
13947 * object.c (out_of_memory): Use the new function.
13949 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
13950 flag is before the custom modifiers. Fixes #49802.
13952 2003-11-16 Martin Baulig <martin@ximian.com>
13954 * class.c (mono_class_is_open_constructed_type): Implemented the
13955 MONO_TYPE_GENERICINST case.
13957 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
13959 * assembly.c (mono_assembly_fill_assembly_name): New function to
13960 fill out the MonoAssemblyName structure.
13961 (mono_assembly_open): Use the new function.
13963 * icall.c (fill_reflection_assembly_name): New helper function.
13965 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
13968 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
13970 2003-11-15 Martin Baulig <martin@ximian.com>
13972 * class.c (mono_class_is_open_constructed_type): New public
13973 function; checks whether a type is an open constructed type,
13974 ie. whether it still contains type parameters.
13975 (mono_class_inflate_generic_type): If we're a type parameter and
13976 the inflated type is also a MONO_TYPE_(M)VAR, return the original
13979 * class.h (MonoGenericInst): Added `guint32 is_open'.
13981 * loader.c (method_from_methodspec): Check whether we're an open
13982 or closed constructed type and set `ginst->is_open'.
13984 * reflection.c (mono_reflection_bind_generic_parameters): Check
13985 whether we're an open or closed constructed type and set
13987 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
13988 from open constructed types.
13990 2003-11-15 Martin Baulig <martin@ximian.com>
13992 * reflection.c (mono_reflection_bind_generic_parameters): If we're
13993 a generic instance (instead of a generic type declaration) with
13994 unbound generic parameters, bind them to our actual types.
13996 2003-11-14 Martin Baulig <martin@ximian.com>
13998 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
14000 * reflection.c (mono_reflection_bind_generic_parameters): If we're
14001 an interface type, populate `res->interfaces' with instantiated
14002 versions of all the interfaces we inherit.
14004 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
14006 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
14007 when MONO_PATH is set but doesn't contain the install dir.
14009 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14012 (ves_icall_Type_GetInterfaces): don't return an interface twice when
14013 it's also implemented in base classes. Fixes bug #50927.
14015 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
14017 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
14018 if this method is called from a finalizer. Fixes #50913.
14020 2003-11-12 Miguel de Icaza <miguel@ximian.com>
14022 * threads.c: Implement VolatileRead/VolatileWrite
14024 * icall.c: Add new icalls for VolatileRead/VolatileWrite
14026 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
14028 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
14029 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
14032 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
14033 from Peter Ross (pro@missioncriticalit.com).
14035 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
14037 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
14039 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
14041 * assembly.c (mono_assembly_load_references): Disable check because it
14042 triggers on older corlibs which lots of people have.
14044 2003-11-12 Jackson Harper <jackson@ximian.com>
14046 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
14047 load corlib.dll if mscorlib.dll is not found.
14048 * assembly.h: Remove corlib name define.
14051 * image.c: Change corlib name to mscorlib.
14053 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
14055 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
14057 2003-11-11 Miguel de Icaza <miguel@ximian.com>
14059 * appdomain.h: Added loader_optimization here to sync with the C#
14060 code, and add disallow_binding_redirects field.
14062 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
14064 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
14066 * reflection.c (mono_image_build_metadata): Fix crash on modules
14069 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
14071 * icall.c (ves_icall_get_method_info): Return callingConvention as
14074 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
14075 namespaces from the EXPORTEDTYPE table as well.
14077 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
14078 from all modules inside the assembly.
14080 2003-11-11 Martin Baulig <martin@ximian.com>
14082 * reflection.c (mono_reflection_bind_generic_parameters): Make
14083 this work for interfaces.
14085 2003-11-11 Martin Baulig <martin@ximian.com>
14087 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
14089 2003-11-11 Martin Baulig <martin@ximian.com>
14091 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
14092 "MonoInflatedMethod" and "MonoInflatedCtor".
14094 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
14096 * reflection.c (resolution_scope_from_image): Use the assembly table
14097 from the manifest module, since other modules don't have it.
14099 * debug-helpers.c (mono_type_full_name): New helper function.
14101 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
14103 * image.c (mono_image_load_file_for_image): New public function which
14104 is a replacement for the load_file_for_image in class.c.
14106 * assembly.c (mono_assembly_load_module): A wrapper for the function
14107 above which does assembly association and reference loading too.
14109 * class.c (mono_class_from_name): Call mono_assembly_load_module.
14111 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14113 * appdomain.c: not all of the attributes for the full assembly name
14114 are required and the order doesn't matter. Fixes bug #50787.
14116 2003-11-10 Dick Porter <dick@ximian.com>
14118 * locales.c: Use platform-endian UTF16
14120 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
14122 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
14124 2003-11-10 Martin Baulig <martin@ximian.com>
14127 (mono_metadata_load_generic_params): Make this actually work.
14129 * reflection.c (mono_reflection_bind_generic_parameters): If our
14130 parent is a generic instance, pass all the `types' to it, no
14131 matter whether it has the same number of type parameters or not.
14133 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
14135 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
14137 * assembly.c (mono_assembly_load_references): Move the image<->assembly
14138 assignment code to this function so it gets called recursively for all
14141 * image.c (load_modules): Remove the assembly assignment since it is
14142 now done by mono_assembly_load_references.
14144 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
14145 Add 'module' argument.
14146 (mono_module_get_types): New helper function.
14147 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
14149 2003-11-08 Martin Baulig <martin@ximian.com>
14151 * class.c (mono_class_inflate_generic_method): Interface method
14152 don't have a header.
14154 * reflection.c (mono_image_get_methodspec_token): Take an
14155 additional `MonoGenericInst *' argument instead of reading it from
14156 the header; this is necessary to support interfaces.
14157 (mono_image_create_token): Pass the `MonoGenericInst *' from the
14158 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
14159 (inflated_method_get_object): Take an additional `MonoGenericInst *'
14162 * reflection.h (MonoReflectionInflatedMethod): Added
14163 `MonoGenericInst *ginst'.
14165 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
14167 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
14169 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
14171 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
14173 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
14176 (reflection_methodbuilder_from_method_builder):
14177 (reflection_methodbuilder_from_ctor_builder): New helper functions to
14178 initialize a ReflectionMethodBuilder structure.
14179 (mono_image_get_methodbuilder_token):
14180 (mono_image_get_ctorbuilder_token): New functions to emit memberref
14181 tokens which point to types in another module inside the same assembly.
14183 * reflection.c: Use the new helper functions.
14185 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
14187 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
14188 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
14190 * reflection.c (resolution_scope_from_image): Emit a moduleref if
14193 * reflection.c (mono_image_build_metadata): Emit metadata only for the
14194 current module. Emit the manifest only for the main module.
14196 * reflection.c (mono_image_create_token): Add assertion when a
14197 memberref needs to be created.
14199 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
14201 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
14202 larger buffer for the custom attribute blob. Fixes #50637.
14204 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14206 * threadpool.c: notify listener on async processing handles after
14207 invoking the async callback. Thanks to Zoltan.
14209 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
14211 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
14212 avoid code duplication.
14214 * reflection.h (MonoDynamicImage): New type which is currently unused,
14215 but will be used through the ref.emit code in place of
14216 MonoDynamicAssembly.
14218 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
14221 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
14222 a MonoDynamicImage instead of just a MonoImage.
14224 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
14225 icalls to ModuleBuilder but keep their semantics, so they will work
14226 with moduleb->assemblyb. This will change later.
14228 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
14230 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
14233 * reflection.c (mono_image_build_metadata): Avoid creation of a default
14234 main module, since it is now done by the managed code.
14236 2003-11-03 Martin Baulig <martin@ximian.com>
14238 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
14239 `ginst->klass' here.
14240 (method_encode_methodspec): Don't use the `ginst->generic_method's
14241 klass if it's a generic instance, use `ginst->klass' in this case.
14243 2003-11-03 Martin Baulig <martin@ximian.com>
14245 * reflection.c (mono_image_get_generic_method_param_info):
14246 Removed, use mono_image_get_generic_param_info() instead.
14247 (mono_image_get_type_info): Write the GenericParam table before
14248 the Method table. This is neccessary because in the GenericParam
14249 table, type parameters of the class (ie. '!0' etc.) must come
14250 before the ones from its generic methods (ie. '!!0' etc).
14252 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
14254 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
14256 2003-11-02 Martin Baulig <martin@ximian.com>
14258 * reflection.c (create_generic_typespec): Take a
14259 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
14260 the generic parameters from it.
14262 2003-11-02 Martin Baulig <martin@ximian.com>
14264 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
14265 instead of a `MonoClassField *' since we just need the type.
14266 (create_generic_typespec): New static function. Creates a
14267 TypeSpec token for a generic type declaration.
14268 (mono_image_get_generic_field_token): New static function.
14269 (mono_image_create_token): If we're a FieldBuilder in a generic
14270 type declaration, call mono_image_get_generic_field_token() to get
14273 2003-11-02 Martin Baulig <martin@ximian.com>
14276 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
14277 `MonoReflectionGenericInst *declaring_type' and
14278 `MonoReflectionGenericInst *reflected_type' fields.
14280 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
14281 `MonoReflectionGenericInst *declaring_type' and a
14282 `MonoReflectionGenericInst *reflected_type' argument instead of a
14283 single `MonoReflectionGenericInst *type' one. Set
14284 `res->declaring_type' and `res->reflected_type' from them.
14285 (mono_reflection_inflate_field): Likewise.
14287 2003-11-02 Martin Baulig <martin@ximian.com>
14289 * class.c (mono_class_setup_vtable): Don't store generic methods
14292 2003-11-02 Martin Baulig <martin@ximian.com>
14294 * reflection.h (MonoReflectionGenericInst): Added
14295 `MonoReflectionType *declaring_type'.
14297 * reflection.c (mono_reflection_bind_generic_parameters): Use
14298 `if (tb->parent)' instead of `klass->parent'.
14300 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
14302 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
14303 with an empty ASSEMBLY table.
14305 * reflection.c (mono_image_build_metadata): Avoid using the same loop
14306 variable in the inner and outer loops.
14308 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
14310 * metadata.h (mono_metadata_make_token): Put parentheses around macro
14313 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
14315 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
14316 icalls. Instead, do everything in managed code. This is needed since
14317 it is hard to restore the original domain etc. in unmanaged code in the
14318 presence of undeniable exceptions.
14320 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
14321 New icalls to push and pop appdomain refs.
14323 2003-10-31 Martin Baulig <martin@ximian.com>
14325 * class.c (inflate_generic_type): Renamed to
14326 mono_class_inflate_generic_type() and made it public.
14328 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
14331 * loader.c (mono_field_from_memberref): Also set the retklass for
14334 * fielder.c (mono_image_get_inflated_field_token): New static
14335 method; creates a metadata token for an inflated field.
14336 (mono_image_create_token, fixup_method): Added support for
14337 "MonoInflatedField".
14338 (fieldbuilder_to_mono_class_field): New static function.
14339 (mono_reflection_inflate_field): New public function.
14342 (MonoReflectionGenericInst): Added `MonoArray *fields'.
14343 (MonoReflectionInflatedField): New typedef.
14345 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
14347 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
14348 for Solaris and other platforms without s6_addr16
14350 2003-10-30 Martin Baulig <martin@ximian.com>
14352 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
14353 argument instead of two.
14354 (mono_class_inflate_generic_signature): Likewise.
14355 (inflate_generic_header): Likewise.
14356 (mono_class_inflate_generic_method): Likewise. In addition, if
14357 `ginst->klass' is set, it becomes the new `method->klass'.
14359 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
14362 * reflection.c (encode_generic_method_sig): Write a 0xa as the
14363 first byte. [FIXME]
14364 (method_encode_methodspec): If we have generic parameters, create
14365 a MethodSpec instead of a MethodRef.
14366 (fixup_method): Added support for "MonoInflatedMethod" and
14367 "MonoInflatedCtor".
14368 (mono_image_create_token): Added support for "MonoInflatedMethod"
14369 and "MonoInflatedCtor".
14370 (inflated_method_get_object): New static function; returns a
14371 managed "System.Reflection.MonoInflatedMethod" object.
14372 (mono_reflection_bind_generic_method_parameters): Return a
14373 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
14374 (mono_reflection_inflate_method_or_ctor): Likewise.
14375 (mono_image_get_generic_method_param_info): Initialize unused
14377 (mono_image_get_generic_param_info): Likewise.
14379 * reflection.h (MonoReflectionInflatedMethod): New public
14380 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
14381 "S.R.MonoInflatedCtor" classes.
14383 * loader.c (method_from_memberref): If we're a TypeSpec and it
14384 resolves to a generic instance, inflate the method.
14386 2003-10-28 Dick Porter <dick@ximian.com>
14388 * object.c (mono_runtime_run_main): Convert command-line arguments
14389 into utf8, falling back to the user's locale encoding to do so.
14391 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
14393 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
14396 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
14398 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
14399 up icalls at method definition time. Partially fixes #33569.
14401 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
14403 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
14404 marshalling of arrays. Fixes #50116.
14406 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
14408 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
14409 points to a vtable in the dying appdomain.
14411 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
14412 listeners into unmanaged code inside the lock.
14414 * object.c (mono_class_vtable): Turn off typed allocation in non-root
14415 domains and add some comments.
14417 2003-10-25 Martin Baulig <martin@ximian.com>
14419 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
14421 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
14423 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
14424 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
14425 currently parsing. Create the generic class and store it in
14426 `generic_inst->klass' before parsing the type arguments. This is
14427 required to support "recursive" definitions; see mcs/tests/gen-23.cs
14429 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
14430 to support recursive typespec entries.
14432 * class.c (mono_class_setup_parent): If our parent is a generic
14433 instance, we may get called before it has its name set.
14434 (mono_class_from_generic): Splitted into
14435 mono_class_create_from_generic() and mono_class_initialize_generic().
14437 2003-10-25 Martin Baulig <martin@ximian.com>
14439 * icall.c (ves_icall_Type_BindGenericParameters): Return a
14440 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
14441 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
14442 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
14444 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
14445 (create_typespec): Likewise.
14446 (mono_reflection_bind_generic_parameters): Return a
14447 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
14448 (mono_reflection_inflate_method_or_ctor): New public function.
14450 * reflection.h (MonoReflectionGenericInst): New typedef.
14452 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
14454 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
14455 inside the domain lock. Fixes #49993.
14457 * object.c (mono_class_vtable): When typed allocation is used,
14458 allocate vtables in the GC heap instead of in the mempool, since the
14459 vtables contain GC descriptors which are used by the collector even
14460 after the domain owning the mempool is unloaded.
14462 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
14464 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
14465 reflect what it does. Also invalidate mempools instead of freeing
14466 them if a define is set.
14468 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
14471 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
14472 hold the finalizable objects in this domain.
14474 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
14477 * appdomain.c (mono_domain_set): New function to set the current
14478 appdomain, but only if it is not being unloaded.
14480 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
14481 appdomain which is being unloaded.
14483 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
14484 unloading of the root appdomain.
14486 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
14487 icall to execute a method in another appdomain. Intended as a
14488 replacement for InternalSetDomain, which can confuse the code
14489 generation in the JIT.
14491 * appdomain.c (mono_domain_is_unloading): New function to determine
14492 whenever an appdomain is unloading.
14494 * appdomain.c (mono_domain_unload): New function to correctly unload
14497 * assembly.c (mono_assembly_load_references): Check that an assembly
14498 does not references itself.
14500 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
14501 domain manually, it asks the finalizer thread to do it, then waits for
14502 the result. Also added a timeout.
14504 * icall.c: Register the new icalls.
14506 * threads.h threads.c: Export the mono_gc_stop_world and
14507 mono_gc_start_world functions.
14509 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
14510 function to fill out the mempool with 0x2a.
14512 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
14514 * reflection.h (MonoReflectionMethodAux): New structure to store
14515 information which is rarely used, thus is not in the MonoMethod
14518 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
14519 store the aux info.
14521 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
14522 and marshalling info into the aux structure.
14524 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
14525 from the aux structure.
14527 * loader.c (mono_method_get_param_names): Retrieve the param names from
14530 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
14532 * exception.h exception.c: Add AppDomainUnloadedException && fix
14535 2003-10-21 Dick Porter <dick@ximian.com>
14538 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
14539 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
14541 2003-10-21 Martin Baulig <martin@ximian.com>
14543 * reflection.c (mono_reflection_bind_generic_parameters):
14544 `klass->parent' is NULL for interfaces.
14546 2003-10-21 Martin Baulig <martin@ximian.com>
14548 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14550 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
14552 * exception.c (mono_exception_from_name_msg): New helper function for
14553 creating exceptions and initializing their message field.
14555 * exception.c: Simplify functions using the new helper.
14557 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
14560 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
14561 mono_raise_exception, since otherwise gcc doesn't generate the function
14562 epilog for raise_exception, confusing the stack unwinding in the JIT.
14565 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
14566 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
14569 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14571 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
14574 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
14576 * icall.c: Removed GetUninitializedObject method because
14577 AllocateUninitializedClassInstance does the same.
14579 2003-10-18 Martin Baulig <martin@ximian.com>
14581 * class.c (inflate_generic_signature): Renamed to
14582 mono_class_inflate_generic_signature() and made it public.
14583 (my_mono_class_from_generic_parameter): New static function; if we
14584 don't already have the generic parameter's MonoClass, create a
14585 very simple one which is just used internally in the runtime and
14586 not passed back to managed code.
14588 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
14590 * metadata.h (MonoMethodSignature): Moved the
14591 `MonoGenericParam *gen_params' to the MonoMethodHeader.
14592 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
14594 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
14595 ves_icall_MonoMethod_GetGenericArguments(); this is now an
14596 interncall on the MonoMethod class, not on MethodInfo.
14597 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
14598 calling mono_reflection_bind_generic_method_parameters() directly.
14600 * loader.c (mono_method_get_signature): If this is a MethodSpec;
14601 return the already computed `method->signature'.
14602 (method_from_methodspec): New static function to load a method
14603 from a MethodSpec entry.
14604 (mono_get_method_from_token): Call the new method_from_methodspec()
14605 for MethodSpec tokens.
14606 (mono_get_method_from_token): If we're a generic method, load the
14609 * reflection.c (mono_image_get_memberref_token): Allow
14610 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
14612 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
14613 (mono_image_create_token): First check whether it's a generic
14614 method (so we'd need to create a MethodSpec), then do the other
14616 (mono_reflection_bind_generic_method_parameters): Return a
14617 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
14618 called directly from the interncall.
14620 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
14622 * reflection.c (load_public_key): Move loading of the public key
14625 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
14627 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
14630 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
14631 culture, hash_alg and public_key. Fixes #49555.
14633 2003-10-17 Martin Baulig <martin@ximian.com>
14635 * class.h (MonoGenericInst): Moved this declaration here and added
14636 `MonoMethod *generic_method'.
14639 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
14640 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
14642 * metadata.c (mono_metadata_type_equal): Two types of
14643 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
14644 index; ie. don't compare the address of the `MonoGenericParam'
14646 (mono_metadata_load_generic_params): Removed the `MonoMethod
14649 * metadata.h (MonoGenericInst): Moved declaration to class.h.
14650 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
14652 * reflection.c (method_encode_signature): Encode the number of
14653 generic parameters.
14654 (encode_generic_method_sig): New static function.
14655 (method_encode_methodspec): New static function; creates an entry
14656 in the MethodSpec table for a generic method.
14657 (mono_image_get_methodspec_token): New static function.
14658 (mono_image_create_token): Call mono_image_get_methodspec_token()
14659 for generic methods.
14660 (mono_reflection_bind_generic_method_parameters): New public
14661 function. Instantiates a generic method.
14663 2003-10-16 Martin Baulig <martin@ximian.com>
14665 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
14666 *gen_params' here from MonoMethodHeader.
14668 * metadata.c (mono_metadata_parse_method_signature): If we have
14669 generic parameters, initialize `method->gen_params' and then set
14670 the correct `type->data.generic_param' in all the parameters.
14672 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
14674 * threads.c (mono_threads_get_default_stacksize): New function to
14675 return the default stacksize.
14677 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
14678 termination of the finalizer thread, since the previous method had
14679 race conditions. Fixes #49628.
14681 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
14682 as for the other managed threads.
14684 2003-10-16 Martin Baulig <martin@ximian.com>
14686 * class.c (inflate_generic_signature): Copy `generic_param_count'
14689 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
14692 * metadata.c (mono_metadata_parse_method_signature): Actually set
14693 the `method->generic_param_count' here.
14694 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
14696 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
14698 * object.h: Add a new field to TypedRef to simplify the implementation
14699 of the REFANY opcodes in the JIT.
14701 * icall.c: Make use of the new field.
14703 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
14706 2003-10-15 Martin Baulig <martin@ximian.com>
14708 * class.c (mono_class_from_gen_param): Renamed to
14709 mono_class_from_generic_parameter() and moved most of the
14710 functionality from mono_reflection_define_generic_parameter()
14711 here; ie. we create a "real" class here.
14712 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
14713 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
14714 previously been called.
14716 * class.h (MonoGenericParam): Moved the declaration of this struct
14717 here from metadata.h and added `MonoMethod *method'.
14719 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
14722 * loader.c (mono_get_method_from_token): If we have any generic
14723 parameters, call mono_metadata_load_generic_params() to read them
14724 from the MONO_TABLE_GENERICPAR.
14726 * metadata.c (mono_metadata_load_generic_params): Added
14727 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
14729 * metadata.h (MonoMethodSignature): Replaced
14730 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
14731 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
14733 * reflection.c (mono_reflection_define_generic_parameter): Moved
14734 most of the functionality into the new
14735 mono_class_from_generic_parameter(); set the `method' field if
14736 we're a method parameter.
14738 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
14740 * marshal.c (emit_struct_conv): if native size is 0
14743 2003-10-14 Martin Baulig <martin@ximian.com>
14745 * icall.c: The generics API has changed in the spec since it was
14746 added to System.Type; these modifications make it match the spec
14748 (ves_icall_Type_GetGenericParameters): Renamed to
14749 `ves_icall_Type_GetGenericArguments'.
14750 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
14751 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
14752 `ves_icall_MonoType_get_HasGenericArguments'.
14753 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
14754 `ves_icall_MonoType_get_IsGenericParameter'.
14755 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
14756 this is no interncall anymore.
14757 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
14758 `ves_icall_TypeBuilder_get_IsGenericParameter'.
14760 2003-10-14 Martin Baulig <martin@ximian.com>
14762 * reflection.c (mono_reflection_bind_generic_parameters): Also
14763 inflate generic methods if we're reading the class from IL.
14765 2003-10-13 Martin Baulig <martin@ximian.com>
14767 * reflection.c (mono_reflection_define_generic_parameter): This
14768 method isn't called directly from the icall anymore; take a
14769 `MonoReflectionAssemblyBuilder *' so we can use this for type and
14770 method generic parameters.
14771 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
14772 (method_builder_encode_signature): Encode generic parameters.
14773 (mono_image_get_method_info): Write generic params to the
14774 MONO_TABLE_GENERICPARAM table.
14776 * reflection.h (MonoReflectionMethodBuilder): Added
14777 `MonoArray *generic_params'.
14779 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
14781 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
14782 wrapper for mono_reflection_define_generic_parameter().
14783 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
14785 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
14787 * marshal.h: Add missing function to fix build.
14789 * marshal.c (mono_marshal_get_native_wrapper): Add support for
14790 the SetLastError pinvoke attribute.
14792 * marshal.c (mono_marshal_set_last_error): New helper function called
14793 by the generated code.
14795 * marshal.c (mono_mb_emit_branch): New helper function.
14797 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
14799 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14800 classes as parameters and return values of delegates. Fixes #29256.
14802 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
14804 * locales.c: use gint32 in non HAVE_ICU case
14806 2003-10-11 Martin Baulig <martin@ximian.com>
14808 * mono-debug.c (mono_debug_add_method): Added a workaround for
14811 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
14813 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
14814 delegates passed to native code must use the STDCALL calling
14815 convention. Fixes #35987.
14817 2003-10-10 Martin Baulig <martin@ximian.com>
14819 * class.c (inflate_generic_type): If we're inflating for a generic
14820 type instance (and not for a generic method), return
14821 MONO_TYPE_MVAR unchanged.
14823 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14825 * string-icalls.c: Join ignores null strings in the source array.
14826 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
14827 * threads.c: GetAvailableTheads is slightly more accurate.
14829 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
14831 * threads.h threads.c : add mono_threads_set_default_stacksize
14832 and pass default to CreateThread calls.
14834 2003-10-09 Dick Porter <dick@ximian.com>
14838 * locales.c: Internal calls for constructing CultureInfo and
14839 related objects from libicu (if its available.)
14841 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
14843 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
14845 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14847 * threadpool.c: added an argument to async_invoke_thread that is the
14848 item to process, pass the MonoAsyncResult to the thread start function
14849 when creating a new thread. This way we don't need to acquire any lock
14850 when we're creating a new thread. Readded a semaphore for faster
14851 response times (instead of that Sleep i added).
14853 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
14855 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
14856 get daylight change dates better on Windows, fix handling
14857 of platforms without tm_gmtoff.
14859 2003-10-06 Martin Baulig <martin@ximian.com>
14861 * class.c (inflate_generic_method): Renamed to
14862 mono_class_inflate_generic_method() and made public.
14863 (mono_class_init): Don't inflate the generic methods here.
14864 (mono_class_from_generic): Added `gboolean inflate_methods'
14865 argument. Inflate the methods here.
14867 * loader.c (mono_method_get_param_names): Ignore instances of
14868 generic types for the moment.
14870 * reflection.c (fixup_method): Added support for inflated methods.
14871 (mono_image_create_token): Use mono_image_get_methodref_token()
14872 for inflated methods.
14873 (mono_custom_attrs_from_param): Ignore instances of generic types
14875 (mono_reflection_bind_generic_parameters): New public function.
14876 Moved all the functionality from
14877 ves_icall_Type_BindGenericParameters() here and added support for
14879 (mono_reflection_define_generic_parameter): Initialize
14880 `klass->methods' here.
14882 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
14883 functionality into mono_reflection_define_generic_parameter().
14884 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
14885 TypeBuilder, return that TypeBuilder.
14887 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14889 * appdomain.c: removed mono_delegate_semaphore.
14892 (mono_thread_pool_add): moved hash table creation inside and the thread
14893 creation outside of the critical region.
14894 (mono_thread_pool_finish): removed obsolete code.
14895 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
14896 continue or exit the thread depending on the queue.
14898 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
14900 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
14901 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
14902 handle more bool marshalling options
14904 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
14906 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
14907 arrays of structs. Also add a more descriptive error message when
14908 a structure member is marshalled as LPArray.
14910 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
14912 * marshal.c (mono_marshal_get_native_wrapper): Add support for
14913 marshalling arrays of complex types. Fixes #29098. Also remove an
14914 usused and incomplete function.
14916 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
14918 * gc.c: report heap_size - free_bytes as total memory allocated
14921 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
14923 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
14924 fix timezone handling problems on Windows.
14926 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
14927 asserts when the year is outside the range handled by ms the functions.
14929 * class.c (setup_interface_offsets): If the class is an interface,
14930 fill out its interface_offsets slot.
14932 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14934 * threadpool.c: mark threadpool threads as background.
14936 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
14938 * decimal.c - define DECINLINE to nothing if not using GCC
14940 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
14942 * assembly.c: More refcount fixes.
14944 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14946 * string-icalls.c: if we're not trimming, return the same string.
14947 When not splitting, don't create a new string.
14949 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14952 (mono_image_open): increment the ref_count inside the critical section.
14954 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
14956 * image.c (mono_image_open): Fix reference counting bug.
14958 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
14960 * marshal.c (mono_marshal_type_size) struct alignment changed for
14961 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
14962 64bits. Avoid leak in mono_marshal_get_native_wrapper when
14963 mono_lookup_pinvoke_call throws.
14965 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
14967 * reflection.c (mono_reflection_parse_type): Fix #49114.
14969 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
14970 temporary workaround for cygwin header problem.
14972 * object.c (mono_object_isinst): Synchronize this with the code
14973 generated by the JIT for casts.
14975 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
14977 * reflection.c (encode_type): Fix #38332.
14979 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
14981 * marshal.c (mono_marshal_method_from_wrapper): New function to return
14982 the original method from the wrapper method.
14984 2003-09-25 Martin Baulig <martin@ximian.com>
14986 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
14987 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
14988 (ves_icall_Type_get_IsGenericInstance): New interncall.
14990 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
14992 * object.c: fix cast warning in big endian code.
14994 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
14996 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
14998 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15000 * assembly.c: don't call check_env from mono_assembly_load. It's
15001 already done once in mono_assemblies_init and may cause headaches when
15002 multiple threads are loading assemblies.
15004 2003-09-19 Martin Baulig <martin@ximian.com>
15006 * reflection.c (mono_reflection_define_generic_parameter): Don't
15007 allocate `klass->methods', set `klass->flags' to
15008 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
15010 2003-09-18 Martin Baulig <martin@ximian.com>
15012 * class.c (mono_class_init): Don't create `class->methods' if it's
15013 already initialized.
15015 * metadata.c (mono_metadata_load_generic_params): Make this
15018 * reflection.c (mono_reflection_define_generic_parameter): Set
15019 parent class and interfaces from the constraints.
15021 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
15022 to keep this struct in sync with the declaration in TypeBuilder.cs.
15024 2003-09-17 Martin Baulig <martin@ximian.com>
15026 * metadata.h (MonoType): Replaced the data's `int type_param'
15027 field with `MonoGenericParam *generic_param'.
15028 (MonoGenericParam): Added `MonoClass *klass'.
15030 * class.c (mono_class_from_gen_param): Removed the
15031 `MonoImage *image' and `int type_num' arguments.
15033 * metadata.c (mono_metadata_parse_generic_param): New static
15034 method; creates a MonoGenericParam which just contains the index.
15035 (do_mono_metadata_parse_type): Call
15036 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
15039 * reflection.c (mono_image_typedef_or_ref): Generic type
15040 parameters may be in the same assembly, but never use a typedef
15042 (mono_reflection_define_generic_parameter): We're now creating a
15043 "real" class for the type parameter; it's now safe to call
15044 mono_class_from_mono_type() on the class'es type, it'll do the
15047 2003-09-16 Martin Baulig <martin@ximian.com>
15049 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
15050 `symfile->range_entry_size' and `symfile->class_entry_size' here;
15051 the `symfile' data structure must be fully initialized before it
15052 gets added to the table.
15054 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
15056 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
15058 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
15059 class init trampolines.
15061 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
15063 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
15064 to the built-in profiler to turn off time and allocation profiling
15067 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
15069 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
15072 * debug-helpers.c (mono_method_full_name): Print the wrapper type
15073 in human readable form.
15075 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
15077 * reflection.c icall.c: Fixed warnings.
15079 * image.c (load_class_names): Use a temporary hash table to hold the
15080 namespaces in order to avoid doing many string comparisons.
15082 * image.h: Fix typo.
15084 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
15085 Pass NULL instead of g_direct_equal to the GHashTable constructor
15086 since the NULL case is short-circuited inside g_hash_table_lookup,
15087 leading to better performance.
15089 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
15090 obtain the first custom attribute for a given index. Depends on the
15091 CustomAttribute table being sorted by the parent field.
15093 * reflection.c (mono_custom_attrs_from_index): Use the new function
15094 for better performance.
15096 2003-09-07 Martin Baulig <martin@ximian.com>
15098 * class.c (mono_class_init): If we're a generic instance, inflate
15099 all our methods instead of loading them from the image.
15100 (mono_class_from_generic): Set `class->methods = gklass->methods'.
15102 2003-09-07 Martin Baulig <martin@ximian.com>
15104 * mono-debug-debugger.c: Added support for constructors.
15106 2003-09-06 Martin Baulig <martin@ximian.com>
15108 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
15111 * reflection.c (mono_reflection_setup_generic_class): Call
15112 ensure_runtime_vtable() to create the vtable.
15114 2003-09-05 Martin Baulig <martin@ximian.com>
15116 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
15119 2003-09-04 Martin Baulig <martin@ximian.com>
15121 * reflection.c (mono_reflection_define_generic_parameter): Generic
15122 parameters start with zero.
15124 2003-09-04 Martin Baulig <martin@ximian.com>
15126 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
15128 * reflection.h (MonoReflectionGenericParam): New typedef.
15129 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
15130 the generic parameters from the managed TypeBuilder.
15132 * reflection.c (mono_reflection_define_generic_parameter): New function.
15133 (mono_reflection_create_runtime_class): Encode generic parameters.
15134 (mono_reflection_setup_generic_class): New function; this is
15135 called after adding adding all generic params to the TypeBuilder.
15136 (encode_type): Added MONO_TYPE_VAR.
15138 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
15140 * class.h class.c (mono_class_needs_cctor_run): Moved this method
15143 * assembly.h assembly.c: Moved the AOT loading code into an assembly
15146 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
15148 * reflection.h reflection.c class.h class.c: Delete duplicate
15149 definition of mono_type_get_name () from reflection.c and export the
15152 * class.c: Class loading fixes from Bernie Solomon
15153 (bernard@ugsolutions.com).
15155 * reflection.c: Endianness fixes from Bernie Solomon
15156 (bernard@ugsolutions.com).
15158 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
15160 * assembly.h assembly.c: Define a file format version for AOT
15163 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
15165 * appdomain.h (MonoJitInfo): New field to determine whenever the
15166 code is domain neutral.
15168 2003-08-31 Miguel de Icaza <miguel@ximian.com>
15170 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
15172 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
15174 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
15175 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
15176 Avoid caching the result since strings must be domain specific. Fixes
15179 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
15181 * marshal.c (mono_marshal_init): Make this callable multiple times
15182 since it is hard to find a correct place to call it.
15184 * object.c (mono_runtime_class_init): Execute static constructors in
15185 the correct appdomain.
15187 * image.c (build_guid_table): Handle the case when multiple images have
15190 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15192 * icall.c: added a couple of icalls for System.Web.
15194 2003-08-28 Martin Baulig <martin@ximian.com>
15196 * icall.c (ves_icall_Type_BindGenericParameters): Use
15197 `klass->generic_inst' instead of `&klass->byval_arg' in the
15198 mono_type_get_object() call. The returned type must be
15199 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
15201 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
15205 * object.c (mono_class_proxy_vtable): Make it thread safe.
15207 * pedump.c: Fix warning.
15209 * object.c appdomain.h: Get rid of metadata_section.
15210 It is no longer needed and it was causing deadlocks with domain->lock.
15212 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
15214 2003-08-26 Martin Baulig <martin@ximian.com>
15216 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
15218 2003-08-26 Martin Baulig <martin@ximian.com>
15220 * pedump.c (main): Call mono_metadata_init(),
15221 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
15222 and mono_loader_init().
15224 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
15226 * loader.h: Add missing include to fix build.
15228 * image.h: mono_image_load_references is no more.
15230 * assembly.c: Reworked assembly loading to make it really thread safe.
15231 After these changes, the assembly returned by mono_assembly_open is
15232 fully initialized, i.e. all its references assemblies are loaded.
15234 * assembly.c (mono_image_load_references): Renamed to
15235 mono_assembly_load_references, and made private, since clients no
15236 longer need to call it.
15238 * class.c: Removed calls to mono_assembly_load_references, since it was
15239 a source of deadlocks.
15241 * loader.h loader.c class.h class.c: Protect data structures using a
15242 new lock, the loader lock.
15244 * class.c (mono_class_setup_vtable): Create temporary hash tables and
15245 GPtrArrays only when needed.
15247 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
15248 into empty structures by mcs. Fixes pinvoke7.cs.
15250 * domain.c (mono_init): Call a new initialization function.
15252 * appdomain.c (mono_runtime_init): Call the new initializer function
15253 of the marshal module.
15255 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
15256 inserted into empty structures by mcs. Fixes pinvoke7.cs.
15258 * marshal.h marshal.c: Added locks around the wrapper caches to make
15259 this module thread safe.
15261 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
15262 this argument. Fixes pinvoke1.exe.
15264 2003-08-25 Lluis Sanchez <lluis@ximian.com>
15266 * object.h: Added call_type field to MonoMethodMessage and the corresponding
15267 enumeration of values. Removed fields to store remote call output values in
15268 MonoAsyncResult. Not needed any more.
15269 * object.c: Initialize call_type and async_result fields in mono_message_init.
15270 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
15271 dispatching the message.
15272 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
15273 async call to finish. To do it use a message with EndInvoke call type.
15275 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
15277 * loader.h loader.c (mono_method_hash_marhal_info): New function which
15278 determines whenever a method has marshalling info.
15280 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15282 * assembly.c: fix the build on windows.
15284 2003-08-22 Lluis Sanchez <lluis@ximian.com>
15286 * object.cs: Fixed bug #47785.
15288 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
15290 * string-icalls.c (StringReplace): If their are no occurances of
15291 the old string found return a reference to the supplied
15292 string. This saves some memory and matches MS behavoir.
15294 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15296 * socket-io.c: fixed compilation for systems that define AF_INET6
15297 and don't define SOL_IP/SOL_IPV6.
15299 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
15301 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
15302 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
15304 * rawbuffer.c rawbuffer.h: Make this module thread safe.
15306 * domain.c: Make this module thread safe.
15308 * domain.c (mono_init): Call new initialization function.
15310 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
15311 reference types too. Fixes #38812.
15313 * image.c (mono_image_init): Fixed warnings.
15315 * class.c (mono_class_from_typeref): Handle assembly load failure
15318 * appdomain.c (add_assemblies_to_domain): Handle the case when
15319 the references of an assembly are not yet loaded.
15321 * metadata.c image.c assembly.c: Moved initialization of global
15322 variables to a separate function called at startup since lazy
15323 initialization of these variables is not thread safe.
15325 * image.c assembly.c: Made this module thread safe by adding locks in
15326 the appropriate places.
15328 * domain.c (mono_init): Call the new initialization functions of the
15331 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
15333 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
15334 make a direct call. It is proxy's work to make the call asynchronous.
15335 mono_delegate_end_invoke(): If the targe is a proxy, just collect
15337 * object.cs: mono_method_call_message_new(): read AsyncResult and
15338 state object from parameters list, if this info is requested.
15339 * object.h: Added fields to store remote call output values in
15340 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
15342 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15344 * object.h: add needed fields to MonoThread.
15345 * threads.c, threads.h: allow registering a function to cleanup data
15346 allocated per thread by the JIT.
15348 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15350 * loader.h: portability fix by Bernie Solomon
15351 * <bernard@ugsolutions.com>.
15353 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
15355 * reflection.h reflection.c (mono_param_get_objects): Changed this to
15356 return a MonoArray. This simplifies the code and also ensures that
15357 the cache allways contains an object reference as a value.
15359 * icall.c (ves_icall_get_parameter_info): Simplified using the new
15362 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15364 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
15365 fixes a problem with byte ordering when getting the address family for
15368 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
15370 * .cvsignore: Added monosn.
15372 * reflection.h reflection.c loader.c: Added support for parameter
15373 marshalling to dynamically created types. Fixes #47295.
15375 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15377 * rand.c: remove useless warnings.
15379 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15381 * class.c: implemented ldtoken for methods and fieldrefs.
15383 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15385 * threadpool.c: when mono_async_invoke was called, no one took care of
15386 monitoring the queue. So if the method invoked took some time and we
15387 got new async invoke requests after 500 ms (the thread created waited
15388 that long in WaitForSingleObject), the new async invoke was not called
15389 until the previous one finished.
15391 This is fixed now. Thanks to Totte for helping with it.
15393 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15395 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
15397 2003-08-11 Martin Baulig <martin@ximian.com>
15399 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
15401 2003-08-06 Martin Baulig <martin@ximian.com>
15403 * mono-debug-debugger.c: Added support for static fields,
15404 properties and methods.
15406 2003-08-06 Martin Baulig <martin@ximian.com>
15408 * mono-debug-debugger.c: Don't store the MonoString's vtable to
15409 make this work for applications with multiple application domains.
15411 2003-08-04 Martin Baulig <martin@ximian.com>
15413 * mono-debug-debugger.c: Completely reworked the type support; the
15414 most important thing is that we're now just using one single
15415 `MonoType' instance per type.
15417 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
15419 * mono-endian.h, mono-endian.c, icall.c: Added icall
15420 ves_icall_System_Double_AssertEndianity to assert double word endianity
15421 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
15423 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15425 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
15426 support, icalls and fixes.
15428 2003-07-31 Miguel de Icaza <miguel@ximian.com>
15430 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
15431 classes that are a punctuation character in .NET is not the same a
15434 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15436 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
15438 2003-07-29 Miguel de Icaza <miguel@ximian.com>
15440 * icall.c: Add new MemCopy internalcall.
15441 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
15442 Simplified code; It is not necessary to handle all the cases here,
15443 as the C# code takes care of it. Only handle the case of the name
15444 resource embedded into the assembly.
15446 Changed signature to return the data pointer and the size of the
15449 2003-07-26 Miguel de Icaza <miguel@ximian.com>
15451 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
15452 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
15454 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
15456 * socket-io.c: ignore EINTR error in select.
15458 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
15460 * class.h, class.c: removed unused subclasses field in MonoClass.
15462 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
15464 * icall.c: improve fix of get_base_definition(). If the parent class
15465 doesn't have the mehod, look at the parent of the parent.
15466 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
15467 to check if a parameter is an in or out parameter
15468 (PARAM_ATTRIBUTE_IN is not set by default).
15469 mono_method_return_message_restore(): Use mono_class_value_size to
15470 get the size of a value type. mono_type_stack_size (parameterType)
15471 does not return the correct value if parameterType is byRef.
15472 mono_load_remote_field(), mono_load_remote_field_new(),
15473 mono_store_remote_field(), mono_store_remote_field_new():
15474 raise exception if the remote call returns an exception.
15476 2003-07-28 Martin Baulig <martin@ximian.com>
15478 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
15479 method. This is a wrapper around mono_runtime_invoke() which
15480 boxes the instance object if neccessary.
15482 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15484 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
15485 metadata.h, row-indexes.h, verify.c: first cut of generics support.
15487 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15489 * icall.c: disable mcs bug workaround.
15491 2003-07-21 Miguel de Icaza <miguel@ximian.com>
15493 * object.c (mono_runtime_class_init): Take the metadata_section
15494 mutex before obtaining the domain mutex.
15496 * appdomain.h: Added definition of metadata_section mutex here.
15498 * object.c: define metadata_mutex here.
15500 2003-07-24 Ravi Pratap <ravi@ximian.com>
15502 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
15505 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
15507 * reflection.c: Fix bug #46669
15509 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15514 * object.h: fill in the type name for TypeLoadException.
15516 2003-07-23 Ravi Pratap <ravi@ximian.com>
15518 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
15519 relationship between TypeBuilders while compiling corlib) and bug
15520 45993 (Array types returned from the runtime while compiling
15521 corlib were from the loaded corlib).
15523 2003-07-22 Martin Baulig <martin@ximian.com>
15525 * mono-debug-debugger.c: Reworked the type support a bit more;
15526 distinguish between types and classes.
15528 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
15530 * icall.c: add IsArrayImpl icall.
15532 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
15534 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
15535 initializing real_size only once. Also fix bug #46602.
15537 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
15539 * object.c: Renamed mono_metadata_section to metadata_section.
15541 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
15543 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
15544 empty array if the type is an array. Fixed.
15545 ves_icall_MonoMethod_get_base_definition: if the base method
15546 is abstract, get the MethodInfo from the list of methods of
15548 * reflection.c: ParameterInfo.PositionImpl should be zero-based
15549 and it was 1-based. Fixed in mono_param_get_objects.
15551 2003-07-20 Martin Baulig <martin@ximian.com>
15553 * mono-debug.h: Set version number to 31.
15554 (mono_debug_init): Added `MonoDomain *' argument.
15556 * mono-debug-debugger.c: Reworked the type support; explicitly
15557 tell the debugger about builtin types; pass the `klass' address to
15560 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
15562 * image.c: Allow new metadata tables to be loaded without a
15563 warning. Also update the warning message to give the new constant value.
15565 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15567 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
15568 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
15569 array type representation changes.
15571 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15573 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
15574 on Environment.Exit () call.
15576 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15578 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
15579 requires a matching corlib.
15581 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
15583 * Changelog: My editor decided to add a CR to each line. Sorry about that.
15584 Committed again without the CRs.
15586 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
15588 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
15589 getting it from the "this" socket instance. Did not work
15590 if the socket is a subclass of Socket.
15591 Also fixed bug #35371.
15593 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15595 * metadata.c: fixed size for TypedByRef.
15596 * loader.c: when searching for a method, consider the vararg amrker.
15597 * unicode.c, decimal.c: constify some arrays.
15599 2003-07-15 Dick Porter <dick@ximian.com>
15601 * socket-io.c: Fixed compilation for gcc < 3.2.
15603 Fixed compilation for machines that don't have AF_INET6 (thanks to
15604 Bernie Solomon <bernard@ugsolutions.com> for that part.)
15606 Fixed compile warnings.
15608 Fixed formatting and line endings.
15610 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
15613 * socket-io.c: Added IPv6 support.
15615 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
15617 * class.c (mono_class_is_assignable_from): New function to implement
15618 the is_assignable_from logic. Used by mono_object_isinst,
15619 Type::IsAssignableFrom () and the interpreter.
15621 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
15622 Object, even interfaces.
15624 * object.c (mono_object_isinst): Implement in terms of
15625 is_assignable_from.
15627 * icall.c (ves_icall_type_is_assignable_from): New icall.
15629 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
15631 * domain.c (foreach_domain): fix compiler warning.
15633 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
15635 * image.c (load_metadata_ptrs): use g_strndup because strndup is
15636 not available on all plattforms
15638 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
15640 * image.h image.c: Store the metadata version string in MonoImage.
15641 * icall.c: New icall to retrieve the image version.
15642 * reflection.c (create_dynamic_image): Fill in the image version field
15643 * reflection.c (build_compressed_metadata): Use the image version
15644 from the image structure.
15646 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15648 * appdomain.c: modified comment.
15649 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
15650 That will be its last iteration when mono_gc_cleanup is called from
15651 mono_runtime_cleanup and before the domain is unloaded.
15655 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
15657 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
15660 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15662 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
15663 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
15664 Bernie Solomon <bernard@ugsolutions.com>.
15666 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15668 * object.c, object.h: provide mono_object_new_fast() for faster
15669 allocation in some special cases.
15671 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15673 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
15674 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
15676 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15678 * threadpool.c: fix leaks.
15680 2003-07-01 Dick Porter <dick@ximian.com>
15682 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
15683 using MonoGHashTables. Fixes threadpool bug posted to list.
15685 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
15687 * image.h, image.c: added support to load an assembly from a byte array.
15688 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
15689 assembly bundle support.
15691 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
15693 * threadpool.c (mono_thread_pool_add): keep a reference to the
15694 AsyncResult to prevent GC
15696 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15698 * class.c: leak fix.
15700 2003-06-25 Dick Porter <dick@ximian.com>
15702 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
15703 for the async object, the WaitHandle object will close the handle.
15706 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15708 * class.c: in mono_array_class_get (), lookup from the hash with the
15709 same type we insert: this works around a bug in
15710 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
15711 lluis. The real fix will have to wait for after the release.
15713 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15715 * icall.c: fix memory leak when getting type members.
15717 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
15719 * reflection.c: added more pubtoken special cases.
15721 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15723 * class.c: handle field offset correctly when class size
15724 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
15726 2003-06-20 Martin Baulig <martin@ximian.com>
15728 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
15731 2003-06-20 Martin Baulig <martin@ximian.com>
15733 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
15735 2003-06-20 Martin Baulig <martin@ximian.com>
15737 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
15738 just distinguish between variables in registers and variables at
15739 an offset relative to a register.
15741 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15743 * icall.c: #ifdef out latest changes until mcs is fixed.
15745 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15747 * icall.c: return members in metadata order.
15749 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15751 * icall.c: avoid infinite loop in GetTimeZoneData.
15753 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15755 * icall.c: added Marshal.Prelink/All icalls.
15757 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
15759 * object.c, object.h: fix warnings and do some overflow checking
15760 when creating arrays.
15762 2003-06-17 Dick Porter <dick@ximian.com>
15765 * file-io.c: File attributes need to be tweaked slightly when
15766 passed from the managed to the w32 world.
15768 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15769 * profiler.h profiler-private.h profiler.c: Rework last patch
15770 based on suggestion by Paolo.
15772 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15774 * profiler.h profiler-private.h profiler.c: Added infrastructure for
15775 instruction level coverage data collection.
15776 * profiler.h profiler.c (: Added new callback function which can be
15777 used by the profiler to limit which functions should have coverage
15779 * profiler.c (mono_profiler_load): Call g_module_build_path to
15780 generate the file name of the profiler library.
15782 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15784 * profiler.c, profiler.h, profiler-private.h: added basic block
15785 coverage profiling API.
15787 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
15789 * reflection.c (mono_reflection_create_runtime_class): Add support
15790 for events in dynamically generated code.
15792 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
15795 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15797 * icall.c: when getting timezone info, return reasonable values if we
15798 can't get the actual data.
15800 2003-06-14 Dick Porter <dick@ximian.com>
15802 * threads.c (start_wrapper): Remove the reference to the thread
15803 object in the TLS data, so the thread object can be finalized.
15804 This won't be reached if the thread threw an uncaught exception,
15805 so those thread handles will stay referenced :-( (This is due to
15806 missing support for scanning thread-specific data in the Boehm GC
15807 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
15809 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
15811 * reflection.c: ensure streams and tables are first allocated with
15812 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
15814 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15816 * icall.c: fixed GetElementType for byrefs (bug# 44792).
15818 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
15820 * reflection.c (mono_reflection_create_runtime_class): Add support for
15821 properties to dynamically created classes.
15822 * reflection.c: Fix a few places where non-MonoObjects were inserted
15823 into the tokens hashtable.
15825 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15827 * object.c: some support to handle out of memory exceptions.
15829 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
15831 * marshal.c (mono_marshal_get_native_wrapper): support reference
15834 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15836 * object.h, object.c: more portability stuff from Bernie Solomon.
15837 Unexport mono_object_allocate(). Added mono_object_unbox ().
15838 Set exitcode when an unhandled exception is thrown.
15840 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
15842 * marshal.c (mono_marshal_get_native_wrapper): use custom
15843 marshaler for return types.
15845 2003-06-10 Dick Porter <dick@ximian.com>
15847 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
15848 ip_mreq is available
15850 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15852 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
15853 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
15854 by Bernie Solomon <bernard@ugsolutions.com>.
15856 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
15858 * gc.c (mono_gc_init): Avoid error message on shutdown when
15859 GC_DONT_GC=1 is used.
15861 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
15862 New icall to return the GUID of a module.
15864 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15866 * class.c: ensure instance size always includes the parent's size
15867 even whem class size is set explicitly (fixes bug#44294).
15869 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15871 * profiler.h, profiler.c: made the simple profiler thread-safe,
15872 get more accurate timing info. Allow the loading of an
15873 externally-developed profiler module.
15875 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
15877 * marshal.c (mono_marshal_get_native_wrapper): improved
15878 class/byref arguments.
15879 (mono_marshal_get_native_wrapper): better string marshaling support.
15881 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15883 * class.c: ensure .pack and .size are handled correctly and
15884 simplified layout of static fields.
15886 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
15889 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
15891 * loader.c (mono_lookup_pinvoke_call): look for modules in the
15892 current directory (fix bug 44008)
15894 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
15896 * marshal.c (mono_marshal_get_native_wrapper): started support for
15898 (mono_delegate_to_ftnptr): consider marshalling specifications
15900 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15902 * reflection.c, reflection.h: emit custom marshal info.
15904 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15906 * object.c: free the GError.
15907 * icall.c: added CloseEvent_internal.
15909 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
15912 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
15914 * loader.c (mono_method_get_signature): Add support for dynamic
15917 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15919 * reflection.c: fixed bug #43905.
15921 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15923 * class.c, domain.c, icall.c, metadata.h, object.h: support for
15924 handling TypedReference and ArgIterator.
15925 * loader.c, loader.h: added function to get signature at call site.
15927 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15929 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
15930 data readonly. Buglets and warning fixes. Some MethodSpec support.
15932 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15934 * class.h, class.c, object.c: remove relative numbering support.
15936 2003-05-26 Miguel de Icaza <miguel@ximian.com>
15938 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
15939 free the string, until we get a chance to fix Gtk#
15941 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15943 * marshal.c: revert last patch.
15945 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15947 * icall.c: updates for new mono_class_vtable() not calling
15948 the type constructor anymore.
15950 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15952 * object.h, object.c: separate vtable creation from type
15953 initialization. Make running the .cctor thread safe.
15955 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
15957 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
15959 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
15961 * loader.c (mono_get_method): consider calling convention
15963 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
15965 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
15966 to return the invisible global type for a module.
15968 * reflection.c (mono_image_build_metadata): Emit global fields too.
15970 2003-05-20 Peter Williams <peterw@ximian.com>
15972 * loader.c (mono_lookup_internal_call): Add a few newlines.
15974 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
15976 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
15979 * appdomain.c (set_domain_search_path): Recalculate search path when
15980 AppDomainSetup.PrivateBinPath changes.
15982 * object.c (mono_class_compute_gc_descriptor): It turns out some
15983 parts of the class libs (like System.Thread) holds pointers to
15984 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
15985 to treat native int a pointer type here.
15987 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
15989 * appdomain.h, domain.c: add hashtable for jump target resolution.
15991 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
15993 * reflection.h reflection.c icall.c: Added new icalls
15994 GetManifestResourceInfoInternal, GetModulesInternal and support
15997 2003-05-16 Dick Porter <dick@ximian.com>
16001 * file-io.c: Implement System.IO.MonoIO::GetTempPath
16003 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
16005 * object.c: mono_store_remote_field: little fix to previous patch.
16007 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16009 * class.c: add constructors to array classes.
16010 * icall.c: special case array construction for InternalInvoke (),
16012 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
16014 * class.h class.c reflection.c object.c: Added support for field
16015 defaults in dynamically generated classes.
16017 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16019 * reflection.c: properly encode charset for ddlimport.
16021 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16023 * threads.c: allow compiling without GC.
16025 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16027 * appdomain.h, object.c, object.h, threads.c, threads.h: added
16028 handling of thread static data.
16030 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16032 * reflection.h, reflection.c: added mono_custom_attrs_free ().
16034 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
16036 * class.c (mono_array_class_get): always set the serializable flags
16037 (mono_array_class_get): always set the SEALED attribute for array types
16039 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
16041 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
16042 attributes (fix for bug 42021).
16044 2003-05-12 Dick Porter <dick@ximian.com>
16046 * gc.c: Don't run finalizers when the finalizer thread is
16047 finishing up, because the default domain has already been
16050 2003-05-11 Miguel de Icaza <miguel@ximian.com>
16052 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
16053 value is null, we should throw an exception. This is slightly
16054 different than the other conventions used for the constructor.
16056 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16058 * socket-io.c: fixed windows build.
16060 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16062 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
16064 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
16066 * object.c (mono_string_new_wrapper): Compatibility fix for MS
16069 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
16071 * class.c (mono_class_layout_fields): Add experimental GC aware
16072 auto layout facility. Requires class library changes to work correctly.
16074 (mono_class_setup_vtable): Avoid overriding explicit interface
16075 method implementations. Fixes iface3.exe test.
16077 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
16079 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
16080 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
16082 * metadata.h: Add new type classification macro which determines
16083 whenever the type holds an object reference.
16085 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
16087 * marshal.c (mono_marshal_get_native_wrapper): cleanups
16089 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
16091 * gc.c (finalizer_thread): Work around a GC bug.
16093 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
16095 * marshal.c (emit_struct_conv): allow unions
16097 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
16099 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
16101 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
16103 2003-05-06 Martin Baulig <martin@ximian.com>
16105 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
16107 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16110 (Select_internal): allow NULLs, don't create arrays if not needed.
16111 Coupled with Socket.cs changes.
16114 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
16115 register a finalizer for it that will close the semaphore handle. This
16116 fixes the leak and make Lupus' test run with > 4080 loops.
16118 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
16120 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
16121 Jerome Laban (bug #42287)
16123 2003-05-02 Martin Baulig <martin@ximian.com>
16125 * debug-mono-symfile.h
16126 (MonoSymbolFile): Moved declaration into mono-debug.h.
16127 (MonoDebugMethodJitInfo): Likewise.
16128 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
16130 (_mono_debug_address_from_il_offset): Take a
16131 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
16134 (MonoDebugDomainData): New struct.
16135 (mono_debug_get_domain_data): New function.
16136 (mono_debug_add_method): Take an additional `MonoDomain *'
16138 (mono_debug_source_location_from_address): Likewise.
16139 (mono_debug_il_offset_from_address): Likewise.
16140 (mono_debug_address_from_il_offset): Likewise.
16142 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
16144 * reflection.c: one more check for null type in custom attrs.
16146 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16148 * reflection.c: avoid warning (comparison is always false due to limited
16149 range of data type).
16151 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16153 * icall.c: throw an exception in Type.GetField if the argument 'name'
16156 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
16158 * reflection.c: fixed handling of enums in named arguments to custom
16159 attributes (bug #42123).
16161 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16163 * reflection.c: use the right array element type and handle
16164 a null for a Type argument, too.
16166 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
16168 * reflection.c: handle arrays as arguments to custom attributes.
16170 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
16172 * reflection.c: handle a string value in a custom attr
16173 ctor that takes an object.
16175 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
16177 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
16180 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
16182 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
16184 2003-04-27 Martin Baulig <martin@ximian.com>
16186 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
16187 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
16188 MONO_DEBUGGER_EVENT_BREAKPOINT.
16189 (mono_breakpoint_trampoline_code): Removed.
16190 (mono_debugger_event_handler): The last argument is now a
16192 (mono_debugger_insert_breakpoint_full): Removed the
16193 `use_trampoline' argument.
16194 (mono_debugger_method_has_breakpoint): Likewise.
16195 (mono_debugger_trampoline_breakpoint_callback): Renamed to
16196 mono_debugger_breakpoint_callback(); take the method and
16197 breakpoint number as arguments.
16199 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16201 * metadata.c: fix off by one when loading parameters attributes.
16203 2003-04-24 Martin Baulig <martin@ximian.com>
16205 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
16207 2003-04-24 Martin Baulig <martin@ximian.com>
16209 * mono-debug-debugger.c: Moved all code which interacts with the
16210 Mono Debugger here.
16212 * debug-mono-symfile.c: This code now just deals with the symbol
16213 file itself, the debugger code is now in mono-debug-debugger.c.
16215 2003-04-23 Martin Baulig <martin@ximian.com>
16217 * mono-debug.c (mono_debug_source_location_from_il_offset):
16218 New method; like mono_debug_source_location_from_address(), but
16219 takes an IL offset instead of a machine address.
16221 2003-04-23 Martin Baulig <martin@ximian.com>
16223 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
16224 `line' field; this is now computed by the debugger.
16226 2003-04-23 Martin Baulig <martin@ximian.com>
16228 * mono-debug.[ch]: New files. This is the new debugging interface.
16230 * mono-debug-debugger.[ch]: New files. Moved all code which
16231 interacts with the Mono Debugger here.
16233 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
16235 * domain.c (mono_init): initialize mono_defaults.monitor_class
16237 2003-04-21 Miguel de Icaza <miguel@ximian.com>
16239 * reflection.c (method_encode_code): Add a spicy exception to help
16240 future compiler authors.
16242 2003-04-21 Martin Baulig <martin@ximian.com>
16245 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
16246 Make this work with relative pathnames; g_filename_to_uri() needs
16247 an absolute filename.
16249 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
16251 * icall.c: Track name changes in Object and ValueType.
16253 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
16255 * metadata.c (mono_type_stack_size): size should be a multiple of
16258 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16261 (internal_domain_finalize): moved into mono_domain_finalize. No need
16262 to create another thread because the finalizers will be run in the
16265 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
16266 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
16267 to be run (MS does this too).
16269 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
16271 * object.c (mono_class_compute_gc_descriptor): Update comment.
16273 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
16275 * image.h: Add synchronized wrapper cache.
16277 * image.c (do_mono_image_open): Initialize cache.
16279 * reflection.c (create_dynamic_mono_image): Initialize cache.
16281 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16283 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
16284 ves_icall_System_Buffer_ByteLengthInternal.
16286 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16288 * reflection.c: setup klass->nested_in earlier. Allow
16289 a dash in the assembly name.
16291 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
16293 * metadata.c (mono_type_to_unmanaged): dont access
16294 type->data.klass for MONO_TYPE_OBJECT
16295 (mono_type_to_unmanaged): consider System.Delegate class
16297 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
16299 * class.c: just setup supertypes in the proper place instead of
16300 initializing the full element class for arrays.
16302 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16304 * class.c: ensure the element class of arrays is initialized.
16305 Setup the supertype info for array classes, too.
16307 2003-04-14 Miguel de Icaza <miguel@ximian.com>
16309 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
16311 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16313 * Makefile.am: re-added -m option when running cygpath. This way,
16314 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
16316 * mono-config.c: same codepath for locating mono config file for WIN32
16318 * assembly.c: if mono_assembly_setrootdir is called, don't override
16321 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16323 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
16324 MONO_ASSEMBLIES variable.
16326 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16328 * icall.c: added Assembly::GetNamespaces() icall.
16330 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16332 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
16334 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
16336 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
16337 * object.c: fixed bug in the construction of vtable for proxies
16339 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
16341 * object.c (mono_array_new): Mark mono_array_new as an icall.
16343 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16345 * class.c: fixed test for public method when overriding interfaces.
16348 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16350 * appdomain.h, domain.c: added mono_domain_foreach() to
16351 be able to access the currently loaded appdomains.
16352 * object.c: make string interning work across sppdomains.
16353 Mark some functions for use as icalls.
16355 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
16357 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
16359 * reflection.h reflection.c: Allocate long living data using
16360 GC_MALLOC_ATOMIC so the collector does not need to scan it.
16362 * reflection.c: Double the allocation size in streams instead of
16363 increasing it, to prevent unneccesary copying on large assemblies.
16365 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
16366 creation if the assembly does not have the Run flag set.
16368 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16370 * class.h: avoid the C++ keywords in header files (Jerome Laban
16371 spotted and fixed this).
16373 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16376 (mono_unhandled_exception): fill in the arguments for the
16377 UnhandledException event. Only trigger that event for the default
16378 domain (as MS does).
16380 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
16382 * object.c: Improve typed allocation stuff based on suggestions from
16383 Paolo. Also turn it on if the GC library supports it.
16385 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
16387 * object.c object.h class.h: Added experimental typed allocation
16388 facility using the interfaces in gc_gcj.h.
16390 * os/gc_wrapper.h: Added new include files.
16392 2003-04-03 Martin Baulig <martin@ximian.com>
16394 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
16395 which is not yet enabled by default.
16397 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
16399 (mono_gc_lock, mono_gc_unlock): New static functions.
16401 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
16402 functions; stop/start the world for the garbage collector. This
16403 is using the windows API; we need to complete the SuspendThread()/
16404 ResumeThread() implementation in the io-layer to make this work on Unix.
16405 (mono_gc_push_all_stacks): New public function; tells the garbage
16406 collector about the stack pointers from all managed threads.
16408 2003-04-03 Martin Baulig <martin@ximian.com>
16410 * object.h (MonoThread): Added `gpointer stack_ptr'.
16412 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
16414 2003-04-03 Martin Baulig <martin@ximian.com>
16416 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
16418 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
16420 * reflection.c (typebuilder_setup_fields): Initialize field.first and
16423 2003-04-02 Miguel de Icaza <miguel@ximian.com>
16425 * loader.c (mono_lookup_internal_call): Report the corlib that is
16428 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
16430 * icall.c (ves_icall_type_GetTypeCode): fixed check for
16431 System.DBNull (it's class not valuetype).
16433 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16435 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
16436 if the array method was already assigned a token (fixes bug#40646).
16438 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
16440 * reflection.c (mono_reflection_get_type): Attempt type resolve even
16441 if no assembly is given.
16443 2003-04-01 Miguel de Icaza <miguel@ximian.com>
16445 * metadata.h: Added the new tables.
16447 * row-indexes.h: Added definitions for new tables.
16449 * metadata.c: Add schemas for new tables, and add support for
16450 computing the sizes of them.
16452 * class.c: Update for handling the new type cases.
16454 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
16456 * metadata.h (MONO_TYPE_IS_VOID): new macro
16458 2003-03-31 Martin Baulig <martin@ximian.com>
16460 * threads.h (MonoThreadCallbacks): Added `thread_created'.
16462 * threads.c (mono_thread_new_init): Call `thread_created' in the
16463 mono_thread_callbacks.
16465 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
16467 * loader.h: added marshalbyrefobject_class to mono_defaults
16468 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
16469 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
16470 generation of output parameters.
16471 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
16472 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
16473 contextbound and the target object belongs to the context of the caller.
16474 * object.h: added context and unwrapped_server variables in MonoRealProxy.
16475 * object.c: Implemented support for interfaces and abstract classes
16476 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
16477 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
16479 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
16481 * class.h class.c (mono_class_is_subclass_of): New function.
16483 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
16484 routines for most common case (calls from ArrayList::ToArray).
16486 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
16487 routine so programs which call Environment::Exit() can be profiled.
16489 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
16490 Added MONO_ARCH_SAVE_REGS.
16492 * icall.c (ves_icall_type_is_subtype_of): Use new function.
16494 2003-03-29 Miguel de Icaza <miguel@ximian.com>
16496 * blob.h: Add a couple of new MonoType types definitions.
16498 * tabledefs.h: Add a couple of new call convs.
16500 2003-03-27 Zoltan Varga <vargaz@freemail.h>
16502 * reflection.h (MonoReflectionDynamicAssembly): track changes in
16503 the layout of the class.
16505 * reflection.c (alloc_table): double the size on overflow to avoid
16506 unnecessary copying.
16508 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
16509 avoid filling out metadata tables and blobs. Also set mb->ilgen to
16510 null so it can be garbage collected.
16512 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
16514 * reflection.c (mono_reflection_get_type): Return the resolved type
16515 only if it is in the assembly we searched.
16517 * reflection.c (ensure_runtime_vtable): Initialize method slots.
16519 * class.c (mono_class_setup_vtable): Set the slot of the overriding
16522 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16525 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
16526 the right one is 'file:///blah', but MS allows it.
16528 (mono_assembly_open): allow 'file://blah'
16530 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
16532 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
16534 * socket-io.c: fixes bug #40310.
16536 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
16538 * reflection.c (mono_reflection_parse_type): handle deeply nested
16541 * reflection.c (mono_image_create_token): Use unique token values
16542 since they will be put into a hash table.
16544 * class.c (mono_class_setup_vtable): If a method occurs in more than
16545 one place in the vtable, and it gets overriden, then change the
16546 other occurances too.
16548 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
16549 object as return type.
16551 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
16553 * icall.c: Deleted "ToString" implementation for double and float
16554 because they are full implemented in managed code.
16556 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16558 * reflection.c, reflection.h: implemented and exported functions
16559 to retrieve info about custom attributes.
16561 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16563 * appdomain.c: moved Uri handling to assembly.c
16564 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
16565 work when using a file Uri in *nix and windows.
16567 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
16568 GetReferencedAssemblies.
16570 2003-03-18 Dick Porter <dick@ximian.com>
16572 * icall.c: Rename a couple of internal calls
16574 * threads.c: Set the thread state to Stopped when a thread exits.
16577 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
16579 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
16582 * object.c (mono_class_vtable): fix warning.
16584 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
16586 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
16588 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
16590 (method_encode_clauses): Create exception info structures in the right
16592 (mono_reflection_setup_internal_class): Initialize supertypes field.
16594 * class.c object.c: Handle interfaces which implement other interfaces
16597 * class.h class.c: Move the supertypes array initialization code into
16598 a separate function so it can be used for dynamic types too. Also call
16599 it earlier, in mono_class_init(), since it can be used before the
16600 type is initialized.
16602 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16606 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
16611 * object.c: remove warnings.
16613 2003-03-13 Martin Baulig <martin@ximian.com>
16615 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
16616 (MonoDebugLexicalBlockEntry): New types.
16618 * debug-mono-symfile.c
16619 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
16621 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16623 * process.c: ret can be any non-zero value accroding to MS doc.
16625 2003-03-07 Miguel de Icaza <miguel@ximian.com>
16627 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
16628 fixing a warning for a miss-used prototype, would have cause
16629 random memory corruption.
16631 2003-03-07 Martin Baulig <martin@ximian.com>
16633 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
16634 getting really annoying ....
16636 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
16638 * reflection.c (fixup_method): added support for array methods.
16640 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16642 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
16643 (pointed out by Michael Adams).
16645 2003-03-04 Dick Porter <dick@ximian.com>
16647 * icall.c: Temporarily reverted the Double and Single ToString()
16648 change, because it broke nunit.
16650 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
16652 * object.h, threads.h: make include files compatible with C++
16653 (patch by Jerome Laban <jlaban@wanadoo.fr>).
16655 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
16657 * icall.c: Erased ToString helper functions for Double and Single.
16658 Now, that implementations ar all in managed code (Double and Single
16661 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
16663 * appdomain.c: Added method for initializing the default context of
16664 a domain. Added internal call for getting the default context.
16665 * appdomain.h: Added context variable in MonoDomain struct.
16666 * domain.c: mono_domain_set also sets the default context of the domain
16667 * icall.c: Mapped internal method InternalGetDefaultContext.
16668 * object.c: mono_object_get_virtual_method returns always a remoting
16669 wrapper if the object is a transparent proxy.
16670 mono_runtime_invoke_array: when creating an object by calling the
16671 constructor, if the created object is a proxy, then the constructor should
16672 be called using the a remoting wrapper.
16674 2003-03-03 Dick Porter <dick@ximian.com>
16676 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
16677 variable so it compiles on solaris. Problem spotted by
16678 Christopher Taylor <ct@cs.clemson.edu>
16680 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16683 (get_info_from_assembly_name): don't leak value.
16686 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
16689 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
16691 * assembly.c: export mono_image_load_references ().
16692 * class.c: handle function pointers. mono_class_from_name() now
16693 supports nested type names directly.
16695 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
16697 * reflection.h reflection.c: Encode already created dynamic methods
16698 and fields correctly as a DEF instead of a REF.
16700 * reflection.c: Get rid of the force_ref argument to
16701 mono_image_typedef_or_ref since it was wrong in the first place.
16703 * string-icalls.c: add error checking to string constructors according
16706 * reflection.c: Emit types in the order their TypeBuilders were
16707 created. Previously, a new table index was assigned to each type before
16708 the tables were emitted. This was wrong because the signature blob
16709 might already refer to a type by its original table index.
16711 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
16713 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
16716 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16718 * Makefile.am: make assemblies dir have \ instead of / on windows.
16720 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
16722 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
16723 iterate over the NESTEDCLASS table using a linear search since the
16724 table is not guaranteed to be sorted by the secondary key.
16726 * class.c (mono_class_create_from_typedef): fixed up call to
16727 mono_metadata_nesting_typedef.
16729 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
16731 * marshal.c (mono_string_to_byvalstr): clear the memory as
16732 suggested by Jerome Laban <jlaban@wanadoo.fr>
16734 2003-02-26 Dick Porter <dick@ximian.com>
16736 * process.c: Cope with padding in .rsrc blocks
16738 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
16740 * metadata.h: reverted the filter_len change, it breaks reflection
16742 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
16744 * metadata.h: added a new field to store the filter_len
16747 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
16749 * reflection.c: handle custom attributes for types and members
16750 created with Reflection.Emit (bug#38422).
16752 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
16754 * reflection.c: define RTSpecialName automatically for constructors for
16755 compatibility with MS.NET.
16757 * reflection.c (mono_reflection_create_runtime_class): initialize
16758 nested_in field of dynamically created classes.
16760 2003-02-22 Martin Baulig <martin@ximian.com>
16762 * debug-mono-symfile.h: Incremented version number.
16764 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
16766 * object.h icall.c process.c: fix warnings.
16768 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
16770 * appdomain.h appdomain.c:
16771 (mono_domain_try_type_resolve): split the
16772 name_or_tb argument into a name and a tb argument.
16773 (mono_domain_has_type_resolve): new function to check whenever the
16774 application has registered a TypeResolve event handler.
16776 * icall.c reflection.h reflection.c: move the type resolve logic into
16777 mono_reflection_get_type () so it will be invoked when
16778 Assembly::GetType () is called.
16781 (mono_reflection_get_type): renamed to get_type_internal.
16782 (mono_reflection_get_type): fixed type name generation so it works
16783 for nested types too.
16784 (mono_reflection_get_type): call has_type_resolve () to avoid the
16785 costly type name generation if there is no resolve event handler.
16787 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16789 * class.c, image.c: load exported types from file references.
16791 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
16793 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
16794 used to cache the managed methods used to create proxies and make
16795 remote invocation of methods.
16796 * class.h: Added in MonoVTable a flag to indicate that a class needs
16797 to be remotely created.
16798 * object.c: Modified the method mono_class_vtable(). It now initializes
16799 the remote flag of the vtable. Modified mono_object_new_specific(),
16800 so now it checks the remote flag.
16801 * icall.c: Added a couple of internal methods, one for enabling instance
16802 creation interception for a type, and one for creating objects bypassing
16805 2003-02-18 Martin Baulig <martin@ximian.com>
16807 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
16808 New interncall to get a method's metadata token.
16810 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
16811 New interncall for the debugger.
16813 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
16815 * class.c (mono_class_setup_vtable): allocate supertype array
16817 2003-02-18 Martin Baulig <martin@ximian.com>
16819 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
16821 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16824 (assembly_name_to_aname): jump over unknown properties (i've found
16825 something like: 'type, assembly, version=xxx, custom=null, public...',
16826 so now will ignore custom=null and still get the rest of the values).
16828 2003-02-17 Dick Porter <dick@ximian.com>
16830 * threads.c: Have Thread.Start() wait for a semaphore to signal
16831 that the thread has set up all its local data. This fixes bug
16832 34323, where Abort() raced the new thread's TLS data.
16834 Also removes the handle_store() call from start_wrapper, because
16835 threads are now always created suspended and there is no longer a
16836 race between the parent and child threads to store the info.
16838 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
16840 * image.c: explain the #- heap issue in a message, hopefully
16841 avoiding FAQs on mono-list.
16843 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16846 (GetEntryAssembly): if the domain has not invoked
16847 AppDomain.ExecuteAssembly yet, return the assembly of the default
16850 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
16852 * class.c (mono_ldtoken): make it work in dynamic assemblies.
16854 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
16856 * metadata.c, reflection.c: simple speedup to type hash
16859 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
16861 * image.c, image.h, class.c, assembly.c: move module loading
16862 to MonoImage. When loading metadata, consider alignemnet from
16863 the start of metadata, not from the metadata address in memory.
16865 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
16867 * reflection.c (mono_reflection_get_custom_attrs): Added support for
16868 AssemblyBuilder objects. Factored out custom attribute creation into
16869 a separate function.
16870 (create_custom_attr): new function to create custom attributes.
16872 2003-02-12 Miguel de Icaza <miguel@ximian.com>
16874 * Makefile.am: Got tired of typing the full pathname to pedump.
16875 Until there is another option, am installing this.
16877 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
16879 * class.c (class_compute_field_layout): always set field->parent
16880 (mono_ldtoken): use mono_defaults.fieldhandle_class;
16882 2003-02-11 Dick Porter <dick@ximian.com>
16885 * monitor.c: Rewrote Monitor, making lock much faster and
16886 Pulse/Wait work as specified. Also uses much fewer handles, and only
16887 creates them as needed.
16889 * exception.c: Added SynchronizationLockException
16891 * threads.c: Deleted old Monitor implementation. The new one is
16894 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16896 * class.c: handled TypedReference type code. Set the correct size for
16897 class data. Setup interface_offsets for interface classes, too.
16899 2003-02-09 Martin Baulig <martin@ximian.com>
16901 * debug-mono-symfile.h: Reflect latest symbol writer changes.
16903 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
16905 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
16906 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
16907 * object.c: fixed mono_object_get_virtual_method () for interfaces.
16908 * verify.c: check for code that runs after the end of the method.
16910 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
16912 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
16913 "System.Math::Round2".
16914 * sysmath.h: Added Floor, Round and Round2 definitions.
16915 * sysmath.c: Modified certain functions that were not 100% compliant
16916 with MS.NET (math precision) and added the implementation of Floor,
16919 2003-02-07 Martin Baulig <martin@ximian.com>
16921 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
16923 2003-02-07 Martin Baulig <martin@ximian.com>
16925 * debug-mono-symfile.c: Reflected latest symwriter changes.
16926 (mono_debug_create_mono_symbol_file): Removed.
16927 (mono_debug_open_mono_symbol_file): Take an argument which
16928 specifies whether to create a dynamic symbol file.
16930 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
16932 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
16934 2003-02-05 Martin Baulig <martin@ximian.com>
16936 * reflection.c (mono_image_build_metadata): Make this public,
16937 protect it against being called multiple times, don't create
16938 resources and don't build the compressed metadata here.
16939 (mono_image_create_pefile): Do this here.
16942 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
16944 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16946 * socket-io.c: fixed bug #36322.
16948 2003-02-06 Piers Haken <piersh@friskit.com>
16952 * debug-mono-symfile.c:
16958 * socket-io.c: warning cleanups
16960 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
16962 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
16963 function. works like remoting invoke, but does a check for the Proxy first.
16965 2003-02-05 Miguel de Icaza <miguel@ximian.com>
16967 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
16969 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
16971 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
16973 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
16974 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
16976 * object.c (mono_store_remote_field_new): used by the new jit
16977 instead of mono_store_remote_field
16978 (mono_load_remote_field_new): used by the new jit
16979 instead of mono_load_remote_field
16981 2003-02-05 Patrik Torstensson
16983 * appdomain.c: changed unload to take the domain id instead
16986 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
16989 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16991 * appdomain.c: don't look for assemblies in ApplicationBase if
16992 PrivateBinPathProbe is set.
16994 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16996 * object.c: make the first argument in main_args contain the absolute
16997 path to the assembly. Fixes bug #37511.
16999 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17001 * icall.c: get correct UTC offset for countries not using daylight
17002 time saving. Fixes bug #30030.
17004 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17006 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
17007 and 1 are the family).
17009 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
17011 * icall.c (ves_icall_InternalExecute): removed wrong assertion
17013 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
17015 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
17017 * reflection.c: added support for SignatureHelper tokens, which is
17018 needed by the Calli opcode.
17020 * reflection.h: track changes to SignatureHelper class.
17022 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
17024 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17026 * appdomain.c: fixed loading assemblies from PrivateBinPath.
17028 2003-02-03 Patrik Torstensson
17029 * appdomain.[c|h], domain.c :
17030 - Added support for getting a domain via domain id
17031 - Support for setting and getting domain from System.AppDomain
17032 (used in cross appdomain channel)
17033 - Added support for get/set for a MonoAppContext on a thread
17034 (Context class in System.Runtime.Remoting.Contexts),
17035 - Removed hack in Get/SetData and ExecuteAssembly.
17037 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
17038 the managed world to get control when a proxy is created.
17040 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
17042 2003-02-03 Miguel de Icaza <miguel@ximian.com>
17045 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
17046 Populate the codebase field as well.
17048 2003-02-02 Martin Baulig <martin@ximian.com>
17050 * debug-mono-symfile.c
17051 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
17052 (mono_debug_symfile_add_method): Allow interncalls.
17054 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17056 * icall.c: throw parse exception if strtod fails or the string is empty.
17058 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
17060 * marshal.c: handle object type separately from defined
17063 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
17065 * marshal.c: handle NATIVE_LPSTR for strings when it's
17066 explicitly specified.
17068 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
17070 * reflection.c, reflection.h, icall.c: setup the reflection
17071 handle cache for ModuleBuilders and AssemblyBuilders.
17073 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
17075 * reflection.c (reflection_methodbuilder_to_mono_method): set
17078 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17080 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
17082 2003-01-29 Dick Porter <dick@ximian.com>
17084 * threads.c: No need for the fake_thread kludge now that Thread
17085 doesn't run a class constructor
17087 2003-01-29 Dick Porter <dick@ximian.com>
17089 * threads.c: Use g_direct_hash instead of the rather bogus
17092 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
17094 * marshal.c (mono_marshal_get_native_wrapper): add check for null
17095 (fix pinvoke12.exe)
17096 (mono_marshal_get_struct_to_ptr): generate valid IL code
17097 (mono_marshal_get_ptr_to_struct): generate valid IL code
17098 (*): correctly set sig->pinvoke, we need to memdup the signature
17101 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17103 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
17104 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
17106 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
17108 * profiler.c: provide more callers information.
17110 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
17112 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
17114 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
17116 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
17118 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
17120 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
17121 exception instead of going into an infinite loop on dates which it
17124 * string-icalls.c (ves_icall_System_String_get_Chars): raise
17125 out-of-range exception if needed.
17127 * class.c (mono_class_setup_vtable): allow a virtual method to provide
17128 an implementation for an interface method and to override an inherited
17129 method at the same time.
17130 Imagine a scenario when a virtual method is used to override a
17131 virtual abstract method in a parent class, and this same method
17132 provides an implementation for an method inherited from an interface.
17133 In this case, the interface resolution code will set im->slot, which
17134 means that the virtual method override pass will skip this method
17135 which means a pointer to the abstract method inherited from the parent
17136 will remain in the vtable of this non-abstract class.
17138 * class.c: (mono_class_setup_vtable): continue search for a real
17139 method if only an abstract method is found.
17141 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
17143 * reflection.c: add size to encoding for ByValStr and ByValArray
17144 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
17146 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
17148 * class.c (mono_class_setup_vtable): pass the override info as an
17151 * class.c (mono_class_setup_vtable): set the slot of overriding methods
17154 * reflection.c (ensure_runtime_vtable); add support for method
17157 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
17159 * reflection.c (resolution_scope_from_image): Hack to work to work with
17160 dynamic assemblies.
17162 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
17163 added a 'force_ref' argument to force this function to allways return
17164 a TypeRef. This is needed by mono_image_get_memberref_token ().
17166 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
17168 * reflection.c (mono_image_get_type_info): interfaces really don't have
17171 * reflection.c (mono_image_basic_init): fill out missing fields of
17174 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
17175 dynamic assemblies. This is required so dynamic assemblies show up in
17176 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
17177 Type::GetType() etc. This is consistent with MS behaviour.
17179 * image.c image.h reflection.c: add newly created classes to the name
17180 cache so mono_class_get () will find them.
17182 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
17184 First part of changes to get IKVM.NET running under mono.
17186 * appdomain.h, appdomain.c: added new function
17187 mono_domain_try_type_resolve() which will emit TypeResolve events.
17188 This function will call AppDomain::DoTypeResolve to do the actual work.
17190 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
17191 moved existing code dealing with dynamic tokens to a new function
17192 called mono_reflection_lookup_dynamic_token (). This function will
17193 raise TypeResolve events when appropriate. Since reflection.c is not
17194 part of libmetadata, a new hook function called
17195 mono_lookup_dynamic_token() is added to class.c which will call this.
17197 * assembly.h assembly.c: make the invoke_load_hook function public,
17198 so it can be called for dynamic assemblies.
17200 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
17202 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
17205 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
17206 MonoGHashTable, since it contains pointers to objects which the GC
17209 * assembly.c (search_loaded): remove unused variable.
17211 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
17213 * object.c: fixed issue exposed by gcc-generated IL programs
17214 that use RVA data for pointers.
17216 2003-01-25 Martin Baulig <martin@ximian.com>
17218 * threads.c (start_wrapper): Moved the initialization of
17219 `start_func' above the mono_new_thread_init() call to which we
17220 pass it as argument.
17222 2003-01-24 Martin Baulig <martin@ximian.com>
17224 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
17225 the MonoThread pointer.
17227 2003-01-21 Miguel de Icaza <miguel@ximian.com>
17229 * icall.c: Rename `PowImpl' to Pow.
17231 2003-01-23 Dick Porter <dick@ximian.com>
17233 * threads.c (start_wrapper): Create a Thread object if needed, so
17234 the Main() thread can do the class initialisation in a subthread
17235 that has been set up to allow managed code execution.
17237 Pass the thread ID instead of the MonoThread pointer to the thread
17238 start and attach callbacks. This change is required, because the
17239 jit thread start callback must be called _before_ the Thread
17240 object can be created.
17242 (mono_thread_init): Removed much object creation code that is no
17243 longer needed. No managed code is called from here now.
17245 * object.c (mono_runtime_exec_managed_code): Create a subthread
17246 for Main, and call back to the runtime to use it.
17247 Set the exit code when Main exits.
17249 * gc.c: Make sure domain finalisation happens in a subthread.
17250 Re-enable threaded GC, fixing bug 31333 (again).
17252 * environment.c: System.Environment internall calls (so far just
17253 ExitCode is here, the others are still in icall.c)
17255 * appdomain.c (mono_runtime_cleanup): All threads running managed
17256 code should have finished before mono_runtime_cleanup() is
17257 reached, so no need to clean up threads.
17259 2003-01-22 Martin Baulig <martin@ximian.com>
17261 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
17262 `gpointer func' arguments.
17263 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
17264 but added `MonoThread *thread' argument.
17265 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
17267 * threads.c (mono_new_thread_init): Added `gpointer func' argument
17268 and pass it to the mono_thread_start_cb callback.
17269 (mono_install_thread_callbacks): New public function to install a
17270 set of callbacks which are set by the debugger.
17271 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
17273 2003-01-22 Martin Baulig <martin@ximian.com>
17275 * Makefile.am: Install debug-mono-symfile.h.
17277 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
17279 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
17281 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
17283 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
17284 * class.c (mono_ptr_class_get): correctly set access levels of pointers
17285 (mono_array_class_get): correctly set access levels of arrays
17287 2003-01-20 Patrik Torstensson
17288 * image.h (MonoAssemblyName): changed major, minor, build, revision
17289 from signed to unsigned.
17291 2003-01-20 sean kasun <skasun@azstarnet.com>
17293 * reflection.c (load_cattr_value): Now this handles
17294 MONO_TYPE_SZARRAY. Fixes bug #35629
17296 2003-01-20 Miguel de Icaza <miguel@ximian.com>
17298 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
17301 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17303 * decimal.c: fixed bug #26056.
17305 2003-01-17 Martin Baulig <martin@ximian.com>
17307 * gc.c: Raise an ExecutionEngineException instead of using g_error().
17309 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17312 (mono_get_exception_type_initialization): new function.
17314 * object.c: throw a TypeInitializationException when an exception is
17315 thrown invoking the class constructor.
17317 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17319 * reflection.c: fixed attribute reading.
17321 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17324 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
17325 provided, look for the type in the calling assembly and then in
17326 mscorlib; if the assembly name is provided, only try that one.
17328 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17330 * object.c: register the vtable before there is a chance it's
17331 queried again recursively.
17333 2003-01-13 Duncan Mak <duncan@ximian.com>
17335 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
17338 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
17340 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
17342 2003-01-11 Martin Baulig <martin@ximian.com>
17344 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
17345 this to 20 for the release.
17347 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
17349 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
17351 * loader.c (mono_method_get_marshal_info): bug fix
17353 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
17354 structures with explicit layout
17356 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17358 * profiler.c: made the output more readable (and sorted).
17359 Added caller information for the allocation profiler.
17361 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
17363 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
17365 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17367 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
17368 to get value types.
17370 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
17372 * object.c, profiler.h, profiler.c, profiler-private.h:
17373 Added object allocation profiler.
17375 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
17377 * reflection.h, reflection.c: handle global methods.
17378 Compress blob entries.
17380 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
17382 * marshal.c: fix compilation.
17384 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
17386 * loader.c (mono_method_get_marshal_info): impl.
17388 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
17390 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17392 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
17393 for reference types.
17395 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
17397 * loader.c: fixed off by one error in loaded parameter names.
17399 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
17401 * marshal.c (mono_marshal_get_icall_wrapper): like
17402 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
17403 instead of a MonoMethod.
17405 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17407 * decimal.c: fixed bug #36537.
17409 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
17411 * marshal.c: throw a missing method exception if a
17412 P/Invoke method is not found.
17414 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17416 * icall.c: allow a null this for constructors.
17418 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17420 * icall.c: raise the proper exceptions if the arguments to the
17421 internal Invoke are incorrect.
17423 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
17425 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
17427 2003-01-03 Martin Baulig <martin@ximian.com>
17429 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
17431 2002-12-31 Martin Baulig <martin@ximian.com>
17433 * debug-mono-symfile.c: Completely rewrote the type section.
17434 Instead of using individual malloc()ed fields, we use one big
17435 continuous memory area and offsets into this area.
17436 See the comments in the source code for details.
17438 2002-12-30 Martin Baulig <martin@ximian.com>
17440 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
17442 2002-12-30 Martin Baulig <martin@ximian.com>
17444 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
17445 line number table in this data blob instead of using an external
17448 2002-12-28 Martin Baulig <martin@ximian.com>
17450 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
17452 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
17454 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
17455 as a boxed return type.
17457 2002-12-21 Miguel de Icaza <miguel@ximian.com>
17460 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
17461 g_build_filename to properly get separators on the filename created.
17463 * object.h: Small change, introduce MonoMarshalByRefObject to
17464 track the layout of that structure in the C# universe as we make
17467 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
17469 * object.c: removed assert to allow static fields on interfaces.
17470 * loader.c: a TypeSpec may be used for any type, not just arrays.
17472 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17474 * class.c, class.h: added mono_class_array_element_size ().
17475 Ignore static methods in interfaces.
17477 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17479 * threads.c: fixed the build under cygwin.
17481 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
17483 * reflection.c: handle nullref constants. Allocate keys for
17484 reflection handles with the GC.
17486 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17488 * threads.c, threads.h: added mono_thread_get_abort_signal()
17489 to get a suitable signal for thread abort.
17491 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17493 * metadata.c: fix handling of ExportedType table.
17495 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17497 * icall.c: added WriteWindowsDebugString internal call.
17499 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17501 * reflection.h: added fields to match C# implementation.
17503 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17505 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
17507 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
17509 * gc.h, gc-internal.h: Rename header for GC internal calls to
17510 gc-internal.h from gc.h as to not clash with Boehm GC having its
17511 header installed as <gc.h> in outside include paths.
17512 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
17513 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
17515 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17517 * icall.c: assign minor, build and revision in FillName.
17519 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
17521 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
17522 Added support for running code generated by Reflection.Emit.
17524 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17526 * appdomain.c: check for NULL argument in LoadFrom.
17528 2002-12-10 Dick Porter <dick@ximian.com>
17530 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
17532 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17534 * appdomain.c: fix buglet when building exe file name. Handle full
17535 assembly name (needed after latest changes to AssemblyName).
17537 (mono_image_close): free some hashtables.
17539 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
17541 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
17542 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
17543 on some systems (redhat 7.3)
17545 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
17547 * threads.c: delete the critical section of a sync block,
17548 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
17550 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
17552 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
17554 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17556 * appdomain.[ch]: handle the assembly preload event to try loading the
17557 assemblies using the paths we have in the current domain.
17559 * assembly.[ch]: created an assembly preload hook that is called to try
17560 loading the assembly by other means that the ones provided here.
17562 * domain.c: initialize the domain search path.
17564 From now on, assemblies (TODO: except corlib and System) are loaded
17565 according to these rules when using mono_assembly_load ():
17567 1. It tries to load the assembly from the ApplicationBase
17568 of the current domain appending .dll and .exe (TODO: have to
17569 try loading from name/name.dll and name/name.exe).
17571 2. It tries the search path specified in PrivateBinPath for the
17572 current domain (if any).
17574 3. Previous behavior.
17576 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
17578 * icall.c: implemented GetInterfaceMap() related icall.
17579 * domain.c, loader.h: load MethodInfo in mono_defaults.
17581 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17583 * gc.c: disable the finalizer thread for now, untill all the issues
17584 with it are resolved.
17586 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17588 * string-icalls.c: handle embedded nulls in string ctor when the
17589 length is specified.
17591 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17593 * class.c: look for explicit interface implementation in parent
17596 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
17598 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
17600 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17602 * gc.c: protect handles with a critical section.
17604 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17607 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
17608 parameters. If no assembly specified, try getting the type from all
17609 the assemblies in the current domain, else, load the assembly and get
17612 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17614 * marshal.c: applied patch from Aleksey Demakov that fixes
17615 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
17617 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17619 * icall.c: fixed get_location.
17621 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
17623 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
17624 declarations to make it work with older gcc.
17626 * loader.c (mono_get_method): set signature->pinvoke for native calls
17628 2002-11-20 Dick Porter <dick@ximian.com>
17630 * threads.c (mono_thread_init): Set the main thread's handle
17632 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17634 * gc.c: allow compilation without GC support. Changed to match the
17637 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17639 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
17641 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
17643 * reflection.c: set a public key token on the core assemblies.
17645 2002-11-18 Dick Porter <dick@ximian.com>
17647 * threads.c: Split out some thread initialisation so that other
17648 files can set the start callback function.
17650 * gc.c: Run finalisers in a separate thread, to avoid stack
17651 overflow. Fixes bug 31333.
17653 * appdomain.c: Set up GC finalisation thread.
17657 * domain.c: Use gc.h macros for GC_malloc
17659 2002-11-15 Dick Porter <dick@ximian.com>
17663 * appdomain.c: Removed mono_runtime_init_with_attach(),
17664 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
17665 merging the extra parameter with the existing function. Removed
17666 unneeded code in mono_thread_attach().
17668 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
17670 * image.c (mono_image_loaded_by_guid): a method to get loaded
17672 (load_metadata_ptrs): we store the guid as string.
17674 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
17676 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
17678 * metadata.c (mono_guid_to_string): imported method form Zoltan
17679 Varga (slightly modified)
17681 * assembly.c (mono_assembly_open): load precompiled code
17683 * loader.h (MonoMethod): we store the method token for use in the
17686 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17688 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
17689 the hook function called when an assembly is loaded.
17691 * domain.c: Modified file.
17692 (mono_domain_assembly_load): removed hash table insertion of assemblies.
17696 2002-11-07 Miguel de Icaza <miguel@ximian.com>
17698 * reflection.c: Map PEFileKind to the value expected by the WinNT
17701 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17703 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
17704 Read until the buffer is filled completely.
17706 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17708 * icall.c: implemented MonoType.InternalGetEvent ().
17710 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17712 * appdomain.c: implemented InitAppDomainSetup. Delayed
17713 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
17714 the entry_assembly.
17716 * assembly.c: base_dir is now an absolute path ending with
17719 * icall.c: modified get_location according to the above changes.
17721 * object.c: init AppDomain.SetupInformation for the default domain after
17722 we have the entry assembly.
17724 * domain.c: when unloading a domain, setup = NULL.
17726 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
17728 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
17730 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
17732 * object.h, object.c: introduced mono_object_get_virtual_method ()
17733 to lookup the method invoked on an object when a callvirt is done on
17735 * icall.c: make MethodInfo::Invoke() always do a virtual call.
17737 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17739 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
17740 current domain when loaded an assembly and failed to load it.
17742 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
17744 2002-10-31 Dick Porter <dick@ximian.com>
17748 * file-io.c: Return the error status in a parameter, as the
17749 GetLastError() value has long since been blown away if we try and
17750 look it up in a subsequent internal call invocation. Delete the
17751 GetLastError() internal call, because it's useless.
17753 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
17755 * class.[ch]: added cast_class to fix bug 29517
17757 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
17759 * marshal.c: create valid IL code in the filter clause:
17760 the new JIT is less forgiving:-)
17762 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17764 * icall.c: removed get_property internal call.
17766 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
17768 * appdomain.h domain.c: Added an ID to appdomains.
17770 * threads.c threads.h icall.c: Implement icall
17771 Thread:GetDomainID(), and remove unused icall
17772 CurrentThreadDomain_internal.
17774 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17776 * icall.c: Don't recurse through the base types in GetConstructor.
17779 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17781 * mempool.h, mempool.c: added mono_mempool_empty() and
17782 mono_mempool_stats().
17784 2002-10-23 Dick Porter <dick@ximian.com>
17788 * icall.c: Added MonoIO.GetFileType internal call
17790 2002-10-17 Dick Porter <dick@ximian.com>
17792 * appdomain.c (mono_runtime_cleanup): Don't signal the async
17793 delegate semaphore before waiting for all threads to finish,
17794 because new threads can also call async delegates. Fixes bug
17797 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
17798 of 3 seconds, in case another async job is queued. (This part is
17799 needed because the bug fix reintroduced the 3s exit lag.) This
17800 makes the mono_runtime_shutdown flag superfluous.
17802 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17804 * reflection.c: include ehader size in method section headers.
17805 Really check for suplicated modules entries.
17807 2002-10-17 Martin Baulig <martin@gnome.org>
17809 * debug-mono-symfile.c: Added back support for locals.
17811 2002-10-14 Martin Baulig <martin@gnome.org>
17813 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
17816 2002-10-14 Martin Baulig <martin@gnome.org>
17818 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
17819 mono_class_get() instead of looking in the class cache.
17821 2002-10-13 Martin Baulig <martin@gnome.org>
17823 * debug-mono-symfile.c: Set version number to 28, include the
17824 signature in method names.
17826 2002-10-13 Martin Baulig <martin@gnome.org>
17828 * debug-mono-symfile.h: Set version number to 27.
17830 2002-10-11 Martin Baulig <martin@gnome.org>
17832 * gc.c: Don't register/unregister NULL pointers as disappearing links.
17834 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17836 * metadata.c, metadata.h: added helper function to allocate signatures.
17838 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17840 * icall.c: added internal call to get the location of machine.config.
17842 2002-10-08 Martin Baulig <martin@gnome.org>
17844 * debug-mono-symfile.c: Ignore classes with a pending init for the
17847 2002-10-03 Dick Porter <dick@ximian.com>
17849 * threads.c: Freebsd pthread_t is a pointer
17851 2002-10-03 Dick Porter <dick@ximian.com>
17853 * socket-io.c: Implemented GetHostName_internal
17855 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17858 (mono_config_parse_file): don't leak the text.
17860 2002-10-02 Martin Baulig <martin@gnome.org>
17862 * debug-mono-symfile.c: Added support for methods.
17864 2002-10-01 Martin Baulig <martin@gnome.org>
17866 * debug-mono-symfile.c: Don't emit methods and line numbers for
17867 the dynamic symbol file, just write the type table. We can easily
17868 have an external helper program which creates a symbol file for an
17871 2002-10-01 Dick Porter <dick@ximian.com>
17873 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
17874 Only add the handle to the cleanup array when we're about to
17875 launch the thread. Bug 31425 deadlocked when the test was run on
17878 2002-10-01 Martin Baulig <martin@gnome.org>
17880 * debug-mono-symfile.c: Added support for properties.
17882 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17884 * reflection.c: unaligned store fix from Mark Crichton
17885 <crichton@gimp.org>.
17887 2002-09-27 Martin Baulig <martin@gnome.org>
17889 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
17892 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17894 * assembly.h, assembly.c: use a sane API to hook into the assembly
17895 loading process instead of a useless special-purpouse hack
17896 (ngen needs a hook, too, for example).
17898 2002-09-27 Dick Porter <dick@ximian.com>
17900 * threads.c (mono_thread_init): Call GetCurrentProcess() so
17901 io-layer can set up some process handle info. Not needed on w32,
17902 but doesn't hurt either.
17904 * process.c: Pass the program name in the second parameter to
17905 CreateProcess, so the path is searched. Include the working
17906 directory. Implemented process name, process enumeration, and some
17907 process detail internal calls.
17909 * icall.c: Added internal calls for process lookup, and some
17912 2002-09-26 Martin Baulig <martin@gnome.org>
17914 * assembly.c (mono_install_open_assembly_hook): New global
17915 function to install a function to be invoked each time a new
17916 assembly is loaded.
17917 (mono_assembly_open): Run this callback function if set.
17919 * debug-mono-symfile.c: Put back line numbers for the dynamic
17920 symbol file and also record the .il file as source file. This
17921 allows us to install the temporary symbol file as `file.dbg' just
17922 like a compiler-generated one.
17924 2002-09-26 Nick Zigarovich <nick@chemlab.org>
17926 * Corrected typo in gc.c (BOHEM vs BOEHM).
17928 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17930 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
17931 GetProperties. Also avoid calling g_slist_length in GetProperties and
17934 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17936 * reflection.c: avoid unaligned stores (bug spotted by
17937 Mark Crichton <crichton@gimp.org>).
17939 2002-09-25 Martin Baulig <martin@gnome.org>
17941 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
17942 instead of guint64 for addresses and added prologue/epilogue info.
17944 2002-09-25 Martin Baulig <martin@gnome.org>
17946 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
17947 store line number info. For the dynamic symbol file, we only need
17948 to provide the JIT generated dynamic line number info for the dynamic
17951 2002-09-25 Martin Baulig <martin@gnome.org>
17953 * debug-mono-symfile.h: Incremented version number.
17955 2002-09-24 Martin Baulig <martin@gnome.org>
17957 * class.c (mono_debugger_class_init_func): New global function
17959 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
17962 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
17963 function. This is called via the mono_debugger_class_init_func
17964 hook to add all types to the dynamic type table.
17965 (ves_icall_MonoDebugger_GetType): New interncall to get a class
17966 from its metadata token.
17968 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
17969 New interncall for the debugger.
17971 2002-09-24 Nick Drochak <ndrochak@gol.com>
17973 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
17974 before using it in case it is null.
17976 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17978 * metadata.c: allow custom modifiers in local var signatures
17979 (bug spotted by Zoltan Varga).
17981 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17983 * class.c: deal with the <Module> class that may have a NULL vtable.
17984 Eliminate warnings.
17986 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17988 * image.c, image.h: more strong name helpers.
17989 * monosn.c: more work: convert pem keys to cryptoapi format.
17991 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17993 * string-icalls.c: speedup IndexOf.
17995 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17997 * icall.c: updates from Zoltan.2.Varga@nokia.com.
17999 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18001 * icall.c: cleanup: use mono_object_domain ().
18003 2002-09-23 Martin Baulig <martin@gnome.org>
18005 * debug-mono-symfile.c: Improved type support.
18007 2002-09-22 Martin Baulig <martin@gnome.org>
18009 * debug-mono-symfile.c: Added support for reference types and strings.
18011 2002-09-22 Martin Baulig <martin@gnome.org>
18013 * debug-mono-symfile.c: Started to work on the type table.
18015 2002-09-21 Martin Baulig <martin@gnome.org>
18017 * debug-mono-symfile.c: Largely reworked the symbol table format.
18018 The symbol table is now incrementally updated each time a new
18019 method is added. We're now also using our own magic and version
18020 so that you don't need to recompile all your classes if the
18021 dynamic table changes.
18022 (mono_debug_update_mono_symbol_file): Removed.
18023 (mono_debug_symfile_add_method): New function to add a method.
18025 2002-09-21 Martin Baulig <martin@gnome.org>
18028 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
18031 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
18032 New interncall to get a method from its metadata token.
18034 2002-09-21 Martin Baulig <martin@gnome.org>
18036 * debug-mono-symfile.c: Create type table.
18038 2002-09-20 Martin Baulig <martin@gnome.org>
18040 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
18042 2002-09-20 Martin Baulig <martin@gnome.org>
18044 * debug-mono-symfile.c: Provide information about params and locals.
18046 2002-09-20 Martin Baulig <martin@gnome.org>
18048 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
18051 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
18052 interncall to get a method from its metadata token.
18054 2002-09-20 Martin Baulig <martin@gnome.org>
18056 * debug-mono-symfile.c: Added a few checks for method->header
18057 being non-NULL. This should never happen, but for the moment
18058 let's use a g_warning() rather than a g_assert().
18060 2002-09-19 Mark Crichton <crichton@gimp.org>
18062 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
18063 even if support for it isn't present. Added an #ifdef to fix this.
18065 * socket-io.c: Added checks back for Solaris support.
18067 2002-09-19 Martin Baulig <martin@gnome.org>
18069 * debug-mono-symfile.c (read_string, write_string): Reflect latest
18070 changes in the symbol file format.
18072 2002-09-18 Martin Baulig <martin@gnome.org>
18074 * debug-mono-symfile.c: Set version number to 21.
18076 2002-09-18 Dick Porter <dick@ximian.com>
18078 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
18079 on netbsd. Fixes bug 30051.
18081 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18084 (set_version_from_string): little fix.
18086 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
18088 * monosn.c, Makefile.am: added strong name utility.
18089 * reflection.h, reflection.c: implemented delayed signing,
18090 locale, version and hash id assembly attributes.
18092 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18094 * loader.c, metadata.c: load param attributes in signatures.
18096 2002-09-16 Martin Baulig <martin@gnome.org>
18098 * debug-mono-symfile.c: Added string table with all method names.
18100 2002-09-14 Martin Baulig <martin@gnome.org>
18102 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
18103 fast method lookup.
18105 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
18107 * reflection.c: record the public key token of referenced assemblies.
18109 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18111 * image.c, image.h: added functions to get the strong name and the
18112 public key of an assembly.
18113 * pedump.c: use them.
18115 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
18117 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
18119 2002-09-12 Miguel de Icaza <miguel@ximian.com>
18121 * marshal.c (mono_marshal_get_managed_wrapper): Added
18124 2002-09-11 Martin Baulig <martin@gnome.org>
18126 * gc.c: Call GC_unregister_disappearing_link() on all links when
18127 finalizing them, this is necessary to aviod a crash in boehm's
18130 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18132 * gc.c: handle GetTarget for finalized objects spotted and fixed by
18135 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
18137 * icall.c: implemented MonoType::Module.
18138 * reflection.c, reflection.h: mono_module_get_object () from
18139 Tomi Pakarinen <tomi.pakarinen@welho.com>.
18141 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
18143 * icall.c: ignore overridden methods in GetMethods ().
18144 Fix for FieldInfo::SetValue().
18145 * object.c: handle float/double in runtime invoke.
18147 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18149 * object.c: allow a constructor to be called again on an object.
18151 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
18153 * class.h, class.c: move field layout code to it's own function and
18154 export it. Get an interface id earlier. Move fields in MonoClass
18155 so they are more cache friendly and align the bitfields.
18156 * loader.c: temporary handle get_param_names() for a runtime method.
18157 * reflection.c, reflection.h: more code to handle runtime creation of
18160 2002-09-09 Martin Baulig <martin@gnome.org>
18162 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
18163 signature with the pinvoke field being set for the actual call.
18165 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18167 * icall.c: removed some unused icalls. Start of map of glib charsets
18168 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
18170 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
18172 * debug-helpers.c: break infinite loop (found and fixed by
18173 Holger Arnold <harnold@gmx.de>).
18175 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
18177 * icall.c: target may be null in create_delegate.
18179 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
18181 * marshal.c: handle a boolean return type.
18183 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
18185 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
18187 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18189 * gc.c: fix weakreferences.
18191 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
18193 * icall.c: added icall to get default codepage.
18195 2002-09-03 Dick Porter <dick@ximian.com>
18198 * threads.c: Use MonoThread instead of MonoObject where
18201 Store running thread objects in a hash table, so that we have all
18202 the info to hand when waiting for them to finish
18203 (means we don't need OpenThread() any more, so mingw builds should
18204 be fully functional again.)
18207 * object.h: Added thread ID to MonoThread
18209 2002-09-03 Martin Baulig <martin@gnome.org>
18211 * icall.c (System.Reflection.Assembly::get_location): New interncall.
18213 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18215 * icall.c: fixed leak in get_temp_path. Thanks lupus.
18217 2002-09-03 Martin Baulig <martin@gnome.org>
18219 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
18220 argument to store the end address of the disassembled instruction.
18222 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
18223 here from debug-symfile.h.
18224 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
18225 JIT into this struct.
18226 (MonoSymbolFile): Added `char *image_file' field.
18227 (MonoDebugGetMethodFunc): Removed.
18228 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
18229 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
18230 (mono_debug_find_method): New method.
18232 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
18233 create a full symbol file.
18234 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
18235 and static symbol files.
18236 (mono_debug_find_method): The symbol file keeps an internal method hash,
18237 call this to get a MonoDebugMethodInfo from a MonoMethod.
18239 * debug-symfile.[ch]: Removed.
18241 2002-08-29 Miguel de Icaza <miguel@ximian.com>
18243 * image.c (do_mono_image_open): Remove linker version check.
18245 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
18247 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
18248 wrappers for instance methods.
18250 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18252 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
18254 2002-08-28 Dick Porter <dick@ximian.com>
18256 * Makefile.am: Export HOST_CC for w32 builds
18258 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
18260 * file-io.c process.c: MonoString are null terminated, no
18261 need for mono_string_to_utf16() anymore.
18263 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18265 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
18267 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
18269 * icall.c, reflection.h: speedup System.MonoType.
18271 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
18273 * reflection.c: allow null as the value of a string argument in
18274 custom attributes constructors.
18276 2002-08-27 Martin Baulig <martin@gnome.org>
18278 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
18279 `trampoline_address' field.
18281 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
18283 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
18284 check (fixes bug #29486)
18286 2002-08-27 Martin Baulig <martin@gnome.org>
18288 * debug-mono-symfile.c: Changed the file format in a way that allows us
18289 open it read-only and to use a specially malloced area for all the
18290 dynamic data. We can now also generate a symbol file on-the-fly if we're
18291 debugging IL code and there is no MCS generated symbol file for it.
18293 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18295 * object.c: added a define for a good string and array
18296 creation speedup (not enabled by default because we need to deal with
18299 2002-08-26 Martin Baulig <martin@gnome.org>
18301 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
18302 function to create a dynamic symbol file. This is used by the
18303 debugger to create a symbol file for IL code on-the-fly.
18305 2002-08-26 Martin Baulig <martin@gnome.org>
18307 * loader.c (mono_lookup_pinvoke_call): Include the error message
18308 from g_module_error() in the error message.
18310 2002-08-24 Martin Baulig <martin@gnome.org>
18312 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
18313 function to update the symbol file. The symbol file is mmap()ed
18314 writable, but private. This allows us to install the symbol file
18315 together with the assembly.
18317 2002-08-24 Martin Baulig <martin@gnome.org>
18319 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
18320 but they can read the new symbol file format which mcs is now creating.
18322 * debug-symfile.c (mono_debug_find_source_location): Moved to
18323 debug-mono-symfile.c; this is now operating on the new symbol file.
18325 2002-08-23 Martin Baulig <martin@gnome.org>
18327 * debug-helpers.c (mono_method_desc_from_method): New function to get
18328 a MonoMethodDesc from a MonoMethod.
18330 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18332 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
18333 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
18335 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
18337 * string-icalls.[ch]: make helper methods static.
18339 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18341 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
18342 types to it and to SetValueInternal.
18344 * object.c: Moved handle_enum label to its proper place. This was the
18347 This time i compiled mcs and gtk-sharp and they both work.
18349 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18351 * icall.c: reverted partially my previous patch until
18352 object.c:set_value handles enums correcly.
18354 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18357 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
18358 (ves_icall_System_Environment_get_MachineName): removed warning when
18359 compiling under cygwin.
18361 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18363 * object.c: fixed field_get_value() for reference types.
18365 2002-08-22 Dick Porter <dick@ximian.com>
18367 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
18368 Don't free a buffer while it's still needed. Patch from Jonathan
18369 Liger <Jonathan.liger@wanadoo.fr>
18371 2002-08-21 Miguel de Icaza <miguel@ximian.com>
18373 * icall.c (ves_icall_System_Environment_get_Platform): Add new
18376 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
18378 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
18379 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
18381 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
18382 we call unmanaged code which throws exceptions.
18384 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18386 * appdomain.h: added per-domain entry_assembly.
18387 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
18389 * icall.c: Assembly::GetEntryAssembly icall.
18390 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
18391 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
18393 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18395 * appdomain.h, gc.c: added mono_domain_finalize ().
18397 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18400 (mono_print_unhandled_exception): changed g_warning by g_printerr
18401 because g_log has a 1024 characters limit (yeah, i got a big stack
18402 trace). Don't print exception name, that should be in ToString
18405 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18407 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
18408 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
18410 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18413 (mono_print_unhandled_exception): after previous commit, i realized
18414 that MS calls ToString on the exception. I changed this function to
18415 do that. This way we get stack_trace for free.
18417 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18420 (mono_print_unhandled_exception): invoke Message property instead of
18421 getting 'message' field from Exception. Don't allocate memory for
18422 'trace' and 'message' if not needed.
18424 2002-08-18 Dick Porter <dick@ximian.com>
18426 * unicode.c: Fix asserts to match Encoder.cs checks
18428 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18430 * marshal.c: fix unaligned store issue and a few wrong
18431 opcode argument types.
18433 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18435 * icall.c: added GetUninitializedObjectInternal internal call.
18437 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
18439 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
18440 to the right domain.
18442 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
18444 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
18446 * class.c (class_compute_field_layout): set blittable to false for Strings
18448 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
18450 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18452 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
18453 first chunk of code to create types at runtime. Code to
18454 handle ReflectedType/DeclaringType. Make reflection handles
18457 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
18459 * class.c: set correct name in arrays.
18461 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
18463 * appdomain.c (mono_domain_transfer_object): make it work with
18464 valuetypes. bug fixes.
18466 2002-08-12 Dick Porter <dick@ximian.com>
18468 * object.h: Rename some parameters to avoid c++ keywords (Patch
18469 from Joseph Wenninger <kde@jowenn.at>)
18471 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
18473 * icall.c: added icall to implement Assembly.GetFile*.
18475 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18477 * reflection.h, reflection.c: code to embed managed resources.
18479 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
18481 * class.c: move all the type size stuff into
18482 class_compute_field_layout().
18484 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18486 * class.c: ensure enums have always the correct instance size.
18487 * unicode.c: remove wrong assert.
18489 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18491 * assembly.c: fix mem corruption issue.
18492 * image.h, image.c: added mono_image_get_resource () to access
18494 * icall.c: implemented Assembly.EntryPoint property and some
18495 Managed Resources related internalcalls.
18498 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
18500 * image.c, image.h: impemented mono_image_get_entry_point ().
18501 * appdomain.c: use mono_image_get_entry_point.
18503 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18505 * reflection.c: support the object type argument when loading
18508 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
18510 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
18511 String as return type.
18513 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
18515 * reflection.c: fix encoding of named args for custom attrs to match
18516 the ms implementation. Read them back when instantiating custom
18519 2002-08-02 Radek Doulik <rodo@ximian.com>
18521 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
18522 by Dietmar as quick fix
18523 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
18524 16 as stack size, used on more places as quick fix before Dietmar
18525 will fix it properly
18527 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18529 * object.h, object.c: added accessors for fields and properties.
18531 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18533 * class.c, class.h: made mono_class_get_field_from_name ()
18534 loop on parent types.
18535 Added mono_class_get_property_from_name ().
18537 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18539 * class.c, class.h: move the code to setup the type vtable in its own
18540 function so that it can be reused also for types created at runtime.
18541 Eliminate the "class" identifier from the header file.
18542 * reflection.c: setup the vtable for enums so that we can create
18543 objects for use in SetConstant ().
18545 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
18547 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
18548 instead of the delegate itself as this pointer (bug #28383)
18550 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
18552 * marshal.c (mono_marshal_get_managed_wrapper): added return type
18555 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18557 * loader.c: don't set the pinvoke bit on icalls.
18559 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
18561 * debug-helpers.c (mono_method_full_name): only print a number to
18562 indicate wrapper type (so that the output is more readable in traces).
18564 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
18566 * class.c (mono_class_init): include method override patch from Paolo
18568 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
18570 * icall.c: fixed GetTypeCode().
18572 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
18574 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
18575 use real delegate invoke function to make it work with multicast
18576 delegates (fix bug# 28291).
18578 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18580 * object.c: load constant strings.
18582 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18584 * reflection.c: no magic numbers.
18585 * tabledefs.h: security action enum.
18587 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18589 * assembly.c: fix possible memory corruption.
18591 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
18593 * reflection.h, reflection.c: added support for linking resources.
18594 * verify.c: check we have an updated corlib.
18596 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
18598 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
18600 (mono_marshal_string_array): null terminate unmanaged string arrays.
18601 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
18603 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18605 * icall.c: Type.GetType () can now return also types from the
18608 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
18610 * loader.h, loader.c: stack walking support.
18611 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
18612 GetCallingAssembly.
18614 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
18616 * marshal.c: added optimisations for blittable types
18618 * class.c (mono_array_class_get): do not set blittable attribute on arrays
18619 (mono_class_setup_mono_type): set blittable attribute for single
18622 * marshal.c (mono_string_utf8_to_builder): impl.
18623 (mono_string_builder_to_utf8): impl.
18624 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
18626 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
18628 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
18629 (mono_marshal_get_managed_wrapper): impl. byref types
18631 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18634 (search_method): don't display debug message.
18636 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
18638 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
18640 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
18642 * appdomain.c: set the missing filename when throwing exception.
18644 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
18646 * metadata.c (mono_type_size): code cleanup
18647 (mono_type_stack_size): removed some test code
18649 2002-07-21 Miguel de Icaza <miguel@ximian.com>
18651 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
18652 mono_get_exception_file_not_found now.
18654 * exception.c (mono_exception_from_name_two_strings): New version
18655 that will call a constructor with two string arguments.
18656 (mono_get_exception_file_not_found): New helper routine, used to
18657 report file-not-found errors.
18659 2002-07-20 Dick Porter <dick@ximian.com>
18662 * process.c: Pass file handles to CreateProcess
18666 * file-io.c: Implemented CreatePipe
18668 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
18670 * metadata.c (mono_get_param_info): set alignment for value types
18672 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18674 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
18675 Constify mono_domain_assembly_open().
18676 * loader.c: handle null namespace in icalls.
18678 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
18680 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
18681 (emit_str_to_ptr_conv): marshal object as structs
18683 * metadata.c (mono_type_to_unmanaged): marshal object as structs
18685 * marshal.c (mono_marshal_get_runtime_invoke): support value types
18687 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
18689 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
18690 (mono_marshal_get_native_wrapper): we an now return value types
18692 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18694 * verify.c: more checks implemented.
18696 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
18698 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
18700 (mono_marshal_get_native_wrapper): allow byref arguments
18701 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
18702 impl. PtrToStringXXX methods
18703 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
18704 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
18705 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
18706 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
18707 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
18709 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18711 * reflection.c: fix buglet in parsing an assembly name.
18713 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
18715 * marshal.c (emit_ptr_to_str_conv): first impl.
18717 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18719 * object.c, class.h: cache the vtable in the class as suggested by
18720 vargaz@freemail.hu (Zoltan Varga).
18722 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18724 * class.h, loader.c: added mono_field_from_token().
18725 * verify.c: first cut of type checking code.
18727 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
18729 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
18731 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
18733 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
18735 (mono_marshal_get_remoting_invoke): impl.
18736 (mono_delegate_begin_invoke): impl.
18737 (mono_mb_emit_save_args): impl.
18738 (mono_delegate_end_invoke): impl.
18739 (mono_marshal_get_delegate_begin_invoke):
18740 (mono_marshal_get_delegate_end_invoke):
18741 (mono_marshal_get_delegate_invoke): generate a special name for
18742 those methods (including the signature) and associate them whith
18743 the delegate class.
18745 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
18748 (mono_reflection_type_from_name): now it has a MonoImage parameter
18749 which is used as the default image to search the type in. If the image
18750 is NULL or getting the type from it fails, it defaults to corlib.
18752 * icall.c: changed 1 call to mono_reflection_type_from_name to match
18755 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18757 * reflection.c: update the parameter table index.
18759 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18761 * domain.c: don't include the mark byte in the string hash.
18763 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18765 * icall.cs: icall for Type.GetTypeCode ().
18766 * verify: a couple of fixes and disabled local initialization checks.
18768 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
18770 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
18772 * debug-helpers.c (mono_method_full_name): print the type of the
18775 * metadata.c (mono_signature_hash): a hash function for signatures
18776 (mono_signature_hash): better hash algorithm
18778 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
18780 * debug-helpers.c (mono_method_full_name): this can now generate
18781 method names with signatures
18783 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
18784 method dont have this pointers.
18786 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18788 * reflection.c: fixup typebuilder tokens.
18789 * image.c: fix buglet.
18790 * marshal.h: remove whitespace.
18791 * metadata.h, metadata.c: reinstate code that was removed.
18792 * verify.c: handle catch directives and fix another couple of bugs.
18794 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
18796 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
18797 (mono_marshal_get_native_wrapper): make it comp. with the old code
18798 (mono_marshal_get_native_wrapper): support boolean
18799 (mono_marshal_get_managed_wrapper): support more types
18801 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
18803 * class.c (class_compute_field_layout): compute class->blittable attribute.
18805 2002-07-09 Dick Porter <dick@ximian.com>
18807 * threads.c: Make the thread cleaning up cope with threads that
18810 2002-07-08 Radek Doulik <rodo@ximian.com>
18812 * reflection.c (method_encode_code): use non-translated values to
18813 compute finally_start, this fixes exception handling on ppc, yay!
18815 * decimal.h (struct signscale): fix endianess
18817 2002-07-07 Radek Doulik <rodo@ximian.com>
18819 * reflection.c: swap box_val and not val
18821 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
18823 * reflection.c, reflection.h: handle full assembly info in type name.
18824 Handle Type arguments when loading custom attributes.
18825 * icall.c: updated to use new mono_reflection_type_from_name () method.
18827 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18830 (method_from_memberref): also print assembly name when method not found.
18832 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18835 (ves_icall_TypeGetProperties): fixed bug #27473.
18837 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18839 * reflection.c: display image name and token when cannot find the
18840 .ctor for an attribute.
18842 2002-07-05 Martin Baulig <martin@gnome.org>
18844 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
18846 2002-07-04 Dick Porter <dick@ximian.com>
18848 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
18849 compile on mingw. This will cause mingw builds to not wait for
18850 subthreads to terminate after the main thread does. I've lodged a
18851 bug with the mingw developers for them to wrap OpenThread().
18853 2002-07-03 Dick Porter <dick@ximian.com>
18855 * threads.c: Store thread IDs instead of handles, because
18856 GetCurrentThread() returns a pseudohandle and therefore stores
18857 useless values. mono_thread_cleanup() continues checking the
18858 array of threads until it is empty, to cope with subthreads
18859 spawning new threads after the main thread has finished.
18863 * profiler-private.h: Pass the thread ID to thread profiler
18864 functions, instead of a handle
18866 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18868 * verify.c: fixes to make it more usable.
18869 * pedump.c: added --verify code to verify IL code in an assembly.
18871 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18873 * reflection.c: turn errors into warnings to allow compiling corlib.
18875 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
18877 * reflection.c: add special cases to compile corlib.
18879 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18881 * reflection.c: handle properties with only a set method.
18883 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18885 * opcodes.h: add enum with opcodes in opval order.
18887 2002-07-01 Dick Porter <dick@ximian.com>
18890 * object.c (mono_runtime_run_main): Removed unneeded argument
18892 2002-06-28 Martin Baulig <martin@gnome.org>
18894 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
18896 2002-06-27 Dick Porter <dick@ximian.com>
18898 * threads.c: Store the handle in both the parent thread and in the
18899 subthread, to minimise the time between starting a new thread and
18902 2002-06-26 Dick Porter <dick@ximian.com>
18904 * appdomain.c (mono_runtime_cleanup): Close the socket library
18905 after all the threads have finished, not before
18907 2002-06-26 Martin Baulig <martin@gnome.org>
18909 * debug-symfile.c (mono_debug_find_source_location): Added
18910 `guint32 *line_number' argument. If it's not NULL, store the line number
18911 there and return the file name without the line number.
18913 2002-06-25 Dick Porter <dick@ximian.com>
18917 * process.c: Process forking and other support functions
18919 2002-06-25 Dick Porter <dick@ximian.com>
18921 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
18922 things dont happen when the image is closed.
18923 (mono_image_lookup_resource): Walk the resource section looking
18924 for a particular entry
18926 * cil-coff.h: PE resource section decoding
18928 2002-06-25 Dick Porter <dick@ximian.com>
18932 (mono_assembly_foreach): Accessor functions to walk the list of
18934 (mono_assembly_set_main):
18935 (mono_assembly_get_main): Process methods need to know which
18936 assembly is the "main" one
18938 * object.c (mono_runtime_run_main): Record the main assembly
18940 * debug-helpers.c: Fix typo
18942 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
18944 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
18945 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
18947 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18949 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
18951 2002-06-21 Miguel de Icaza <miguel@ximian.com>
18953 * image.c (do_mono_image_open): Initialize reference count,
18954 otherwise we leak the MonoImage.
18956 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18958 * reflection.c: small tweak to handle self-hosting.
18960 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
18962 * reflection.c: fix type name parse code.
18964 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18966 * reflection.c: break out of the loop.
18967 * image.c: special case corlib.
18969 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18971 * reflection.c: add all the custom attrs at the end to ensure the
18972 ctors have been properly initialized when the attributes are defined
18973 in the current assembly.
18975 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18977 * reflection.c: handle correctly multiple-nested types.
18979 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
18981 * row-indexes.h: fix typos.
18982 * reflection.c: adjust for typos and fix method_def_or_ref
18983 encoding in MethodImpl table.
18985 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18987 * reflection.c: fix entry point patching (thanks Serge!).
18989 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
18991 * verify.c: add check for System.Exception
18993 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18995 * image.c, class.c: minifix for code just c&p'ed.
18996 * reflection.c: warning fix.
18997 * object.h, loader.h, domain.c: load also StringBuilder.
18999 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
19001 * marshal.h, marshal.c: some support code to handle complex marshaling.
19003 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19005 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
19006 Better signatures with vtable error dump.
19008 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
19010 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
19012 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
19014 * icall.c (ves_icall_Type_GetField): impl.
19016 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19018 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
19019 to retrieve a marshal description blob for a field or param.
19021 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
19023 * reflection.h, reflection.c: change order of nested type emission
19024 to avoid table corruption. The NestedTypes table is sorted.
19025 * icall.c: change order of GetConstructor results to workaround mcs bug.
19027 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19029 * reflection.h, reflection.c: handle field and param marshal
19032 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19034 * icall.c, marshal.c marshal.h: more Marshal class implementation.
19036 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19038 * reflection.c: fix call convention.
19040 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19042 * reflection.h, reflection.c: mono_image_get_memberref_token()
19043 takes a type instead of a class, now. Added
19044 mono_image_get_array_token() to create tokens for the special
19045 multi-dim array methods.
19047 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19049 * assembly.c: handle modules (no assembly table). Split
19050 loading references in its own function.
19051 * class.c: handle moduleref resolution scope.
19052 * image.c, image.h: cache module name in image.
19054 2002-06-07 Martin Baulig <martin@gnome.org>
19056 * reflection.c (mono_image_get_type_info): Only add a class layout entry
19057 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
19059 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
19061 * icall.c: more signature fixes that used uint instead of int.
19063 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19065 * reflection.c: fixed signature of field refs.
19067 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19069 * class.c, reflection.c: handle typerefs of nested types
19070 (both on read and when writing files).
19072 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
19074 * icall.c: fix method signatures that tried to workaround the previous
19077 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
19079 * debug-helpers.c: fix typo.
19081 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
19083 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
19084 rewrote the PE/COFF writing code (our programs are understood by the
19087 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
19089 * gc.c, gc.h, icall.c: weakreference support.
19091 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19093 * Makefile.am, mono-config.c: use $(sysconfdir).
19095 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
19097 * icall.c: changed default precision of Double.ToString() to 15.
19098 Fixed memory leak. Unified with Single.ToString.
19100 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
19102 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
19104 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
19106 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
19107 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
19108 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
19111 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19113 * debug-symfile.c, sysmath.c: yet more compilation fixes.
19115 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19117 * reflection.c, socket-io.c: more compilation fixes.
19119 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19121 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
19122 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
19123 unicode.c: warning and compiler compatibility fixes.
19125 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19127 * class.h, metadata.c: fixed warnings/compilation errors.
19129 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
19131 * Makefile.am, mono-config.c, mono-config.h: configuration file
19133 * loader.c, loader.h: make Dll mapping configurable at runtime in the
19134 config file. Export methods to insert and lookup mappings.
19136 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
19138 * reflection.c: handle types and boxed objects in custom attr
19141 2002-05-30 Martin Baulig <martin@gnome.org>
19144 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
19146 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
19148 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
19149 to lookup the implmap row for a P/Invoke method.
19150 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
19151 P/Invoke method from the runtime on an as needed basis.
19153 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
19155 * metadata.c (mono_metadata_parse_signature): impl.
19157 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19159 * class.c: handle .pack directive.
19161 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
19163 * object.c: initialize static fields with RVA data.
19165 2002-05-25 Martin Baulig <martin@gnome.org>
19168 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
19170 2002-05-24 Martin Baulig <martin@gnome.org>
19173 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
19174 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
19175 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
19177 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
19179 * object.c: special case string ctros in invoke.
19180 * gc.c: silly whitespace changes.
19182 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
19184 * threadpool.[ch]: impl. a threadpool that can
19185 be used by mint and mono.
19187 2002-05-22 Martin Baulig <martin@gnome.org>
19189 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
19190 The first argument is now a `MonoReflectionModuleBuilder *', the return
19191 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
19192 `methods' field to get the method builder. The `token' argument is the
19195 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
19196 invalid characters instead of g_assert_not_reached()ing. This seems
19197 to be the behaviour of mscorlib.
19199 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
19201 * object.c (mono_runtime_invoke_array): applied patch from Rachel
19202 Hestilow to fix bug #25104
19204 2002-05-21 Martin Baulig <martin@gnome.org>
19206 * debug-symfile.c (mono_debug_find_source_location): New function.
19207 Looks up an IL offset in the line number table and returns the source
19208 location as a string.
19210 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19213 (mono_double_ToStringImpl): changed %f by %g until we have something
19216 2002-05-21 Nick Drochak <ndrochak@gol.com>
19218 * icall.c : Use different name for Math.Pow's icall. Needed to check
19219 parameters first in C#.
19221 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19223 * icall.c, reflection.h: added icall to get info about an event.
19225 2002-05-20 Radek Doulik <rodo@ximian.com>
19227 * object.c (mono_value_box): don't use memcpy for boxing on BIG
19229 (mono_value_box): don't use memcpy for small sizes on
19230 architectures with unaligned access
19232 2002-05-20 Martin Baulig <martin@gnome.org>
19234 * reflection.c (mono_reflection_setup_internal_class): Don't crash
19235 if `tb->parent == NULL'.
19236 (mono_reflection_create_internal_class): New function. This is
19237 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
19240 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
19243 2002-05-19 Martin Baulig <martin@gnome.org>
19245 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
19246 argument to get the length, don't default to the array length.
19248 2002-05-18 Miguel de Icaza <miguel@ximian.com>
19250 * assembly.c (mono_assembly_setrootdir): New function used to
19251 override the MONO_ASSEMBLIES directory.
19253 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19255 * icall.c: ValueType_GetHashCode() initialize local var.
19257 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19259 * reflection.c: sort custom attributes table.
19261 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19263 * reflection.c: support named args in custom attributes (write support).
19265 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
19267 * reflection.c: fix finally position calculation.
19269 2002-05-15 Radek Doulik <rodo@ximian.com>
19271 * reflection.c: fixed endianess at many places
19273 * icall.c (ves_icall_InitializeArray): comment out debug msg
19275 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
19277 * object.c (mono_unhandled_exception): new function to handle
19278 unhandled exceptions.
19279 (mono_unhandled_exception): call the UnhandledException event.
19280 (mono_runtime_delegate_invoke): impl.
19282 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
19284 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
19285 returns the RVA, not the direct pointer to the data. Handle the case
19286 when the class size is fixed.
19288 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
19290 * reflection.c: fix some endianess issues.
19292 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
19294 * object.c (mono_runtime_invoke): is now able to catch exceptions.
19296 * threads.c (mono_thread_init): added a callback which is invoked
19299 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
19301 * icall.c: make GetHashCode return non-negative values.
19303 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
19305 * object.c, icall.c, gc.c: revert to address-based hashcode.
19307 2002-05-13 Miguel de Icaza <miguel@ximian.com>
19309 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
19311 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19313 * icall.c, class.c: special case <Module>.
19315 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
19317 * icall.c: fix bug in GetNow().
19319 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
19321 * object.c (mono_runtime_class_init): make sure that we call all
19322 static class constructors.
19324 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19326 * reflection.c: sort methodsemantics table.
19328 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19330 * reflection.h, reflection.c: honour init locals setting.
19332 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
19334 * icall.c: copied Double ToStringImpl for Single ToStringImpl
19336 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19338 * reflection.c: support ContructorBuilders in attribute blob creation.
19340 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19342 * reflection.c: some changes to build a binary that can be run
19343 directly in windows.
19345 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
19347 * loader.c: print a big message when an icall can't be found.
19349 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19351 * string-icalls.c: fix bug 24248.
19353 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
19355 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
19356 icall.c, reflection.h: separate assembly loading by pathname and by
19357 assembly name. Use the MONO_PATH env var to search for assemblies.
19359 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19361 * assembly.c, image.h: add some support for assemblies
19362 with multiple modules.
19363 * class.c, class.h: export mono_class_from_typeref().
19364 * loader.c: remove duplicated code and use mono_class_from_typeref(),
19367 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19369 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
19370 documentation says (the ECMA one is correct).
19372 2002-05-02 Dick Porter <dick@ximian.com>
19374 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
19375 Don't name the synchronisation mutex.
19377 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
19380 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
19381 Make the prototypes match.
19382 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
19386 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
19387 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
19388 all systems have tm.tm_zone, so use strftime() with %Z to print
19389 the timezone abreviation into a temp string.
19391 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
19392 rather than mono_array_addr() on a MonoString on Big Endian
19395 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
19397 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
19400 2002-04-30 Dick Porter <dick@ximian.com>
19402 * socket-io.c: Cope with SOCKET being an integer rather than a
19405 * threads.c: Added Thread_free_internal, to deal with thread
19406 handle cleanup. Moved calls to handle_store() and handle_remove()
19407 to start_wrapper(), so each can only be called once. Allocate
19408 synchronisation blocks with GC_malloc(), and use GC finalisation
19409 to close the handles.
19411 * icall.c: added System.Threading.Thread::Thread_free_internal
19413 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19415 * icall.c: support Environment.Exit, CommandLineArgs().
19417 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19419 * object.c, object.h: added mono_runtime_run_main () and
19420 mono_runtime_get_main_args () for use in System.Environment.
19422 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19424 * gc.c: fix thinko, enable actual finalization since the jit is now
19427 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19429 * gc.c, object.c: take into account that an object may be offset wrt the address
19430 returned by GC_malloc().
19432 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
19434 * image.c: handle files without entries in the assembly table (modules).
19436 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
19438 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
19439 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
19440 allowed to be null when it's System.Object class setup.
19442 2002-04-27 Martin Baulig <martin@gnome.org>
19444 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
19445 if `tb->parent == NULL' rather than crashing.
19447 2002-04-28 Nick Drochak <ndrochak@gol.com>
19449 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
19450 calling acos() where asin() should have been called.
19452 2002-04-26 Martin Baulig <martin@gnome.org>
19454 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
19455 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
19456 there's a subdirectory called `System', but we don't want to read that
19457 subdirectory as an assembly.
19459 2002-04-25 Martin Baulig <martin@gnome.org>
19461 * debug-symfile.c: Reflect latest MonoString changes.
19463 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19465 * rand.c, rand.h: instance method icalls need to have an explicit
19466 this pointer as first argument in the C implementation.
19468 2002-04-25 Nick Drochak <ndrochak@gol.com>
19470 * icall.c: Fix typo in map for GetNonZeroBytes
19472 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
19474 * string-icalls.c : String does now passes unit tests without any
19475 errors, the following changes has been made:
19477 Implemented replace methods.
19478 Renaming of methods to (try) follow the standard.
19479 Fixed compare ordinal
19480 Made all memory allocated directly to function instead of via icall function.
19481 Small performance fix in is_in_array function
19483 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
19485 c (mono_string_Internal_ctor_charp_int_int):
19486 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
19487 sindex < 0, throw ArgumentOutOfRangeException instead of
19488 ArgumentNullException.
19490 Added new check for length == 0, however
19491 I need to make it return String.Empty from the C code.
19493 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
19494 that calculate the length for us here.
19496 (mono_string_Internal_ctor_sbytep_int_int): Replaced
19497 mono_string_new_utf16 with mono_string_new, since value is utf8.
19499 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19501 * object.c: register the object for finalization if needed.
19502 Allocate one more char in the string for the terminating 0 char.
19504 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19506 * class.c, class.h, image.c: check if a type implemenst a destructor.
19507 Use the proper key for array class lookups.
19508 * icall.c: register the icalls in the System.GC class.
19509 * gc.c, gc.h: GC-related functions and icalls.
19511 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19515 * unicode.c: free some strings gotten from mono_string_to_utf8 and
19516 changed a couple of free () by g_free ().
19518 * decimal.c: one-liner in the comments for decimal2string ().
19520 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
19522 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
19524 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
19526 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
19527 * object.c (mono_runtime_invoke_array) : handle null in params
19529 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
19531 * string-icalls.c: fixed bug in split (one off bug)
19533 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
19535 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
19536 * icalls.c: added String::Equals as internal method
19538 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
19540 * threads.c: fixed bug in the double interlocked functions
19542 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
19544 * threads.c: implemented all of the new interlocked icalls.
19545 * string-icalls.c: fix a bug in insert.
19546 * icalls.c: added the icalls for interlocked, removed old string functions.
19548 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19550 * loader.c: fix off-by-one error when reading argument names.
19552 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19554 * profiler.c: win32 counter implementation (untested).
19555 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
19556 (the latter needs testing and more complete impl. from win32 folks).
19558 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
19560 * object.c: mono_array_new_full workaround mono_array_class_get
19563 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
19565 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
19566 * object.h (mono_string_chars): Changed casting type.
19568 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
19570 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
19571 method signatures to use gunichar2 instead of gint16.
19573 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
19575 * object.h, object.c: domain-specific versions of mono_object_new and
19578 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
19580 * object.c: changed String layout
19582 * string-icalls.c (mono_string_Internal_ctor_chara): added
19583 internal string constructors.
19585 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
19587 * threads.c: pass 'this' to the thread start routine.
19589 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19591 * string-icalls.c: fix IndexOf and LastIndexOf. Now
19592 InternalCompareStr don't call twice mono_string_cmp_char for the last
19593 character. Improved performance in mono_string_cmp_char.
19595 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19597 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
19598 code into its own library: libmonoruntime.
19600 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
19602 * object.h, object.c: changed array format so that szarrays do not
19603 require a bounds structure.
19604 * icall.c, appdomain.c: support for new szarray format.
19606 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
19608 * metadata.c: compare also the retuns type when comparing signatures:
19609 we didn't do this as an optimization since really overloaded methods
19610 must differ also in the arguments, but this doesn't work with
19611 low-level IL code (or when using explicit conversion operators: see
19612 bug#23498 for an example).
19614 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19616 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
19618 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
19620 * icall.c: make MonoType::GetElementType its own icall.
19622 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19624 * icall.c: remove MonoMethod_get_Name().
19625 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
19628 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
19630 * string-icalls.c: optimized a few methods.
19632 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
19634 * icall.c: added all new string internal calls
19635 * string-icalls.c: added, new string internal call implementation.
19636 * object.c: added mono_string_new_size for allocating a string a size
19638 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
19640 * object.c (mono_object_isinst): use the same code as in the
19641 optimized x86 version.
19643 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19645 * profiler.c: TSC-based timer code (faster and more accurate).
19646 Not hooked up in configure, yet (set USE_X86TSC to 1).
19648 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
19650 * profiler.c, profiler.h: track time spent compiling methods.
19651 * threads.c: track thread creation/destruction.
19653 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
19655 * profiler.c, profiler.h, profiler-private.h: profiling interface
19656 and sample implementation. Moved here so that it can be used also by
19659 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
19661 * reflection.c, reflection.h: keep types and other handles separate in
19662 the hash tables for referred tokens. Add guid for modules.
19664 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
19666 * assembly.c: fix bugs found with valgrind.
19667 * metadata.h, metadata.c: added mono_metadata_guid_heap().
19669 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
19671 * threads: added icall support for getting current domain for
19674 2002-04-13 Martin Baulig <martin@gnome.org>
19676 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
19677 (MonoDebugVarInfo): Added `index' field for register based addresses.
19678 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
19679 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
19680 `MonoDebugVarInfo *params' and `guint32 this_offset' with
19681 `MonoDebugVarInfo *this_var'.
19683 * debug-symfile.c (relocate_variable): New static function to write
19684 a location description for a local variable or method parameter.
19686 2002-04-12 Martin Baulig <martin@gnome.org>
19688 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
19689 stack offset and begin/end scope address of a local variable.
19690 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
19691 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
19692 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
19694 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
19695 Added new relocation types for start/end scope of a local variable.
19697 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19699 * object.h: add mono_object_domain() macro.
19700 * reflection.c: handle typespecs.
19701 * icall.c: MonoMethod::get_Name() implementation.
19703 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19705 * icall.c: String::GetHashCode() icall implementation.
19707 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19709 * icall.c: String::IndexOfAny icall.
19710 * object.c, object.h: make array->max_length more useful.
19711 Intrduced mono_object_class() and mono_string_length() macros.
19713 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19715 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
19716 instead of g_unichar_isdigit.
19718 2002-04-11 Nick Drochak <ndrochak@gol.com>
19720 * icall.c: Implement a simple Double.ToString().
19722 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19724 * appdomain.h: only io-layer.h is supposed to be included.
19725 * icall.c: explicitly import environ. Fix warning.
19727 2002-04-10 Nick Drochak <ndrochak@gol.com>
19729 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
19730 return true even if it's not Daylight Savings time.
19731 Only return false for the case where the function isn't
19732 implemented for a plaform (read Windows).
19734 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19736 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
19739 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
19741 * mempool.c (mono_mempool_alloc): only use g_malloc when
19742 absolutely necessary.
19744 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
19746 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
19748 * class.c (mono_class_vtable): use domain mempool to allocate vtable
19749 (mono_class_proxy_vtable): use domain mempool
19751 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
19753 * appdomain.h, appdomain.c: split initialization that requires the
19754 execution engine support into mono_runtime_init().
19756 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
19758 * class.c (mono_class_init): don't include vtable inside MonoClass
19759 to save some memory, gather some statistics.
19760 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
19762 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19764 * icall.c: internalcall implementation for ValueType.Equals().
19766 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
19768 * object.c (mono_message_init): moved
19769 (mono_runtime_exec_main): new arch. independent impl.
19770 (mono_runtime_invoke_array): new method - like
19771 mono_runtime_invoke, but you can pass an array of objects.
19772 (mono_remoting_invoke): new arch. independent impl.
19773 (mono_message_invoke): new arch. independent impl.
19774 (mono_runtime_class_init): new arch. independent impl.
19775 (mono_runtime_object_init): new arch. independent impl.
19777 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19779 * metadata.c, object.c, reflection.c: documented the exported
19782 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
19784 * icall.c: simpler code to pass the assembly builder data to corlib.
19785 Implement GetNestedTypes() internalcall.
19787 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19789 * class.c: warn if a type can't be loaded.
19791 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
19793 * image.h: typedef MonoImageOpenStatus
19794 * types.h: removed unused file
19796 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
19798 * icall.c: Enum_ToObject accepts enum value arguments.
19800 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
19802 * class.c: move initialization of properties, events and nested
19803 classes, so that they happen for interfaces, too.
19805 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
19807 * icall.c: cleanup some ugly casts in Array_SetValue*.
19809 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19811 * icall.c: the values array fro enums is of the correct type, now.
19812 Implement (correctly) getFullName instead of assQualifiedName for
19814 * reflection.h, reflection.c: added mono_type_get_name ().
19816 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19818 * assembly.c, image.h: for each MonoImage, record from wich assembly
19820 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
19821 Make Type.Assembly work.
19823 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
19825 * debug-symfile.h: use char* instead of gpointer to avoid
19828 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
19830 * icall.c (ves_icall_InternalExecute): impl. FielSetter
19831 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
19833 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
19835 * icall.c (mono_message_init): impl. (code cleanup)
19836 (ves_icall_InternalExecute): impl. FieldGetter
19838 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
19839 defined we call all (non-static)methods through the vtable.
19841 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
19843 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
19844 finalizer even though the memory is still referenced (and the chunk of
19845 memory is not freed).
19847 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
19849 * assembly.c: fix brokeness.
19851 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
19853 * class.c: kill some warnings. Check explicit interface method
19854 implementation also without considering the namespace.
19855 Load also literal strings in static class data.
19857 2002-03-29 Miguel de Icaza <miguel@ximian.com>
19859 * assembly.c (default_assembly_name_resolver): Kill memory leak.
19860 (default_assembly_name_resolver): Make the resolver take the
19861 "base" directory where the assembly was originally defined, so we
19862 can load DLLs that are in the same directory as the assembly that
19863 is being referenced.
19865 2002-03-28 Dick Porter <dick@ximian.com>
19871 * unicode.c: Warning cleanups
19873 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
19875 * object.h, reflection.h: use the correct type instead of MonoObject.
19877 2002-03-28 Martin Baulig <martin@gnome.org>
19879 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
19880 (mono_debug_update_symbol_file): Initialize classes if necessary.
19882 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
19884 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
19885 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
19887 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
19889 * assembly.h: fix function prototype.
19890 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
19891 * mono-endian.h: use const cast.
19893 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
19895 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
19897 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
19899 * loader.c: don't assert when a typeref can't be loaded, give
19900 a chance to the runtime to trow an exception instead.
19901 * loader.h: fix warning.
19903 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
19905 * class.c (mono_class_proxy_vtable): added proxy support
19907 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
19909 * icall.c: removed last of PAL calls, added System.Environment
19910 * file-io.h, file-io.c: MonoIO implementation
19911 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
19913 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
19915 * appdomain.c: do not use the byte marker in ldstr table lookup.
19916 * debug-helpers.c: allow two ':' to separate class and method name.
19917 * object.c: allocate arrays bounds with the GC, too.
19918 * verify: add a few more checks.
19920 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
19922 * reflection.c: output also literal strings. Allocate parameter data
19923 with GC_malloc() (thanks, Martin, for catching this!).
19925 2002-03-26 Martin Baulig <martin@gnome.org>
19927 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
19928 include the `this' offset in the `param_offsets'.
19930 2002-03-25 Martin Baulig <martin@gnome.org>
19932 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
19933 mono_debug_get_class() function to get the classes. Added new
19934 relocation types for arrays and strings.
19935 (mono_debug_get_class): New static function to search in all
19936 referenced assemblies for a metadata token.
19938 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
19940 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
19942 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
19943 hold gc-allocated objects. Make the string heap a stream like the
19944 others. Removed duplicated code when writing stream info.
19945 Added asserts to catch possible buffer overflows. Set the sorted map
19946 for tables that need sorting. Added some documentation.
19948 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
19950 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
19951 for interned strings and vtables.
19953 2002-03-24 Martin Baulig <martin@gnome.org>
19955 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
19956 it in the array since it was created with g_slist_prepend().
19958 2002-03-24 Martin Baulig <martin@gnome.org>
19960 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
19961 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
19962 (mono_debug_method_from_token): Renamed to
19963 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
19964 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
19966 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
19969 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
19971 2002-03-24 Martin Baulig <martin@gnome.org>
19973 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
19974 (mono_debug_method_from_token): New func.
19976 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
19977 New interncall, calls mono_debug_local_type_from_signature().
19978 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
19979 calls mono_debug_method_from_token().
19981 2002-03-23 Martin Baulig <martin@gnome.org>
19983 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
19984 specifies the number of bytes to be converted, not the array size.
19985 Return the number of chars, not the number of bytes.
19986 (ves_icall_iconv_get_chars): The `byteCount' argument
19987 specifies the number of bytes to be converted, not the array size.
19989 2002-03-23 Martin Baulig <martin@gnome.org>
19991 * reflection.h (MonoReflectionSigHelper): New type.
19993 * reflection.c (mono_reflection_sighelper_get_signature_local),
19994 (mono_reflection_sighelper_get_signature_local): New functions.
19996 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
19997 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
20000 2002-03-23 Martin Baulig <martin@gnome.org>
20002 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
20003 is_writeable is set.
20004 (mono_raw_buffer_update): New function to write the modified map
20007 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
20009 * debug-symfile.c (mono_debug_update_symbol_file): Call
20010 mono_raw_buffer_update() when done writing.
20012 2002-03-23 Martin Baulig <martin@gnome.org>
20014 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
20016 * debug-symfile.c: Added support for arguments and local variables.
20018 2002-03-23 Dick Porter <dick@ximian.com>
20020 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
20021 protected by ifdefs, hence breaking the w32 build.
20023 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20025 * object.c: implement is_interned() the right way.
20027 2002-03-21 Martin Baulig <martin@gnome.org>
20029 * debug-symfile.[ch]: New files to handle debugging information
20030 files. There's also support to dynamically update these symbol
20031 files to include machine dependent information.
20033 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
20035 * threads.c (mono_thread_create): new function to create thread
20038 2002-03-20 Martin Baulig <martin@gnome.org>
20040 * icall.c (ves_icall_InternalInvoke): Create a new object if the
20041 method is a constructor.
20042 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
20043 points to ves_icall_InternalInvoke().
20045 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
20047 * file-io.c: Flush shouldn't throw exceptions.
20049 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
20051 * file-io.c: FileStream flush support; FileSetLength now
20052 restores file pointer.
20054 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
20056 * class.c: set image for pointer classes.
20058 2002/03/19 Nick Drochak <ndrochak@gol.com>
20060 * sysmath.c: Forgot one.
20062 2002-03-18 Miguel de Icaza <miguel@ximian.com>
20064 * sysmath.c: Avoid redefining existing names.
20066 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
20068 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
20069 handled by runtime as icall rather than dllimport from libm.so
20070 * file-io.c, file-io.h: fixed handle argument type.
20072 2002-03-18 Dick Porter <dick@ximian.com>
20074 * reflection.c (mono_image_get_type_info): rename interface to
20075 iface, because of "#define interface struct" on windows.
20077 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
20079 * class.c, class.h: rename and export mono_ptr_class_get().
20080 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
20081 * reflection.c, reflection.h, icall.c: better/saner type name
20082 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
20085 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
20087 * class.c (mono_class_init): removed hardcoded GHC_SLOT
20089 * icall.c (ves_icall_InternalInvoke): impl.
20091 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20093 * reflection.c: output the interface map table, too.
20095 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
20097 * class.c (class_compute_field_layout): separate computation of
20098 static field layout
20100 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
20102 * icall.c: added System.Buffer support.
20103 * file-io.c: moved file icalls from PAL to FileStream.
20105 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
20107 * icall.c (ves_icall_System_Object_GetHashCode): impl.
20109 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
20111 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
20113 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20115 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
20117 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
20119 * debug-helpers.{c,h}: moved here from monograph some useful functions
20120 to locate a method by name/signature in a class or image. Included
20121 also a small and flexible IL disassembler.
20123 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20125 * reflection.c: fixup tokens in methods with small header size, too.
20127 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
20129 * object.c (mono_string_to_utf8): remove assert(!error), instead
20132 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
20134 * icall.c: update to the new mono_Array_class_get interface.
20136 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
20138 * appdomain.c, object.c: Boehm-GC enable.
20139 * icall.c: make get_data_chunk() support split data requests.
20140 Ensure a class is initialized in more cases. Return only the first
20141 property found in GetProperties() or the compiler gets confused.
20142 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
20143 * reflection.h, reflection.c: add fixup mechanism for field and method
20144 tokens. Initialize assembly->typeref in a single place. Output
20145 properties after events. Support custom attributes for events, too.
20146 Typo fix for paramter custom attrs.
20148 2002-03-07 Martin Baulig <martin@gnome.org>
20150 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
20152 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
20154 * class.c (mono_array_class_get): fix. for multi. dim. arrays
20156 2002-03-06 Martin Baulig <martin@gnome.org>
20158 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
20159 non-zero lower bounds. See testcases #F10-#F13.
20161 2002-03-05 Martin Baulig <martin@gnome.org>
20163 * exception.c (mono_get_exception_argument_out_of_range): New exception.
20165 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
20166 ves_icall_System_Array_GetValue(), only calculate the absolute array position
20168 (ves_icall_System_Array_SetValue): Likewise.
20169 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
20170 as argument and does the actual work. This function is used when copying a
20171 multi-dimensional array.
20172 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
20173 now do all the widening conversions of value types.
20174 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
20176 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20178 * class.c: remove some magic numbers and use the smbolic names,
20179 instead. Added init_events() to load event info at class init time.
20180 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
20181 and mono_metadata_methods_from_event().
20182 * reflection.h, reflection.c: added support for writing out the evnets
20183 related information.
20185 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
20187 * reflection.h, icall.c: use a different method (GetInterfaces)
20188 to gather interface info and add isbyref, isprimitive and
20189 ispointer to the ves_icall_get_type_info() return value.
20191 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
20193 * class.h: stared adding support for events.
20194 * icall.c: split find_members implementation. Added debug icall to get
20195 the address of an object.
20196 * reflection.c: handle TypeBuilders in mono_type_get_object().
20198 2002-03-01 Martin Baulig <martin@gnome.org>
20200 * icall.c (ves_icall_System_Array_GetLength): This must throw an
20201 ArgumentOutOfRangeException(), not an ArgumentException().
20202 (ves_icall_System_Array_GetLowerBound): Likewise.
20203 (ves_icall_System_Array_GetValue): Improved argument checking.
20204 (ves_icall_System_Array_SetValue): Improved argument checking.
20206 2002-03-01 Martin Baulig <martin@gnome.org>
20208 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
20209 called with invalid arguments rather than just dying with g_assert().
20210 (ves_icall_System_Array_SetValue): Likewise.
20211 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
20212 raise a NotImplementedException instead.
20213 (ves_icall_System_Array_GetLength): Added argument checking.
20214 (ves_icall_System_Array_GetLowerBound): Added argument checking.
20216 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
20218 * object.h (mono_assert): new macros mono_assert and
20219 mono_assert_not_reached
20221 2002-02-28 Martin Baulig <martin@gnome.org>
20223 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
20224 and "System::String::IsInterned" to "System::String::_IsInterned".
20226 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
20228 * icall.c: remove hacks for typebuilder. Added icall to create a
20229 modified type from a tybebuilder.
20230 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
20231 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
20232 to create a backing MonoClass for a TypeBuilder.
20234 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20236 * class.c, class.h: more refactoring of class init.
20237 Export mono_class_setup_mono_type() and mono_class_setup_parent().
20239 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
20241 * marshal.c, marshal.h: start of marshaling interface.
20243 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
20245 * icall.c: fix order in assembly qualified name icall.
20247 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
20249 * class.c: do not free str, since we store it in the hash table.
20250 * reflection.h: add label field to MonoILExceptionInfo.
20251 * reflection.c: handle references to more than one assembly. Handle
20252 case when there isn't a module created in the assembly.
20254 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
20256 * class.c: Fix typo. Start refactoring of class init code.
20258 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
20260 * appdomain.c: exit with 1 on error.
20261 * class.c: we already have the name in MonoClassField.
20262 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
20263 MonoStreamHeader instead of an offset of image->raw_metadata.
20265 2002-02-26 Miguel de Icaza <miguel@ximian.com>
20267 * appdomain.c (mono_init): Be even more descriptive about the error.
20269 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
20271 * appdomain.c: give the user an informative message when corlib can't
20274 2002-02-26 Martin Baulig <martin@gnome.org>
20276 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
20277 New icall to get the time zone data.
20279 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20281 * reflection.c: set virtual and raw size of section correctly.
20282 * threads.c: transfer domain information to newly created threads.
20284 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
20286 * class.c: when instancing a class in a domain, load the default
20287 vaules for static fields from the constant table. Fix System.Enum to
20289 * icall.c: implement Object::GetType() internalcall. Implemented
20290 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
20291 Fixed checking of binding flags in find_members().
20292 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
20293 * reflection.c: handle enumerations when writing to the constant
20294 table. Use a different object cache for types.
20297 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
20299 * object.c (mono_object_isinst): fix for arrays
20301 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
20303 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
20305 * object.c: don't use mprotect () and fix intern pool hash table
20306 lookup for big endian systems.
20308 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20310 * icall.c: change type_is_subtype_of () signature.
20312 2002-02-21 Mark Crichton <crichton@gimp.org>
20314 * rand.c, rand.h: Added random number generator for
20315 System.Security.Cryptography classes.
20317 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
20319 * icall.c: Added System.Security.Cryptography calls.
20321 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20323 * class.c, icall.c, metadata.c: better support for pointer types.
20324 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
20325 * reflection.c: Add support for getting custom attrs for properties
20326 and simplify some code.
20328 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20330 * icall.c: change getToken () and add custom attribute GetBlob()helper
20332 * reflection.h: add custom attrs array to the reflection builder structures.
20333 * reflection.c: encode and emit custom attributes for all the relevant
20334 reflection objects. Cache fieldref and methodref tokens. Change
20335 mono_image_create_token() interface to take a MonoDynamicAssembly.
20336 More complete custom attributes decoder. Load custom attributes for
20337 Assembly, Field, Method and Constructor objects, too. Make the
20338 returned array an Attribute[] one, not object[]. Added
20339 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
20340 custom attribute constructor.
20342 2002-02-20 Dick Porter <dick@ximian.com>
20346 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
20347 problem code out for now).
20349 2002-02-19 Radek Doulik <rodo@ximian.com>
20351 * object.c (mono_ldstr): use hash table to avoid multiple swapping
20353 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
20355 * icall.c: register the GetCustomAttributes method.
20356 * object.c, object.h: add mono_string_new_len ().
20357 * reflection.h, reflection.c: added mono_runtime_invoke(),
20358 mono_install_runtime_invoke(). Added
20359 mono_reflection_get_custom_attrs () to load custom attributes and
20360 create the attribute objects.
20362 2002-02-19 Dick Porter <dick@ximian.com>
20363 * threads-dummy-types.c:
20364 * threads-dummy-types.h:
20367 * threads-pthread-types.c:
20368 * threads-pthread-types.h:
20369 * threads-pthread.c:
20370 * threads-pthread.h: Deleted obsolete files
20372 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
20374 * class.c (mono_class_vtable): runtime init the class when we
20375 allocate static class data.
20377 * icall.c (ves_icall_System_Array_SetValue): check for null values.
20379 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
20380 and String - but we will need generic marshalling support in the
20382 (mono_init): set the domain name in a ms compatible way
20384 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
20387 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
20389 * object.c (mono_array_clone): use alloca() instead of g_malloc
20392 * appdomain.c (mono_domain_unload): impl.
20394 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20396 * appdomain.c, object.c: fix intern pool implementation.
20397 * class.c: fix alignment code.
20399 2002-02-16 Radek Doulik <rodo@ximian.com>
20401 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
20402 and s2 > s1, just copy lower bytes to be compatible with little
20403 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
20404 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
20406 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
20407 force big_endian to be 1 for big endian machines
20408 (ves_icall_iconv_new_decoder): ditto
20410 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
20412 * socket-io.c (convert_sockopt_level_and_name): If the system
20413 doesn't define SOL_IP or SOL_TCP, get them by hand using
20414 getprotobyname() and caching the values (because this could be a
20416 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
20417 Use the appropriate struct when the system does support it. Ie,
20418 not all systems have struct ip_mreqn so use struct ip_mreq when
20421 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
20423 * reflection.c: handle finally clauses.
20425 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
20427 * socket-io.c: use g_snprintf() instead of snprintf.
20429 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
20431 * reflection.c (mono_param_get_objects): Cast second argument to
20432 mono_method_get_param_names to a const char** to silence the
20435 * appdomain.c (mono_domain_assembly_open): Put parens around the
20436 truth statement in the for-loop.
20438 * unicode.c (iconv_convert): Got rid of a compiler warning about
20439 int i being unused when the system has a new iconv.
20440 (iconv_get_length): Same.
20442 * image.c (load_class_names): Cast the second argument to
20443 g_hash_table_insert() to char* to hush compiler warnings about the
20445 (mono_image_open): Same here.
20447 * socket-io.c: Don't conditionally include sys/filio.h or
20448 sys/sockio.h here anymore since we now get them from
20449 io-layer/io-layer.h
20450 (inet_pton): If the system doesn't support inet_aton, implement
20451 using inet_addr and also #define INADDR_NONE if it isn't defined
20454 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20456 * metadata.c, metadata.h: added function to get packing and size info
20458 * reflection.h, reflection.c: handle field RVA data. Save info about
20459 the table layout if needed. Assign typedef indexes to all the types
20460 before dumping the info about them to avoid forward reference problems.
20462 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
20464 * socket-io.c (convert_sockopt_level_and_name): ifdef
20465 SO_ACCEPTCONN because it is not defined on my system (old debian)
20467 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20469 * opcode.c: use stddef.h to get NULL.
20471 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
20473 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
20474 for FIONBIO, FIONREAD and SIOCATMARK.
20475 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
20476 define INADDR_NONE and besides, inet_addr() is deprecated and
20477 should not be used. Use inet_pton() instead - it also has the
20478 added bonus that it can easily handle IPv6 addresses as well.
20479 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
20481 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
20483 * decimal.c: remove _MSC_VER conditional.
20485 2002-02-13 Dick Porter <dick@ximian.com>
20488 * icall.c: Internal calls for Blocking, Select, Shutdown,
20489 GetSocketOption and SetSocketOption
20491 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20493 * assembly.cs: better resolver: use it instead of some kludgy
20496 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
20498 * reflection.c: the best way to speed-up the compiler is to avoid
20501 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
20503 * class.c (mono_class_vtable): changed the object layout
20504 (obj->vtable->class).
20505 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
20507 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20509 * assembly.c: look for assemblies in the assembly dir, too.
20511 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20513 * class.c: fix thinko in mono_class_from_type().
20515 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20517 * exception.h, exception.c: added TypeLoadException.
20518 * object.h, object.c: added mono_array_clone ().
20519 * icall.c: handle throwOnError in AssemblyGetType().
20520 Added Array.Clone().
20521 * opcode.h, opcode.c: use a single value for the opcode val.
20522 Compile fix for non-gcc compilers.
20524 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
20526 * opcodes.c, opcodes.h: export interesting info about opcodes.
20528 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
20530 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
20533 * class.c (class_compute_field_layout): set element_class for enums
20534 (mono_class_create_from_typedef): set element_class for normal classes
20536 * icall.c (ves_icall_System_Enum_get_value): impl.
20538 * class.c (mono_class_create_from_typedef): do not set valuetype
20539 flag for System.ValueType and System.Enum
20541 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
20543 * unicode.c (iconv_convert): fix big endian problem.
20545 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20547 * class.c: add asserts if we are ever going to scribble over memory.
20548 * socket-io.c: not all systems have AF_IRDA defined.
20550 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
20552 * class.c (class_compute_field_layout): do not consider static
20553 fields to compute alignment
20555 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
20557 * appdomain.c (mono_appdomain_get): impl.
20558 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
20560 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
20562 * icall.c: ignore "file://" prefix when loading an assembly.
20564 2002-01-23 Dick Porter <dick@ximian.com>
20568 * Makefile.am: Added socket support
20570 2002-01-23 Miguel de Icaza <miguel@ximian.com>
20572 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
20573 code back. This should return the assemblies that are loaded by
20574 the runtime on behalf of an application domain.
20576 The current implementation is still broken, it just returns every
20577 assembly loaded, but until we get real applications domain this
20580 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
20582 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
20585 2002-01-23 Miguel de Icaza <miguel@ximian.com>
20587 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
20588 the mono_class_from_name lookup.
20589 (ves_icall_get_parameter_info): ditto.
20590 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
20592 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
20594 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20596 * class.c: load also nested classes on class init.
20597 System.ValueType instance methods gets passed boxed
20598 values, unless methods in derived classed that get a pointer to the
20600 * icall.c: use better name parsing code in GetType().
20601 * image.c, image.h: add mono_image_loaded ().
20602 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
20603 * reflection.c, reflection.h: added mono_reflection_parse_type().
20605 2002-01-22 Veronica De Santis <veron78@interfree.it>
20607 * icall.c : Added mapping of internal calls for Manual and Auto reset events
20608 * threads.c : Added the implementation of internal calls for events
20609 * threads.h : Added prototypes of internal calls for events
20611 2002-01-21 Radek Doulik <rodo@ximian.com>
20613 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
20615 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
20617 * class.c (mono_class_init): set min_align to 1 (instead of 0)
20618 (mono_class_value_size): use min_align
20620 2002-01-20 Dick Porter <dick@ximian.com>
20623 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
20624 so it compiles on w32.
20626 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
20628 * metadata.c (mono_type_stack_size): impl.
20630 * class.c (mono_class_get_field): impl. memberref token
20632 2002-01-16 Veronica De Santis <veron78@@interfree.it>
20634 * icall.h : Added the internal calls mapping for CreateMutex_internal
20635 and ReleaseMutex_internal.
20636 * threads.h : Added the prototype of mutexes internal calls.
20637 * threads.c : Added the implementations of mutexes internal calls.
20639 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
20641 * metaparse.h: removed unused file.
20642 * reflection.c, reflection.h: added stream_data_align () function
20643 to align data in streams and keep stream aligned. Add support for
20644 exception support in method headers.
20646 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
20648 * unicode.c: make iconv_convert () return the number of bytess written
20649 in the output buffer.
20651 2002-01-15 Dick Porter <dick@ximian.com>
20652 * threads.c: Make the runtime's idea of infinite timeouts coincide
20653 with the class library's
20655 Fix a particularly egregious bug in mono_thread_cleanup(). That
20656 code was so utterly bogus it must have been written on a Monday.
20658 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
20660 * reflection.h: add subtypes field to TypeBuilder.
20661 * reflection.c: encode constants for literal fields.
20662 Handle subtypes. Fix user string token (and add a zero byte)
20665 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
20667 * class.c (mono_class_init): bug fix: assign slot numbers for
20670 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20672 * reflection.c: don't try to output a code RVA for abstract methods.
20673 Small fixes for method header format. Output parameter info to the
20674 ParamDef table. Save method overriding info to MethodImpl table.
20675 Fix property support. Allow typedef.extends to be a type in the
20677 * verify.c: fix off-by-one error.
20679 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
20681 * class.c: fix mono_class_from_mono_type () for szarray types.
20682 Remove unused cache check in mono_class_from_type_spec().
20683 * icall.c: *type_from_name () functions handle simple arrays and byref.
20684 * reflection.c: handle byref and szarray types. Handle methods without
20685 body (gets P/Invoke compilation working). Handle types and fields in
20687 * reflection.h: add rank to MonoTypeInfo.
20689 2002-01-10 Dick Porter <dick@ximian.com>
20691 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
20694 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
20696 * icall.c: initialize class in type_from_handle ().
20697 Loop also in parent classes for get_method ().
20698 * reflection.c: properly encode class and valuetype types.
20699 Start on encoding TypeBuilder types. Handle fieldrefs.
20700 Use correct length when registering a user string.
20701 Handle ConstructorBuilder and MonoMethod in get_token ().
20702 Make mono_type_get_object () aware of cached types.
20703 * object.c: back out change to mono_string_new ().
20705 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
20706 * object.c: mono_string_new should return a NULL when the string
20707 passed in is NULL -- not try to deference it.
20709 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
20711 * icall.c: hack to make IsSubType work for TypeBuilders.
20712 * reflection.c: emit constructors before methods.
20713 Retrieve param names in mono_param_get_objects().
20715 2002/01/05 Nick Drochak <ndrochak@gol.com>
20717 * Makefile.am: fix list of headers and sources so automake 1.5
20718 doesn't complain. Removed \# at end of list.
20720 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
20722 * reflection.c: get token for a method ref. Set return type of
20723 constructor to void.
20724 * loader.c: debug message.
20725 * class.c: typo fix.
20727 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
20729 * icall.c: fix array init with rank > 1. FindMembers
20730 loops in parent class as well.
20731 * image.c: do not insert nested types in name cache.
20732 * reflection.c: warning fix.
20733 * reflection.h: add override method (for interface impl).
20735 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
20737 * metadata.c: fix customattr decoding.
20739 2001-12-21 Miguel de Icaza <miguel@ximian.com>
20741 * rawbuffer.cs: Added native Win32 implementation, avoids using
20742 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
20744 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
20746 * class.c: make the low-level routines handle the cache.
20748 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
20750 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
20752 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
20754 * class.c: fix mono_array_element_size() for objects.
20755 * class.h, class.c: add properties to MonoClass and load them
20757 * icall.c: check with isinst() when assigning a value to an array
20758 instead of requiring the classes to match exactly.
20759 Implemented icall for System.Type::GetType().
20760 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
20761 enums. Handle bindingflags when looking for methods and fields.
20762 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
20763 and mono_metadata_methods_from_property().
20764 * reflection.h, reflection.c: added structures for propreties,
20765 parameters and enums. Implemented mono_property_get_object() and
20766 mono_param_get_objects().
20768 2001-12-18 Dick Porter <dick@ximian.com>
20770 * file-io.c: Use mono_string_to_utf16() instead of
20771 mono_string_chars()
20773 * object.c: Added mono_string_to_utf16(), which copies the non
20774 NULL-terminated MonoString into a new double-null-terminated
20777 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
20779 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
20781 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
20783 * file-io.c: raise exceptions if handle is invalid.
20785 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
20787 * assembly.c: yet another check for mscorlib.
20788 * class.c, class.h: load nesting info for classes.
20789 * icall.c: many new functions to support the Reflection classes.
20790 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
20791 * reflection.h, reflection.c: mono_image_create_token(),
20792 mono_assembly_get_object(), mono_type_get_object(),
20793 mono_method_get_object(), mono_field_get_object(): methods to return
20794 objects that parallel the C representation of assemblies, types,
20797 2001-12-11 Dick Porter <dick@ximian.com>
20800 * file-io.c: Internal calls for file IO.
20802 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
20804 * tabledefs.h: missing FileAttributes.
20805 * verify.h, verify.c: use is_valid_string () to simplify and check for
20806 valid strings more correctly. Fix warnings and speeling.
20807 Check more tables: Filed, File, ModuleRef, StandAloneSig.
20808 Check code: branches, maxstack, method calls.
20810 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
20812 * object.c (mono_object_allocate): removed static, so that the jit
20813 can allocate value types.
20815 * icall.c (ves_icall_System_DateTime_GetNow): impl.
20817 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20819 * class.c: init enum types right away and register the
20820 token->MonoClass map in mono_class_create_from_typedef ().
20821 * verify.h, verify.c: first cut of the verifier.
20822 * pedump.c: add --verify switch to verify metadata tables.
20823 * tabledefs.h: add some missing enums.
20825 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
20827 * class.c (mono_install_runtime_class_init): impl.
20828 (mono_class_init): renamed mono_class_metadata_init to
20829 mono_class_init, also removed the metadata_inited flag
20831 * object.c (mono_object_isinst): use faster algorithm
20833 2001-11-30 Radek Doulik <rodo@ximian.com>
20835 * mono-endian.h: reverted last change
20836 added function prototypes
20838 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
20839 add mono-endian.c back
20841 * mono-endian.c: returned back, as Paolo pointed out, it's needed
20842 for unaligned access, I've mistaked it with endianess. I am
20844 (mono_read16): fix reverted endianess
20845 (mono_read64): ditto
20846 (mono_read32): ditto
20848 2001-11-30 Dick Porter <dick@ximian.com>
20850 * exception.c: Implement mono_exception_from_name()
20852 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
20854 * metadata.h, metadata.c: remove params_size and locals_size and their
20855 calculation from the metadata code: they are only usefult to the
20858 2001-11-29 Radek Doulik <rodo@ximian.com>
20860 * object.c (mono_ldstr): swap bytes here, it's probably not the
20861 best place, but works for me now, I'll redo it once I know mono
20862 better, also note that I add PROT_WRITE and don't reset back, also
20863 note that it's only affects big endians, so x86 should be OK
20865 * mono-endian.h (read16): use just glib macros for both endians
20867 * mono-endian.c: removed as glib macros are used in in
20868 mono-endian.h so we don't need to care about endianess for read
20869 macros as glib does that for us already
20871 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
20873 * class.h, class.h: take minimum alignment into consideration so
20874 that the fields of a class remain aligned also when in an array.
20876 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20878 * loader.h, loader.c: add mono_method_get_param_names().
20879 * class.c: 0-init class fields.
20881 2001-11-26 Dick Porter <dick@ximian.com>
20885 * threads.c: New file that handles System.Threading on all platforms
20888 * object.h: Remove the synchronisation struct from MonoObject,
20889 replace it with a pointer that gets initialised on demand
20891 * Makefile.am: Replace all the system-specific threading code with
20892 a single file that uses the new wrapper library
20894 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
20896 * class.c, class.h: add mono_install_trampoline() so that the runtime
20897 can register a function to create a trampoline: removes the ugly
20898 requirement that a runtime needed to export arch_create_jit_trampoline.
20899 * object.h, object.c: added mono_install_handler() so that the runtime
20900 can install an handler for exceptions generated in C code (with
20901 mono_raise_exception()). Added C struct for System.Delegate.
20902 * pedump.c: removed arch_create_jit_trampoline.
20903 * reflection.c: some cleanups to allow registering user strings and
20904 later getting a token for methodrefs and fieldrefs before the assembly
20906 * row-indexes.h: updates and fixes from the new ECMA specs.
20908 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
20910 * class.h, class.c: add enum_basetype field to MonoClass.
20911 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
20912 to get index in the constant table reated to a field, param or
20914 * reflection.h, reflection.c: handle constructors. Set public-key and
20915 version number of the built assembly to 0.
20916 * row-indexes.h: update from new ECMA spec.
20918 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
20920 * class.h, class.c: add a max_interface_id to MonoClass.
20921 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
20922 since it's used to do that. Added mono_type_type_from_obj().
20923 Make GetType() return NULL instead of segfaulting if the type was not
20924 found. Handle simple arrays in assQualifiedName.
20925 * object.h: add a struct to represent an Exception.
20926 * reflection.c: output call convention in method signature.
20927 Add code to support P/Invoke methods and fixed offsets for fields.
20929 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
20931 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
20933 * icall.c: use mono_array_addr instead of array->vector: fixes the
20934 reflection image writing.
20935 * reflection.c: init call convention byte to 0 in method signature.
20936 Encode the property signature. Don't output property-related methods
20937 twice. Really process the properties for a type (don't cast a field to
20938 a property, my mom always told me that).
20939 Fix 64 bit issues in pointer alignment in a different and more
20942 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
20944 * loader.h: Removed type class from MonoDefaults, added monotype
20946 * loader.c: Loaded MonoType, removed loading of Type
20948 * icall.c (my_mono_new_object): Now returns a System.MonoType,
20949 and fills in System.Type._impl with a RuntimeTypeHandle rather
20950 than the actual MonoClass *
20952 (ves_icall_type_from_handle): change from type_class to
20955 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
20958 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
20961 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
20963 (ves_icall_System_Reflection_Assembly_GetType): implemented
20965 (ves_icall_System_MonoType_assQualifiedName): implemented
20967 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
20969 2001-11-09 Miguel de Icaza <miguel@ximian.com>
20971 * assembly.c (mono_assembly_open): Implement a cache for the
20974 (mono_assembly_close): only destroy the assembly when the last
20977 2001-11-09 Dick Porter <dick@ximian.com>
20979 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
20981 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
20983 * class.c (mono_class_metadata_init): bug fix: compute the right slot
20985 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
20987 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
20988 from Martin Weindel.
20989 * object.h: add mono_string_chars ().
20991 2001-11-07 Miguel de Icaza <miguel@ximian.com>
20993 * reflection.c (build_compressed_metadata): Eliminates warnings
20994 and uses 64-bit clean code.
20996 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
20997 (mono_type_equal): Change signature to eliminate warnings.
20999 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
21001 * icall.c, loader.c: remove the internalcall array constructors.
21002 Changes to match the new MonoArray structure.
21003 * object.h, object.c: an array object doesn't allocate an extra
21004 vector. Add mono_array_new_full () to create jagged arrays easily.
21006 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
21008 * metadata.h, metadata.c: add mono_metadata_field_info () to
21009 retreive all the info about a field from vairous tables.
21010 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
21011 * class.h, class.c: augment MonoClassField with more info.
21012 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
21013 policy and load a field's RVA if needed.
21015 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
21017 * class.c (mono_class_metadata_init): create a trampoline for all
21018 virtual functions instead of actually compiling them.
21020 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
21022 * class.h, class.c: include name in MonoClassField.
21023 * class.c: fix fundamental type of System.Object and System.String.
21024 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
21026 * icall.c: remove internalcalls for the Reflection stuff that is now
21028 * loader.c: mono_field_from_memberref () implementation.
21029 * mono-endian.c: thinko (s/struct/union/g).
21030 * object.c, object.h: make the mono_string_* prototypes actually use
21031 MonoString instead of MonoObject.
21032 * reflection.c, reflection.h: updates for changes in the reflection
21033 code in corlib: we use C structures that map to the actual C# classes.
21034 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
21035 fat method header if needed and use the info from the ILGenerator for
21036 methods. Handle fields in types. Misc fixes.
21038 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
21040 * class.c (mono_class_metadata_init): bug fix: always allocate
21041 space for static class data
21043 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
21045 * class.c (mono_compute_relative_numbering): use relative
21046 numbering to support fast runtime type checks.
21048 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
21050 * class.c (mono_class_create_from_typeref): added debugging output
21051 to print class name when MonoDummy is returned instead of real class
21053 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
21055 * class.c (mono_class_metadata_init): interface offset table now
21056 contains pointers into the vtable - this is more efficient for the jit
21058 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
21060 * class.c (mono_class_metadata_init): use a temporary vtable (the
21061 old algorithm only worked for the interpreter, but not for the jit)
21063 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
21065 * loader.c (method_from_memberref): use mono_class_get to get the
21066 class of an array instead of using System.Array directly.
21067 (mono_get_method): also add MEMBERREF methods to the method cache
21068 which usefull for arrays.
21070 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
21072 * pedump.c (arch_compile_method): added to compute vtable entry
21074 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
21075 number of interfaces.
21077 * class.h: merged MonoArrayClass into MonoClass
21079 * class.c (mono_class_create_from_typedef): compute the vtable size and
21080 allocate space to include the vtable inside MonoClass
21081 (mono_class_metadata_init): initialize the vtable
21083 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
21085 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
21086 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
21087 * image.c: endian fixes by Laurent Rioux.
21088 * object.h, object.c: rename MonoStringObject to MonoString and
21089 MonoArrayObject to MonoArray. Change some function names to conform to
21090 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
21091 guint16* as first argument, so don't use char*.
21092 Provide macros to do the interesting things on arrays in a portable way.
21093 * threads-pthread.c: updates for the API changes and #include <sched.h>
21094 (required for sched_yield()).
21095 * icall.c: updates for the API changes above.
21096 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
21097 platforms that need them.
21099 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
21101 * class.c: set the correct type for all the fundamental
21102 type when loading the class.
21104 2001-10-05 Dick Porter <dick@ximian.com>
21106 * threads-pthread.c (pthread_mutex_timedlock): Simple
21107 compatibility version for C libraries that lack this call.
21109 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
21111 * class.c: MonoTypes stored in MonoClass are stored as
21112 fundamental MonoTypes when the class represents a
21113 fundamental type (System.Int32, ...).
21114 The TypeHandle return by ldtoken is a MonoType*.
21115 * icall.c: ves_icall_get_data_chunk () write out all the
21116 PE/COFF stuff. Implement ves_icall_define_method (),
21117 ves_icall_set_method_body (), ves_icall_type_from_handle ().
21118 * image.c: properly skip unknown streams.
21119 * loader.h, loader.c: add type_class to mono_defaults.
21120 * metadata.c, metadata.h: export compute_size () as
21121 mono_metadata_compute_size () with a better interface.
21122 Typo and C&P fixes.
21123 * pedump.c: don't try to print the entry point RVA if there is no entry point.
21124 * reflection.c, reflection.h: many cleanups, fixes, output method
21125 signatures and headers, typedef and typeref info, compress the metadata
21126 tables, output all the heap streams, cli header etc.
21127 * row-indexes.h: typo fixes.
21129 2001-10-04 Dick Porter <dick@ximian.com>
21131 * object.h: Add a synchronisation mutex struct to MonoObject
21133 * object.c (mono_new_object): Initialise the object
21134 synchronisation mutexes
21136 * icall.c: System.Threading.Monitor internal calls
21138 * threads-pthread.h:
21139 * threads-pthread.c: System.Threading.Monitor internal calls
21141 * threads-types.h: New file, includes the system-specific thread
21144 * threads-pthread-types.h:
21145 * threads-pthread-types.c: New files, handle pthread-specific
21146 synchronisation types
21148 * threads-dummy-types.h:
21149 * threads-dummy-types.c: New files of dummy support for
21150 thread-specific types
21154 * pedump.c: include mono-endian.h not endian.h
21156 * Makefile.am: More threads files.
21157 Name mono-endian.h not endian.h
21159 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
21161 * Makefile.am, reflection.h, reflection.c: move here the reflection related
21162 stuff and implement a few more bits.
21163 * icall.c: a field needs to be dereferenced twice. Do not use the same
21164 name for two variables in the same scope.
21165 * image.c, image.h: cleanups.
21167 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
21169 * class.c (mono_class_metadata_init): bug fix: compute the right size
21171 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
21173 * icall.c: implemented some of the Reflection internalcalls.
21174 * image.c, image.h: start writing out the PE/COFF image.
21175 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
21176 that does the reverse than decode_blob_size ().
21177 * object.c: use mono_metadata_encode_value (). Move here
21178 temporary implementation of mono_string_to_utf8 ().
21179 * rawbuffer.c: make malloc_map static.
21181 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
21183 * metadata.c: fix type comparison for arrays.
21184 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
21185 Added a couple of new classes to monodefaults.
21186 * icall.c: added a couple of Reflection-related internalcalls.
21187 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
21188 Added a byval_arg MonoType to MonoClass.
21190 2001-09-28 Dick Porter <dick@ximian.com>
21193 * threads-pthread.h:
21194 * threads-pthread.c: Implemented internal calls for
21195 LocalDataStoreSlot operations. Applied mutexes around all shared
21196 data. Reworked the thread creation and Start() operations to
21197 avoid a race condition.
21200 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
21202 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
21204 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
21206 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
21208 * class.c, loader.c: warn and return NULL instead of erroring out.
21209 * icall.c: added System.AppDomain::getCurDomain().
21210 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
21212 2001-09-25 Dick Porter <dick@ximian.com>
21214 * threads-pthread.h:
21215 * threads-pthread.c: Implemented timed thread joining and added
21216 System.Threading.Thread::Join_internal internal call
21218 * icall.c: Added System.Threading.Thread::Join_internal internal call
21221 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
21223 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
21225 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
21226 mono_string_intern () to implement the semantics of the ldstr opcode
21227 and the interning of System.Strings.
21228 * icall.c: provide hooks to make String::IsIntern and String::Intern
21231 2001-09-23 Dick Porter <dick@ximian.com>
21234 * threads-dummy.h: New files of dummy threading routines
21236 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
21237 support code based on system specifics
21239 Rename PTHREAD_LIBS to THREAD_LIBS
21241 2001-09-23 Dick Porter <dick@ximian.com>
21243 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
21244 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
21246 (mono_thread_init): Set up a Thread object instance to return when
21247 the main thread calls Thread.CurrentThread
21248 (mono_thread_cleanup): Wait for all subthreads to exit
21250 * icall.c: New internal calls for System.Threading.Thread::Sleep
21251 (including Schedule) and CurrentThread
21253 * threads.h: New file, to insulate thread-specific stuff from the
21256 2001-09-21 Dick Porter <dick@ximian.com>
21258 * threads-pthread.h:
21259 * threads-pthread.c: New file, for handling pthreads-style
21260 threading support. Start() now starts a new thread and executes
21261 the ThreadStart delegate instance.
21263 * icall.c: Added the internalcall for
21264 System.Threading.Thread::Start_internal
21266 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
21268 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
21270 * loader.c: work around the different signatures for delegates
21271 constructors csc generates in compiled code vs the ones compiled in mscorlib.
21273 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
21275 * class.h, class.c: add mono_class_get_field_from_name ().
21276 * *: Fix C comments and other ANSI C issues.
21278 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
21280 * endian.h, assembly.c: fix some endianness issues.
21282 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
21284 * loader.h, load.c: add delegate_class to mono_defaults.
21285 Handle runtime provided methods in mono_get_method ().
21287 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
21289 * loader.c (mono_get_method): use pinvoke for internal call
21291 * icall.c: use pinvoke for internal call
21293 * loader.c (method_from_memberref): set the method name
21295 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
21297 * metadata.c: help the compiler generate better code for
21298 mono_class_from_mono_type ().
21300 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
21302 * class.c (mono_class_metadata_init): delayed computing of the
21303 class size to mono_class_metadata_init ()
21305 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
21307 * class.c, class.h: add an interfaces member to MonoClass.
21308 * image.c, image.h: add assembly_name field to MonoImage
21309 from the assembly table.
21310 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
21312 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
21314 * class.c: Handle Array in mono_class_from_mono_type ().
21315 * metadata.c, pedump.c: some endian fixes.
21317 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
21319 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
21320 * metadata.c: fix small problem introduced with the latest commit.
21322 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
21324 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
21325 We don't need a MonoMetadata pointer anymore to compare signatures in
21326 mono_metadata_signature_equal (), update callers.
21327 Reduced memory usage an number of allocations for MonoMethodHeader and
21328 MonoMethodSignature.
21330 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
21332 * metadata.c: added compare for szarray.
21334 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
21336 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
21337 and add a couple more types to it and mono_defaults. Give an hint on
21338 classes that need implementing in our corlib and are referenced
21341 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
21343 * class.h, class.c: keep track if a class is also an Enum.
21344 * loader.c: Implement a couple more types for use in libffi
21345 marshalling. Gives better diagnostics when failing to dlopen
21346 a library. Set method->klass for P/Invoke methods, too.
21348 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
21350 * class.c, class.h: add a MonoType this_arg to MonoClass that
21351 represents a pointer to an object of the class' type that
21352 can be used by the interpreter and later the type cache.
21353 Add best guess alignment info for valuetype objects.
21355 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
21357 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
21358 into MonoType: one less level of indirection and allocation and
21359 simplifies quite a bit of code. Added cache for MonoTypes that are
21360 used frequently, so that we don't need to allocate them all the time.
21362 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
21364 * class.c (mono_class_create_from_typedef): System.Enum is also a
21365 value type, although it does not derive from System.ValueType
21366 (maybe a bug in the ms compiler?)
21368 * metadata.c (mono_type_size): return the right size for value types
21370 * loader.c (mono_get_method): only initialize method header if not abstract
21372 * class.c (mono_class_from_mono_type): use mono_default values.
21374 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
21376 * *: use MonoClass pointers instead of <type_tokens>
21378 * class.h: new flag: metadata_inited.
21380 * class.c (mono_class_metadata_init): impl.
21381 (mono_class_instance_size): impl.
21382 (mono_class_data_size): impl.
21384 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
21386 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
21387 MonoClass now has the name and name_space fields.
21388 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
21389 mono_get_method () takes and optional MonoClass as argument.
21390 Removed mono_typedef_from_name() and added mono_class_token_from_name()
21391 instead that takes advantage of a map from class names to typedef
21392 tokens in MonoImage.
21394 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
21396 * metadata.c: zero is not a valid alignment boundary.
21397 Merge MONO_TYPE_VOID in default decoding code.
21399 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
21401 * image.h: merged MonoMetadata into MonoImage
21403 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
21404 identify the type of elements.
21406 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
21408 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
21409 * cil-coff.h: split MonoMSDOSHeader and add size info.
21410 * image.c: add some consistency checks.
21411 * metadata.c: fix row size computation: one programmer
21412 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
21413 add explanation for the locator routine.
21414 Fix decoding of size in method header.
21416 2001-08-20 Miguel de Icaza <miguel@ximian.com>
21418 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
21419 (g_concat_dir_and_file): Bring g_concat_dir_and_file
21420 function from gnome-libs. This uses the right path separator
21421 based on the OS, and also works around a bug in some systems where
21422 a double slash is not allowed.
21423 (default_assembly_name_resolver): Use g_concat_dir_and_file
21424 (mono_assembly_open): ditto.
21426 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
21428 * metadata.c (mono_metadata_signature_equal): impl.
21430 * *: void is now a realy MonoType (instead of using NULL)
21432 * metadata.c (do_mono_metadata_parse_type): use
21433 mono_metadata_parse_type to parse void value.
21435 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
21437 * metadata.c, metadata.h: in the signature and method header store
21438 only the space required for holding the loca vars and incoming arguments.
21440 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
21442 * metadata.c (do_mono_metadata_parse_type): treat void like any
21443 other type (instead of assigning NULL);
21445 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
21447 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
21449 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
21451 * image.c (do_mono_image_open): added a cache for arrays.
21453 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
21455 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
21456 decode a single column from a row in a metadata table and changes
21457 to take advantage of it in the typedef locator (gives a nice speed up).
21458 Store offset info for function params.
21460 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
21462 * image.h (MONO_IMAGE_IS_CORLIB): removed
21464 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
21466 * assembly.c: how could mono_assembly_close () had ever worked?
21467 * metadata.c, metadata.h: provide offset info for local vars.
21468 Implement mono_type_size () to take care of alignment as well
21469 as size (it was mono_field_type_size in cli/class.c before).
21471 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
21473 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
21475 * assembly.h (CORLIB_NAME): set to corlib.dll
21477 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
21479 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
21481 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
21482 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
21483 tokentype.h: massive namespace cleanup.
21485 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
21487 * metadata.h, metadata.c: decode exception clauses when parsing method header.
21489 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
21491 * metadata.c (mono_metadata_free_type): added check for type !=
21492 NULL (void) before calling mono_metadata_free_type()
21494 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
21496 * metadata.h, row_indexes.h: added header with enumerations to use
21497 to index in the columns from tables in metadata and to decode coded
21498 tokens: we should start using this instead of embedding magic numbers
21501 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
21503 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
21504 Move metadata_t info from cli_image_info_t to MonoImage, where
21505 it's easily accessible. Changed all the uses accordingly.
21506 Added the method and class caches to MonoImage.
21507 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
21508 and mono_metadata_decode_value () signature to be more consistent
21509 with the other parse functions (and simplify code). Taken advantage
21510 of zero-length array allocation with GCC. Removed reduntant (and
21511 wrong) MonoFieldType struct and use MonoParam instead. Changed
21512 mono_metadata_parse_field_type () to use common code for parsing.
21513 Added mono_metadata_typedef_from_field () and
21514 mono_metadata_typedef_from_method () to lookup a typedef index from a
21515 field or method token.
21516 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
21518 2001-07-23 Miguel de Icaza <miguel@ximian.com>
21520 * metadata.c (mono_metadata_parse_field_type): Implement.
21521 (do_mono_metadata_parse_type): Split engine from
21522 mono_metadata_parse_type, so that we can create smaller structures
21523 for things that just have one pointer to the MonoType (look at
21526 2001-07-20 Miguel de Icaza <miguel@ximian.com>
21528 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
21529 as Jan Gray found out, it is incorrect.
21531 2001-07-18 Miguel de Icaza <miguel@ximian.com>
21533 * assembly.c: Implement asssembly loading. This loads an image
21534 and loads all the referenced assemblies. Come to think of it, we
21535 could always do lazy loading of the assemblies.
21537 * image.c (mono_image_open): Keep loaded images in a hashtable.
21539 * image.h (MonoImage): Add reference count.
21541 2001-07-17 Miguel de Icaza <miguel@ximian.com>
21543 * assembly.c (mono_assembly_open): Keep track of the file name in
21544 case the assembly has no ASSEMBLY table.
21546 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
21549 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
21551 * metadata.c, metadata.h: decode local vars in method header
21552 parse function. Change callers accordingly.
21554 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
21556 * metadata.h, cil-coff.h: protect against multiple inclusion.
21557 Added some new structures to hold information decoded from metadata:
21558 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
21559 and relevant decoding/free functions.
21560 * metadata.c: implement decoding functions. Add warning for out of bounds
21561 index in mono_metadata_locate(). Implement mono_get_method () to retreive
21562 all the info about a method signature and invocation. Remove check on
21563 uninitialized local var in parse_mh() and fix memory leak.
21565 2001-07-12 Miguel de Icaza <miguel@ximian.com>
21567 * metadata.h: More macros.
21569 * tokentype.h: New file.
21571 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
21573 * assembly.c: added a consistency check and initialize
21574 some structures with g_new0().
21575 * metadata.c: fixed a couple more bugs in table size computation
21576 and add other checks for out-of bound access to metadata.
21578 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
21580 * metatada.c: fix bugs computing table sizes. Spew a
21581 warning when index in string heap is out of bounds.
21583 2001-07-04 Miguel de Icaza <miguel@ximian.com>
21585 * metadata.h: Add a couple of macros to manipulate tokens.
21587 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
21589 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
21590 cli_section_tables).
21592 2001-07-01 Miguel de Icaza <miguel@ximian.com>
21594 * metadata.c (mono_metadata_user_string): New function, provides
21595 access to the UserString heap.
21597 2001-06-27 Miguel de Icaza <miguel@ximian.com>
21599 * metadata.c: Add inline documentation.
21601 2001-06-26 Miguel de Icaza <miguel@ximian.com>
21603 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
21606 2001-06-22 Miguel de Icaza <miguel@ximian.com>
21608 * typeattr.h: New file, TypeAttribute flags.
21610 2001-06-21 Miguel de Icaza <miguel@ximian.com>
21612 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
21613 mono_assembly_ensure_section): Section loading code.
21614 (load_section_tables): Load the sections.
21616 * mono/metadata/metadata.c (mono_metadata_locate_token,
21617 mono_metadata_locate): Functions to locate the information
21618 definition given a token or a table and an index.
21619 (mono_metadata_compute_table_bases): New.
21620 (compute_size): New function to compute the sizes of the various
21623 * mono/metadata/metadata.h: Finish listing the different index
21626 * mono/metadata/pedump.c: Improve to dump new information.
21628 2001-06-19 Miguel de Icaza <miguel@ximian.com>
21630 * mono/metadata/metadata.c: Entered all the tables matching
21633 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2