1 2006-01-25 Ankit Jain <jankit@novell.com>
2 Raja R Harinath <rharinath@novell.com>
4 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
5 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
8 2006-01-25 Martin Baulig <martin@ximian.com>
10 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
11 `MonoDebuggerThread' into debug-debugger.c.
13 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
15 * profiler.c: fix printing of data.
17 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
19 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
20 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
22 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
24 * object.c: fix deadlock related to string interning.
26 2006-01-23 Martin Baulig <martin@ximian.com>
28 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
30 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
32 2006-01-23 Martin Baulig <martin@ximian.com>
34 * mono-debug.h: Moved the prototypes of some functions which are
35 used by the JIT here from mono-debug-debugger.h.
37 2006-01-21 Martin Baulig <martin@ximian.com>
39 * Makefile.am: Don't install mono-debug-debugger.h.
41 2006-01-21 Martin Baulig <martin@ximian.com>
43 * mono-debug-debugger.h: Enforce the private status of this header
44 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
45 Moved some stuff from mono-debugger-jit-wrapper.h here.
47 2006-01-20 Raja R Harinath <rharinath@novell.com>
49 * class.c (mono_class_from_typeref): Add a sanity test to help
50 catch lack of assembly load/search hooks.
52 2006-01-19 Zoltan Varga <vargaz@gmail.com>
54 * marshal.c (emit_struct_conv): Relax the fields with same offset
55 check even more. Fixes #77230.
57 2006-01-18 Martin Baulig <martin@ximian.com>
59 * loader.c (find_method_in_class): Added `gboolean is_inflated'
60 argument; if false, we compare the uninstantiated signatures.
61 (method_from_memberref): Compare the uninstantiated signatures;
64 2006-01-18 Robert Jordan <robertj@gmx.net>
66 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
67 Clear the weak link. Fixes bug #77170.
69 * gc.c (mono_gchandle_free):
70 Reflect *-gc.c changes (tiny optimization).
72 2006-01-18 Zoltan Varga <vargaz@gmail.com>
74 * metadata.c (mono_metadata_signature_dup): Applied patch from
75 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
78 2006-01-17 Zoltan Varga <vargaz@gmail.com>
80 * marshal.c (emit_struct_conv): Allow fields with the same offset when
81 marshalling from native to managed code. Fixes #77230.
83 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
85 * threadpool.c: fix problem (Mac only) when more than one asynchronous
86 connect. Fixes bug #77020.
88 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
90 * class.c: fixed id assignement for nested interfaces (bug #77275).
91 Added also better info for --print-vtable debugging.
93 2006-01-12 Martin Baulig <martin@ximian.com>
95 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
96 interfaces on-the-fly; fixes #76625.
99 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
100 don't need that anymore.
102 2006-01-12 Miguel de Icaza <miguel@novell.com>
105 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
106 To avoid initing the nested_classes when not needed I turned the
107 PeerCredData as a toplevel internal class, as it has to be shared
110 Fixes the CASA issue.
112 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
114 * domain.c: Accessors for MonoJitInfo
116 * profiler-private.h: Add jitinfo to the end jit hook
118 * profiler.[ch]: Define new hooks, called after jitting which give
119 the MonoJitInfo that was compiled
121 2006-01-10 Martin Baulig <martin@ximian.com>
123 * class.c (mono_class_setup_events): Add support for generic
124 classes; fixes #76440.
126 2006-01-06 Raja R Harinath <rharinath@novell.com>
129 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
132 2006-01-03 Zoltan Varga <vargaz@gmail.com>
134 * object.c (mono_runtime_invoke_array): Add Nullable support.
136 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
138 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
140 * file-io.c: Don't consider sockets as directory and avoid an endless
141 loop. Fix bug #76966.
143 2006-01-03 Zoltan Varga <vargaz@gmail.com>
145 * object.c (mono_nullable_init): New helper function.
146 (mono_nullable_box): Ditto.
148 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
150 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
152 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
154 2006-01-02 Zoltan Varga <vargaz@gmail.com>
156 * class.c (mono_class_is_assignable_from): Make T assignable to
159 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
161 * appdomain.c: Bump corlib version to 46.
162 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
163 serialization purpose) and changed ves_icall_System_Reflection_
164 Assembly_get_code_base signature to accept a boolean (to escape, or
165 not, the assembly code base).
167 2005-12-23 Dick Porter <dick@ximian.com>
171 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
172 CreateEvent icall now returns "created" boolean parameter.
174 2005-12-22 Zoltan Varga <vargaz@gmail.com>
176 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
179 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
180 when attr_klass is an interface. Fixes #77045.
182 2005-12-20 Zoltan Varga <vargaz@gmail.com>
184 * marshal.c (emit_struct_conv): Fix previous patch.
186 * marshal.c (emit_struct_conv): Add a check for fields with the same
189 2005-12-20 Raja R Harinath <rharinath@novell.com>
191 Fix regression in Mono.C5.
192 * class.c (mono_class_create_generic): If 'klass' is an interface
193 set up the interface offsets.
194 (mono_class_is_assignable_from): Don't throw away generic arguments.
196 2005-12-19 Raja R Harinath <rharinath@novell.com>
198 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
201 2005-12-15 Raja R Harinath <rharinath@novell.com>
203 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
205 (do_mono_metadata_parse_generic_class): Don't pass the current
206 generic context when parsing the type being instantiated: it
207 cannot use it, anyway.
209 * loader.c (method_from_memberref): Don't inflate a signature if
210 it doesn't contain any type parameters.
212 2005-12-15 Zoltan Varga <vargaz@gmail.com>
214 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
216 2005-12-14 Martin Baulig <martin@ximian.com>
219 (mono_type_get_name_recurse): Don't return null for type
220 parameters and open generic classes.
221 (mono_class_setup_methods): Don't exclude generic instances.
222 (mono_get_unique_iid): Use different IDs for different
223 instantiations of the same generic type.
224 (mono_class_setup_vtable): Only use setup_generic_vtable() for
225 open generic instances; create a normal vtable for closed generic
227 (mono_class_setup_vtable_general): We're now also called for
228 closed generic instances.
231 (mono_reflection_bind_generic_parameters): Correctly use
232 mono_metadata_lookup_generic_inst() everywhere.
234 2005-12-14 Zoltan Varga <vargaz@gmail.com>
236 * object.c (mono_class_create_runtime_vtable): Call
237 mono_class_setup_vtable ().
239 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
241 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
244 * loader.c (mono_loader_set_error_type_load): Print the type load
245 warnings to the console so they are more visible to the user.
246 (mono_loader_set_error_method_load): Ditto.
248 * reflection.c (ensure_runtime_vtable): Revert the last change as it
251 * reflection.c (ensure_runtime_vtable): Fix build.
253 * reflection.c (ensure_runtime_vtable): Disable an optimization which
254 doesn't work in all cases.
256 2005-12-13 Zoltan Varga <vargaz@gmail.com>
258 * object.c (mono_array_new_full): Treat a single dimensional array
259 with 0 lower bounds as an szarray. Fixes #76973.
261 * reflection.c (custom_attr_visible): Really fix this.
263 2005-12-12 Zoltan Varga <vargaz@gmail.com>
265 * reflection.c (custom_attr_visible): Allow nested public attributes
268 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
271 2005-12-12 Raja R Harinath <harinath@gmail.com>
273 * class.c (set_generic_param_owner): Delete.
274 (mono_class_create_from_typedef): Don't set ->owner field of
275 generic parameters to "param containers" of enclosing classes.
276 * reflection.c (mono_reflection_initialize_generic_parameter):
279 2005-12-11 Zoltan Varga <vargaz@gmail.com>
281 * reflection.c (custom_attr_visible): Fix build.
283 2005-12-10 Zoltan Varga <vargaz@gmail.com>
285 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
288 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
289 handling of null parameter defaults.
291 2005-12-09 Raja R Harinath <rharinath@novell.com>
293 * class.c (mono_class_from_generic_parameter): Don't set
294 klass->generic_container.
295 (my_mono_class_from_generic_parameter): Likewise.
297 2005-12-07 Zoltan Varga <vargaz@gmail.com>
299 * reflection.c (load_public_key): Fix a warning.
300 (method_encode_code): Fix unaligned accesses.
302 2005-12-07 Martin Baulig <martin@ximian.com>
304 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
307 (write_generic_param_entry): Encode our custom attrs.
309 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
311 2005-12-07 Martin Baulig <martin@ximian.com>
313 * reflection.c (encode_new_constraint): Removed; we don't use the
314 `NewConstraintAttribute' anymore.
316 2005-12-06 Zoltan Varga <vargaz@gmail.com>
318 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
319 not fire a TypeResolve event when Assembly.GetType () is called.
321 2005-12-05 Ben Maurer <bmaurer@ximian.com>
323 Beginning of support for nullable types in the runtime. Parts of
324 this patch are from Martin.
326 * appdomain.c (MONO_CORLIB_VERSION): Bump
328 * domain.c (mono_init_internal): get the nullable type
330 * class.c (mono_class_is_nullable): New method
331 (mono_class_get_nullable_param): New mehod
332 (mono_class_create_generic): In types T? set cast_class to T
334 * class-internals.h (MonoDefaults): new nullable default class
335 (mono_class_get_nullable_param, mono_class_get_nullable_param):
338 2005-12-05 Raja R Harinath <rharinath@novell.com>
340 * metadata.c (select_container): New. Refactor code to select the
341 appropriate GenericContainer given the type of generic parameter
343 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
344 not a MonoGenericContext. Use select_container. Update parameters.
345 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
347 (unwrap_arrays): Remove duplicate tests.
348 (find_generic_param): Rename from 'has_same_context'. Now walks a
349 generic instantiated class to find any arguments that are generic
351 (mono_type_create_from_typespec_full): Use find_generic_param to
352 avoid evicting some generic instantiations from the typespec
355 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
357 * reflection.c: fixed writing of doubles on ARM FPA.
359 2005-12-02 Robert Jordan <robertj@gmx.net>
361 * icall.c: Fixed EventInfo.ReflectedType (#76829).
363 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
365 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
366 least on SUSE 10 they are not the same (on debian, they are just the
369 2005-12-01 Raja R Harinath <rharinath@novell.com>
371 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
372 DeclaringType for VARs and MVARs.
373 * class.c (set_generic_param_owner): Fix initialization of owner
376 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
378 * icall.c: fixed Enum.ToObject() to correctly convert the values.
380 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
382 * threadpool.c: workaround for a bug that shows up on the Mac:
383 select()+connect() on a blocking socket is not like it should
384 be, so we proceed to connect() in that case, wasting the I/O
385 threadpool thread until connect succeedes. Fixes bug #75436.
387 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
389 * threadpool.c: fix typo when setting file descriptor states.
391 2005-11-28 Raja R Harinath <rharinath@novell.com>
393 * class-internals.h (MonoGenericContainer.is_signature): Remove.
394 * metadata.c (mono_metadata_parse_method_signature_full): Don't
395 create a temporary signature container.
396 (mono_metadata_parse_generic_param): Update to changes.
397 (mono_type_create_from_typespec_full): Update to changes.
398 * loader.c (method_from_memberref): Don't use a
399 MonoGenericContainer while parsing a memberref signature.
400 (method_from_methodspec): Remove dead-store of the 'container'
401 variable. It's overwritten before use.
403 * metadata.c (mono_type_create_from_typespec_full): Make debugging
405 (mono_metadata_parse_generic_param): Likewise.
406 * loader.c (find_method_in_class): Does not need a
407 MonoGenericContainer. Use 'mono_method_signature' rather than
408 'mono_method_signature_full'.
409 (find_method, mono_get_method_constrained, method_from_memberref):
412 * metadata.c (mono_type_create_from_typespec_full): Ensure that
413 owner-less generic-parameters are never evicted from the typespec
416 * loader.c (method_from_memberref): Don't use the current context
417 when parsing signatures.
418 (method_from_methodspec, mono_get_method_from_token): Update to changes.
420 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
421 side-effects in g_assert.
422 * loader.c (mono_get_method_from_token): Resolve klass earlier so
423 that we don't potentially lose information.
425 2005-11-26 Dick Porter <dick@ximian.com>
428 * threads.c: icalls to implement basic (ie, not named)
429 System.Threading.Semaphore.
431 2005-11-24 Dick Porter <dick@ximian.com>
434 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
435 Use GetProcessId() if it's available.
437 2005-11-23 Zoltan Varga <vargaz@gmail.com>
439 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
441 2005-11-23 Raja R Harinath <rharinath@novell.com>
442 Ankit Jain <jankit@novell.com>
444 * loader.c (mono_get_method_from_token): Initialize 'method' field
445 of all generic parameters before parsing the signature. Remove
446 code that "fixed"-up MVAR references.
448 2005-11-23 Ankit Jain <jankit@novell.com>
450 * metadata.c (mono_metadata_has_generic_params):
451 (mono_metadata_load_generic_param_constraints):
452 (mono_metadata_load_generic_params): Move duplicate code ...
453 (mono_metadata_get_generic_param_row): ... here. Returns the
454 first row-id in GenericParam table for a given owner (token).
455 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
458 2005-11-23 Raja R Harinath <rharinath@novell.com>
459 Ankit Jain <jankit@novell.com>
461 * metadata.c (mono_metadata_class_equal): Pass signature_only when
463 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
464 type->data.generic_param only if the type is an MVAR.
465 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
466 leak owner-less VARs and MVARs into managed space.
468 2005-11-21 Martin Baulig <martin@ximian.com>
471 (MonoMethod): Moved the `generic_container' here from
472 `MonoMethodNormal' since we now also need it for
474 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
475 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
476 an union containing both `MonoMethodNormal' and
480 (mono_get_method_from_token): Allow implementing generic methods
484 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
487 2005-11-17 Dick Porter <dick@ximian.com>
491 * process.c: Split the Process Start_internal icall into
492 ShellExecuteEx_internal and CreateProcess_internal, which are
493 called depending on whether UseShellExecute is true. Fixes bug
496 * appdomain.c (MONO_CORLIB_VERSION): Incremented
498 2005-11-17 Zoltan Varga <vargaz@gmail.com>
500 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
501 'msize' parameters, use the information in 'mspec' instead.
502 (emit_object_to_ptr_conv): Ditto.
504 * marshal.c (emit_struct_conv): Handle explicit layout structs with
505 fields out of order. Fixes #76733.
507 2005-11-17 Ankit Jain <jankit@novell.com>
509 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
511 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
513 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
516 2005-11-16 Zoltan Varga <vargaz@gmail.com>
518 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
519 for types with non-auto layout. Fixes #76717.
521 2005-11-16 Ankit Jain <jankit@novell.com>
523 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
524 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
525 if generic_context is null.
526 (mono_metadata_generic_param_equal): param->owner can be null.
527 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
530 2005-11-16 Zoltan Varga <vargaz@gmail.com>
532 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
535 2005-11-15 Martin Baulig <martin@ximian.com>
537 * object.c (set_value): Use mono_class_from_mono_type() instead of
538 the hack for generic instances; fixes #76136.
540 2005-11-15 Zoltan Varga <vargaz@gmail.com>
542 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
545 * image.c (load_metadata_ptrs): Initialize the new fields.
547 * reflection.c (create_dynamic_mono_image): Ditto.
549 * reflection.c (build_compressed_metadata): Use the new fields.
551 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
554 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
557 2005-11-15 Ankit Jain <jankit@novell.com>
558 Raja R Harinath <harinath@gmail.com>
560 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
561 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
562 new per-generic_container cache if the cached MonoType's context matches
564 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
565 to the expected context.
566 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
568 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
570 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
571 we changed the signature of an icall.
572 * icall.c: Modify to mono_double_ParseImpl return true/false
573 depending on the success, instead of throwing the exception. This will
574 help us in Double.TryParse methods.
576 2005-11-14 Zoltan Varga <vargaz@gmail.com>
578 * marshal.c (emit_marshal_object): Throw an exception when
579 marshalling 'object' instead of crashing. Fixes #76696.
581 2005-11-11 Zoltan Varga <vargaz@gmail.com>
583 * class-internals.h: Add prototype for mono_type_get_full_name ().
585 2005-11-11 Dick Porter <dick@ximian.com>
587 * threads.c (mono_thread_manage): Make sure the main thread has
588 abandoned all its mutexes when cleaning up. Fixes bug 74680.
590 2005-11-11 Zoltan Varga <vargaz@gmail.com>
592 * loader.c (mono_loader_set_error_type_load): Log a warning to the
593 console about the missing type.
594 (mono_loader_set_error_method_load): Ditto.
596 2005-11-09 Miguel de Icaza <miguel@novell.com>
598 * mono-config.c (mono_get_config_dir): Set the system defaults if
601 * assembly.c (mono_set_dirs): New API entry point to set the
602 assembly and the config directory in one call
604 2005-11-09 Zoltan Varga <vargaz@gmail.com>
606 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
607 the ftnptr was created from a delegate in a domain other than the
608 current domain. Fixes #75377.
610 * exception.h exception.c: Add mono_get_exception_not_supported ().
612 2005-11-08 Martin Baulig <martin@ximian.com>
614 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
616 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
618 * security-manager.h: Added definitions to deal with strongname key
619 pairs bigger (and smaller) than 1024 bits.
620 * reflection.c: Remove hardcoded strongname size (128 bytes) and
621 adjust wrt the public key length being used.
623 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
625 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
626 Windows build (r51396-51397).
628 2005-11-03 Martin Baulig <martin@ximian.com>
630 * class.c (mono_class_setup_vtable_general): Also add generic
631 methods to the vtable; fixes #76581.
633 2005-11-01 Miguel de Icaza <miguel@novell.com>
635 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
636 sure that we lookup GetString method from the System.Text.Encoding
637 class, not the derived class or we get an empty method.
641 2005-10-25 Miguel de Icaza <miguel@novell.com>
643 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
644 if it has been previously set (embedders).
646 Make mono_set_rootdir available also on Unix.
648 005-10-24 Robert Jordan <robertj@gmx.net>
650 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
652 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
654 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
655 only calls which are made to native code use this flag.
657 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
659 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
661 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
662 Add support for FieldBuilders.
664 2005-10-29 Martin Baulig <martin@ximian.com>
667 (mono_debug_using_mono_debugger): New public method; returns
668 whether we're running inside the debugger.
670 2005-10-27 Zoltan Varga <vargaz@gmail.com>
672 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
673 for Method/Constructor/FieldBuilders.
675 2005-10-26 Zoltan Varga <vargaz@gmail.com>
677 * reflection.c (module_add_cattrs): Save custom attributes for global methods
680 2005-10-26 Martin Baulig <martin@ximian.com>
682 * mono-debug-debugger.c
683 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
685 2005-10-24 Raja R Harinath <harinath@gmail.com>
687 * icall.c (base64_to_byte_array): Don't pass an out-of-range
690 2005-10-21 Zoltan Varga <vargaz@gmail.com>
692 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
693 when passing valuetypes byref. Fixes #76502.
695 2005-10-19 Jackson Harper <jackson@ximian.com>
697 * profiler.c: Don't put a . in front of types that are not in a
700 2005-10-18 Zoltan Varga <vargaz@gmail.com>
702 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
704 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
706 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
708 (mono_marshal_get_ldflda_wrapper): Fix a warning.
710 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
712 * assembly.c metadata-internals.h icall.c: Define an additional
713 parameter for mono_assembly_name_parse_full, so we can avoid creating
714 S.R.AssemblyName.Version when no version info wasn't passed.
716 2005-10-09 Miguel de Icaza <miguel@novell.com>
718 * class.c (mono_type_get_full_name): Reimplement method that was
723 2005-10-10 Zoltan Varga <vargaz@gmail.com>
725 * profiler.c (output_newobj_profile): Fix printing of Total memory
728 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
730 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
732 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
734 * threads.c: remove debug output.
736 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
738 * threads.c (mono_thread_manage): Fix crashes if more than 64
739 threads need to be aborted. Hopefully fixes #75899.
741 * assembly.c (mono_stringify_assembly_name): New helper function.
743 * class.c: Use mono_stringify_assembly_name instead of the similar
746 * assembly.h assembly.c: Add support for calling a postload search
747 hook if an assembly cannot be loaded.
749 * appdomain.c: Register new search hooks which call the AssemblyResolve
750 events in AppDomain. Fixes #75231
752 2005-10-07 Martin Baulig <martin@ximian.com>
754 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
755 methods without debug info.
757 2005-10-07 Zoltan Varga <vargaz@gmail.com>
759 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
762 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
764 * file-io.c: now that we return symlinks, use lstat and, when the file
765 is a symbolic link, stat, to get the file attributes. Also avoid the
766 conversion to/from utf16/external.
768 2005-10-06 Zoltan Varga <vargaz@gmail.com>
770 * class.c (mono_class_layout_fields): Compute klass->has_references
771 correctly if an embedded valuetype is not yet initialized. Fixes
774 2005-10-04 Martin Baulig <martin@ximian.com>
777 (mono_metadata_load_generic_param_constraints): New public
778 function; splitted the constraints loading out from
779 mono_metadata_load_generic_params().
781 * class.c (mono_class_create_from_typedef): Call
782 mono_metadata_load_generic_param_constraints() after setting up
783 the type and creating our parent; fixes #75329.
785 2005-10-04 Martin Baulig <martin@ximian.com>
787 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
788 non-dynamic parent classes.
790 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
792 * file-io.c : win32 build fix (ETXTBSY seems not found).
794 2005-10-04 Martin Baulig <martin@ximian.com>
797 (mono_image_get_methodspec_token): Make the cache actually work;
800 2005-10-04 Martin Baulig <martin@ximian.com>
802 * class.c (mono_class_name_from_token): Removed the unneccessary
803 `MonoGenericContext *' argument.
805 2005-10-04 Martin Baulig <martin@ximian.com>
808 (method_from_methodspec): Make the caching work again; fixes the
809 performance regression from #76262.
811 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
815 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
816 GetFileSystemEntries that performs the same work but without going
817 into io-layer, locking, etc.
819 2005-09-30 Zoltan Varga <vargaz@gmail.com>
821 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
822 ThreadState_Stopped as well. Fixes #76047.
824 2005-09-29 Martin Baulig <martin@ximian.com>
827 (inflate_generic_context): If the new context has a `gmethod', set
828 its `container' that that gmethod's `container'.
831 (mono_metadata_parse_generic_param): Simplify things;
832 `generic_container = generic_context->container;' is just fine.
834 * loader.c (method_from_methodspec): Code cleanups.
836 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
838 * decimal.c: fix warning (and let gcc generate correct
839 code on ARM with optimizations).
841 2005-09-28 Martin Baulig <martin@ximian.com>
844 (method_from_memberref): Added `MonoGenericContext *class_context'
845 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
846 (method_from_methodspec): If we're a memberref, use the enclosing
847 context when parsing its parent. Fixes #76262; see gtest-206.cs.
849 2005-09-28 Martin Baulig <martin@ximian.com>
851 * object.c (mono_runtime_invoke_array): Added support for
852 MONO_TYPE_GENERICINST; fixes #75917.
854 2005-09-27 Martin Baulig <martin@ximian.com>
856 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
857 `k->byval_arg.type' to determine the actual type.
859 * loader.c (method_from_methodspec): Removed some hacks.
861 2005-09-27 Ben Maurer <bmaurer@ximian.com>
863 * class-internals.h (mono_field_is_deleted): Do the test for
864 rtspecialname before we check the actual name of the field. This
865 prevents us from dereferencing a pointer into the string table,
866 saving us from accessing a few pages
868 * *.c: Replace the use of {Enter,Leave}CriticalSection with
869 macros. This will allow a deadlock debugger to easily be plugged
872 2005-09-27 Martin Baulig <martin@ximian.com>
874 * loader.c (method_from_methodspec): Create a "signature"
875 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
877 2005-09-27 Martin Baulig <martin@ximian.com>
880 (inflate_generic_class): Correctly set the new context's
884 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
885 instead of a `MonoGenericContext *'.
886 (mono_method_signature_full): Take a `MonoGenericContainer *'
887 instead of a `MonoGenericContext *'.
890 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
891 instead of a `MonoGenericContext *'.
892 (mono_metadata_parse_method_signature_full): Likewise.
894 2005-09-26 Martin Baulig <martin@ximian.com>
897 (mono_class_from_generic_parameter): Set `klass->generic_container'
898 (mono_class_from_generic_parameter): Likewise.
899 (mono_bounded_array_class_get): We inherit the generic container
900 from the element class.
903 (find_method, find_method_in_class): Take a `MonoGenericContext *'
904 argument rather than computing it here.
905 (method_from_memberref): Correctly set the generic context before
906 parsing the signature. Fixes #75681.
908 2005-09-26 Zoltan Varga <vargaz@gmail.com>
910 * object.c (mono_class_has_special_static_fields): Fix warnings.
912 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
914 * assembly.c: Add parse_public_key function, to
915 par the public keys. Also added mono_assembly_name_parse_full,
916 to define it the parsed key should be freed or not.
917 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
918 to parse a long format assembly name.
919 * metadata-internals.h: Keep mono_assembly_name_parse_full as
920 private, since calling it to preserve the key requires
923 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
925 * locales.c : removed HAVE_ICU part.
927 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
929 * object.c (mono_class_create_runtime_vtable): Avoid calling
930 field_is_special_static if the klass has no special static fields.
932 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
933 (MonoCachedClassInfo): Likewise.
935 * object.c (mono_class_has_special_static_fields): New helper function.
937 2005-09-23 Zoltan Varga <vargaz@gmail.com>
939 * class.c (mono_class_create_from_typedef): Don't call
940 interfaces_from_typedef_full for enums.
941 (mono_class_create_from_typedef): Compute the base types of enums directly
942 without calling mono_class_setup_fields ().
943 (mono_class_find_enum_basetype): New helper function.
945 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
946 one place inside the string heap.
948 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
950 * class.c: locking fixes, code cleanups, some docs added.
951 Allocate some data structures in the image mempool.
953 2005-09-23 Zoltan Varga <vargaz@gmail.com>
955 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
958 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
960 * class-internals.h, class.c, reflection.c: reduce memory taken by
963 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
965 * metadata.c, metadata.h, loader.h: documentation updates, code and
968 2005-09-23 Zoltan Varga <vargaz@gmail.com>
970 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
973 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
974 page faults caused by the runtime while reading metadata.
976 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
978 * socket-io.c: the field names were changed 3 months ago and no one
979 realized until bug #76077 got filed!
981 2005-09-20 Martin Baulig <martin@ximian.com>
983 * icall.c (assembly_icalls): Removed some unused debugger icalls.
985 2005-09-20 Martin Baulig <martin@ximian.com>
987 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
988 write the rank into the class entry.
990 2005-09-20 Martin Baulig <martin@ximian.com>
992 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
994 2005-09-19 Zoltan Varga <vargaz@gmail.com>
996 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
998 * icall.c (custom_attrs_defined_internal): New icall.
1000 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
1002 (mono_custom_attrs_construct_by_type): New helper function.
1004 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
1006 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
1007 terminate the resulting string. Fixes #76123.
1009 2005-09-16 Martin Baulig <martin@ximian.com>
1012 (mono_debug_add_method): Ignore inflated methods for the moment.
1014 2005-09-14 Martin Baulig <martin@ximian.com>
1016 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
1018 2005-09-13 Zoltan Varga <vargaz@gmail.com>
1020 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
1021 return a success/failure indication.
1022 (mono_metadata_interfaces_from_typedef_full): Ditto.
1023 (get_constraints): Ditto.
1025 2005-09-12 Zoltan Varga <vargaz@gmail.com>
1027 * marshal.c (emit_marshal_array): Fix handling of null arrays.
1029 * marshal.c (emit_marshal_array): Add support for returning string
1030 arrays from delegates. Fixes #76063.
1032 * marshal.c: Use the emit_ldloc/stloc macros where possible.
1034 2005-09-11 Zoltan Varga <vargaz@gmail.com>
1036 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
1039 2005-09-09 Zoltan Varga <vargaz@gmail.com>
1041 * reflection.c icall.c: Fix after mono_get_exception_type_load
1044 * assembly.c (mono_assembly_get_assemblyref): New helper function.
1045 (mono_assembly_load_reference): Use the new helper.
1047 * class-internals.h (MonoLoaderError): New structure containing
1048 information about type loading errors.
1050 * class-internals.h loader.c: Add APIs to store per-thread loader
1053 * loader.c class.c: Set the loader error if needed.
1055 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
1057 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
1059 * decimal.c: fixed to handle the broken ARM fp format.
1061 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
1063 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
1066 2005-09-06 Martin Baulig <martin@ximian.com>
1068 * domain.c (supported_runtimes): Added v2.0.50727.
1070 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
1072 * culture-info.h: reduce the size of some structures.
1074 2005-09-05 Martin Baulig <martin@ximian.com>
1076 Reflect latest API changes in the August CTP.
1079 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
1080 ("MonoType.HasGenericArguments"): Removed.
1081 ("MonoMethod.BindGenericParameters"): Renamed to
1082 "MakeGenericMethod".
1083 ("MethodBuilder.BindGenericParameters"): Renamed to
1084 "MakeGenericMethod".
1086 2005-09-05 Martin Baulig <martin@ximian.com>
1088 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
1090 2005-09-05 Martin Baulig <martin@ximian.com>
1092 Applying a patch from Michal Moskal <malekith@nemerle.org>.
1094 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
1095 generic_container is non-NULL.
1097 2005-09-05 Martin Baulig <martin@ximian.com>
1099 Applying a patch from Michal Moskal <malekith@nemerle.org>.
1101 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
1103 2005-08-29 Michal Moskal <malekith@nemerle.org>
1105 * reflection.c (encode_locals,
1106 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
1107 for large generic types.
1109 2005-09-05 Martin Baulig <martin@ximian.com>
1111 Applying a patch from Michal Moskal <malekith@nemerle.org>.
1113 * class.c (mono_dup_array_type): New public method.
1114 (mono_metadata_signature_deep_dup): New public method.
1115 (dup_type): Correctly duplicate array and function types.
1117 2005-09-05 Martin Baulig <martin@ximian.com>
1119 Applying a patch from Michal Moskal <malekith@nemerle.org>.
1121 * reflection.c (get_default_param_value_blobs): Handle generic types
1122 and generic methods.
1124 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
1126 * class.c: Fixed error reporting (method/class were inversed) for
1127 inheritance demands.
1128 * security-manager.c|h: Added the AppDomain when calling the managed
1129 System.Security.SecurityManager.InheritanceDemand method.
1131 2005-09-01 Raja R Harinath <rharinath@novell.com>
1133 * reflection.c (encode_marshal_blob): 'marshaltype' and
1134 'marshaltyperef' are alternate sources for the custom marshaler
1137 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
1139 * class.c: fix creation of array classes with rank == 1
1140 (patch by Ankit Jain <jankit@novell.com>).
1142 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
1144 * object.c: fix check for creating the bound data for arrays vs
1147 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1149 * object.c: configuration file name is now based on the executable name,
1150 not the image name. Fixes bug #75931.
1152 2005-08-29 Zoltan Varga <vargaz@gmail.com>
1154 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
1155 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
1157 2005-08-25 Zoltan Varga <vargaz@gmail.com>
1159 * rand.c: Use wincrypt.h instead of WinCrypt.h.
1161 2005-08-24 Ankit Jain <jankit@novell.com>
1162 Raja R Harinath <rharinath@novell.com>
1164 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
1165 called by it recursively.
1166 (mono_class_init): Remove special case in pending_init handling, since it's
1167 superseded by the fix to mono_class_from_typeref.
1169 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
1171 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
1172 BROKEN_THREAD_START stuff.
1174 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
1176 * class-internals.h object.c: Add a new kind of trampoline called a delegate
1179 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
1181 * object.c (mono_delegate_ctor): Replace the original function address with
1182 a delegate trampoline.
1184 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
1186 * icall.c: add boolean argument to base64_to_byte_array and
1187 InternalFromBase64String to control whether a whitespace-only string
1188 is allowed (or should casue a FormatException to be thrown). We need
1189 this as the behavior has changed between MS.NET 1.x and 2.0, and we
1190 to match the MS behaviour in both profiles.
1191 * appdomain.c: Bump corlib version.
1193 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1195 This patch implements a big portion of publisher policy
1196 support, used to bind assembly versions and redirect
1197 one assembly from version A to version B.
1200 New GSList loaded_assembly_bindings, for storing the cached
1202 (assembly_binding_maps_name): New static function for checking if a
1203 assembly binding information maps an assembly name.
1204 (mono_assembly_binding_info_free): New function for freeing
1205 assembly binding information resources.
1206 (get_publisher_policy_info): New static function for retrieving
1207 assembly binding information from a MonoImage.
1208 (compare_versions): New static function for comparing an assembly
1209 binding information data and the version of an assembly name.
1210 (check_policy_versions): New static function for checking if an
1211 assembly binding info mapping an assembly name is valid for it.
1212 (mono_assembly_load_publisher_policy): New static function for
1213 loading the 'policy.major.minor.MyAssembly' image for an assembly
1214 with an assembly name 'aname'.
1215 (mono_assembly_bind_version): New static function for updating
1216 assembly redirection.
1217 (mono_assembly_apply_binding): New static function for applying
1219 (search_binding_loaded): New static function for searching
1220 loaded assembly binding infos in the cache domain.
1221 (mono_assembly_load_full): Don't apply assembly binding for
1222 reflection only assemblies.
1224 * metadata-internals.h: Add MonoAssemblyBindingInfo,
1225 which contains information about assembly binding. Also
1226 declare signature for mono_config_parse_publisher_policy ()
1227 function, used to retrieve pub policy info.
1230 (publisher_policy_start): New static function used to parse publisher
1231 policy config files.
1232 (publisher_policy_parser): New static MonoParseHandler containing
1233 the functions used when parsing config files.
1234 (mono_config_parse_publisher_policy): New function for parsing
1235 publisher policy files.
1237 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
1239 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
1241 * marshal.c (mono_delegate_free_ftnptr): Ditto.
1243 * object.c (mono_get_addr_from_ftnptr): New helper function.
1245 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
1247 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1249 2005-08-19 Dick Porter <dick@ximian.com>
1251 * threads.c, threads.h, appdomain.c, appdomain.h,
1252 profiler-private.h, monitor.c, object.c, object-internals.h,
1253 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
1254 store the thread ID, so it can hold a 64 bit value if needed.
1256 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
1258 * reflection.c (mono_reflection_create_dynamic_method): Store the
1259 handle class into the method references as well so ldtoken works in
1262 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
1265 2005-08-19 Ankit Jain <jankit@novell.com>
1268 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
1269 here rather than using the method signature of a arbitrary function
1270 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
1272 Hack done with Harinath.
1274 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1276 * threadpool.c: disable printing stack traces when we get a exception
1277 in a threadpool thread. I need to do more testing to figure out which
1278 cases actually print this. Fixes bug #75828.
1280 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1282 * icall.c: there might be ignored whitespace after the last '='. This
1283 fixes length computation and bug #75840.
1285 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
1287 * assembly.c (mono_assembly_load_full): Consider .exe extension as
1290 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
1293 * reflection.c (create_custom_attr_data): Ditto.
1295 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
1297 * locales.c, culture-info.h : removed RegionLCIDMap.
1298 * culture-info-tables.h : regenerated.
1300 2005-08-16 Martin Baulig <martin@ximian.com>
1302 * class.c (mono_type_get_name_recurse): Small fix.
1304 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
1306 * locales.c : indentation fixie.
1308 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
1310 * object-internals.h,
1314 icall.c : added RegionInfo table support.
1315 * culture-info-table.h : regenerated for region support.
1317 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
1319 * reflection.c (resolve_object): handle all kinds of MonoMethod
1320 including generic ones
1322 2005-08-12 Ankit Jain <jankit@novell.com>
1324 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
1325 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
1327 2005-09-12 Lluis Sanchez <lluis@ximian.com>
1329 * process.c: Don't close a thread handle when it's NULL. This is a
1330 workaround for bug #75733.
1332 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
1334 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
1336 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
1338 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
1340 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1342 * threadpool.c: if a work item in the thread pool has a callback that
1343 catches a exception, don't propagate it after invoking the callback.
1346 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
1348 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
1350 * class-internals.h (MonoCachedClassInfo): Add some new fields.
1352 * class.c (mono_class_init): Load field info lazily in the AOT case.
1354 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
1356 2005-08-03 Ankit Jain <jankit@novell.com>
1359 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
1360 PInvoke calling convention is 0.
1362 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
1364 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
1365 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
1367 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
1369 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
1370 to handle threads not started by the GC (patch by Michael Meeks
1371 <michael.meeks@novell.com>).
1373 2005-07-31 Kamil Skalski <nazgul@omega.pl>
1375 * reflection.c: Make buffer used in emitting types larger for some
1376 big generic types (patch by Michal Moskal).
1378 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
1380 * mono-debug.c: Fix some (not all) alignment problems.
1382 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1384 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
1385 Invoke mono_image_load_from_data_full passing the refonly
1389 (mono_assembly_open_from_bundle): Add the refonly argument,
1390 in order to pass it to other methods it calls to.
1391 (do_mono_assembly_open): Add the refonly argument, in order
1392 to pass it to other methods it calls to.
1393 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
1394 the refonly parameter to it.
1396 * image.c: Add loaded_images_refonly_hash and
1397 loaded_images_refonly_guid_hash to cache the reflection
1399 (mono_images_init): Initialize the hash tables used for
1400 caching the reflection only images.
1401 (load_modules): Invoke mono_image_open_full passing the refonly
1402 parameter to load the modules the correct way.
1403 (build_guid_table): Add the refonly argument, to re-build the
1405 (do_mono_image_open): Added the refonly argument, in order to
1406 define it for the loaded image.
1407 (mono_image_loaded_full): New function, which receives an
1408 additional parameter to look for the image in the refonly or
1409 non-refonly section.
1410 (mono_image_loaded): Updated, using mono_image_loaded_full.
1411 (mono_image_loaded_by_guid_full): The same case that happens
1412 with mono_image_loaded_full.
1413 (mono_image_loaded_by_guid): Likewise.
1414 (register_image): Use the ref_only variable inside MonoImage
1415 to decide in which hash table store the current image.
1416 (mono_image_open_from_data_full): Rename
1417 mono_image_open_from_data to mono_image_open_from_data_full,
1418 adding the refonly argument, to define the ref_only variable
1420 (mono_image_open_from_data): Return
1421 mono_image_open_from_data_full.
1422 (mono_image_open_full): Rename mono_image_open to
1423 mono_image_open_full, receiving the new refonly argument,
1424 to pass it to inner methods.
1425 (mono_pe_file_open): Update this function, to open
1426 a MonoImage as a non-refonly image.
1427 (mono_image_close): Use the refonly variable inside
1428 MonoImage to remove the image from the correct caches.
1430 * image.h: Add the signatures of mono_image_open_full,
1431 mono_image_open_from_data_full, mono_image_loaded_full,
1432 mono_image_loaded_by_guid_full.
1434 * metadata-internals.h: Add the ref_only field to
1437 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1439 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
1440 Fix the last behavior, which used to load the assemblies and
1441 extract MonoReflectionAssemblyName information, instead of
1442 extract it from the metadata tables. Needed for Reflection
1445 2005-07-29 Martin Baulig <martin@ximian.com>
1447 * mono-debug-debugger.c
1448 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
1452 (mono_debug_address_from_il_offset): Check whether we have
1453 debugging support before attempting to take the lock.
1454 (mono_debug_source_location_from_address): Likewise.
1455 (mono_debug_source_location_from_il_offset): Likewise.
1456 (mono_debug_il_offset_from_address): Likewise.
1457 (mono_debug_address_from_il_offset): Likewise.
1459 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
1461 * class.c (mono_class_from_name_case): Add support for dynamic images.
1464 * object.c (mono_class_compute_gc_descriptor): Add a workaround
1467 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
1469 * reflection.c (mono_method_get_object): Fix warning.
1471 2005-07-28 Martin Baulig <martin@ximian.com>
1474 (mono_debug_add_wrapper): Also write the wrapper type.
1476 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
1478 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
1480 * class.c (mono_class_init): Avoid reading nested classes if the AOT
1481 data indicates the class has none.
1483 2005-07-26 Ben Maurer <bmaurer@ximian.com>
1485 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
1486 loader lock with the debugger lock. Prevents deadlocks for beagle.
1488 Beagle can now run on an smp box for a weekend without any
1491 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
1493 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
1494 in a module. Fixes #75629.
1496 2005-07-26 Martin Baulig <martin@ximian.com>
1498 * mono-debug.c (mono_debug_add_wrapper): New static method.
1499 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
1500 interncall or a wrapper.
1502 * mono-debug.h (MonoDebugWrapperData): New public typedef.
1503 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
1504 (MONO_DEBUGGER_VERSION): Bump to 51.
1506 * mono-debug-debugger.c
1507 (mono_debugger_add_type): Removed this empty function.
1508 (mono_debugger_add_method): Likewise.
1510 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
1512 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
1513 before accessing method->slot.
1515 2005-07-21 Jb Evain <jbevain@gmail.com>
1517 * reflection.c (method_encode_clauses/class): Handle filters clauses.
1520 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
1522 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
1525 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
1527 * image.h image.c: Add mono_image_get_guid () API function.
1529 2005-07-19 Ben Maurer <bmaurer@ximian.com>
1531 There were issues when multiple threads tried to load
1532 assemblies. A deadlock was created between assemblies_mutex and
1533 mono_domain_assemblies_lock. This fixes the issue by making the
1534 assembly ref counting be lock free. See bug 75586.
1536 * image.c (mono_image_close): The add ref function here was using
1537 Interlocked operations while the unref was using a mutex and a
1538 --. I don't think this was ever a bug that would be exposed in a
1539 non-pendantic way (ie, by an embedder doing a ref on one thread
1540 and an unref on another), but for the sake of correctness, this is
1543 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
1544 (mono_assembly_load_reference): Call mono_assembly_addref rather
1545 than touching the refcount ourselves.
1546 (mono_assembly_close): Use InterlockedDecrement to unref the
1547 assembly. Don't acquire the lock unless it is actually needed.
1549 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
1551 * class.c (mono_class_layout_fields): Fix calculation of has_references
1554 2005-07-12 Martin Baulig <martin@ximian.com>
1556 Applying a patch from Michal Moskal <malekith@nemerle.org>.
1559 (mono_type_hash): Provide better hashing for generic instances.
1560 (mono_generic_inst_hash): Improve hashing.
1561 (mono_generic_class_hash): Likewise.
1563 * reflection.c (mymono_metadata_type_hash): Improve hashing for
1566 2005-07-12 Martin Baulig <martin@ximian.com>
1568 * reflection.c (mono_reflection_create_runtime_class): Remove the
1569 hack for generic type definitions and non-`Run' assemblies.
1570 (mono_reflection_bind_generic_parameters): Also use
1571 `klass->wastypebuilder' to check for TypeBuilders.
1573 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
1575 * class.c (mono_class_layout_fields): Fix calculation of has_references
1578 * class.c (inflate_generic_class): Fix a leak.
1579 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
1582 2005-07-11 Martin Baulig <martin@ximian.com>
1584 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
1587 2005-07-11 Martin Baulig <martin@ximian.com>
1589 * loader.c (find_method): Also lookup in
1590 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
1592 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
1594 * appdomain.c (mono_domain_unload): Don't free the error message
1595 before passing it to mono_get_exception_...
1597 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
1599 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
1601 * threads.c: try to better guess an available RT signal (bug #75387).
1603 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
1605 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
1608 2005-07-07 Martin Baulig <martin@ximian.com>
1610 * class.c (mono_type_get_name_full): Return NULL for
1611 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
1614 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
1616 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
1617 exit the appdomain as well being aborted.
1619 * threadpool.c: Create all threadpool threads inside the root appdomain, and
1620 change back to the root domain after calling managed code. This enables
1621 appdomains using threadpools to be unloaded.
1623 2005-07-07 Martin Baulig <martin@ximian.com>
1626 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
1627 into `MonoDynamicGenericClass' since we only need it for dynamic
1630 * reflection.c (mono_class_bind_generic_parameters): We don't need
1631 to compute the `parent' here.
1633 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
1635 * culture-info-table.h : regenerated.
1637 2005-07-06 Martin Baulig <martin@ximian.com>
1640 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
1642 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
1644 2005-07-06 Martin Baulig <martin@ximian.com>
1646 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
1647 we're doing a signature-only comparision; fixes #74945.
1649 2005-07-06 Martin Baulig <martin@ximian.com>
1651 * class-internals.h (MonoGenericClass): Moved some things out into
1652 a new `MonoInflatedGenericClass' type.
1653 (MonoInflatedGenericClass): New type; the `klass' of a
1654 `MonoGenericClass' is now computed lazyly in
1655 mono_get_inflated_generic_class().
1657 * class.c (mono_get_inflated_generic_class): New public function.
1658 (mono_class_inflate_generic_method): Removed the unused
1659 `MonoClass *' argument.
1660 (setup_generic_vtable): Don't call mono_get_inflated_method() on
1662 (mono_class_create_generic): Make this static and merge it with
1663 mono_class_create_generic_2(); we're now called automatically from
1664 mono_get_inflated_generic_class().
1666 * loader.c (mono_method_signature): Call
1667 mono_get_inflated_method() here.
1669 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
1671 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
1672 type of fields with RVA.
1674 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
1675 for this pseudo class.
1676 (my_mono_class_from_generic_parameter): Likewise.
1677 (mono_class_init): Allow interfaces to have cctors.
1679 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
1681 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
1682 lazily for AOT methods.
1684 2005-07-05 Martin Baulig <martin@ximian.com>
1686 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
1687 returns FALSE for a successful match, not TRUE.
1689 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
1691 * loader.c (mono_method_get_index): Optimize this a bit.
1693 2005-07-04 Martin Baulig <martin@ximian.com>
1696 (class_compute_field_layout): Move the check for generic type
1697 definitions into mono_class_layout_fields(). Fixes #74684.
1698 (mono_class_from_generic_parameter): Correctly compute
1699 `klass->parent'; fixes #75457.
1701 * reflection.c (register_assembly, register_module): Make sure
1702 `domain->rejobject_hash' is already created.
1704 2005-07-02 Martin Baulig <martin@ximian.com>
1707 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
1708 `MonoDynamicGenericClass'.
1710 2005-07-01 Lluis Sanchez <lluis@ximian.com>
1712 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
1713 returned by a field getter is null, since null is a valid value.
1715 2005-07-01 Martin Baulig <martin@ximian.com>
1717 * reflection.c (mono_reflection_generic_class_initialize): Update
1718 the `dgclass->fields [i].parent' to the correct class.
1719 (mono_image_get_fieldref_token): Use the declaring type, not the
1722 2005-07-01 Martin Baulig <martin@ximian.com>
1724 * loader.c (find_method): Also look in the interfaces; fixes #75429.
1726 2005-06-30 Ben Maurer <bmaurer@ximian.com>
1728 * threads.c (thread_cleanup): assert that thread != NULL
1729 (wait_for_tids_or_state_change): We were using the wrong variable
1730 when accessing wait->threads. `i' was always out of the bounds of
1733 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1735 * loader.c: map user32 and kernel32 to libMonoSupportW
1737 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
1739 * appdomain.c (unload_thread_main): Mark this as WINAPI.
1741 2005-06-28 Martin Baulig <martin@ximian.com>
1743 * loader.c (method_from_methodspec): Fix #75334.
1745 2005-06-28 Martin Baulig <martin@ximian.com>
1747 Fix #74953 - Arrays now implement the generic IList<T> interface
1748 on the 2.0 platform.
1750 * class-internals.h (MonoDefaults): Added `generic_array_class'.
1752 * reflection.c (mono_class_bind_generic_parameters): New public
1753 function; similar to mono_reflection_bind_generic_parameters(),
1754 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
1756 * domain.c (mono_init_internal): Try to initialize.
1757 `mono_defaults.generic_array_class' here; this'll only succeed if
1758 we're using the 2.0 corlib.
1761 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
1762 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
1763 (mono_lookup_internal_call): Added support for nested classes.
1766 (mono_get_method_from_token): Set `result->signature->pinvoke' if
1767 we're an interncall and have generic arguments.
1770 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
1771 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
1772 instance of System.Array.InternalArray<T> for arrays, so they
1773 implement the generic IList<T> interface.
1775 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
1777 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
1778 (chastamar@yahoo.com). Fixes #75374.
1780 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
1782 * culture-info-table.h: regenerated.
1784 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1786 * icall.c: handle spaces correctly for base64 strings.
1788 2005-06-26 Ben Maurer <bmaurer@ximian.com>
1790 * *.c: Kill some warnings.
1792 2005-06-23 Duncan Mak <duncan@novell.com>
1794 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
1795 that this builds on Solaris 10 (x86).
1797 2005-06-23 Martin Baulig <martin@ximian.com>
1800 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
1801 generic type definitions.
1803 2005-06-23 Martin Baulig <martin@ximian.com>
1807 * metadata.c (mono_class_get_overrides): Renamed to
1808 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
1809 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
1810 pass it to mono_get_method_full().
1812 2005-06-22 Ben Maurer <bmaurer@ximian.com>
1814 * reflection.c (mono_reflection_create_runtime_class): take the
1815 mono_domain_lock in this method. Prevents deadlocks
1817 2005-06-22 Martin Baulig <martin@ximian.com>
1819 * loader.c (method_from_methodspec): Fix #75330.
1821 2005-06-22 Martin Baulig <martin@ximian.com>
1823 * reflection.c (type_get_qualified_name): Use
1824 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
1825 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
1826 argument; use it if we don't have an assembly name.
1828 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
1830 * object.c: In mono_message_init, set "copy out" flag for in
1831 parameters with the [Out] flag.
1833 2005-06-21 Martin Baulig <martin@ximian.com>
1836 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
1839 2005-06-21 Martin Baulig <martin@ximian.com>
1841 * class.c (mono_class_init): Don't initialize `class->fields' for
1842 generic instances since they're initialized again in
1843 compute_field_layout().
1844 (compute_field_layout): Set the field's `generic_info' here; fix
1847 2005-06-21 Martin Baulig <martin@ximian.com>
1850 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
1852 * metadata.c (mono_metadata_generic_method_equal): Also
1853 distinguish the `generic_class'; fixes #75334.
1855 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1859 * domain-internals.h:
1860 * reflection.c: 'domain_assemblies' field is now protected by its own
1861 lock. Don't call into managed code to run the AssemblyLoad event if we
1862 now there are no registered delegates for it.
1864 2005-06-20 Martin Baulig <martin@ximian.com>
1866 * class.c (mono_class_is_assignable_from): Use a custom version of
1867 mono_class_has_parent() to make things work for generic instances;
1870 2005-06-20 Martin Baulig <martin@ximian.com>
1872 * loader.c (method_from_methodspec): Apply a patch from
1873 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
1875 2005-06-20 Martin Baulig <martin@ximian.com>
1877 * class.c (mono_class_init): Reverted Zoltan's last change; it
1880 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
1882 * threads.c (wait_for_tids_or_state_change): Add missing locking.
1884 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1886 * socket-io.c: fix the index in the socket array for writable/error
1887 sockets. Fixes bug #75306.
1889 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
1891 * class.c (mono_class_init): Allow interfaces to have static ctors.
1893 2005-06-17 Martin Baulig <martin@ximian.com>
1895 * loader.c (method_from_methodspec): Use `context->container' when
1896 parsing the `gmethod->inst'.
1898 2005-06-17 Martin Baulig <martin@ximian.com>
1900 * class.c (mono_type_get_name_recurse): Don't add the assembly
1901 name for type arguments.
1903 2005-06-15 Martin Baulig <martin@ximian.com>
1905 * reflection.c (mono_image_get_inflated_method_token): Encode
1906 correct klass; fixes #75260.
1908 2005-06-13 Michal Moskal <malekith@nemerle.org>
1910 * icall.c: Make GetCorrespondingMethod/Constructor take
1911 MonoReflectionMethod method not MonoMethod. Removed
1912 MonoType.GetCorrespondingField, and make
1913 MonoGenericType.GetCorrespondingField take name not
1916 2005-06-13 Michal Moskal <malekith@nemerle.org>
1918 * reflection.c (field_encode_signature, encode_locals):
1919 Make sizes of buffers for types larger (for big generic types).
1920 (create_generic_typespec,
1921 mono_reflection_sighelper_get_signature_local,
1922 mono_reflection_sighelper_get_signature_field):
1923 Add asserts for too small buffers.
1925 2005-06-15 Martin Baulig <martin@ximian.com>
1927 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
1928 if our parent is not a dynamic type.
1930 2005-06-15 Martin Baulig <martin@ximian.com>
1932 * class-internals.h (MonoTypeNameFormat): New enum.
1935 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
1936 (mono_type_get_full_name): Removed.
1937 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
1938 argument instead of the boolean's.
1940 * icall.c (ves_icall_System_MonoType_getFullName):
1941 Added `gboolean assembly_qualified'.
1944 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
1946 * reflection.c (mono_reflection_parse_type): Parse the new type
1949 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1951 * icall.c: no need to convert from utf16 to utf8 and then back again
1952 after the call to GetLogicalDrives.
1954 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1956 * icall.c: frombase64. Fix problems exposed by new tests.
1958 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1960 * icall.c: added internal calls for converting char [] and strings in
1961 base64 into byte [].
1963 2005-06-10 Martin Baulig <martin@ximian.com>
1965 * class.c (mono_class_create_generic_2): Read the nested classes
1966 from the metadata rather than from `gklass->nested_classes' since
1967 `gklass' might not be initialized yet.
1969 2005-06-09 Duncan Mak <duncan@novell.com>
1971 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
1972 all public headers. Fixes #74919.
1974 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
1976 * domain.c: The key for proxy_vtable_hash is now a pointer
1977 array. Added new GHashFunc and GCompareFunc functions for this.
1979 * class.h: The list of interfaces in MonoRemoteClass is known in
1980 advance and can't grow (we create a new MonoRemoteClass if needed),
1981 so now the interface array can be allocated together with
1984 * object.c: Added a new method create_remote_class_key.
1985 Fixed mono_remote_class so it does not depend on
1986 mono_upgrade_remote_class.
1987 Removed extend_interface_array.
1988 Added new method clone_remote_class(), which makes a copy of a remote
1989 class and adds a new interface or class to it.
1990 mono_upgrade_remote_class() now creates a new remote class (or gets
1991 it from the cache) if an vtable upgrade is needed. In this way
1992 we make sure that other objects sharing the same remote class
1993 don't get the new vtable with unwanted interfaces.
1995 * object-internals.h:
1996 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
1998 * marshal.c: Track changes in mono_upgrade_remote_class().
2000 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
2001 * icall.c: Add runtime methods for obtaining members of inflated
2002 class, which were created from supplied non-inflated members. It
2003 is used in internal Get{Method,Constructor,Field} methods in
2006 2005-06-09 Martin Baulig <martin@ximian.com>
2009 (mono_reflection_bind_generic_method_parameters): Fix #75169.
2011 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2012 * reflection.c (mono_image_basic_init): Define
2013 Version in MonoDynamicAssembly.
2015 2005-06-08 Martin Baulig <martin@ximian.com>
2020 (mono_method_signature_full): New public method; takes a
2021 `MonoGenericContext *'.
2022 (find_method): Use mono_method_signature_full() and pass the
2023 klass'es context to it.
2025 * class.c (mono_class_is_inflated_method): Use
2026 mono_method_signature_full() and pass the context to it.
2028 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
2030 * object.c: add proper locking in mono_remote_class_vtable(),
2031 fixes possible memory corruption.
2033 2005-06-08 Michael Meeks <michael.meeks@novell.com>
2035 * marshal.c (mono_remoting_marshal_init): set
2036 initialized after initialization.
2038 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
2042 2005-06-06 Michael Meeks <michael.meeks@novell.com>
2044 * object.c (extend_interface_array): fix really silly
2045 memory corrupting / comparison bug.
2047 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2049 * reflection.c: Functions added to support the creation
2050 of CustomAttributeData, which includes Attribute data
2051 used by ReflectionOnly methods.
2053 * reflection.h: mono_reflection_get_custom_attrs_data and
2054 mono_custom_attrs_data_construct added (functions exposed).
2056 * icall.c: Added mono_reflection_get_custom_attrs_data
2059 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
2061 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
2064 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
2066 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
2068 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
2069 dynamic DllImportAttribute.
2071 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
2072 dynamic DllImportAttribute.
2074 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
2077 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2079 * threads.c: avoid segfault when an unstarted thread is aborted.
2081 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
2083 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
2084 Returns the name and version of the runtime for reporting.
2086 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2088 * appdomain.c: bump corlib version.
2089 * object-internals.h: new field in MonoReflectionAssembly.
2091 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2093 * object-internals.h: Carlos forgot to add this field.
2095 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2097 * icall.c: Added create_version to create instances
2098 of Version of MonoReflectionAssemblyName. This change helps
2099 the AssemblyName tests to keep running fine.
2101 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
2103 * object.c (mono_method_return_message_restore): A somehow less
2104 intrusive fix for #75138.
2106 2005-06-03 Raja R Harinath <rharinath@novell.com>
2108 * object.c (mono_method_return_message_restore): Fix computation
2109 of expected number of out args.
2111 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
2113 * reflection.c (mono_image_get_method_info): Fix the case when the
2116 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
2118 * object.c: Added missing null check in
2119 mono_method_return_message_restore.
2121 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
2123 * reflection.c (mono_image_get_method_info): Handle the case when
2126 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
2128 * object.c: When creating the vtable for a proxy, take into account
2129 all inherited interfaces, not only the ones registered in
2130 iclass->interfaces. This fixs bug #74996.
2131 Also, in mono_method_return_message_restore, verify that the array
2132 of out args has the expected lengh.
2134 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2136 * socket-io.c: update the timeout in Poll when the call is interrupte.
2138 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2140 * socket-io.c: support abort/suspend in Select_internal after last
2143 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2145 * threadpool.c: remove warning.
2147 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2150 * socket-io.[ch]: Select_internal uses poll() now when available, thus
2151 removing the 1024 limit from select(). Runtime part of the fix for
2154 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2156 * socket-io.c: when resolving the addresses for the same
2157 host returned by gethostname(), get the local IPs from the interface
2158 list. Loopback addresses are discarded if the are interfaces up with
2159 non-loopback ones. Fixes bug #63265.
2161 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
2163 * appdomain.c, verify.c, object-internals.h, reflection.c:
2164 bumped corlib number to 36, and added new extra_flags field
2165 to ReflectionMethodBuilder and friends. Fixes #75060.
2167 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
2169 * gc.c: register a new weak link only if the object is non-null
2172 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
2174 * culture-info.h : short time pattern too.
2176 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
2178 * culture-info.h : expand long time pattern string length.
2180 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
2182 * culture-info-table.h : update (more French date format; #72788).
2184 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
2186 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
2187 the method is static. Fixes #75029.
2189 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
2191 * reflection.c: Update the table_idx field of method builders after
2192 saving the module, since it can change. This is a workaround for
2195 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
2197 * culture-info-table.h : update (additional French date format).
2199 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
2201 * icall.c (ves_icall_type_Equals): Revert last change.
2203 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
2205 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
2207 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
2209 * class-internals.h: Added executioncontext_class field to
2210 MonoDefaults structure.
2211 * domain.c: Cache System.Threading.ExecutionContext class in
2213 * object.c: Capture the ExecutionContext for asynchroneous calls in
2214 mono_async_result_new.
2215 * object-internals.h: Added execution_context and original_context
2216 fields to MonoAsyncResult. Added execution_context to MonoThread.
2217 * security-manager.c|.h: Added mono_get_context_capture_method to
2218 return the capture method (if required by the security manager or by
2219 the framework version used).
2220 * threadpool.c: Apply capture (if present) ExecutionContext in
2221 mono_async_invoke and revert to original context after it completes.
2223 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
2225 * culture-info-table.h : updated (real hacky solution for zh-CHT).
2227 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
2229 * culture-info-table.h : zh-CHT related workaround.
2231 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
2233 * marshal.c (emit_marshal_custom): Add some error checking and call the
2234 methods in the ICustomMarshaler interface. Fixes #74875.
2236 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
2237 native->managed wrappers.
2239 2005-05-12 Martin Baulig <martin@ximian.com>
2241 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
2242 here and use the loader lock.
2244 * mono-debug.c: Properly lock when the debugger is not attached.
2245 (mono_debug_init): Release the initial lock if we're not running
2248 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
2250 * marshal.c (emit_marshal_custom): Pass through NULL values without
2251 calling the custom marshalling routines.
2253 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
2254 conversion in structures. Fixes #74882.
2256 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
2258 * culture-info-table.h : zh-* cultures were missing.
2260 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
2262 * threads.c: Added a new event background_change_event which is signaled
2263 when a thread changes its background mode.
2264 Moved here several checks previously done in managed code. The checks
2265 require the thread lock, and using the thread lock in managed code
2266 can result in deadlocks.
2267 Merged Start_internal and Thread_internal into a single method. Now
2268 Thread_internal does all work of creating and starting a thread.
2269 Added icalls for setting and getting the state of the object. Moved from
2270 managed code to avoid locking there.
2271 Added wait_for_tids_or_state_change() which is called instad of
2272 wait_for_tids when waiting for non-backround threads to end. This method
2273 will return if one of the threads ends or the background_change_event
2275 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
2276 the background mode. This method signals the background_change_event
2279 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
2280 removed Start_internal.
2282 2005-05-11 Martin Baulig <martin@ximian.com>
2284 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
2285 to order of some fields to get proper alignment on 64-bit machines.
2287 2005-05-11 Martin Baulig <martin@ximian.com>
2289 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
2290 changes as they're broken and completely fuck up the debugger.
2292 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
2294 2005-05-10 Martin Baulig <martin@ximian.com>
2296 * reflection.c (mono_reflection_generic_class_initialize): Don't
2297 call mono_class_setup_parent() here.
2299 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2301 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
2302 send/receive timeout use an integer in milliseconds. We were using a
2305 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2308 (internal_get_cultures): reserve the first slot of the array for the
2309 InvariantCulture, which will be filled in managed code.
2311 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
2313 * reflection.c (mono_image_fill_module_table): Initialize the
2314 GENERATION field as well.
2316 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2318 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
2319 Monitor.Enter on the object.
2321 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
2323 * threads.c: Enable the wait for running threads when exiting.
2324 * icall.c: Suspend all threads before exiting.
2326 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
2328 * assembly.c (mono_assembly_load_reference): Fix warning.
2330 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2332 * threadpool.c: changed the default number of threads per cpu. From now
2333 on, the default will be 20 + (5 * number of cpus) instead of 50.
2335 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
2337 * loader.c (mono_method_get_signature_full): Add locking here.
2339 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
2341 * appdomain.c: Moved methods for parsing and freeing assembly
2342 names to assembly.c.
2343 * assembly.c, domain-internals.h: Created public methods for parsing
2344 assembly names. Fixed mono_assembly_load_with_partial_name:
2345 it now finds the best match, taking into account the version,
2346 token and culture specified in the partial name. Also return
2347 the latest version if no version information is specified.
2349 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
2351 * threadpool.c: replace check for SocketAsyncCall class.
2353 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2355 * threadpool-internals.h:
2356 * Makefile.am: added threadpool-internals.h
2358 * threadpool.c: call mono_unhandled_exception on exceptions not handled
2359 that happen in threadpool threads (tested on MS).
2360 (mono_thread_pool_remove_socket): new function that dispatch any pending
2361 AIO call on a socket that is closing. By now only epoll really needs it,
2362 as select/poll wake up when the socket closes.
2365 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
2367 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
2369 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
2371 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
2373 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
2375 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
2377 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
2378 has an abort request, convert it into a suspend request.
2380 2005-04-30 Ben Maurer <bmaurer@ximian.com>
2382 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
2383 warning for the usage of `UnmanagedFunctionPointerAttribute' which
2384 is not supported yet.
2386 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2388 * image.c: register assemblies loaded from data (bundles) in the loaded
2389 assemblies hash. Fixes bug #74772.
2391 2005-04-29 Martin Baulig <martin@ximian.com>
2393 * class.c (mono_type_get_name_recurse): Update to the new naming
2394 schema from the latest .NET 2.x beta2.
2395 (mono_class_setup_vtable_general): If we're a generic instance,
2396 copy the vtable from our generic type definition and inflate all
2399 * loader.c (find_method): Update to the new naming schema from the
2400 latest .NET 2.x beta2.
2402 2005-04-29 Raja R Harinath <harinath@gmail.com>
2404 * class.c (mono_class_init): Add a mono_loader_unlock to the
2407 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
2409 * icall.c (ves_icall_System_Environment_Exit): Remove the
2410 suspend_all_other_threads () call for the time being, since it can hang.
2412 * threads.c (mono_thread_manage): Similarly, disable the waiting for
2413 the background threads to exit, since it can also hang.
2415 * class.c (mono_class_init): Applied patch from Ankit Jain
2416 (radical@gmail.com). Avoid pending init errors when a field refers
2417 to a nested class using a typeref. Fixes #74734.
2419 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
2420 this for dynamic modules.
2422 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2424 * threads.c: don't wait for threads that are in the process of aborting
2425 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
2426 and waiting for background threads to finish. This makes xsp and
2427 mod-mono-server exit without random length delays and/or hangs.
2429 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2431 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
2433 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
2435 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
2436 dynamic types to prevent infinite loops. Fixes #74727.
2438 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
2439 ..._is_assignable_to.
2441 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
2443 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
2445 2005-04-25 Martin Baulig <martin@ximian.com>
2447 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
2450 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
2452 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
2454 * reflection.c (build_compressed_metadata): Set metadata header
2457 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
2459 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
2460 number into an integral and a decimal part. Fixes #70473.
2462 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
2464 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
2466 * culture-info-table.h : reflected the latest locale-builder output.
2468 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2470 * threadpool.c: check for SuspendRequested too when deciding if
2471 mono_thread_interruption_checkpoint should be called.
2473 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2475 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
2476 * threads.c: remove interruption_mutex and use Interlocked instead. When
2477 suspending all the threads, wait for all the suspended events at once.
2478 If we're shutting down and get an APC that is going to be queued,
2479 call mono_thread_execute_interruption immediately, as the thread might
2480 be sleeping on a pthread condition or mutex.
2482 * icall.c: call mono_runtime_set_shutting_down before suspending the
2485 Fixes bug #74693. And now xsp is happier when exiting.
2487 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
2489 * loader.c (mono_stack_walk): Fix #74690.
2491 2005-04-22 Martin Baulig <martin@ximian.com>
2493 * mono-debug.h (MonoDebugMethodJitInfo): Added
2494 `MonoDebugMethodJitInfo *jit'.
2496 * mono-debug.c (mono_debug_read_method): Cache the
2497 MonoDebugMethodJitInfo in `address->jit'.
2498 (mono_debug_free_method_jit_info): New public method.
2500 2005-04-22 Martin Baulig <martin@ximian.com>
2502 * class.c (mono_class_is_assignable_from): Disallow
2503 type parameter -> interface.
2505 2005-04-21 Dick Porter <dick@ximian.com>
2507 * threads.c (mono_thread_create): Turn an assertion into an error.
2509 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
2511 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
2513 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
2514 Fix some gcc 4.0 warnings.
2516 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
2518 * file-io.c: fix alt dir separator char on unix systems
2519 and cleanup (fixes bug #71214).
2521 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
2523 * marshal.c: Use CALLVIRT instead of CALL when dispatching
2524 a call to a remote domain, since the method may be an
2525 interface method in the client domain. This fixes bug #74192.
2527 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2529 * threadpool.c: recv/send are now performed before going back to managed
2530 code to save one transition.
2532 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2534 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
2536 * metadata/threadpool.c: removed hack to workaround the bug above.
2540 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
2542 * reflection.c reflection.h: Fix handling of parameter defaults in
2543 dynamic methods. Also fixes handling of parameter attributes.
2546 * mono-debug.c (mono_debug_close_image): Fix warning.
2548 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2550 * socket-io.h: replaced old unused field with new 'blocking'.
2551 * threadpool.c: restore socket blocking state on windows(tm).
2553 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
2555 * icall.c: don't return the codebase in the AssemblyName[] returned by
2556 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
2557 * object-internals.h: Removed FIXME (fields were presents) and fixed
2558 versioncompat declaration.
2560 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2562 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
2563 not closed, so don't cleanup when it happens.
2565 2005-04-13 Chris Toshok <toshok@ximian.com>
2567 * mono-debug-debugger.h: change prototype for
2568 mono_debugger_lookup_type.
2570 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
2571 this function, although it should probably be named
2572 mono_debugger_init_type.
2574 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2576 * threadpool.c: fix non-AIO case.
2578 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
2580 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
2581 the built-in profiler to measure just JIT compilation times.
2583 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2585 * threadpool.c: the epollfd might be closed by another thread at
2586 any time, so ignore EBADF at treat it as a "we're closing" sign.
2588 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2590 * threadpool.c: release the semaphores with a count equals to the number
2591 of working threads in both IO and regular pools. Fixed typo that messed
2592 up the count of IO pool threads. Don't initialize the pipe handles if
2595 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2597 * threadpool.c: some systems don't like a NULL when deleting the socket
2600 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2602 * threadpool.c: fix semaphore allocation.
2604 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2606 * threadpool.c: added epoll() based implementation for asynchronous IO
2607 that is used instead of the default poll() when available.
2608 It can be disabled by setting MONO_DISABLE_AIO.
2610 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2612 * threadpool.c: windows needs 'closesocket' and instead of returning
2613 0 when the stream is closed while in select, it returns -1. Fixes bug
2616 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
2618 * class.c (class_compute_field_layout): Fix the regression caused by
2621 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2623 * threadpool.c: separate pool for socket async. IO.
2624 * threadpool.h: mono_max_worker_threads is not a global any more.
2626 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
2628 * class.c (class_compute_field_layout): Fix #74549.
2630 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2632 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
2633 use 2 connected sockets instead.
2635 2005-04-08 Miguel de Icaza <miguel@novell.com>
2637 * mono-config.c: Add new entry point for mkbundle
2638 mono_config_parse_memory.
2640 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2642 * threadpool.c: removed another unused function.
2644 2005-04-08 Ankit Jain <radical@corewars.org>
2646 * reflection.c (get_default_param_value_blobs): Add 'types'
2647 parameter to get the types encoded in the constant table.
2648 (mono_param_get_objects): Use the type from the constant table,
2649 not the type of the parameter, when creating default values.
2650 Handle null default values correctly.
2652 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2659 * socket-io.c: removed dead code for async IO.
2661 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2663 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
2665 * threadpool.c: intercept socket async. calls and pass them to a thread
2666 that is polling and dispatching the job items to the threadpool as
2667 socket become ready. Fixes bugs #71217, #71933.
2669 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
2670 between char and short/ushort arrays.
2672 * socket-io.c: remove dead code.
2674 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
2677 icall.c : removed InternalToUpper_Comp() and
2678 InternalToLower_Comp().
2680 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
2682 * char-conversions.h : The tables were incorrectly generated. Should
2683 be generated against invariant culture.
2685 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
2687 * object.c (mono_runtime_invoke_array): Fix return value when
2688 passing pre-created valuetype objects to ctors.
2690 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
2691 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
2694 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
2696 * domain.c: removed g_assert for runtimesecurityframe_class. This is
2697 only used with --security and hides the wrong corlib version error.
2699 2005-03-30 Joshua Tauberer <tauberer@for.net>
2701 * class.c: Changed mono_class_name_from_token so that types
2702 outside of a namespace don't have an initial period. Improved
2703 the g_warning message used in _mono_class_get when loading
2705 * assembly.c: In mono_assembly_load_reference, when an assembly
2706 can't be found, "No such file or directory" is misleading and
2707 unhelpful because a few paths were checked for the presence of
2708 the assembly. When that happens (ENOENT), display a nicer
2709 message indicating the directories that were searched. In all
2710 cases, the warning is made easier to read for non-hackers.
2712 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
2714 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
2716 * appdomain.h|domain.c: Removed inline from functions.
2717 * appdomain.c: Reduced warnings when compiling on windows.
2718 * icall.c: Fixed output_debug declaration to gunichar2*.
2719 * mono-config.c: Reduced warnings when compiling on windows.
2720 * rand.c: Added missing "windows.h". Added missing return value.
2721 * rawbuffer.c: Added missing winsock2.h for windows.
2722 * sysmath.h: Added mono-compiler.h header to allow/ease
2723 compilation with non-GCC compilers.
2724 * threads.c: Fixed declarations to compile with VS.NET C compiler.
2725 Removed cast warnings.
2727 Adapted from the work of J Lothian (for VC6).
2729 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
2731 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
2734 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
2736 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
2739 2005-03-27 Raja R Harinath <harinath@gmail.com>
2741 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
2742 has to be in $(exec_prefix). $(prefix) is for arch-independent
2743 stuff, and it would probably use $(prefix)/share rather than
2746 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2748 * console-io.c: added 2 includes that might be missing.
2750 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
2752 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
2755 * reflection.c (create_custom_attr): Allocate the params array using
2756 alloca so it gets GC tracking.
2758 2005-03-23 Chris Toshok <toshok@ximian.com>
2760 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
2763 2005-03-24 Raja R Harinath <rharinath@novell.com>
2765 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
2766 changes to pick up any changes in prefix, etc.
2768 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
2770 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
2772 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
2773 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
2775 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
2777 * class-internals.h object-internals.h class.c reflection.c: Extend the
2778 mono_lookup_dynamic_token () function to return the class of the
2781 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
2784 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
2786 * security-manager.c: Skip inheritance checks for intra-corlib
2787 class inheritance and method overrides. This skips a lot of checks
2788 and (anyway) permissions cannot work until corlib is loaded.
2790 2005-03-23 Martin Baulig <martin@ximian.com>
2792 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
2793 MONO_TYPE_GENERICINST.
2795 2005-03-23 Martin Baulig <martin@ximian.com>
2797 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
2799 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2801 * class.c: added locking comments to some functions.
2802 Cache the interface offsets arrays (saves about 20 KB
2803 of runtime memory in a typical app).
2804 Reduce the time overhead in mono_class_setup_supertypes ().
2806 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
2808 * icall.c: speedup and fix leaks in GetMethodsByName and
2809 GetPropertiesByName.
2811 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2813 * reflection.c: some locking fixes.
2815 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2817 * metadata.c: added missing break in case statement.
2819 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
2821 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
2822 typedbyref return values. Fixes #73941.
2824 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
2826 * security-manager.c|h: Added demandunmanaged method and
2827 suppressunmanagedcodesecurity class to MonoSecurityManager.
2828 Renamed aptc class to allowpartiallytrustedcallers.
2830 2005-03-17 Martin Baulig <martin@ximian.com>
2832 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
2834 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2836 * file-io.c: disabled file async. IO using aio_*. It uses the
2837 threadpool now. Workaround for bug #73718.
2839 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2841 * assembly.h, mono-config.c: added code to deal with bundled configs
2842 for bundled assemblies.
2844 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
2846 * *.c, private.h: cleanup, removing old private.h header file.
2848 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
2850 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
2851 and throw_on_unmappable_char attributes.
2853 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
2855 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
2856 _ProcessName_internal.
2858 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
2860 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
2863 * icall.c threads.c threads-types.h: Remove slothash icalls as they
2866 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
2868 * object.c (compute_class_bitmap): Add support for generics. Fixes
2871 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
2873 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
2875 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2877 * filewatcher.c: commented out the code for windows watcher, as we don't
2878 use it (we use the managed implementation instead).
2880 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
2882 * object-internals.h (MonoThread): Remove 'unused1' field.
2884 * appdomain.c: Bump corlib version.
2886 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
2888 * reflection.c (mono_reflection_create_runtime_class): Remove the
2889 AssemblyBuilder.Save optimization since it causes too many problems.
2891 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
2893 * exception.c|h: Added mono_get_exception_reflection_type_load to
2894 create a ReflectionTypeLoadException object.
2895 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
2896 to return NULL is a InheritanceDemand fails during reflection. Updated
2897 ves_icall_System_Reflection_Assembly_GetTypes to throw a
2898 ReflectionTypeLoadException if an InheritanceDemand fails during
2899 reflection. Added icall mapping for GetLinkDemandSecurity.
2900 * security-manager.c|h: Added ves_icall_System_Security_
2901 SecurityManager_GetLinkDemandSecurity internal call to return the
2902 class and methods permissions set for a LinkDemand. Removed unused
2903 fields in MonoSecurityManager.
2905 2005-03-10 Martin Baulig <martin@ximian.com>
2907 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
2908 it's a generic instance.
2910 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
2912 * reflection.c (mono_get_object_from_blob): Applied patch from
2913 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
2915 * class.c (mono_class_is_assignable_from): Another try at fixing
2916 #73469 without breaking anything.
2918 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
2920 * class.c: (mono_class_is_assignable_from): Revert the last changes
2921 since they don't work with generics.
2923 * class.c (mono_class_is_assignable_from): Fix build bustage.
2925 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
2926 the managed IsAssignableFrom method. Fixes #73469.
2928 * reflection.c (mono_reflection_call_is_assignable_from): New helper
2931 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
2933 * object.c (mono_load_remote_field_new): Fix returning uninitialized
2934 memory when the remoting callback does not sets the out arguments.
2937 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
2940 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
2942 * object-internals.h (MonoStackFrame): Sync with managed object layout.
2944 * appdomain.c: Bump corlib version.
2946 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
2948 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
2951 * threads.c (mono_thread_attach): Detect threads which are not started
2952 by the GC pthread wrappers.
2954 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
2956 * icall.c: Added new icall for RNG.
2957 * rand.c|h: Added new icall to open the RNG. This allows to share a
2958 single handle on Linux to access /dev/urandom and fix #73183.
2960 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
2962 * object.c: setting the new vtable in a transparent proxy object must
2963 not change the GC descriptor.
2965 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2967 * object.c: fixed compilation without GCJ support.
2968 * reflection.c: for runtime-created types ensure klass->has_references
2969 is correct (bug #73215).
2971 2005-03-02 Martin Baulig <martin@ximian.com>
2973 * class.c (mono_class_is_assignable_from): Make this work if
2974 `oklass' is a generic instance; fixes #72831.
2976 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
2978 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
2981 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
2983 * marshal.c: Reorganize native->managed marshalling code to also use
2984 the emit_marshal_... functions.
2986 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
2988 * object.c: typed allocs have issues with bitmap sizes > 30,
2989 so check for max_set >= 30.
2991 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
2993 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
2994 managed code. Fixes #73012.
2996 * metadata.h (MonoMarshalSpec): Add elem_mult field.
2998 * metadata.c reflection.c: Load/Emit elem_mult as well.
3000 * metadata.h (MonoMarshalSpec): Add comment.
3002 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
3004 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
3005 num_elem to -1 if not given.
3007 * object-internals.h (MonoReflectionMarshal): Add has_size field.
3009 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
3012 2005-03-01 Marek Safar <marek.safar@seznam.cz>
3014 * null-gc.c (mono_gc_free_fixed): Was not compilable.
3016 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
3018 * reflection.c (encode_marshal_blob): Encode param_num field as well.
3020 * object-internals.h (MonoReflectionMarshal): Add param_num field.
3022 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
3024 * object.c: generalized the reference bitmap creation
3025 and added hooks for the new GC.
3026 * class-internals.c: removed the gc_bitmap field from MonoClass.
3028 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3030 * domain.c: help the compiler to produce better code
3031 in mono_jit_info_table_find ().
3033 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
3035 * object.c: make all allocations look typed.
3037 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3039 * socket-io.c: load Mono.Posix if it's not loaded already
3042 2005-02-24 Martin Baulig <martin@ximian.com>
3044 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
3045 * reflection.c (dup_type): Likewise.
3047 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
3049 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
3050 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
3052 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3054 * domain.c, threads.c, object-internals.h: make the critical thread
3055 local vars use the fast access mode (even when we're compiled in
3056 a lib). Provide accessors to be used by the jit during codegen.
3058 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3060 * appdomain.c: Changed hook functios behavior to include
3061 support for the reflection only assemblies. Some icalls were changed
3062 to support the mentioned assemblies too. Signatures of static methods
3063 try_assembly_resolve and real_load now have an additional parameter:
3066 * assembly.c: General changes to mono_assembly_ methods to support
3067 reflection only api. Functions mono_assembly_open, mono_assembly_load,
3068 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
3069 suffix, to support an additional gbool parameter to specify whether
3070 the assembli is reflection only or not. Created some new hook functions
3071 to add support for reflection only assemblies. Signatures of static
3072 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
3073 have now an additional parameter: refonly.
3075 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
3076 indicating whether the assembly is reflection only or not.
3078 * exception.c: Add mono_get_exception_invalid_operation.
3080 * icall.c: Throw an InvalidOperationException when trying to invoke
3081 a property/method/event, or trying to set/get the value of a field.
3082 Also add an icall to retrieve the ref_only flag to the
3083 MonoReflectionAssembly.
3085 2005-02-23 Chris Toshok <toshok@ximian.com>
3087 Part of fix for #72827.
3088 * mono-debug.c (mono_debug_add_method): add lexical block data to
3089 the info we write. Kind of a hack at the moment - we copy the
3090 lexical block info from the MonoDebugMethodInfo to the
3091 MonoDebugMethodJitInfo here, before writing it.
3092 (mono_debug_read_method): read the lexical block info.
3094 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
3096 * debug-mono-symfile.h: add lexical block support.
3098 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
3101 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
3103 * loader.c (mono_lookup_pinvoke_call): Fix warning.
3105 * object.c (mono_runtime_free_method): Call mono_free_method () and
3106 put the TODOs there.
3108 * loader.c (mono_free_method): Free up most memory allocated for
3111 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
3113 * reflection.c: properly flag a Type argument to a
3114 named custom attr value (bug #72248).
3116 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3118 * reflection.c: reduce code duplication in named custom
3121 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
3123 * reflection.c: properly encode custom attrs of type object
3126 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
3128 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
3130 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
3132 * socket-io.c: load System.dll if it's not loaded already
3133 (bug #72850 and #70477).
3135 2005-02-21 Martin Baulig <martin@ximian.com>
3137 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
3140 2005-02-21 Martin Baulig <martin@ximian.com>
3142 * reflection.c (mono_image_build_metadata): We also need to
3143 "fixup" the MethodImpl table after we computed the final method
3144 indices. Call fixup_methodimpl() to do that.
3145 (fixup_methodimpl): New private method.
3147 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
3149 * assembly.c: special case mscorlib.dll (bug#72536),
3150 patch from Carlos Alberto Cortez.
3152 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
3154 * threads-types.h threads.c: Fix build bustage.
3156 * threads.c: Use a union for long<->double conversions.
3158 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
3159 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
3161 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
3162 containing the checkpoint call with NOT_TAKEN.
3164 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
3165 checkpoint before pushing the arguments, so they won't have to be
3168 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3170 * domain.c, assembly.c, domain-internals.h: make some data
3171 const and relocation-free.
3173 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
3175 * object.c, appdomain.c, class-internals.h: introduce the
3176 MonoClassRuntimeInfo structure to hold the info needed to
3177 use a class at runtime. Made mono_class_vtable() lock-free
3178 for all the appdomains.
3180 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
3182 * metadata-internals.h, image.c: introduce a per-image mempool to
3183 be used for memory that has the same lifetime as the image.
3185 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
3187 * domain.c: In mono_init_internal(), instead of selecting the first
3188 runtime version supported by an executable, get a list of all
3189 supported versions and select the one for which an mscorlib exists
3190 (since even if the runtime supports a given version, it doesn't mean
3191 that the framework for that version is installed).
3192 Modified get_runtimes_from_exe to support this behavior.
3193 In supported_runtimes, added information about additional system
3196 * assembly.c: Added support for more than one system assembly version
3197 per runtime version. Updated the assembly list.
3198 In mono_assembly_remap_version, removed the initial version check,
3199 since we don't know to which version we need to compare until we
3200 get the version set on which the assembly is based.
3201 Moved the code for loading corlib into the new method
3202 mono_assembly_load_corlib(), so it can be used by the initialization
3205 * domain-internals.h: Updated data structures and added declaration
3206 for mono_assembly_load_corlib.
3208 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
3210 * reflection.c (resolve_object): Fix the creation of the signature in
3211 the SignatureHelper case.
3213 * assembly.c (mono_assembly_remap_version): Fix binary search.
3215 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
3217 * class.c: Added inheritance check when a method is overloaded (from a
3218 virtual method or when implementing an interface) and when a class is
3219 inherited. Added functions to set a failure for a class and to
3220 retreive the exception from a failure.
3221 * class-internals.h: Added fields to MonoClass to keep the exception
3222 information status for inheritance (or other exceptions) to be thrown
3223 later (i.e. not at load time).
3224 * object.c: Throw the inheritance SecurityException when a type is to
3225 be created with either class or method inheritance violations.
3226 * reflection.c|h: Fix when getting declsec from a class. Removed
3227 unrequired code for class. Improved sanity in parameter naming.
3228 * security-manager.c|h: Added functions to check for class and method
3231 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
3233 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
3234 and has_finalize in dynamic types as well.
3236 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
3238 * culture-info-table.h : fixed currency format for en-GB (and so on).
3240 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
3242 * gc.c: ensure the GC handles never have 0 as a value.
3244 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
3246 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
3247 a pointer to a struct to unmanaged code. Fixes #72625.
3249 2005-02-16 Martin Baulig <martin@ximian.com>
3251 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
3253 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
3255 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
3257 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
3259 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
3261 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
3262 UnmanagedFunctionPointerAttribute, use it for determining calling convention
3265 * reflection.c (mono_custom_attrs_get_attr): New helper function.
3267 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
3269 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
3271 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
3272 changes to make the current context a field in MonoThread.
3274 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
3276 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
3279 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
3280 extracted from mono_marshal_get_native_wrapper.
3282 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
3283 to create wrappers around native functions.
3285 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
3286 delegates for arbitrary function pointers. Fixes #71472.
3288 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
3290 * threads.c: cleaned up the code a little.
3292 2005-02-15 Martin Baulig <martin@ximian.com>
3294 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
3297 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
3298 allocate larger chunks if needed.
3300 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
3302 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
3305 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
3307 * domain.c: keep the domains in an array and ensure the domain ids
3308 are kept small, so they can be used as indexes to domain-specific data
3309 with a small memory overhead.
3311 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
3313 * icall.c: Handle byref types in Type icalls. Fixes #72544.
3315 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
3317 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
3319 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
3321 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
3323 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
3326 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
3328 2005-02-12 Ben Maurer <bmaurer@ximian.com>
3330 * domain-internals.h: add the hashtable here.
3332 * class-internals.h: Remove `info' from MonoMethod
3334 * domain.c: Add a new hashtable, jit_trampoline_hash
3336 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
3338 * object.c: don't set the value of static fields
3341 2005-02-11 Martin Baulig <martin@ximian.com>
3343 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
3344 (mono_debug_add_method): Silently ignore the method if it's too big.
3345 (mono_debug_add_type): Likewise.
3347 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
3349 * threads.c, appdomain.c: remove #ifdefs from the code.
3351 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
3353 * metadata-internals.h: Added flags to MonoAssembly to cache the most
3354 common security informations. This allows us to stay in unmanaged code
3355 when doing LinkDemand and it's special cases (except for the first
3356 time for initialization). The flags a very much used with --security.
3357 * reflection.c|h: Added code to get declarative security attributes
3358 for LinkDemand and InheritanceDemand. This required to refactor the
3359 existing code for Demand.
3360 * security-manager.c|h: Added new method fields for the special cases
3363 2005-02-10 Martin Baulig <martin@ximian.com>
3365 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
3366 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
3368 2005-02-10 Martin Baulig <martin@ximian.com>
3370 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
3371 debugging code; this is almost a complete rewrite.
3373 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
3375 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3377 * domain.c, object.h: expose mono_string_equal () and
3378 mono_string_hash ().
3379 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
3380 it's implemented in managed code.
3382 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3384 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
3385 lo leak objects between appdomains.
3387 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3389 * assembly.c: old compilers compilation fix from
3390 robertj@gmx.net (Robert Jordan).
3392 2005-02-09 Ben Maurer <bmaurer@ximian.com>
3394 * class-internals.h: Little reminder for the future.
3396 * debug-helpers.c: Fix up wrapper_type_names
3398 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3400 * image.c, metadata-internals.h: when loading an image from a file,
3401 mmap all of it and use the same codepaths as when using a
3402 in-memory image: the code is simpler and we use less memory
3403 (both writable and readonly).
3405 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
3407 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
3408 API to alloc runtime data structures that need to be tracked by the
3409 GC and contain pointers.
3410 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
3411 make the code more readable and eventually use a different GC.
3413 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
3415 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
3418 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
3420 * object.c: In release_type_locks(), don't release the cctor lock
3421 if it has already been released. This fixes a crash in the
3424 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3426 * gc.c, marshal.c, icall.c: register a delegate for finalization
3427 only when the native function pointer has been allocated for it.
3429 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3431 * object.c: cleaned up some code, allocate objects that are
3432 pointer free with the atomic malloc variant. Allocate memory
3433 for static data from the mempool if it's pointer-free.
3434 Allocate the bounds array at the end of the array data, when needed.
3435 * object-internals.h, object.h: move a private function in a private
3437 * class.c: handle missing case in tracking references in fields.
3439 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
3441 * class.c, class-internals.h: keep track if a type has
3442 reference fields in either the instance or static fields.
3444 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
3446 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
3447 and renamed to MonoRuntimeInfo. Added fields to store the expected
3448 framework assembly version. Changed mono_get_framework_version and
3449 mono_get_runtime_version for a single mono_get_runtime_info method.
3451 * assembly.c: Added method to remap system assembly versions to the
3452 current executing runtime version. Removed old mapping code.
3453 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
3455 * icall.c, reflection.c: Track api changes.
3457 2005-02-06 Miguel de Icaza <miguel@novell.com>
3459 * loader.c (method_from_memberref): Improve error reporting,
3460 produce the class name instead of the typeref/typedef index.
3462 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
3464 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
3466 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
3468 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
3469 stdcall and charset name mangling. Reorganize the code and add
3472 2005-02-05 Ben Maurer <bmaurer@ximian.com>
3474 * monodiet.c: More iters!
3476 * marshal.c: Iter usage.
3478 * icall.c: Iter usage.
3480 * object.c: Use iters.
3482 * debug-helpers.c: More iters
3484 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
3486 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
3489 2005-02-05 Ben Maurer <bmaurer@ximian.com>
3491 * mono-debug-debugger.c: use iters
3493 * class.c, class-internals.h: mono_class_setup_events is static
3496 * All callers: use iters
3498 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
3500 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
3501 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
3503 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
3505 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
3507 * marshal.h: Add prototypes for ldfld/stfld_remote.
3509 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
3510 this is called during startup.
3512 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
3514 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
3515 MonoThreadsSync struct private in monitor.c. Changed the way
3516 MonoThreadsSync is allocated so it's faster and there is no
3517 need to keep track of it with a finalizer and it uses less memory.
3518 This also finally allows us to allocate mono objects as ptrfree when
3519 there are no reference fields.
3521 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
3523 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
3524 disappearing link to the GC interface and use them to simplify
3527 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
3529 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
3530 stfld_remote which call mono_load/store_field_new. This allows methods
3531 calling ldfld/stfld wrappers to be AOTed.
3533 * console-io.c: Include sys/filio.h under solaris.
3535 * console-io.c: Include curses.h if needed correctly.
3537 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
3539 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
3540 method->klass as well.
3542 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
3544 * class.c (mono_class_init): Switch on lazy initialization of
3547 * class.c (mono_class_get_finalizer): Handle the case when the
3548 finalizer is inherited.
3550 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3552 * console-io.c: <curses.h> is needed by term.h on solaris.
3554 2005-02-03 Ben Maurer <bmaurer@ximian.com>
3556 * icall.c, class-internals.h, monodiet.c, class.c: Remove
3557 mono_class_setup_properties where possible. Remove this ftn from
3558 the header file, and make it static.
3560 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
3562 * loader.c: Add missing setup_... call.
3564 * class.c: Add missing setup_... calls.
3566 * class.c (mono_class_init): Switch on lazy initialization of
3569 * class.c (mono_class_init): Fix generics broken by the recent changes.
3571 * monodiet.c (handle_type): Add missing setup_... calls.
3573 * class.c: Back out garbage in previous patch.
3575 * class.c: Add missing setup_... calls.
3577 * class.c (mono_class_get_method_from_name_flags): Avoid calling
3578 mono_class_setup_methods () if possible.
3580 * class-internals.h (MonoClass): Add 'has_cctor' flag.
3582 * class-internals.h (MonoCachedClassInfo): New structure.
3584 * class.c: Initialize properties and events fields of MonoClass lazily.
3586 * class.c: Add infrastructure for lazily initializing the methods and
3587 vtable fields of MonoClass. Not yet used.
3589 * class.c (mono_class_get_finalizer): New helper function.
3591 * class.c: Add infrastructure for loading some class related data from
3594 * object.c: Add infrastructure for initializing the vtable from data
3597 * gc.c (run_finalize): Use mono_class_get_finalizer ().
3599 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
3600 appropriate initialization function before accessing parts of the
3601 MonoClass structure.
3603 * marshal.c: Fix warnings.
3605 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
3607 * mono-debug-debugger.c (get_exception_message): Use
3608 mono_class_get_method_from_name_flags ().
3610 2005-02-02 Ben Maurer <bmaurer@ximian.com>
3612 * reflection.c, appdomain.c: Replace a few manual searches that
3613 Zoltan missed. (Paolo approved this part of my initial patch).
3615 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
3617 * profiler.c: disable recording statistical events at report time.
3619 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3621 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
3622 to byteswap arrays of enum values, too (bug #72080).
3624 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
3626 * appdomain.c (set_domain_search_path): Allow this to be called if
3627 domain->setup is not yet set.
3629 * loader.c (mono_method_get_index): New helper function.
3631 * loader.c reflection.c: Use mono_method_get_index ().
3633 * class.c (mono_class_get_method_from_name_flags): New helper method.
3635 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
3638 * class.c (mono_class_get_cctor): New helper method.
3640 * string-icalls.c object.c class.c marshal.c reflection.c: Use
3641 mono_class_get_method () to look up methods.
3643 2005-02-01 Miguel de Icaza <miguel@novell.com>
3645 * console-io.c: Fix the build, this should work on Windows.
3647 2005-01-31 Ben Maurer <bmaurer@ximian.com>
3649 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
3650 be set to null to keep things valid
3652 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3654 * icall.c: added Console 2.0 icalls.
3655 * Makefile.am: added console-io.[ch]
3656 * console-io.[ch]: internal calls for Console 2.0 API.
3658 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3660 * class.c: make sure we consider all the interfaces
3661 when calculating max_interface_id (bug found by
3662 Jeroen Frijters running ikvm).
3664 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
3666 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
3667 valuetype fields to null.
3669 * object.c (set_value): Ditto. Fixes #71669.
3671 2005-01-31 Martin Baulig <martin@ximian.com>
3673 * metadata.c (mono_metadata_has_generic_params): New public
3674 function; checks whether something is a generic method.
3676 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
3678 * appdomain.c: fix infinite recursion when adding assemblies.
3680 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
3682 * object.c: Fix small typo to return all items for Environment.
3685 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3687 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
3688 reflection.c: more domain and assembly-unload related fixes
3689 and memory leaks plugs.
3691 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
3693 * 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.
3695 2005-01-29 Ben Maurer <bmaurer@ximian.com>
3697 * loader.c (mono_method_signature): Make this method lazy
3698 (mono_get_method_from_token): Don't computate the signature here.
3700 Doing this saves quite a bit of memory. I got 90 kb on starting up
3701 monodoc. It should also save some disk reads on startup.
3703 * *: MonoMethod->signature might be NULL now. You *MUST* use
3704 mono_method_signature.
3706 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
3708 * object.c (mono_runtime_get_main_args): Return an array from the
3709 current domain here. Fixes #71938.
3711 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
3713 * monitor.c: formatting changes to comply with the
3714 mono coding style and remove #ifdefs from the code.
3716 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
3718 * metadata.c, private.h: remove some unneeded data
3719 and use a more compact representation for table schemas.
3721 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
3723 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
3724 to get a better distribution in hash tables.
3725 * *.c: use mono_aligned_addr_hash() where appropriate.
3726 * assembly.c: make var static.
3728 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
3730 * domain-internals.h: Put MonoJitInfo on a diet.
3732 * domain.c: Fix a warning.
3734 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3736 * gc.c: rework the gc handles code to reuse handles
3739 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
3741 * domain.c: fixed long standing bug in mono_string_equal() which
3742 was brought to light with the ldstr changes.
3744 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
3746 * reflection.c: Remove warning by adding missing include for marshal.h
3748 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3750 * domain.c, object.c: change the ldstr_table to hold
3751 MonoString* as keys: makes the runtime isinterned lookup
3752 faster and simplifies memory management.
3754 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
3756 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
3757 possible to add imperative security checks before calling the icall.
3758 * reflection.c: Return security attributes on the original MonoMethod
3759 (and not the wrapped one). This fix permissions on icalls.
3761 2005-01-25 Dick Porter <dick@ximian.com>
3763 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
3764 the check for mktime() support actually test the mktime() return
3765 value. "Fixes" bug 71682, though the output is still different to
3768 2005-01-25 Martin Baulig <martin@ximian.com>
3770 * class.c (mono_class_is_assignable_from): Make this work for
3773 2005-01-24 Ben Maurer <bmaurer@ximian.com>
3775 * marshal.c (mono_string_utf8_to_builder)
3776 (mono_string_builder_to_utf16): We might not have ownership of the
3777 string. In thise case, we need to create a new buffer.
3779 * object-internals.h (mono_stringbuilder_capacity): sb->str might
3780 be null, in which case, use the default capacity.
3782 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3784 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
3785 GC events to the profiler.
3787 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
3789 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
3790 if you don't want the GC to run.
3792 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
3794 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
3795 start providing a GC API and keeping different implementations in
3797 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
3799 2005-01-22 Ben Maurer <bmaurer@ximian.com>
3801 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
3802 mmap rather than allocating a huge buffer.
3803 (mono_debug_close_mono_symbol_file): Free the buffer allocated
3806 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
3808 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
3809 and CheckExecutionRights.
3810 * reflection.c|h: Keep the index of the declarative security to be
3811 used, instead of the pointer, when AOT compiler is used. Also add
3812 class initialization when requesting demands.
3813 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
3814 CheckExecutionRights. Both properties are now FALSE by default, and
3815 unmodifiable, unless the --security option is used.
3817 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3819 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
3820 reflection.c: properly refcount images and assemblies, many leaks fixed.
3822 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3824 * threadpool.c: increase the timeout for threads in the thread pool to
3825 10s. Fixes bug #67159.
3827 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
3829 * class-internals.h: Sun's compiler insists on explicit
3830 signed on bit fields to handle then correctly.
3832 2005-01-19 Miguel de Icaza <miguel@ximian.com>
3834 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
3835 Make the size of the array fit only the number of invalid path
3838 * class.c (_mono_class_get): Improve the error reporting when a
3839 class referenced is not found, to assist debugging.
3841 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
3843 * threads.c: fix off-by-one error.
3844 * domain.c: free data allocated in the domain.
3846 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
3848 * reflection.c (mono_method_body_get_object): Fill out exception info
3851 * object-internals.h: Add MonoReflectionExceptionHandlingClause
3854 2005-01-19 Martin Baulig <martin@ximian.com>
3856 * loader.c (mono_get_method_constrained): Make this work again.
3858 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
3860 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
3861 guint16 to match the managed side.
3863 * reflection.c (mono_reflection_body_get_object): Fill out local
3866 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
3869 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
3870 'local_var_sig_token'.
3872 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
3874 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
3877 * reflection.c (mono_method_body_get_object): Handle abstract and
3880 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
3882 * marshal.c, loader.c, class-internals.h, reflection.c:
3883 store the emthod data for a wrapper in an array instead of a list.
3885 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
3887 * marshal.c: change the code to allocate memory more
3888 conservatively for method wrappers.
3890 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
3892 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
3893 fields from MonoClass to the marshal info structure where they belong.
3895 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3897 * class.c, object.c, class-internals.h, marshal.c: rearrange
3898 some fields and tweak some types to lower memory usage.
3900 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
3902 * threads.c (signal_thread_state_change): Handle the case when the
3903 target thread is the current thread.
3905 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
3907 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
3908 emit_ptr_to_object_conv.
3910 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
3911 marshalling. Fixes #71352.
3913 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
3915 * metadata.h, blob.h: move table enum to blob.h so it can be included
3917 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
3918 cut the size of MonoImage/MonoDynamicImage.
3920 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
3922 * profiler.c (mono_profiler_install_simple): Fix default arguments.
3924 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
3926 * reflection.c, reflection.h, icall.c: add a function to check
3927 if an attribute type is defined for a metadata object.
3929 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
3931 * object-internals.h: Added some needed fields from StringBuilder class.
3932 * marshal.c: Set the maxCapacity when creating a StringBuilder.
3934 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
3936 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
3937 threads before shutting down the runtime.
3939 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
3941 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3943 * object-internal.h, threads.c: implement stacksize and
3944 parameterized thread start functionality (requires
3945 matching corlib). Marked broken code for later removal.
3947 2005-01-12 Martin Baulig <martin@ximian.com>
3949 * class-internals.h (MonoGenericClass): Moved the `initialized'
3950 flag to MonoDynamicGenericClass, removed `init_pending'.
3951 (MonoGenericInst): Added `is_reference' flag.
3953 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
3955 * reflection.c (mono_image_create_pefile): Only set the pe_offset
3956 inside the MSDOS header. Fixes #71201.
3958 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
3960 (mono_domain_finalize): Ditto.
3962 2005-01-12 Martin Baulig <martin@ximian.com>
3964 * class.c (mono_get_shared_generic_class): Use the cache for
3965 non-dynamic generic classes.
3967 * class-internals.h (mono_class_create_generic_2): Removed
3968 function prototype, this function is now static inside class.c.
3970 * class.c (mono_class_create_generic_2): Made this static, only
3971 call it from mono_class_init() and mono_class_setup_parent().
3972 (collect_implemented_interfaces_aux): Call mono_class_init() on
3973 the interfaces we collect.
3974 (mono_class_setup_vtable): Call mono_class_init (class->parent).
3976 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
3978 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
3979 it a real thread handle.
3981 * domain-internals.h: Move exvar_offset from MonoJitInfo to
3982 MonoJitExceptionInfo, since each catch clause needs its own variable.
3984 2005-01-11 Dick Porter <dick@ximian.com>
3986 * image.c (mono_pe_file_open): New variant on mono_image_open()
3987 that does not set up the CLI metadata; used for FileVersionInfo so
3988 it can get the data for windows binaries too.
3990 * process.c (process_read_string_block): Don't read off the end of
3991 the StringTable block.
3993 These both fix bug 70766.
3995 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
3997 * gc.c: set some fields to NULL at GC cleanup time.
3998 * threads.c: if we quit the main thread, call exit ().
4000 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
4002 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
4004 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
4006 * threads.h, threads.c, object.c: added accessor and settor for
4007 main_thread. Handle it specially when exiting from it: wait
4008 for other foreground threads to exit.
4010 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
4012 * process.c, verify.c: remove some bloat.
4014 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
4016 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
4017 the calling convention to cdecl under win32.
4019 2005-01-08 Ben Maurer <bmaurer@ximian.com>
4021 * object.c (mono_object_get_size): New function to get the size of
4024 * profiler.c (simple_allocation): Use above.
4026 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
4028 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
4029 ves_icall_System_AppDomain_getRootDomain (as it's not required to
4030 get an appdomain by it's id and we can't assume the root's id is 0).
4031 * domain-internals.h: Change the function prototype to match.
4032 * icall.c: Change the icall table for AppDomain.
4034 2005-01-08 Miguel de Icaza <miguel@ximian.com>
4036 * locales.c (string_invariant_compare_char): Only compute
4037 GUnicodeTypes in the case where we need them. Test for ordinality
4038 first and return if so.
4043 * FIXME: here we must use the information from c1type and c2type
4044 * to find out the proper collation, even on the InvariantCulture, the
4045 * sorting is not done by computing the unicode values, but their
4046 * actual sort order.
4049 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4051 * loader.c: for P/Invoke methods, allow the "Internal" shared
4052 library name to refer to the calling process symbol namespace.
4054 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
4056 * Makefile.am: Add the security manager to the build.
4057 * security-manager.c|h: New. Initialization of the security manager.
4059 2005-01-07 Dick Porter <dick@ximian.com>
4062 * monitor.c: Update thread state during Monitor and WaitHandle
4063 waits. Fixes bug 71031.
4065 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
4067 * reflection.c (property_encode_signature): Correctly handle when the
4068 property has no methods.
4070 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
4072 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
4074 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
4075 fields from mb, not rmb. Fixes #71017.
4077 * marshal.c (emit_ptr_to_str_conv): Add support for
4078 ByValTStr -> string conversion. Fixes #71015.
4080 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
4082 * mempool.c (mono_mempool_contains_addr): New helper function.
4084 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
4086 * metadata.c (mono_metadata_compute_size): Fix size calculation of
4087 HasSematics encoded fields.
4089 * metadata.c (mono_type_to_unmanaged): Improve error message for
4090 invalid string marshalling.
4092 * metadata.c: Fix warnings.
4094 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4096 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
4099 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
4101 * domain.c object.c domain-internals.h: Revert part of r38077 since the
4102 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
4105 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
4107 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
4108 so methods containing these can be AOTed.
4110 2005-01-03 Martin Baulig <martin@ximian.com>
4112 * loader.c (find_method): Removed the hack for generic instances.
4113 (method_from_memberref): If our parent is a generic instance, pass
4114 its generic type definition to find_method() and then inflate the
4116 (mono_get_method_constrained): Pass the generic type definition to
4117 find_method() and inflate the method later.
4119 * class-internals.h (MonoStats): Added `generic_class_count'.
4121 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
4122 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
4124 * reflection.c (mono_custom_attrs_from_params): Don't ignore
4125 generic type definitions.
4127 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
4129 * loader.c icall.c: Fix warnings.
4131 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
4133 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
4134 blittable types. Fixes #70864.
4136 2004-12-29 Martin Baulig <martin@ximian.com>
4139 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
4141 * reflection.c (mono_method_get_object): Create a
4142 "System.Reflection.MonoGenericMethod" for inflated methods; don't
4143 call mono_get_inflated_method().
4145 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
4147 2004-12-27 Martin Baulig <martin@ximian.com>
4149 * class-internals.h (MonoMethod): Added `is_inflated' flag.
4150 (MonoMethodInflated): Added `inflated' field.
4152 * class.c (mono_class_inflate_generic_method): Don't really
4153 inflate the method here; just set the `is_inflated' flag in the
4155 (mono_class_get_inflated_method): Actually inflate the method here
4156 if it's not already inflated; we use the MonoMethodInflated's new
4157 `inflated' field as a cache.
4159 2004-12-26 Martin Baulig <martin@ximian.com>
4162 (inflate_generic_class): Moved some code out of inflate_generic_type().
4163 (mono_class_inflate_generic_method): If we're already inflated,
4164 inflate the context and use the declaring method; ie. make sure
4165 the declaring method of an inflated method is always the generic
4167 (mono_class_create_from_typedef): Create
4168 `class->generic_container->context->gclass'.
4170 2004-12-24 Ben Maurer <bmaurer@ximian.com>
4172 * metadata-internals.h, marshal.c, reflection.c: More
4173 MonoGHashTable->GHashTable.
4175 * domain-internals.h, class.c: Change MonoGHashTable's into
4176 GHashTables for some cases where no gc stuff is used
4178 All users: update apis
4180 2004-12-23 Ben Maurer <bmaurer@ximian.com>
4182 * metadata.c (builtin_types): Make this `const'. Makes this get
4183 put into the shareable section.
4184 (mono_metadata_init): Casts to make gcc happy.
4186 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
4188 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
4190 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
4192 * icall.c: Added an internal call to retrieve the position and length
4193 of assembly-level declarative security attributes (RequestMinimum,
4194 RequestOptional and RequestRefuse). This is used by the Assembly class
4195 to re-create the corresponding permission sets.
4197 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
4199 * marshal.c: fix the stelemref wrapper to be type correct
4202 2004-12-20 Ben Maurer <bmaurer@ximian.com>
4204 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
4205 to do key & 0x7fffffff. Hashtable already does this. It just
4206 results in longer code.
4208 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
4210 * appdomain.c: Bump corlib version.
4211 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
4212 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
4213 * reflection.c|h: Add functions to get declarative security infos
4214 (blob position and length) for assemblies, classes and methods.
4216 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
4218 * reflection.c: sort the constant table (bug #70693).
4220 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
4222 * object-internals.h, threads.c, domain.c: add accessors for
4223 the MonoThread and MonoDomain tls keys.
4225 2004-12-18 Martin Baulig <martin@ximian.com>
4227 * class.c (inflate_generic_type): If we're inflating a generic
4228 instance, set `ngclass->context->container = context->container';
4229 ie. the container we inflated into.
4231 * metadata.c (mono_metadata_parse_generic_param): Reflect above
4232 inflate_generic_type() changes.
4234 2004-12-17 Martin Baulig <martin@ximian.com>
4237 (MonoGenericClass): Replaced `MonoType *generic_type' with
4238 `MonoClass *generic_class'. Removed `dynamic_info'; if
4239 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
4240 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
4242 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
4244 * exception.c (mono_exception_from_token): New helper function.
4246 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
4248 * assembly.c (mono_assembly_load_with_partial_name): Call
4249 mono_assembly_loaded before invoking the preload hooks. Fixes
4252 * object-internals.h (MonoThread): Change culture_info and
4253 ui_culture_info into an array.
4255 * threads.c: Cache culture info objects from more than one appdomain.
4257 * threads.c threads-types.h icall.c: Add icalls for manipulating the
4260 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
4262 * threads.h threads.c appdomain.c: Clear the culture_info field of
4263 all threads during unloading if they point to an object in the dying
4266 2004-12-13 Ben Maurer <bmaurer@ximian.com>
4268 * culture-info.h (TextInfoEntry): New struct
4269 * object-internals.h: sync with managed
4270 * locales.c: fill the `text_info_data' field
4271 * culture-info-tables.h: update
4273 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
4275 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
4278 2004-12-12 Ben Maurer <bmaurer@ximian.com>
4280 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
4281 (ves_icall_ModuleBuilder_getMethodToken): Ditto
4283 2004-12-12 Martin Baulig <martin@ximian.com>
4285 * mono-debug-debugger.c (write_type): If we're an enum and the
4286 builtin types have already been initialized, call mono_class_init().
4288 2004-12-11 Martin Baulig <martin@ximian.com>
4290 * metadata.c (mono_metadata_load_generic_params): Added
4291 `MonoGenericContainer *parent_container' argument; automatically
4292 compute `container->is_method'; pass the correct owner to
4295 * reflection.c (compare_genericparam): Sort the GenericParam table
4296 according to increasing owners.
4298 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
4300 * profiler.c: allow disabling the default profiler.
4302 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
4304 * decimal.c, icall.c: allow disabling System.Decimal support.
4306 2004-12-09 Marek Safar <marek.safar@seznam.cz>
4308 * reflection.c: Add support for null attribute arguments.
4310 2004-12-09 Martin Baulig <martin@ximian.com>
4312 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
4313 names to get rid of compiler warnings.
4315 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
4317 * marshal.c (mono_marshal_get_struct_to_ptr): Call
4318 mono_marshal_load_type_info (). Fixes #69625.
4319 (mono_marshal_get_ptr_to_struct): Likewise.
4321 2004-12-08 Martin Baulig <martin@ximian.com>
4323 * mono-debug.h: Bumped version number to 47.
4325 * mono-debug-debugger.c
4326 (mono_debugger_event_handler, mono_debugger_event): Take two
4327 guint64 arguments insteed of a gpointer and a guint32.
4329 2004-12-08 Martin Baulig <martin@ximian.com>
4331 * debug-mono-symfile.h
4332 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
4333 `address' to `native_offset'.
4335 2004-12-08 Martin Baulig <martin@ximian.com>
4337 * class.c (mono_class_create_from_typespec): Only inflate if we
4338 either have `context->gclass' or `context->gmethod'.
4340 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
4342 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
4344 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
4346 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
4348 * reflection.c (mono_assembly_get_object): Remove the workaround put
4351 * appdomain.c: Use the corlib_internal field from MonoAssembly.
4353 * appdomain.c: Bump corlib version.
4355 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
4356 be visible in other appdomains.
4358 2004-12-07 Ben Maurer <bmaurer@ximian.com>
4360 * threads.c: Interlocked inc and dec for longs were messed up,
4361 use a KISS based impl for this. Fixes 70234
4363 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
4365 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
4367 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
4369 * icall.c: fix to follow policy not to allow struct
4370 arguments in icalls.
4372 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4374 * process.c: make the patch that handles spaces in file paths work
4375 on mono/windows too.
4377 2004-12-06 Martin Baulig <martin@ximian.com>
4379 * class.c (mono_class_create_generic): Call
4380 mono_class_setup_supertypes() if we're dynamic.
4381 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
4383 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
4385 * object-internals.h: Add new fields to MonoThread.
4387 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4389 * icall.c threads-types.h threads.c: Add new icalls.
4391 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
4393 * object-internals.h (MonoReflectionAssembly): Sync object layout with
4396 * appdomain.c: Bump corlib version.
4398 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
4399 internal assemblies. Fixes #69181.
4401 2004-12-05 Martin Baulig <martin@ximian.com>
4403 * class.c (mono_class_inflate_generic_signature): Make this a
4404 no-op if `context' is NULL or we don't have any type parameters;
4405 also copy `sentinelpos'.
4407 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
4409 * image.c: Add unbox_wrapper_cache.
4411 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
4413 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
4416 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
4419 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
4421 2004-12-04 Martin Baulig <martin@ximian.com>
4423 * loader.c (mono_method_get_signature_full): New public function;
4424 like mono_method_get_signature(), but with an additional
4425 `MonoGenericContext *' argument.
4427 * class.c (mono_class_inflate_generic_signature): Formerly known
4428 as inflate_generic_signature(); make this public.
4430 2004-12-04 Martin Baulig <martin@ximian.com>
4433 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
4434 instead of a `MonoGenericContainer *'.
4435 (mono_metadata_parse_array_full): Likewise.
4436 (mono_metadata_parse_signature_full): Likewise.
4437 (mono_metadata_parse_method_signature_full): Likewise.
4438 (mono_metadata_parse_generic_inst): Likewise.
4439 (mono_metadata_parse_generic_param): Likewise.
4440 (mono_metadata_parse_mh_full): Likewise.
4441 (mono_type_create_from_typespec_full): Likewise.
4443 2004-12-03 Martin Baulig <martin@ximian.com>
4445 * class-internals.h (MonoGenericContainer): Replaced the
4446 `MonoGenericContext * pointer with a `MonoGenericContext'
4447 structure and made it the first element.
4449 2004-12-03 Martin Baulig <martin@ximian.com>
4452 (inflate_generic_type): Set the `context->container' when creating
4453 a new MonoGenericContext.
4454 (mono_class_inflate_generic_method): Likewise.
4455 (mono_class_create_from_typespec): Just use `context->container'
4456 to get the container.
4458 * loader.c (method_from_methodspec): Set `context->parent' from
4459 `context->container' - and if that's a method container, use its
4460 parent. Also set the `context->container' when creating a new
4462 (mono_get_method_from_token): Use just `context->container' to get
4465 * metadata.c (do_mono_metadata_parse_generic_class): Also set
4466 `gclass->context->container'.
4468 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
4469 the `context->container' when creating a new MonoGenericContext.
4471 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
4473 * reflection.c (compare_genericparam): Sort params with identical
4474 owner by their number. Fixes gen-111 on sparc.
4476 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
4478 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
4479 around the domain changes.
4481 * appdomain.c (mono_domain_unload): Handle the case when the thread
4482 calling Unload is itself being aborted during unloading. Fixes #70022.
4484 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
4486 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
4487 checkpoint_func as an icall so it gets a wrapper.
4488 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
4489 in the cross-appdomain wrappers too.
4491 * threads.c (mono_thread_has_appdomain_ref): Make this public.
4493 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
4495 * reflection.c: Fix some memory leaks.
4497 2004-12-02 Martin Baulig <martin@ximian.com>
4499 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
4501 * metadata.c (generic_class_cache): New static hashtable.
4502 (mono_metadata_lookup_generic_class): New public method.
4504 2004-12-02 Martin Baulig <martin@ximian.com>
4506 * class.c (mono_class_create_from_typedef): Call
4507 mono_class_setup_parent() and mono_class_create_mono_type() before
4508 parsing the interfaces.
4510 2004-12-02 Martin Baulig <martin@ximian.com>
4512 * metadata.c (generic_inst_cache): New static hashtable.
4513 (mono_metadata_lookup_generic_inst): New public function.
4514 (mono_metadata_inflate_generic_inst): New public function.
4515 (mono_metadata_parse_generic_inst): New public function.
4516 (do_mono_metadata_parse_generic_class): Use the new
4517 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
4518 since this'll also use the cache.
4520 * reflection.c (mono_reflection_bind_generic_method_parameters):
4521 Use mono_metadata_lookup_generic_inst() to use the new cache.
4523 * class.c (inflate_mono_type): Use
4524 mono_metadata_inflate_generic_inst() to inflate a generic
4525 instance; this'll also use the new cache.
4527 * loader.c (method_from_methodspec): Use
4528 mono_metadata_parse_generic_inst() and
4529 mono_metadata_inflate_generic_inst() rather than parsing it
4530 manually, so we can use the new cache.
4532 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
4534 * threads.c (wait_for_tids): Do not incorrectly free threads when
4537 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
4539 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
4540 iter->args based on whether parameters are passed in registers (i.e.
4541 MONO_ARCH_REGPARMS is defined)
4543 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
4545 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
4546 the exception message. Fixes #70070.
4547 (method_from_methodspec): Fix warnings.
4549 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4551 * process.c: (complete_path) return the path quoted
4553 2004-12-01 Martin Baulig <martin@ximian.com>
4555 * class-internals.h (MonoGenericInst): New structure.
4556 (MonoGenericClass): Replaced `type_argc', `type_argv' and
4557 `is_open' with `MonoGenericInst *inst'.
4558 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
4559 `is_open' with `MonoGenericInst *inst'.
4561 2004-11-30 Martin Baulig <martin@ximian.com>
4563 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
4565 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
4566 to `generic_class_cache'.
4569 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
4570 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
4571 (mono_generic_inst_is_valuetype): Renamed to
4572 mono_generic_class_is_valuetype().
4575 (MonoGenericInst): Renamed to MonoGenericClass.
4576 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
4577 (MonoClass): Renamed `generic_inst' to `generic_class'.
4578 (MonoGenericContext): Renamed `ginst' to `gclass'.
4580 * object-internals.h
4581 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
4583 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
4584 mono_reflection_generic_class_initialize().
4586 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
4587 now known as "System.Reflection.MonoGenericClass".
4588 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
4590 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
4592 * class-internals.h: Added a flag field to MonoClass to cache the
4593 declarative security attributes actions associated with the class.
4594 * domain-internals.h: Added booleans to MonoJitInfo to cache the
4595 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
4596 applicable to the JITted method.
4597 * reflection.c|h: Added functions to extract (as flags) which security
4598 actions are available (declaratively) for a method, class or assembly.
4599 * metadata.c|h: Added functions to search the declarative security
4600 table in the metadata.
4602 2004-11-29 Ben Maurer <bmaurer@ximian.com>
4604 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
4605 EXPORTEDTYPES are already in the class name cache, so there is no
4606 need to add extra code here to look at them. Just removes a bit of
4609 (ves_icall_System_Environment_get_TickCount): No need for #if
4610 WINDOWS. We already have the code in io-layer.
4612 2004-11-28 Martin Baulig <martin@ximian.com>
4615 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
4618 2004-11-27 Miguel de Icaza <miguel@ximian.com>
4620 * assembly.c (do_mono_assembly_open): Instead of having a
4621 conditional WITH_BUNDLE, incorporate support for bundles here, by
4622 having a global `bundles' variable holding a pointer to the actual
4625 (mono_register_bundled_assemblies): New API call used by the
4628 See mkbundle.1 for details.
4630 2004-11-27 Martin Baulig <martin@ximian.com>
4632 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
4633 the vtable for generic methods.
4635 2004-11-26 Martin Baulig <martin@ximian.com>
4638 (mono_metadata_generic_method_hash): New public function.
4639 (mono_metadata_generic_method_equal): Likewise.
4642 (MonoGenericContainer): Added `GHashTable *method_hash'.
4644 * reflection.c (ReflectionMethodBuilder): Added
4645 `MonoGenericContainer *generic_container'.
4646 (reflection_methodbuilder_to_mono_method): Don't create a new
4647 MonoGenericContainer each time we're called.
4648 (mono_reflection_bind_generic_method_parameters): Use
4649 `container->method_hash' to cache the results so we don't create a
4650 different method if we're called several times with the same
4653 * loader.c (method_from_methodspec): Use the new
4654 `container->method_hash' here, too.
4656 2004-11-26 Martin Baulig <martin@ximian.com>
4658 * class.c (inflate_generic_signature): Correctly compute
4659 `res->has_type_parameters'.
4660 (mono_class_vtable): Use the `has_type_parameters' flag to
4661 determine whether we're a generic method.
4663 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
4665 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
4667 * object.c (mono_runtime_run_main): Fix a small memory leak.
4669 2004-11-25 Martin Baulig <martin@ximian.com>
4671 * class.c (set_generic_param_owner): Fixed the loop.
4673 2004-11-25 Martin Baulig <martin@ximian.com>
4675 * object.c (mono_class_vtable): Don't create any JIT wrappers for
4678 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
4680 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
4681 names. Fixes #69787.
4683 2004-11-24 Martin Baulig <martin@ximian.com>
4685 * class.c (mono_class_create_generic_2): If we don't have a
4686 `ginst->parent', inflate `gklass->parent' to get our parent.
4688 2004-11-24 Martin Baulig <martin@ximian.com>
4690 * reflection.c (compare_genericparam): Correctly sort the
4691 GenericParam table; fixes #69779.
4693 2004-11-23 Ben Maurer <bmaurer@ximian.com>
4695 * reflection.c: When writing a PE file, don't create a huge
4696 buffer in memory. Just write the arrays we have to the file.
4697 This reduces memory usage.
4699 * metadata-internals.h: MonoDynamicStream pefile is no longer used
4702 2004-11-17 Martin Baulig <martin@ximian.com>
4704 * class.c (mono_class_init): Don't setup `class->parent' for
4705 dynamic instances; moved this to mono_class_generic_2().
4706 (mono_class_create_generic): Also set `klass->inited' for dynamic
4708 (mono_class_create_generic_2): Don't do anything for dynamic
4709 generic instances. Set `klass->parent' here and also call
4710 mono_class_setup_parent() here.
4712 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
4713 `MonoType *parent' argument; set `ginst->parent' before calling
4714 mono_class_create_generic_2(), so we set the correct parent.
4716 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
4718 * reflection.c: allow getting attributes from ModuleBuilder
4721 2004-11-17 Martin Baulig <martin@ximian.com>
4723 * class.c (mono_class_create_from_typedef): If a type parameter is
4724 inherited from an outer class, set its owner to that class.
4726 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
4728 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
4729 for (int*) written size. This fixes bug #69592.
4731 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
4733 * icall.c: Added IsAuthenticodePresnet internal call.
4734 * image.c|h: New function that check a MonoImage for an Authenticode
4735 signature in the certificate PE data directory.
4736 * security.c|h: New internal call to ask the runtime if an
4737 Authenticode signature seems referenced in the PE header.
4739 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
4741 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
4743 * reflection.c (mono_image_create_pefile): Free the assembly streams
4744 after writing out the assembly file.
4746 * object.c (mono_runtime_run_main): Fix small memory leak.
4748 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
4749 property access modifiers. Fixes #69389.
4751 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
4753 * domain.c, object.c, object-internals.h, domain-internals.h,
4754 object.h, marshal.c: keep dynamic code info per domain.
4756 2004-11-15 Martin Baulig <martin@ximian.com>
4758 * class.c (mono_type_get_name_recurse): Put type arguments in
4759 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
4762 2004-11-15 Martin Baulig <martin@ximian.com>
4764 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
4765 (mono_class_setup_vtable): When computing `the_cname' for a
4766 generic instance, don't include the namespace since we'd otherwise
4769 2004-11-15 Martin Baulig <martin@ximian.com>
4771 * class.c (mono_class_create_generic): Changed return type to void.
4772 (mono_class_create_generic_2): New public function; setup
4773 `class->method', `class->field' and `class->interfaces' here
4774 instead of in mono_class_init().
4776 * class.h (mono_class_create_generic): Moved to class-internals.h.
4778 2004-11-14 Ben Maurer <bmaurer@ximian.com>
4780 * reflection.c (mono_image_create_pefile): take a file HANDLE.
4781 rather than writing to memory, write to this file. Right now,
4782 we are just writting into a buffer, and copying that. However
4783 we can avoid the buffer later.
4785 (mono_dynamic_stream_reset): new function
4787 * icall.c, object-internals.h: update for the above.
4789 2004-11-13 Ben Maurer <bmaurer@ximian.com>
4791 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
4792 have been using gc'd memory. First it is slower, unlikely
4793 the comment in the source code said, secondly, it increases
4794 our footprint to do it in the gc.
4796 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
4797 the method so that it does not have to copy to managed code.
4799 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
4801 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
4803 2004-11-12 Martin Baulig <martin@localhost>
4805 * reflection.c (mono_image_create_token): Allow generic method
4806 definitions here, since they may appear in an `.override'; see
4807 gen-98/gen-99 for an example.
4809 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
4811 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
4814 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
4817 2004-11-11 Martin Baulig <martin@ximian.com>
4819 * class.c (mono_class_setup_vtable): In an explicit interface
4820 implementation, the method name now includes the arity.
4822 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
4824 * object.c (mono_array_full_copy): Fix warning.
4826 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
4828 * appdomain.c: Removed look_for_method_by_name(). Use the new method
4829 mono_class_get_method_from_name() instead.
4831 * class-internals.h: Added two new types of wrappers.
4832 Added MonoRemotingTarget enum. Added new trampoline function type, which
4833 takes an additional MonoRemotingTarget value as parameter, so it is
4834 possible to request a trampoline for a specific target.
4836 * class.c: Added new mono_class_get_method_from_name() method.
4838 * class.h: In MonoRemoteClass, we can have now to vtables, one for
4839 general remoting sinks and one specific for cross domain calls.
4841 * debug-helpers.c: Added new wrapper names.
4843 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
4846 * image.c: Porperly delete value objects form the remoting invoke hashtable.
4848 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
4849 with several other methods (mono_marshal_get_xappdomain_dispatch,
4850 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
4851 and others) can generate a fast remoting wrapper for cross domain calls.
4852 More information can be found in docs/remoting.
4853 Other changes: Removed mono_find_method_by_name, and used
4854 mono_class_get_method_from_name instead.
4855 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
4856 is stored in the remoting invoke hashtable.
4858 * marshal.h: published the new method for getting the xdomain wrapper,
4859 and also added a method for getting the adequate wrapper for a given
4862 * object-internals.h, object.c: Added a couple of methods for capying and
4864 Modified mono_install_remoting_trampoline, which takes the new remoting
4865 trampoline that has a remoting target as parameter.
4866 mono_class_proxy_vtable now also takes a remoting target as parameter, and
4867 will return the most suitable vtable for the target.
4868 Added mono_remote_class_vtable, which returns the vtable of a remote class
4869 (which can be the normal remoting vtable or the xdomain vtable).
4871 * threads.c: the xdomain invoke and dispatch wrappers must also be
4872 protected against interruptions.
4874 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4876 * icall.c: use memmove in BlockCopyInternal when the source and
4877 destination arrays are the same.
4879 2004-11-09 Martin Baulig <martin@ximian.com>
4881 * class-internals.h (MonoGenericContainer): Removed `method' and
4882 `signature', replaced them with `is_method' and `is_signature'
4883 flags. Added `context'.
4885 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
4886 instead of a `MonoGenericContainer *'.
4888 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
4889 for dynamic type parameters.
4890 (mono_metadata_load_generic_params): Setup `container->context'.
4892 * reflection.c (mono_reflection_setup_generic_class): Setup
4893 `tb->generic_container->context'.
4894 (do_mono_reflection_bind_generic_parameters): Use
4895 mono_class_inflate_generic_type() to correctly inflate types,
4896 rather than using our own hack just for MONO_TYPE_VAR.
4898 2004-11-09 Martin Baulig <martin@ximian.com>
4900 * class.c (mono_class_inflate_generic_method): Small fix; don't
4904 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
4905 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
4906 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
4907 (ves_icall_Type_BindGenericParameters): Likewise.
4908 (ves_icall_Type_get_IsGenericInstance): Likewise.
4909 (ves_icall_Type_GetGenericParameterPosition): Likewise.
4910 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
4911 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
4912 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
4914 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
4916 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
4917 assembly versions and public key tokens. Fixes #69113.
4919 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
4921 * metadata.c: fix bug introduced with the type cache changes
4924 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
4926 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
4927 the MonoClass pointer instead of the token in exception clauses.
4928 * reflection.c: updates for the above and make the code not depend
4929 on the structure of MonoExceptionClause.
4931 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
4933 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4934 Add support for dynamic assemblies. Fixes #69114.
4936 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
4938 2004-11-07 Ben Maurer <bmaurer@ximian.com>
4940 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
4941 since most only those methods use it. the code member of
4942 MonoMethodPInvoke was dead, so that can be removed too. Also,
4943 remove inline_count (again, not used), and move slot so that it
4944 can share bits with some other flags. This saves 8 bytes in the
4945 structure and gives us about 50 kb back for mcs helloworld.cs
4947 * *.[ch]: Do naming changes for the above.
4949 * loader.c (mono_method_get_header): Lazily init the header
4951 (mono_get_method_from_token): don't init the header here
4952 (mono_free_method): the header may never be allocated
4954 Overall, this saves 150 kb of unmanaged allocations
4955 for mcs helloworld.cs. That accounts for 10% of the unmanaged
4958 * loader.c, loader.h (mono_method_get_header): new accessor.
4960 * *.[ch]: use the above method. Prepares us to lazily load
4963 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
4964 three warnings, which are actual bugs (see 69206).
4966 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
4967 unused. Saves a cool 4 bytes / method.
4969 2004-11-06 Ben Maurer <bmaurer@ximian.com>
4971 * metadata.c (builtin_types): Add types for System.Object here.
4972 (mono_metadata_parse_type_full): Cache MonoType*'s that are
4973 for a class or valuetype from klass->this_arg or klass->byval_arg.
4975 On mcs for a hello world, this gets us down from 21836 MonoType's
4978 (mono_metadata_free_type): Account for the above change.
4980 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
4982 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
4983 exception instead of asserting if name is null.
4984 (ves_icall_System_AppDomain_GetData): Ditto.
4986 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
4988 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
4991 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
4992 Return NULL when the domain does not have entry_assembly set.
4994 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
4995 Add a 'resource_modules' argument.
4996 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
4998 * reflection.c (mono_reflection_create_runtime_class): Move setting
4999 of wastypebuilder here, so mono_get_type_object () returns a MonoType
5002 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
5003 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
5004 Throw an ArgumentNullException if 'ptr' is null.
5006 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
5007 assemblies here. Fixes #69020.
5009 2004-11-05 Geoff Norton <gnorton@customerdna.com>
5011 * reflection.c (build_compressed_metadata): Fix the previous patch for
5012 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
5015 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
5017 * assembly.c (mono_assembly_names_equal): Allow a match if one of
5018 the cultures is false. Fixes #69090.
5020 * reflection.c (build_compressed_metadata): Fix invalid memory read
5021 detected by valgrind.
5023 * reflection.c (mono_reflection_get_type): Avoid triggering a
5024 TypeResolve multiple times for the same type. Fixes #65577.
5026 2004-11-04 Ben Maurer <bmaurer@ximian.com>
5028 * marshal.c: Avoid using ldftn to call managed functions. It is
5029 much slower than just a call.
5031 * reflection.c (mono_module_get_object): free the basename we
5032 allocate here from glib.
5034 * reflection.c (ensure_runtime_vtable): make sure to free
5035 overrides. Also, we were allocating an array of MonoMethod not an
5036 array of MonoMethod*.
5038 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
5040 * image.c (mono_image_close): free image->guid here.
5042 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
5044 * reflection.c: Fix some spec conformance issues with the PE file
5045 structures so mcs compiled apps run on the Net 2.0 beta.
5047 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
5049 * string-icalls.c (ves_icall_System_String_ctor_encoding):
5050 Implement this. Fixes #67264.
5052 * debug-helpers.h debug-helpers.c marshal.c: Move
5053 mono_find_method_by_name to debug-helpers.c.
5055 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
5057 * object.c (mono_release_type_locks): type_initialization_hash is
5060 * reflection.c object.c object-internals.h: Fix warnings.
5062 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
5063 without accessors. Fixes #61561.
5065 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
5066 application base from the root domain if not set. Fixes #65641.
5067 (mono_runtime_init): Fix warning.
5069 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5071 * appdomain.c: call mono_thread_pool_init.
5072 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
5073 of worker threads based on the number of CPUs and the environment
5074 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
5075 for non-windows (windows) systems.
5077 2004-10-27 Chris Toshok <toshok@ximian.com>
5079 * mono-debug-debugger.c (write_class): don't call mono_class_init
5080 here, as even with the check for (!klass->init_pending), we get
5081 into a situation where we're hitting cycles in class
5082 initialization. Fixes #68816.
5084 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
5086 * image.c: Avoid overwriting values in the loaded_images_hash when an
5087 assembly is loaded multiple times. Fixes #61152.
5089 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
5090 so multiple satellite assemblies for the same name can be loaded.
5093 * mono_domain_assembly_preload: Actually return the loaded assembly,
5096 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
5097 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
5099 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
5100 pending finalizers are not invoked after the appdomain has been
5101 unloaded. Fixes #67862.
5103 2004-10-22 Martin Baulig <martin@ximian.com>
5105 * mono-debug-debugger.c
5106 (mono_debugger_runtime_invoke): Don't box valuetypes.
5108 2004-10-22 Chris Toshok <toshok@ximian.com>
5110 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
5111 don't hide private methods.
5113 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
5115 * icall.c: Allows the runtime to "share" (when known) the public key
5116 token of an assembly. This avoid the need to recalculate the token
5117 (from the public key) in managed code.
5119 2004-10-21 Chris Toshok <toshok@ximian.com>
5121 * debug-helpers.c (append_class_name): argh, revert last patch.
5123 2004-10-21 Chris Toshok <toshok@ximian.com>
5125 * debug-helpers.c (append_class_name): use '+' as the delimiter,
5126 not '/', so that it matches what the debugger uses to look up
5129 2004-10-21 Martin Baulig <martin@ximian.com>
5131 * mono-debug-debugger.c (mono_debugger_throw_exception): New
5132 public method; this is called each time an exception is thrown and
5133 allows the debugger to use exception catch points.
5135 2004-10-21 Martin Baulig <martin@ximian.com>
5137 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
5138 the stack pointer and the exception object in some struct and pass
5139 that to the debugger.
5141 2004-10-21 Chris Toshok <toshok@ximian.com>
5143 * mono-debug-debugger.c (do_write_class): add instance/static
5144 event support. We don't expose "raise" or "other" yet.
5145 (event_is_static): new method.
5147 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
5149 * mono-debug-debugger.c
5150 (mono_debugger_handle_exception): Remove
5151 bogus return value for fussy compilers.
5153 2004-10-20 Martin Baulig <martin@ximian.com>
5155 * mono-debug-debugger.c
5156 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
5157 (mono_debugger_handled_exception): Likewise.
5159 2004-10-20 Martin Baulig <martin@ximian.com>
5161 * mono-debug-debugger.h (MonoDebuggerEvent): Added
5162 MONO_DEBUGGER_EVENT_EXCEPTION.
5164 * mono-debug-debugger.c (mono_debugger_handle_exception): New
5165 public function to send the debugger a notification for an
5166 exception and inform it about a catch/finally clause.
5168 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
5170 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
5171 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
5174 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
5176 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
5178 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
5179 marshalled as [In,Out]. Fixes #58325.
5181 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
5183 * reflection.c (mono_method_body_get_object): Implement some fields.
5185 2004-10-12 Martin Baulig <martin@ximian.com>
5187 * reflection.c (mono_reflection_bind_generic_parameters): Small
5188 fix, correctly retrieve our parent from a generic instance.
5190 2004-10-12 Martin Baulig <martin@ximian.com>
5192 * metadata.c (mono_metadata_generic_param_equal): We always have
5196 (mono_class_from_generic_parameter): We need to have an owner.
5197 (my_mono_class_from_generic_parameter): Likewise.
5199 * reflection.c (mono_reflection_setup_generic_class): Renamed to
5200 mono_reflection_create_generic_class() and added a new
5201 mono_reflection_setup_generic_class().
5202 (mono_reflection_initialize_generic_param): If we're a nested
5203 generic type and inherited from the containing class, set our
5204 owner to the outer class.
5206 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
5208 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
5210 * reflection.c (mono_method_body_get_object): New function to create
5211 a MethodBody object.
5213 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
5215 2004-10-11 Martin Baulig <martin@ximian.com>
5217 * metadata.c (_mono_metadata_type_equal): Renamed to
5218 do_mono_metadata_type_equal() and made static.
5220 2004-10-11 Martin Baulig <martin@ximian.com>
5222 * appdomain.c: Bump corlib version number to 28.
5224 2004-10-10 Martin Baulig <martin@ximian.com>
5227 (MonoGenericInst): Added `MonoGenericContainer *container'.
5228 (MonoGenericMethod): Likewise.
5229 (MonoGenericContext): Likewise.
5230 (MonoGenericParam): Added `MonoGenericContainer *owner'.
5233 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
5234 (do_mono_metadata_parse_generic_inst): Likewise.
5235 (mono_metadata_parse_type_full): New public method. This is the actual
5236 mono_metadata_parse_type() implementation - with an additional
5237 `MonoGenericContainer *' argument.
5238 (mono_metadata_parse_array_full): Likewise.
5239 (mono_metadata_parse_signature_full): Likewise.
5240 (mono_metadata_parse_method_signature_full): Likewise.
5241 (mono_metadata_parse_mh_full): Likewise.
5242 (mono_type_create_from_typespec): Likewise.
5243 (mono_metadata_interfaces_from_typedef_full): New public method;
5244 this is similar to the other _full() methods, but we take a
5245 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
5246 (mono_metadata_parse_generic_param): Take an additional
5247 `MonoGenericContainer *' argument and lookup the MonoGenericParam
5248 from that container.
5249 (mono_metadata_generic_param_equal): New static method to compare
5250 two type parameters.
5251 (_mono_metadata_type_equal): New static method; takes an
5252 additional `gboolean signature_only' argument - if true, we don't
5253 compare the owners of generic parameters.
5254 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
5255 with a TRUE argument - do a signature-only comparision.
5257 * loader.c: Use the new _full() methods and pass the
5258 MonoGenericContainer to them.
5260 * object-internals.h (MonoReflectionTypeBuilder): Added
5261 `MonoGenericContainer *generic_container' field.
5262 (MonoReflectionMethodBuilder): Likewise.
5264 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
5266 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
5267 case initial images of dynamic assemblies.
5269 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
5271 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
5273 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
5274 length of event->other array.
5275 (typebuilder_setup_events): Ditto.
5277 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
5278 'assembly_by_name' and add an 'assemblies' list.
5280 * assembly.h assembly.c: Add a new search hook for determining whenever
5281 an assembly is already loaded. Use this instead of searching in the
5282 loaded_assemblies list.
5284 * domain.c appdomain.c: Implement the new search hook so loaded
5285 assemblies are now scoped by appdomain. Fixes #67727.
5287 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
5289 * threads.c (mono_thread_attach): Initialize synch_lock field so
5290 mono_thread_detach works again.
5292 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
5293 'lib' too. Fixes #63130.
5295 2004-10-06 Jackson Harper <jackson@ximian.com>
5297 * culture-info-tables.h: regenerated.
5299 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
5301 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
5302 implemented by other interfaces in the result. Fixes #65764.
5304 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5305 Handle unloadable modules without crashing.
5307 * image.c (load_modules): Revert the previous patch since modules must
5308 have a fixed index inside the array.
5310 * image.c (load_modules): Don't include native modules in the modules
5313 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
5315 * reflection.h: Add param_defaults field.
5317 * reflection.c: Add support for parameter defaults in dynamic methods.
5320 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
5321 an empty string when a type has no namespace. Fixes #64230.
5323 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
5325 * tabledefs.h: Added "internal" security actions to support non-CAS
5326 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
5327 Note: they do not seems to be used anymore in 2.0 (new metadata format)
5329 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
5331 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
5332 constructor of abstract class. Fixes #61689.
5334 2004-10-04 Martin Baulig <martin@ximian.com>
5336 * class-internals.h (MonoGenericContainer): New type.
5337 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
5338 `MonoGenericContainer *generic_container'.
5339 (MonoClass): Replaced `gen_params' and `num_gen_params' with
5340 `MonoGenericContainer *generic_container'.
5342 * metadata.c (mono_metadata_load_generic_params): Return a
5343 `MonoGenericContainer *' instead of a `MonoGenericParam *';
5344 removed the `num' argument.
5346 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
5348 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
5351 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
5354 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
5356 * reflection.c: Save pe_kind and machine values into the generated
5359 * appdomain.c: Bump corlib version number.
5361 * object-internals.h: Reorganize layout of LocalBuilder.
5363 * class-internals.h class.c (mono_class_get_implemented_interfaces):
5364 New helper function.
5366 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
5367 created MonoType for dynamic types. Fixes #66180.
5369 2004-10-02 Ben Maurer <bmaurer@ximian.com>
5371 * threadpool.c: the ares hashtable needs a critical section around it.
5372 this prevents some nasty segfaults
5374 2004-10-02 Massimiliano Mantione <massi@ximian.com>
5376 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
5377 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
5380 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
5382 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
5384 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
5386 * image.c: Always canonicalize image file names, to avoid loading
5387 the same assembly twice when referenced using a relative path.
5389 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
5391 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
5393 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
5395 * marshal.c: Fix warnings.
5397 2004-09-29 Geoff Norton <gnorton@customerdna.com>
5399 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
5400 attempting to marshal the delegate_trampoline as the method_addr.
5401 This patch has a static hashtable of marshalled delegates so that
5402 we can map delegate_trampoline addresses back to delegates. This
5403 allows a delegate passed to managed code to be passed back into native
5406 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
5408 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
5410 * reflection.c (method_encode_code): Align method headers properly.
5413 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
5415 * marshal.c: In the runtime invoke wrapper, reset the abort
5416 exception if it is cached. This avoids the automatic rethrowal of
5417 the exception after the catch of the wrapper. Also check for pending
5418 interruptions before calling the managed method. This is done using
5419 the new method emit_thread_force_interrupt_checkpoint, since the
5420 normal checkpoint method is ignored when running the invoke wrapper.
5421 * object.c: If the abort exception is rethrown, set the abort_exc
5422 field of the thread, so it will be rethrown aftere every catch.
5423 * threadpool.c: Only run an interruption checkpoint if what has been
5424 requested is a stop of the thread (aborts will be ignored).
5425 * threads.c: By default, a thread will now never be interrumped while
5426 running the runtime invoke wrapper (this ensures that runtime_invoke
5427 will always return to the caller if an exception pointer is provided).
5428 There is a new special method mono_thread_force_interruption_checkpoint()
5429 to force an interruption checkpoint even if running a protected
5430 wrapper, which is used by the same runtime invoke wrapper to do a check
5433 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
5435 * object.c, object-internals.h: Implemented mono_release_type_locks,
5436 which releases the cctor locks held by a thread.
5437 * threads.c, threads.h: In thread_cleanup, release cctor locks held
5438 by a thread. Added mono_thread_exit() method to be used to safely stop
5441 2004-09-28 Raja R Harinath <rharinath@novell.com>
5443 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5444 Move null check before dereference. Avoid indexing beyond the end
5445 of the 'modules' array.
5447 2004-09-28 Raja R Harinath <rharinath@novell.com>
5449 * metadata-internals.h (MonoImage): Add module_count field.
5450 * image.c (load_modules): Set image->module_count.
5451 (mono_image_load_file_for_image): Use image->module_count.
5452 * reflection.c (mono_image_load_module): Append to image->modules array
5453 of dynamic assembly.
5454 (mono_module_get_object): Fix loop to actually increment index.
5455 Use image->module_count.
5456 * assembly.c (mono_assembly_load_references): Use image->module_count.
5457 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5460 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
5462 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
5463 Avoid assert on generic types.
5465 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
5467 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
5469 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
5471 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
5472 function to convert a MarshalSpec structure to its managed counterpart.
5474 * reflection.c: Fix warnings.
5476 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
5479 * icall.c (mono_create_icall_signature): Fix build.
5481 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
5483 * icall.c: Add MakePointType icall.
5485 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
5488 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5490 * threadpool.c: reuse allocated slots in the queue.
5492 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
5494 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
5496 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
5498 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
5501 * tabledefs.h: Add constants for pinvoke attributes BestFit and
5502 ThrowOnUnmappableChar.
5504 * icall.c (ves_icall_Type_GetPacking): New icall.
5506 2004-09-24 Martin Baulig <martin@ximian.com>
5508 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
5510 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5513 (mono_domain_set): allow setting a domain that is being unloaded.
5514 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
5517 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
5519 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
5520 the GetCustomAttributes icall.
5522 2004-09-23 Martin Baulig <martin@ximian.com>
5524 * object-internals.h (MonoReflectionGenericParam): Replaced
5525 'has_ctor_constraint', `has_reference_type' and `has_value_type'
5526 with `guint32 attrs'.
5528 2004-09-23 Martin Baulig <martin@ximian.com>
5530 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
5532 2004-09-23 Martin Baulig <martin@ximian.com>
5534 * object-internals.h (GenericParameterAttributes): New enum.
5536 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
5538 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
5540 * class.c (init_events): Fill out event->other field.
5542 * class.c: Fix warnings.
5544 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
5546 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
5548 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
5549 walk which doesn't supply the IL offset.
5551 2004-09-22 Martin Baulig <martin@ximian.com>
5553 * reflection.c (mono_reflection_setup_internal_class): If we're
5554 System.ValueType, System.Object or System.Enum, set
5555 `klass->instance_size' and create the vtable.
5556 (mono_reflection_create_internal_class): If we're an enum type,
5557 get the base class from our current corlib.
5559 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
5561 * reflection.h (MonoResolveTokenError): New type.
5563 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
5566 * icall.c: Add an 'error' argument to the ResolveToken icalls.
5568 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
5570 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
5571 Support also calling constructors, but only for already allocated objects.
5573 2004-09-17 Geoff Norton <gnorton@customerdna.com>
5575 * reflection.c (type_get_qualified_name): If the klass is null
5576 return the typename to avoid a NullRefEx.
5577 (encode_cattr_value): Get the qualified name of the boxed type,
5578 not the underlying enumtype. Fixes #62984.
5580 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
5582 * marshal.c: Fix problems with previous checkin.
5584 2004-09-21 <vargaz@freemail.hu>
5586 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
5587 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
5589 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
5591 2004-09-21 Geoff Norton <gnorton@customerdna.com>
5593 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
5594 should only return a type for pointers, arrays, and passbyref types.
5597 2004-09-21 Martin Baulig <martin@ximian.com>
5599 * domain.c (mono_debugger_check_runtime_version): New public
5602 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
5604 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
5606 * reflection.c: Added missing sort to the declarative security
5607 attributes table. MS implementation stops seeing the attributes if the
5608 token number regress in the table (as shown by ildasm and permview).
5610 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
5612 * object-internals.h (MonoReflectionModule): Add 'token' field.
5614 * reflection.c (mono_reflection_get_token): Add support for Module
5616 (mono_module_get_object): Set 'token' field.
5617 (mono_module_file_get_object): Set 'token' field.
5619 * icall.c: Add new Assembly and Module icalls.
5621 * appdomain.c: Bump corlib version.
5623 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
5625 * loader.h loader.c class.h class.c: Add helper functions for obtaining
5626 tokens of metadata objects.
5628 * reflection.h reflection.c (mono_reflection_get_token): New function
5629 to obtain the token of a metadata object.
5631 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
5633 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
5635 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
5637 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
5639 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
5641 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
5642 * object-internals.h: Added 3 MonoArray* members to MonoReflection
5643 AssemblyBuilder to access the permissions set in the class lib.
5644 * reflection.c: Added security attributes encoding step in
5645 mono_image_build_metadata.
5646 * tabledefs.h: Added new security actions defined in 2.0:
5647 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
5649 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
5651 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
5654 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
5656 * locales.c: nullify the ICU_collator member of CompareInfo when it is
5657 finalized. There where random SIGSEVs at program termination, when
5658 an object being finalized was trying to do a string comparison and
5659 the current culture was already finalized.
5661 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5663 * threads.c: call thread_cleanup before finishing the thread if we get
5666 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
5668 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
5669 assemblies from the parent. Fixes #65665.
5671 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
5673 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
5676 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
5678 * reflection.h: add prototype for mono_get_dbnull_object
5679 * reflection.c: add prototypes for get_default_param_value_blobs
5680 and mono_get_object_from_blob for fussier compilers
5682 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
5684 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
5685 false deadlock checks in class initialization.
5687 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
5689 * image.c (mono_image_addref): Fix comment.
5691 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
5694 2004-09-12 Jambunathan K <kjambunathan@novell.com>
5696 * reflection.c (mono_param_get_objects): Modified to return
5697 ParameterInfo.DefaultValue object.
5699 (get_default_param_value_blobs):
5700 (mono_get_object_from_blob):
5701 (mono_get_dbnull_object): New helper routines.
5703 * object.c (mono_get_constant_value_from_blob): New helper routine
5704 carved out from get_default_field_value ()
5706 * object-internals.h (mono_get_constant_value_from_blob): Added
5707 function declaration.
5709 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
5711 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
5712 referenced assemblies. Fixes #62135.
5714 * exception.h exception.c (mono_get_exception_file_not_found2): New
5717 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
5719 * class.h class.c: Add mono_type_get_underlying_type ().
5721 2004-09-09 Geoff Norton <gnorton@customerndna.com>
5723 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
5724 Fix GetTypes() to support dynamically created assemblies.
5726 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
5728 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
5730 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
5733 * reflection.h reflection.c loader.c: Allow dynamic construction of
5734 pinvoke methods. Fixes #65571.
5736 * reflection.c (mono_reflection_get_type): Revert previous change since
5737 it causes regressions.
5739 2004-09-08 Martin Baulig <martin@ximian.com>
5741 * class.c (class_compute_field_layout): Don't call
5742 mono_class_layout_fields() for open generic instances.
5744 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
5745 * threads.c appdomain.c: fix typo in GC macro
5747 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5749 * threads.c: don't call mono_thread_detach() in start_wrapper(),
5750 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
5752 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
5754 * image.c (mono_image_close): Applied patch from
5755 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
5756 assembly is loaded multiple times from data.
5758 * image.c (mono_image_open): Fix warning.
5760 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
5762 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
5765 * reflection.c (mono_reflection_create_runtime_class): Initialize
5766 klass->nested_classes. Fixes #61224.
5768 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
5770 * threads.c: sched_yield() on exit, to allow threads to quit.
5772 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
5774 * object.c (mono_unhandled_exception): Remove leftover debug code.
5776 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
5778 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
5780 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
5782 * marshal.c (emit_marshal_array): Really null terminate string arrays.
5784 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
5786 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
5788 * marshal.c (emit_marshal_array): Null terminate string arrays.
5790 * marshal.c (raise_auto_layout_exception): Fix warning.
5792 * reflection.c (mono_param_get_objects): Initialize the default value
5793 with DBNull.Value, not null. Fixes #62123.
5795 2004-09-01 Miguel de Icaza <miguel@ximian.com>
5797 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
5798 throw an exception with a cute explanation.
5800 2004-09-06 Dick Porter <dick@ximian.com>
5802 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
5803 Close the new process's thread handle, as we don't use it. The
5804 handle stays around forever otherwise.
5806 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
5808 * object.c (arith_overflow): Fix warning.
5810 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
5811 calling conventions in method refs. Fixes #65352.
5813 * reflection.c: Fix warnings.
5815 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
5817 * icall.c: Add a new icall for Array.Clear
5819 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
5821 * object.c: When allocating an array, we have to throw
5822 an overflow exception if any of the lengths are < 0.
5824 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
5826 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
5827 properly. Also move implementation of string array marshalling to
5828 managed code. Fixes #42316.
5830 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5832 * assembly.c: provide more information when loading an assembly fails.
5834 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5836 * filewatcher.c: don't expect the development fam package to be
5839 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
5841 * marshal.c: Make a copy of the signature cookie since it will be
5842 freed by the caller.
5844 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
5846 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
5848 * metadata.c (mono_metadata_free_marshal_spec): New function to free
5851 * marshal.c: More refactoring.
5853 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
5856 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
5858 * object.c: In mono_message_invoke, fill the output parameter array after
5859 calling the managed method (it was done before the call). This fixes
5862 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
5864 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
5867 2004-09-02 Martin Baulig <martin@ximian.com>
5869 * class.c (mono_class_instance_size): Don't allow generic type
5870 definitions or open generic instances.
5871 (mono_class_array_element_size): If we're a value type, call
5872 mono_class_instance_size() on the original class.
5874 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
5875 handle generic instances.
5877 * mono-debug-debugger.c (write_type): Handle generic instances
5880 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
5882 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
5883 the allocation request fails. Fixes #65089.
5885 * object.c (mono_runtime_free_method): Do not call mono_free_method.
5887 * object.c (mono_runtime_free_method): New function to free a dynamic
5890 * marshal.c (mono_delegate_free_ftnptr): New function to free the
5891 delegate trampoline.
5893 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
5894 with hasthis as dynamic,
5896 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
5898 * domain.c (mono_jit_info_table_remove): New function to remove an
5899 entry from the jit info table.
5901 * class-internals.h (MonoMethod): Add 'dynamic' field.
5903 * loader.c: Fix warnings.
5905 2004-09-01 Martin Baulig <martin@ximian.com>
5907 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
5908 instead of mono_debugger_lock() because the latter one is a no-op
5909 unless running in the debugger.
5911 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
5913 * class.c (class_compute_field_layout): Classes with auto-layout or
5914 reference fields are not blittable.
5916 2004-09-01 Dick Porter <dick@ximian.com>
5918 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
5919 mono_image_get_filename() to get the assembly location.
5922 * metadata.h: Fix compile warnings
5924 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
5926 * class.c (class_compute_field_layout): System.Object is blittable.
5928 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
5929 as in/out. Fixes #59909.
5931 2004-09-01 Martin Baulig <martin@ximian.com>
5933 * metadata.h (MONO_TYPE_ISREFERENCE): Call
5934 mono_metadata_generic_inst_is_valuetype() if we're a generic
5935 instance to check whether our underlying type is a reference type.
5937 2004-09-01 Martin Baulig <martin@ximian.com>
5939 * metadata.c (mono_type_size): If we're a generic instance, call
5940 mono_class_value_size() for value types.
5942 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
5944 * marshal.c: Implement more custom marshalling functionality. Fixes
5947 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
5949 * mono-debug.c, debug-mono-symfile.c: add some locking love.
5951 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
5953 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
5955 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
5957 * icall.c: Fix some warnings.
5959 * threads.c (abort_appdomain_thread): Fix unref errors.
5960 (mono_thread_current): Fix THREAD_DEBUG define.
5962 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
5964 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
5966 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
5968 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
5970 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
5973 2004-08-28 Martin Baulig <martin@ximian.com>
5976 (mono_metadata_generic_inst_is_valuetype): New public function.
5978 * metadata.h (MONO_TYPE_ISSTRUCT): Call
5979 mono_metadata_generic_inst_is_valuetype() if we're a generic
5980 instance to check whether our underlying type is a valuetype.
5982 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
5984 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
5987 2004-08-25 Martin Baulig <martin@ximian.com>
5989 * loader.c (mono_get_method_from_token): Abstract methods can also
5990 be generic and thus have type parameters.
5992 * metadata-internals.h
5993 (MonoDynamicImage): Added `GPtrArray *gen_params'.
5995 * reflection.c (mono_image_get_generic_param_info): Don't create a
5996 metadata row, just add an entry to the `gen_params' array.
5997 (build_compressed_metadata): Sort the `gen_params' array and then
5998 actually create the metadata.
6000 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6002 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
6004 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
6006 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
6008 2004-08-24 Martin Baulig <martin@ximian.com>
6010 * class.cs (mono_class_is_subclass_of): Like an interface, a
6011 generic instance also derives from System.Object.
6013 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
6015 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
6016 custom modifiers to be in any order. Fixes #61990.
6018 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
6020 * object.c: Register mono_object_new_fast icall.
6022 * object.c (mono_class_get_allocation_ftn): Return to calling
6023 mono_object_new_fast, since it seems faster to compute the object
6024 size in unmanaged code than passing it as a parameter.
6026 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
6028 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
6029 this function with Boehm as the oom handler, so we don't have to check
6030 the result of GC_malloc.
6032 * object.c: Remove checks for oom.
6034 * object.h object.c (mono_class_get_allocation_ftn): New function to
6035 return the icall which can be used to allocate an instance of a given
6038 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
6040 * class-internals.h: Add 'enabled' field.
6042 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
6044 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
6046 2004-08-18 Jambunathan K <kjambunathan@novell.com>
6047 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
6050 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
6052 * appdomain.c: use the Tls function for appdomain too,
6053 at Zoltan's request. Actually return in mono_context_get
6055 * appdomain.c, profiler.c, threads.c: use __thread
6057 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
6059 * appdomain.c threads.c: Call GC_CreateThread on windows.
6061 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
6062 multiple libraries since this don't work on windows.
6064 2004-08-18 Martin Baulig <martin@ximian.com>
6067 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
6070 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
6071 MonoMethodNormal since we also need it for abstract and interface
6075 (build_compressed_metadata): Sort the GenericParam table.
6076 (mono_image_create_token): Added `gboolean create_methodspec'
6077 argument; this is false when generating a MethodImpl token.
6078 (reflection_methodbuilder_to_mono_method): Abstract and interface
6079 methods may also have generic parameters.
6081 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
6083 * appdomain.c: thread local alloc
6085 2004-08-17 Martin Baulig <martin@ximian.com>
6087 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
6090 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
6093 * class.c (mono_type_get_full_name): New public function.
6094 (mono_type_get_name): Don't include the type arguments.
6096 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
6098 * Makefile.am: Build static versions of libmetadata and libmonoruntime
6099 for inclusion into the mono executable.
6101 2004-08-16 Martin Baulig <martin@ximian.com>
6103 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
6104 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
6106 2004-08-14 Martin Baulig <martin@ximian.com>
6108 * class.c (dup_type): Also copy the `byref' field.
6110 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
6112 * reflection.c (create_dynamic_mono_image): Revert the last change
6113 since it breaks bootstrap.
6115 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
6117 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
6119 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
6120 not free them with g_free.
6122 2004-08-11 Martin Baulig <martin@ximian.com>
6124 * reflection.c (mono_reflection_setup_internal_class): Also call
6125 mono_class_setup_mono_type() if we already have a `tb->type.type'.
6127 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
6129 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
6130 called during default (first) AppDomain creation. Keep track of
6131 Evidence when loading assemblies.
6133 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
6135 * opcodes.c, opcodes.h: reduce runtime relocations.
6137 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
6139 * culture-info.h, locales.c: fixes and chages to sue the new
6140 optimized format of the locale data.
6141 * culture-info-tables.h: regenerated.
6143 2004-08-06 Geoff Norton <gnorton@customerdna.com>
6145 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
6147 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
6149 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
6150 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
6151 * domain-internals.h: icall declaration.
6152 * icall.c: icall registration.
6153 * object-internals.h: New fields in MonoAssembly for CAS.
6155 2004-08-05 Duncan Mak <duncan@ximian.com>
6157 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
6160 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
6162 * reflection.c: fix to deal with object[] arrays in custom ctors
6165 2004-08-05 Martin Baulig <martin@ximian.com>
6167 * class.c (mono_class_array_element_size): Added support for
6168 generic instances and correctly handle "recursive" types.
6170 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
6172 * assembly.c: Fix warnings.
6174 2004-08-04 Martin Baulig <martin@ximian.com>
6177 (mono_type_get_name_recurse): Added `gboolean include_arity'
6178 argument specifying whether or not we should include the generic
6179 arity in the type name.
6180 (_mono_type_get_name): New static function.
6181 (mono_class_setup_vtable): If we're a generic instance, don't
6182 include the generic arity in the names of explicit method
6185 2004-08-03 Martin Baulig <martin@ximian.com>
6187 * class.c (mono_type_get_name_recurse): Enclose the generic type
6188 arguments in `<', '>'.
6190 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6192 * gc.c: make GC warning messages use the trace API, they are just
6193 noise to most of the users.
6195 2004-08-03 Martin Baulig <martin@ximian.com>
6197 * debug-mono-symfile.c (read_string): Correctly read the string.
6199 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
6201 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
6203 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
6205 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
6207 2004-07-30 Martin Baulig <martin@ximian.com>
6209 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
6210 Reflect latest symbol writer changes.
6212 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
6214 * object.c: always create an object if null is passed
6215 to Invoke() where a valuetype is expected.
6217 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
6219 * marshal.c (mono_marshal_init): make managed
6220 signatures match native ones better for 64bits.
6222 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6224 * appdomain.c: hack to build correctly the private bin path on windows.
6227 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
6229 * assembly.c: Load mscorlib from the correct framework directory
6230 (mono/<version>/mscorlib.dll).
6231 * appdomain.h: Added prototypes for new functions.
6232 * internals.h: Added some prototypes.
6233 * domain.c: When initializing the runtime, get from the executable and
6234 the configuration files the runtime version that the app supports.
6235 Added support methods for reading app.exe.config. Added list of versions
6236 supported by the JIT. Added two new methods: mono_init_from_assembly,
6237 which initializes the runtime and determines the required version from
6238 the provided exe file, and mono_init_version, which initializes
6239 the runtime using the provided version.
6240 * icall.c: Get machine.config from version-specific directory.
6241 * reflection.c: When generating an image, embed the version number
6242 of the current runtime.
6244 2004-07-28 Dick Porter <dick@ximian.com>
6247 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
6248 returned sockaddr size before creating the remote address object.
6249 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
6252 2004-07-28 Dick Porter <dick@ximian.com>
6254 * locales.c (string_invariant_compare_char): Fix invariant char
6255 compares between upper and lower cases. Fixes bug 61458.
6257 2004-07-27 Ben Maurer <bmaurer@ximain.com>
6259 * marshal.c: actually cache stelem.ref wrappers.
6261 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
6263 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
6264 sections and remove the mono_cli_rva_map () function.
6266 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
6268 * debug-mono-symfile.c: fix one more endianess issue, from a patch
6269 by Geoff Norton (<gnorton@customerdna.com>).
6271 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6273 * class.c: fix class loads for pointer types (typeof(int) !=
6276 2004-07-27 Martin Baulig <martin@ximian.com>
6278 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
6279 reading the debugging information from an external ".mdb" file.
6281 2004-07-24 Martin Baulig <martin@ximian.com>
6283 * reflection.c (mono_image_get_type_info): Only write a class
6284 layout entry if we actually have a size or a packing size.
6286 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
6288 * reflection.c (type_get_fully_qualified_name):
6289 insert cast to get type checking of ?: with non-gcc compilers
6291 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
6293 * rand.c: use g_getenv for both lookups of
6296 2004-07-17 Martin Baulig <martin@ximian.com>
6298 * reflection.c (mono_reflection_bind_generic_method_parameters):
6299 Set `gmethod->reflection_info'.
6301 2004-07-17 Martin Baulig <martin@ximian.com>
6303 * class.c (mono_class_create_from_typedef): Insert the newly
6304 created class into the hash table before computing the interfaces
6305 since we could be called recursively.
6307 2004-07-16 Ben Maurer <bmaurer@ximain.com>
6309 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
6310 function to implement stelem.ref in managed code
6311 * class-internals.h, debug-helpers.c: a new wrapper type
6314 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
6316 * gc.c: allow GC handles to work even when no GC is compiled in.
6317 Fix part of bug #61134 (GetAddrOfPinnedObject).
6319 2004-07-13 Peter Williams <peter@newton.cx>
6321 * process.c (complete_path): Make sure we don't attempt to execute
6324 2004-07-12 Geoff Norton <gnorton@customerdna.com>
6326 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
6327 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
6328 and will add/subtract the hour if needed
6330 2004-07-12 Martin Baulig <martin@ximian.com>
6332 * reflection.c (mono_field_get_object): If we have
6333 `field->generic_info', take the attributes from
6334 `field->generic_info->generic_type'.
6336 2004-07-12 Martin Baulig <martin@ximian.com>
6338 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
6339 This function must be called before initializing the runtime.
6340 (mono_debug_init_1): New function; call this after initializing
6341 the runtime, but before loading the assembly. It tells the
6342 debugger to load corlib and the builtin types.
6344 * mono-debug-debugger.c: Did some larger changes in the debugging
6345 code; support recursive class declarations, make sure we actually
6348 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6350 * debug-helpers.c: undo my previous patch and fixed the real issue in
6351 ../mini/exceptions-x86.c
6353 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6355 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
6356 when no HOME env. variable was set and a NullRef was thrown in a .cctor
6357 called from other .cctors.
6359 2004-07-09 Miguel de Icaza <miguel@ximian.com>
6361 * loader.c: Removed the mono_loader_wine_init hack now that we are
6362 doing a managed version of Windows.Forms.
6364 2004-07-09 Ben Maurer <bmaurer@ximian.com>
6366 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
6367 threadpool.c, threads.c: remove static data from rootset.
6369 2004-07-09 Dick Porter <dick@ximian.com>
6371 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
6372 Don't do any more processing if the matched length was 0. It was
6373 increasing the size of the string before. Fixes bug 61167.
6375 2004-07-09 Dick Porter <dick@ximian.com>
6379 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
6380 Add support for SO_PEERCRED if its available.
6382 2004-07-09 Peter Bartok <pbartok@novell.com>
6383 * loader.c: winelib.exe.so error message is now only displayed if
6384 MONO_DEBUG is set. To help us avoid questions when people are trying
6385 out the new Managed.Windows.Forms.
6387 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
6389 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
6390 for isinst and castclass wrappers.
6392 * class-internals.h icall.c: Move registration and lookup of JIT icalls
6393 to libmetadata from the JIT, so they could be used by the marshalling
6394 code and the interpreter.
6396 * marshal.c: Register marshalling related JIT icalls here instead of
6397 in mini.c. Use CEE_MONO_ICALL instead of the family of
6398 CEE_MONO_PROC<x> opcodes to call marshalling functions.
6400 * metadata.h: Remove unneeded marshalling conversions.
6402 * opcodes.c: Update for new opcodes.
6404 2004-07-08 Martin Baulig <martin@ximian.com>
6406 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
6407 (mono_debug_get_domain_data): Make this function static.
6409 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
6411 * gc.c, object.h: add nice GC handle API for embedders.
6413 2004-07-06 Ben Maurer <bmaurer@ximian.com>
6415 * reflection.c: more changes for the new api
6417 * object.c: When we reflect on a field w/ a constant value, it
6418 will not have a memory location, so we must access metadata. Also,
6419 allow easier reading of strings so that we can read them from
6422 * class.c (mono_class_layout_fields): no need for literal fields here.
6424 * class-internals.h: api changes for const fields
6426 * icall.c (ves_icall_get_enum_info): use new apis for const fields
6428 2004-07-06 Martin Baulig <martin@ximian.com>
6430 * mono-debug.h: Increment version number to 44.
6432 * mono-debug.c (mono_debug_add_wrapper): The second argument is
6433 now a gpointer, rewrote this whole method.
6435 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
6436 function. Add information about the wrapper in a new "misc table".
6438 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
6439 for the new misc table.
6441 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
6443 * metadata-internals.h image.c: Add a cache for helper signatures.
6445 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
6447 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
6449 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
6450 delegates from a delegate. Fixes #61033.
6452 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
6453 marshalling of stringbuilder arrays. Fixes #59900.
6455 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
6457 * icall.c: Add EnumBuilder:setup_enum_type icall.
6459 2004-06-30 Ben Maurer <bmaurer@ximian.com>
6461 * icall.c: Added a new icall for the property version of
6464 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
6466 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
6467 it has a constant size across platforms.
6469 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
6472 2004-06-29 Martin Baulig <martin@ximian.com>
6474 * mono-debug.c (mono_debug_add_method): Protect the whole function
6475 in mono_debugger_lock(), not just parts of it.
6477 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
6479 * reflection.c: make sure padding bytes in heaps are zeroed.
6481 2004-06-24 David Waite <mass@akuma.org>
6483 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
6484 image.c, loader.c, locales.c, marshal.c, metadata.c,
6485 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
6486 string-icalls.c, threads.c: change to C90-style comments from C99 /
6489 2004-06-24 Dick Porter <dick@ximian.com>
6492 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
6493 return createdNew. Fixes bug 60412.
6496 * icall.c: Add createdNew parameter to CreateMutex icall
6498 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
6500 * reflection.c, object-internals.h: save default value in params.
6502 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6504 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
6505 no need to build a new path combining that with the application base.
6508 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
6510 * reflection.c: fixed minor standard compliance issues.
6512 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
6514 * reflection.c: fixed issue with encoding some custom attributes
6515 (arrays in properties and fields, bug #60411).
6517 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6519 * reflection.c: fix start address when copying the public key token.
6521 2004-06-23 Martin Baulig <martin@ximian.com>
6523 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
6524 the `exc' object in a static object to put it into the GC's root set.
6526 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
6528 * reflection.c: make mono_reflection_setup_internal_class ()
6529 callable a second time to setup a new parent class.
6531 2004-06-23 Dick Porter <dick@ximian.com>
6533 * threads.c: Check for WAIT_IO_COMPLETION return values.
6535 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
6537 * appdomain.c: Removed the g_free on the public key token. Now copy
6538 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
6539 * assembly.c: Added public key token string value when loading
6540 assemblies. Fix bug #60439.
6541 * icall.c: Added missing informations (like public key) in
6542 GetReferencedAssemblies. Fix #60519.
6543 * image.h: Changed definition for public key token from const char*
6544 public_tok_value to guchar public_key_token [17];
6545 * reflection.c: Updated for changes to public key token.
6547 2004-06-22 Lluis Sanchez Gual
6549 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
6550 for the field in base classes.
6552 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
6554 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
6555 mark headers as not supported, they are installed only for use by the
6558 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
6560 * *.c, *.h: avoid namespace pollution in public headers.
6562 2004-06-21 Martin Baulig <martin@ximian.com>
6564 * exception.c (mono_get_exception_security): It's in
6565 "System.Security", not in "System".
6567 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
6568 the exception classes.
6570 2004-06-21 Martin Baulig <martin@ximian.com>
6572 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
6573 Protect the exception object from being finalized.
6575 2004-06-21 Martin Baulig <martin@ximian.com>
6577 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
6580 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
6582 * reflection.c: Load the assembly in mono_reflection_type_from_name,
6583 if it was not loaded before. Fix parts of #60439.
6585 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
6587 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
6588 code that was broken since Ben's change: wrappers are now
6589 dependent on the method signature only again.
6591 2004-06-21 Martin Baulig <martin@ximian.com>
6593 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
6594 added interface support.
6596 2004-06-21 Martin Baulig <martin@ximian.com>
6598 * class.c (mono_vtable_get_static_field_data): New public method.
6600 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
6602 * filewatcher.c : Windows build fix to be compliant with API changes.
6604 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
6606 * class.h, class.c: more accessors.
6607 * metadata.h, metadata.c: prepare for hiding MonoType and
6608 MonoMethodSignature: people should use the accessors from now on
6609 outside of the tree.
6611 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
6613 * *.c, *.h: more API cleanups.
6615 2004-06-18 Jackson Harper <jackson@ximian.com>
6617 * assembly.c: Trace loading assemblies.
6618 * loader.c: Trace loading native libraries.
6619 * mono-config.c: Trace loading config files.
6621 2004-06-18 Dick Porter <dick@ximian.com>
6623 * locales.c: Tell ICU the lengths of strings, it can cope with
6624 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
6626 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
6628 * image.c: swapped name/filename;
6630 2004-06-18 Martin Baulig <martin@ximian.com>
6632 * mono-debug-debugger.c (write_class): Write the parent class at
6633 the end of the header.
6635 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
6637 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
6639 2004-06-17 Raja R Harinath <rharinath@novell.com>
6641 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
6642 (bundle_obj): New conditional define.
6643 (BUILT_SOURCES): Remove.
6644 ($(bundle_srcs)): Make parallel-make safe.
6645 (libmonoruntime_la_LIBADD): Make unconditional.
6646 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
6647 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
6649 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
6651 * culture-info-tables.h: It was inconsistent with the latest
6654 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
6656 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
6659 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
6662 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
6664 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
6665 cleaned up public header threads.h.
6667 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
6669 * Makefile.am, *.c, *.h: more API cleanups.
6671 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
6673 * Makefile.am: removed monosn from compilation.
6674 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
6675 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
6676 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
6677 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
6678 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
6679 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
6681 2004-06-15 Jackson Harper <jackson@ximian.com>
6683 * assembly.c: Make locales lower case when searching the GAC for
6684 assemblies. gacutil will always make locales lowercase when
6685 installing so this effectively makes them case insensitive.
6687 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
6689 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
6690 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
6691 parameter which allows to choose whether the wait can be interrupted or
6692 not. Also added the method mono_monitor_enter(), which locks the monitor
6693 using an infinite wait and without allowing interruption.
6694 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
6696 * object.h: Added new fields in MonoThread. suspend_event holds the event
6697 used to susped/resume the thread. synch_lock is the lock object to use for
6698 modifying the thread state.
6699 * threads.c: Use the new synch_lock object for locking, instead of "this",
6700 which can generate deadlocks.
6701 Moved thread state change in Thread.Sleep and Thread.Join from managed
6702 to unmanaged code. This avoids a deadlock when the thread was suspended
6703 just after acquiring the thread lock.
6704 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
6705 Implemented Thread.Suspend using an event instead of ThreadSuspend,
6706 which is not fully implemented in the io-layer.
6707 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
6709 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
6711 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
6712 threads-types.h: more API cleanups.
6714 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
6716 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
6717 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
6718 threadpool.c, threads.c: first pass at the exported API cleanup.
6720 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
6722 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
6724 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6726 * icall.c: added internalGetHome.
6728 2004-06-14 Dick Porter <dick@ximian.com>
6730 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
6731 possible to return successfully when '.' or '..' were the only
6732 entries in a directory, but were skipped. The MonoIOStat was not
6733 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
6736 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
6738 * reflection.c: make binaries run on .Net 1.1 by default.
6740 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
6742 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
6744 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
6746 * marshal.c: keep track of struct size with explicit layout
6749 2004-06-12 Martin Baulig <martin@ximian.com>
6751 * mono-debug-debugger.c: Comment out a debugging g_message().
6753 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
6755 * reflection.c, reflection.h: do not free custom attrs that are cached.
6756 * icall.c: use braces to make code clearer.
6758 2004-06-11 Martin Baulig <martin@ximian.com>
6760 * class.h (MonoInflatedField): New type.
6761 (MonoClassField): Replaced `MonoType *generic_type' with
6762 `MonoInflatedField *generic_info'.
6765 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
6767 2004-06-11 Martin Baulig <martin@ximian.com>
6769 * reflection.c (mono_image_create_method_token): Correctly encode
6772 2004-06-11 Martin Baulig <martin@ximian.com>
6774 * metadata.c (mono_metadata_parse_method_signature): When parsing
6775 a MethodDef which has VarArgs, also set sentinelpos if we don't
6776 have any parameters.
6778 2004-06-11 Martin Baulig <martin@ximian.com>
6780 * verify.c (mono_method_verify): In CEE_CALL, use
6781 mono_method_get_signature() to get the method's signature, unless
6782 we're a PInvoke method.
6784 2004-06-10 Jackson Harper <jackson@ximian.com>
6786 * assembly.c: Use <path>/lib/mono/gac for the extra paths
6787 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
6788 logical name as the supplied path is just a prefix to the gac not
6789 the direct path to it.
6791 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
6793 * reflection.c: make the token for a created method match
6794 the token of the MethodBuilder it was created from
6795 (IKVM requires this behaviour now).
6797 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
6799 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
6800 reflection.c, socket-io.c: leak fixes.
6802 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
6804 * icall.c: handle sentinel pos in vararg methods in position different
6807 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6809 * culture-info-tables.h: freshly generated.
6811 2004-06-09 Martin Baulig <martin@ximian.com>
6813 * loader.c (mono_get_method_constrained): Call `mono_class_init
6814 (constrained_class)'.
6816 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
6818 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
6819 any methods. Fixes #59629.
6821 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
6823 * culture-info-tables.h: reflecting locale-builder updates.
6825 2004-06-08 Dick Porter <dick@ximian.com>
6828 * locales.c: Fixed compile warnings, including a real bug in
6829 CompareInfo_internal_compare.
6831 2004-06-08 Dick Porter <dick@ximian.com>
6834 (ves_icall_System_Globalization_CompareInfo_internal_index):
6835 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
6836 Double-check the resuls of usearches, because ICU currently
6837 ignores most of the collator settings here. Fixes bug 59720.
6839 2004-06-08 Dick Porter <dick@ximian.com>
6842 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
6843 Fix memory leak and segfault-causing typo. No idea how this one
6844 lasted so long without being noticed.
6846 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
6848 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
6849 any methods. Fixes #59629.
6851 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6854 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
6855 own the critical section before). Removed dead code (that's done
6856 in the preload hook).
6858 (mono_assembly_load_with_partial_name): call the preload hook.
6860 2004-06-08 Martin Baulig <martin@ximian.com>
6862 * metadata.c (mono_metadata_signature_alloc): Default
6863 `sentinelpos' to -1.
6865 * reflection.c (mono_image_get_array_token): Likewise.
6867 2004-06-08 Martin Baulig <martin@ximian.com>
6869 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
6871 * metadata.c (mono_metadata_parse_method_signature): When parsing
6872 a MethodDef which has VarArgs, set sentinelpos.
6874 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
6875 `gint16' since we're using -1 for non-varargs methods.
6878 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
6879 (method_encode_signature): Added varargs support.
6880 (method_builder_encode_signature): Likewise.
6881 (mono_image_get_varargs_method_token): New static method.
6882 (mono_image_create_method_token): New public method; this is
6883 called via an icall instead of mono_image_create_token() when
6884 calling a varargs method.
6886 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
6888 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
6890 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
6892 * culture-info-tables.h : Reflecting the latest locale-builder that
6893 fixed empty array representation ({} to {0}).
6895 2004-06-07 Jackson Harper <jackson@ximian.com>
6897 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
6898 looking up extra gac paths. This allows MONO_GAC_PATH to act
6899 exactly like a prefix.
6901 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
6903 * reflection.c (mono_reflection_type_from_name): Make a copy of the
6904 type name before modifying it. Fixes #59405.
6906 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
6908 * culture-info.h: added fields for "all datetime patterns".
6909 * locales.c: ( ves_icall_System_Globalization_CultureInfo
6910 _construct_datetime_format ()): fill xxx_patterns fields.
6911 * object.h: added fields for "all datetime patterns" to
6912 MonoDateTimeFormatInfo.
6913 * culture-info-tables.h: reflecting locale-builder updates.
6915 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
6917 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
6918 the event has no add and remove methods. Fixes #59629.
6920 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
6922 * object.c: Fixed possible integer overflow when allocating large
6925 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
6927 * culture-info-tables.h: reflecting locale-builder updates.
6929 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
6931 * culture-info-tables.h: reflecting locale-builder updates.
6933 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
6935 * culture-info-tables.h: reflecting locale-builder updates.
6937 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
6939 * threads.c: Made Thread.Sleep abortable.
6941 2004-06-02 Martin Baulig <martin@ximian.com>
6943 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
6945 * debug-mono-symfile.h: Bumped symbol file version number to 37.
6947 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
6949 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
6951 2004-05-30 Jackson Harper <jackson@ximian.com>
6953 * reflection.c: Do not hardcode assembly versions or public key
6954 tokens anymore. All of this except the corlib section was dead
6957 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
6959 * object.c (mono_runtime_invoke_array): Automatically create boxed
6960 objects for byref valuetypes if needed. Fixes #59300.
6962 * object.c (mono_method_return_message_restore): Handle
6963 MONO_TYPE_OBJECT as well.
6965 2004-05-28 Jackson Harper <jackson@ximian.com>
6967 * reflection.c: The modified type encoding was causing build
6968 problems. Reverted for now.
6970 2004-05-28 Jackson Harper <jackson@ximian.com>
6972 * reflection.c/h: Take an assembly ref so that we dont create
6973 fully qualified names when encoding types in the same assembly as
6974 the custom attribute being emitted.
6975 * appdomain.c: Increment version number.
6977 2004-05-26 Duncan Mak <duncan@ximian.com>
6980 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6981 Set the full version number (major, minor, build, revision).
6983 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
6985 * marshal.c (emit_struct_conv): increment src/dst after blit
6986 (mono_marshal_get_managed_wrapper,
6987 mono_marshal_get_native_wrapper): make sure we have marshalling
6988 info before marshalling params (info computation affects
6991 * class.c (class_compute_field_layout): correctly deal with
6993 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
6994 value types (as per what windows dows by default)
6995 (mono_class_setup_mono_type): System.ValueType is blittable
6996 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
6999 * marshal.c (mono_marshal_load_type_info): flag types as
7000 non-blittable if the native layout doesn't match the managed
7003 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7005 * appdomain.c: don't add stuff in the private search path that is
7006 above the application base. If application base is not set, there's
7007 no private search path.
7009 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
7011 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
7012 byref struct arguments in native->managed marshalling.
7014 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
7016 * marshal.c (mono_marshal_get_runtime_invoke): correctly
7017 cache methods using signature (special case for methods
7018 that are value type or string class)
7020 * image.c (mono_image_close): clean up allocated GSList's
7021 in runtime_invoke_cache.
7023 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7025 * mono-config.c: set the correct path for mono_cfg_dir on windows when
7026 there's no MONO_CFG_DIR environment variable defined.
7028 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7030 * threads.c: windows version must be >= 0x0500 to include OpenThread.
7032 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
7034 * threadpool.c: Really wait for 500ms after the async call, even if the wait
7036 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
7037 before waiting for it, and call CloseHandle after the wait to unref it.
7038 This will make sure that handles are not disposed too early.
7040 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7045 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
7048 * object.c: se the application_base only for the domain that runs
7049 Main. Fixes bug #59216,
7051 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7054 * object.c: only the domain in which Main is run have
7055 SetupInformation.ConfigurationFile set, so moved a few lines from
7056 appdomain.c to object.c.
7058 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7060 * appdomain.c: we tried to load [name].(dll|exe), but according
7061 to bug #57710, we must also try [culture]/[name].(dll|exe) and
7062 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
7063 There's a test case attached to bug #58922.
7065 2004-05-27 Dick Porter <dick@ximian.com>
7068 * file-io.c: Implemented icalls for locking and unlocking regions
7070 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
7071 FALSE on error (fixes both compiler warning and real bug.)
7073 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
7075 * culture-info-tables.h: reflecting locale-builder updates.
7077 (Added missing ChangeLog entry for 05/26)
7079 2004-05-27 Jackson Harper <jackson@ximian.com>
7081 * locales.c: Fix some cut and paste errors.
7083 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7085 * mono-config.c: set the correct path for config. directory on windows.
7087 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
7089 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
7092 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
7094 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
7095 from pinvoke functions.
7097 * marshal.c (mono_ftnptr_to_delegate): Implement this.
7099 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
7101 * culture-info-tables.h: reflecting locale-builder updates.
7103 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
7105 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
7108 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
7110 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
7111 * icall.c: Modified icalls for RNG.
7112 * rand.c|h: Changed RNG interface to allow thread-safe usage under
7113 Windows (CryptoAPI).
7115 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
7117 * locales.c: Fix build.
7119 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
7121 * culture-info-tables.h: reflecting locale-builder updates.
7123 2004-05-25 Jackson Harper <jackson@ximian.com>
7125 * locales.c: When creating the current culture use the $LANGs
7126 specific culture. So DateTimeFormat and NumberFormat entries are created.
7128 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
7130 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
7131 a char array as parameter.
7133 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
7135 * image.c: In mono_image_open(), always use an absolute path name to
7136 look for already loaded images.
7138 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
7140 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
7141 missing in the windows build (like older cygwin include files).
7143 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
7145 * icall.c: Fixed check for possible integer overflow in Buffer_
7146 BlockCopy icall. Replaced comments style // by /* */.
7148 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
7150 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
7152 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
7153 check after MONO_VTADDR. Fixes pinvoke2.exe.
7155 * marshal.h marshal.c metadata.h: Add beginnings of support for
7156 ftnptr -> delegate marshalling.
7158 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
7160 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
7161 * threads.c: Fix warnings.
7163 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
7165 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
7166 * icall.c: Registered icalls for Suspend and Resume.
7167 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
7169 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
7170 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
7171 * process.c: Use WaitForSingleObjectEx.
7172 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
7174 * threads.c, threads.h: Make use of new Ex wait methods. Improved
7175 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
7176 for Suspend and Resume. Added new mono_thread_stop, used for stoping
7177 background threads. Added basic support for Abort in Windows.
7178 Start new threads using a managed delegate invoke wrapper. This wrapper
7179 has an interruption checkpoint that is needed since an interruption
7180 can be requested before the thread leaves the unmanaged code that starts
7182 * marshal.c: Added interruption checkpoint after every native call, and
7183 also before managed calls for wrappers called from unmanaged code to
7184 go into managed code.
7185 * object.h: Added new field in MonoThread to keep track of interruption
7188 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
7190 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
7193 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7200 * rand.c: getenv -> g_getenv (windows!)
7202 * process.c: complete_path is also used on non-windows platforms.
7204 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7206 * icall.c: new signature for Process_Start.
7208 * process.[ch]: new signature for Process_Start. If we're on windows
7209 and UseShellExecute is false, we have to search for the program by
7210 ourselves if we don't get a full path.
7212 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
7214 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
7215 marshalling and call CleanUpNativeData if needed. Fixes #58646.
7217 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7219 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
7222 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7224 * process.c: use double quotes to quote program name and arguments on
7225 windows. Fixes bug #58575.
7227 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7229 * file-io.c: don't return "." and ".." when using windows Find*File.
7231 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
7233 * marshal.c: Don't pass wrappers to message init because method
7234 addressed used to lookup metadata. part of remoting[2|3] fix.
7236 2004-05-15 Jackson Harper <jackson@ximian.com>
7238 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
7239 path is essentially the same as MONO_PATH except that it points to
7240 GACs instead of lib directories.
7241 * loader.h: The user gac is gone so we dont need function to
7243 * mono-config.c: user gac option is now gone.
7245 2004-05-15 Jackson Harper <jackson@ximian.com>
7247 * culture-info.h: Make defines more consistent, add calendar data
7248 to the culture info table.
7249 * culture-info-tables.h: Add basic calendar data. Basically
7250 everyone gets default gregorian until all the data is
7252 * locales.c: Use the new consistent defines. Set calendar data for
7253 culture info objects.
7254 * object.h: add a field for calendar data to CultureInfo
7256 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
7258 * image.c: image->runtime_invoke_cache is keyed on signatures now.
7259 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
7261 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
7262 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
7263 an extra param that is the pointer of the method to invoke. The IL for
7264 the invoke method is no longer specific to the method, but to the
7265 signature of the method. Thus, we can share the same code for multiple
7266 methods. This reduces the number of methods that have to be compiled.
7268 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
7270 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
7272 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7274 * icall.c: Optimize Buffer.BlockCopy.
7276 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7278 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
7279 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
7280 quote). Changed them to "MMMM yyyy".
7282 2004-05-12 Miguel de Icaza <miguel@ximian.com>
7285 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
7287 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
7289 * reflection.h: Updated after changes to managed structures.
7291 * appdomain.c: Bump corlib version.
7293 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7295 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
7298 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7300 * Makefile.am: link to ../os/libmonoos.la on windows.
7303 -If MONO_DEBUG, warn about non-existing directories in
7305 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
7306 compile time variable.
7307 -Removed init_default_path and call mono_set_rootdir from
7308 libmonoos.a instead (windows only).
7310 * assembly.h: declare mono_assembly_getrootdir().
7313 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
7315 * loader.c: s/getenv/g_getenv/
7317 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
7319 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
7321 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
7323 * metadata.h: Add new marshalling conversions.
7325 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
7328 * reflection.c (mono_reflection_get_type): Lookup the type in all
7329 modules of a multi-module assembly. Fixes #58291.
7331 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
7333 * threads.c: Before aborting a background, set the StopRequested
7334 state. This avoids throwing the Abort exception.
7335 In mono_thread_manage, don't continue with the shutdown until all
7336 aborted threads have actually stopped.
7338 2004-05-10 Jackson Harper <jackson@ximian.com>
7340 * locales.c: Remove the modifier from culture names.
7342 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7344 * Makefile.am: monosn is not installed any more. It has been deprecated
7347 2004-05-07 Jackson Harper <jackson@ximian.com>
7350 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
7351 Fix array construction, add bailout if the length is 0.
7353 2004-05-07 Dick Porter <dick@ximian.com>
7355 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
7356 machine doesn't have a DNS entry. Patch by Urs Muff
7357 (umuff@quark.com), fixes bug 57928.
7359 2004-05-06 Jackson Harper <jackson@ximian.com>
7361 * reflection.c: Handle null PublicTokens properly. alloc mem for
7362 assembly names culture so we dont crash when freeing it.
7364 2004-05-06 Jackson Harper <jackson@ximian.com>
7366 * assembly.c: Check the usergac when loading with partial names.
7368 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
7370 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
7371 does nothing for now (not required for Linux/Windows) but the class
7372 library can call it (and a newer or modified runtime could need it).
7373 * icall.c: Registred icall.
7375 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7377 * loader.c: prints a message on module loading error we set MONO_DEBUG
7378 environment variable.
7380 2004-05-05 Jackson Harper <jackson@ximian.com>
7382 * appdomain.c: Handle PublicKeyToken=null properly.
7384 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
7386 * environment.c|h: Added icall ves_icall_System_Environment_
7387 GetOSVersionString to get the current OS version as a string.
7388 * icall.c: Registred icall.
7390 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
7392 * object.c: in mono_object_get_virtual_method(), take into account that
7393 non-virtual methods don't have a slot in the vtable. Check needed when
7394 the object is a proxy.
7396 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
7398 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
7399 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
7401 * object.c (mono_class_compute_gc_descriptor): Fix warning.
7403 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
7404 passed when a valuetype is expected.
7406 * object.c (mono_unhandled_exception): Only set the exit code if the
7407 exception happens in the main thread. Fixes thread5.exe.
7409 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
7410 invalid names. Fixes #58047.
7412 2004-05-03 Jackson Harper <jackson@ximian.com>
7414 * assembly.c: This line was committed accidently and is unneeded.
7416 2004-05-03 Jackson Harper <jackson@ximian.com>
7418 * icall.c: Add new icall for Assembly::LoadWithPartialName
7419 * assembly.c/.h: new function that probes the GAC to load partial
7420 assembly names by Paolo Molaro.
7422 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7424 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
7425 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
7426 (type_get_fully_qualified_name): Added PublicKeyToken when building a
7429 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7431 * appdomain.c: fixed check for 'neutral' culture and removed warning.
7432 * reflection.c: fix bug when parsing a full type name and Version is not
7433 the last thing in the string.
7435 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
7437 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
7438 crashes when it is freed.
7440 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7442 * assembly.c: print the compat warning to stderr.
7444 2004-05-01 Miguel de Icaza <miguel@ximian.com>
7446 * assembly.c (mono_assembly_load_references): Add a compatibility
7447 hack to run old applications that might be still referencing the
7448 3300-based assemblies, only do this for System.xxx.
7450 2004-05-01 Jackson Harper <jackson@ximian.com>
7452 * appdomain.c: If the culture is neutral we set it to "".
7454 2004-04-29 Jackson Harper <jackson@ximian.com>
7456 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
7458 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
7460 * string-icalls.c: added low overhead function for copying chars
7461 * icall.c: added needed icall for the above function
7463 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7465 * icall.c: fix return value of get_global_assembly_cache. Implemented
7466 Environment.GetLogicalDrives.
7468 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
7470 * rand.c: try and talk to egd or prngd
7471 for random bytes if opening devices fail.
7473 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
7475 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
7476 alignment for the type using the native alignment of its members
7477 instead of using klass->min_align.
7479 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
7481 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7484 * socket-io.c: added check for sys/aio.h.
7486 2004-04-28 Dick Porter <dick@ximian.com>
7488 * threads.c: Don't abort a thread thats already aborting, when
7489 terminating everything.
7491 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7493 * icall.c: added 2 new async calls for Socket.
7495 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
7498 * threadpool.c: removed unused variable.
7500 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
7502 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
7504 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7506 * locales.c: put back string_invariant_tolower () and
7507 string_invariant_toupper ().
7509 2004-04-26 David Waite <mass@akuma.org>
7514 * unicode.h: remove comma from end of enumeration declarations
7516 2004-04-26 David Waite <mass@akuma.org>
7518 * debug-mono-symfile.h:
7521 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
7524 2004-04-26 Jackson Harper <jackson@ximian.com>
7526 * appdomain.c: Increment version number.
7528 2004-04-26 Jackson Harper <jackson@ximian.com>
7530 * appdomain.c: Set assembly references public token value when
7531 PublicKeyToken is specified, not the hash_value. Free public token
7532 values when free assembly name data. Previously the public key
7533 token was hex decoded, however we are using hex encoded public key
7534 tokens, so this is not neccasary.
7535 * assembly.c: Lookup assemblies in the gac if their public token
7536 value is set. Add function to allow enabling user gac
7537 lookups. Specify whether or not the assembly was loaded from the
7538 GAC. Compare full assembly names when checking the cache for
7539 assemblies (Temporarily disabled see comment in code). Remove
7540 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
7541 specifies trace-loader they get extra info to stdout on the
7542 loading of assemblies.
7543 * image.h: Add a field for an assembly references public token
7544 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
7545 whether an assembly has been loaded from the GAC.
7546 * image.c: Remove a corlib -> mscorlib name mapping.
7547 * loader.h: Add function to enable/disable the user gac.
7548 * mono-config.c: Check if the usergac is enabled in the config
7550 * icall.c: New icall to determine whether or not an assembly has
7551 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
7552 * tabldefs.h: Add constant for assemblyref flag that specifies a
7553 full public key is used instead of a public token.
7554 * reflection.c: Remove mscorlib -> corlib mappings. Set
7555 PublicTokenValue instead of hash value. This value is a hex
7556 string so it does not need to be expanded.
7558 2004-04-26 Martin Baulig <martin@ximian.com>
7560 * mono-debug-debugger.c (mono_debugger_initialize): Set
7561 `mono_debugger_initialized' before calling mono_debug_lock().
7563 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
7565 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
7566 InternalToUpper/InternalToLower.
7567 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
7568 removed invariant culture shortcut. This is now done in managed code.
7569 * locales.c: (string_invariant_toupper/tolower) removed.
7571 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7573 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
7574 Added Poll internal call.
7576 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
7577 call for Poll. Select was too heavy for polling a single socket.
7579 * threadpool.[ch]: added mono_threadpool_cleanup.
7580 * threads.c: use it. Don't use Thread_Abort on windows.
7582 2004-04-23 Martin Baulig <martin@ximian.com>
7584 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
7586 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
7588 * icall.c: Registred new icalls for key pair protection and added an
7589 icall for Environment.GetFolderPath on Windows.
7590 * security.c|h: Added new icalls for key pair protection.
7592 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7594 * socket-io.c: don't display the non-supported family warning for known
7595 families. Now this is not displayed on windows when checking support
7598 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7600 * class.c: don't display the layout warning for static fields.
7602 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
7604 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
7605 * locales.c, locales.h: Added new icalls for culture-specific
7606 Char.ToLower and Char.ToUpper.
7608 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7610 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
7613 2004-04-20 Martin Baulig <martin@ximian.com>
7615 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
7616 of the type name before passing it to mono_reflection_type_from_name().
7618 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
7620 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
7621 encodings here. Fixes #56965.
7623 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
7625 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
7626 fix test on strstr result not that I can see anything that
7627 relies on the result.
7629 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
7631 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
7634 * marshal.c (mono_marshal_get_string_encoding): New helper function.
7636 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
7637 function to determine which marshalling to use for strings. Fixes
7640 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
7642 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
7644 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
7646 * icall.c: #include mono-config.h
7648 2004-04-15 Jackson Harper <jackson@ximian.com>
7650 * culture-info-tables.h: Fix date formats for en-US culture.
7652 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
7654 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
7655 ThreadPool.SetMinThreads.
7656 * threadpool.c: Implemented ThreadPool.GetMinThreads and
7657 ThreadPool.SetMinThreads.
7659 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
7661 * mono-config.c: also load the .config file in the directory
7662 where the assembly was found.
7664 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
7666 * assembly.c: load per-assembly config files.
7667 * icall.c: decrapified code to get the config dir and moved to
7669 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
7670 per-assembly config files. When doing a dll map lookup give precedence
7671 to the per-assembly data.
7673 2004-04-14 Martin Baulig <martin@ximian.com>
7675 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
7676 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
7677 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
7679 * mono-debugger-debugger.c: While the debugger is locked, remember
7680 whether the symbol tables have changes and send one single
7681 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
7683 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
7685 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
7687 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
7690 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
7691 account when marshalling string arrays. Fixes #56965.
7693 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
7695 * icall.c: Add new icalls mapping for security.
7696 * security.c|h: Add internal calls for WindowsIdentity,
7697 WindowsImpersonationContext and WindowsPrincipal.
7699 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
7701 * class.c: Added comment to ensure the System.MonoDummy class
7702 is removed when no longer necessary
7704 2004-04-13 Miguel de Icaza <miguel@ximian.com>
7706 * appdomain.c: Pass arguments to the bootstraping exceptions to
7707 minimize JITed methods at boot
7709 * metadata.c (mono_exception_from_name_two_strings): Allow for the
7710 second string to be null.
7712 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
7713 Change the protocol to minimize the JIT methods at startup. Now
7714 it Returns the internal codepage, if the value of "int_code_page"
7715 is 1 at entry, and we can not compute a suitable code page
7716 number, returns the code page as a string.
7718 2004-04-13 Jackson Harper <jackson@ximian.com>
7720 * culture-info-tables.h: Fix number of decimal digits for all
7723 2004-04-13 Jackson Harper <jackson@ximian.com>
7725 * icall.c: Clairfy out of sync error message. It is not always
7726 your corlib that is out of sync.
7728 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
7730 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
7731 properties when only the set accessor is overriden. Fixes #55874.
7733 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
7735 * assembly.c (mono_assembly_load_references): Make this thread safe.
7738 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
7740 * monosn.c: Add missing initialization calls.
7742 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
7745 ves_icall_System_Globalization_CultureInfo_construct_number_format
7746 Fix g_assert so it compiles on fussier compilers re int/ptr
7749 2004-04-08 Dick Porter <dick@ximian.com>
7752 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
7753 53992. Also rearrange the code so that the internal calls return
7754 an error value and exceptions are thrown from managed code.
7756 * icall.c: Add type info to the socket icalls.
7758 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7760 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
7763 2004-04-07 Martin Baulig <martin@ximian.com>
7765 * class.c (mono_class_from_generic_parameter): Don't default
7766 `klass->parent' to `mono_defaults.object_type'.
7768 2004-04-07 Martin Baulig <martin@ximian.com>
7770 * reflection.c (mono_reflection_initialize_generic_parameter): Set
7771 `param->pklass->reflection_info'.
7773 2004-04-07 Jackson Harper <jackson@ximian.com>
7775 * culture-info-tables.h: Fix date separator symbol.
7777 2004-04-07 Martin Baulig <martin@ximian.com>
7779 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
7780 from System.Type to System.MonoType.
7782 2004-04-07 Martin Baulig <martin@ximian.com>
7785 (MonoReflectionGenericParam): Added `has_reference_type' and
7786 `has_value_type' fields.
7788 * reflection.c (mono_image_get_generic_param_info): Encode the
7789 correct flags if we have the `class' or `struct' constraint.
7791 2004-04-07 Martin Baulig <martin@ximian.com>
7794 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
7796 2004-04-07 Jackson Harper <jackson@ximian.com>
7798 * appdomain.c: Revert extra patches, just wanted to bump the
7801 2004-04-07 Jackson Harper <jackson@ximian.com>
7803 * Makefile.am: Add culture-info private headers.
7804 * icall.c: Add new icalls for contructing locales.
7805 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
7806 * locales.h: Declare new culture info construction methods.
7807 * object.h: Add new fields used to avoid the CultureMap to
7809 * culture-info.h: Definition of structs used in the culture info
7811 * culture-info-tables.h: Autogenerated tables that contain culture
7812 info data. This file was generated with the locale-builder tool.
7813 * appdomain.c: Incement corlib version number.
7815 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
7817 * appdomain.c: (mono_runtime_init) move mono_thread_init
7818 to before mono_object_new calls so critical sections
7819 are initialized before use.
7821 2004-04-07 Martin Baulig <martin@ximian.com>
7824 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
7825 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
7826 (ves_icall_MonoGenericParam_initialize): Removed.
7827 (monogenericparam_icalls): Removed.
7828 (generictypeparambuilder_icalls): Added new table for
7829 System.Reflection.Emit.GenericTypeParameterBuilder.
7832 (mono_reflection_define_generic_parameter): Removed.
7833 (mono_reflection_initialize_generic_parameter): This is now called
7834 from GenericTypeParameterBuilder's .ctor.
7836 2004-04-06 Martin Baulig <martin@ximian.com>
7838 * class.c (mono_class_init): Don't inflate nested classes in a
7840 (mono_type_get_name_recurse): Include the generic arguments for
7841 generic instances and generic type declarations.
7842 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
7843 (_mono_class_get_instantiation_name): Removed.
7844 (mono_class_create_generic): Always use `gklass->name' as our name.
7846 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
7848 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
7849 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
7850 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
7851 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
7852 closed generic methods here.
7855 (mono_reflection_generic_inst_get_nested_types): Removed.
7856 (inflate_mono_method): Copy the generic parameters from the
7857 MonoMethodHeader into out MonoGenericMethod.
7859 2004-04-06 Martin Baulig <martin@ximian.com>
7862 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
7864 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
7866 * reflection.c (build_compressed_metadata): If we have any entries
7867 in the GenericParam, MethodSpec or GenericParamConstraint tables,
7868 set the header version to 1.1.
7870 2004-04-06 Martin Baulig <martin@ximian.com>
7872 * class.c (mono_class_init): If we're a generic instance,
7873 initialize our nested classes, too.
7874 (_mono_class_get_instantiation_name): Deal with the new `!%d'
7877 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7879 * process.c: quote the argument passed to the shell on windows.
7881 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
7883 * threads.c (mono_alloc_special_static_data): Allow this to be
7884 called during startup.
7886 2004-04-02 Martin Baulig <martin@ximian.com>
7889 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
7891 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
7893 * icall.c: Fix build.
7895 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
7897 * Makefile.am: Added security.c|h.
7898 * icall.c: Added icall for get_UserName;
7899 * security.c: New file for security related icalls. Added function
7900 get_UserName for System.Environment (fix #56144).
7901 * security.h: New. Header file for security.c
7903 2004-04-02 Dick Porter <dick@ximian.com>
7905 * icall.c: Deleted the icalls that were obsoleted some time ago
7906 by the ICU string code, and which were mixed into the icall
7907 rearranging. Fixes bug 55969.
7910 * string-icalls.c: Deleted the code that those icalls reference.
7912 2004-04-01 Martin Baulig <martin@ximian.com>
7914 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
7916 * class.c (mono_class_from_generic_parameter): Don't set
7917 TYPE_ATTRIBUTE_INTERFACE.
7918 (my_mono_class_from_generic_parameter): Likewise.
7920 2004-04-01 Martin Baulig <martin@ximian.com>
7922 * loader.c (find_method): Added an optional `MonoClass *ic'
7923 argument to search in a specific interface.
7924 (mono_get_method_constrained): New public function.
7926 2004-04-01 Martin Baulig <martin@ximian.com>
7928 * reflection.c (mono_image_get_generic_field_token): Use the
7929 `handleref' cache here.
7931 2004-04-01 Martin Baulig <martin@ximian.com>
7933 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
7935 * reflection.c (create_generic_typespec): Use the `typespec' hash
7936 here, not the `typeref' one.
7938 2004-04-01 Martin Baulig <martin@ximian.com>
7940 * class.c (mono_class_inflate_generic_type): Moved the
7941 functionality into a new static inflate_generic_type() which
7942 returns NULL if it didn't do anything. Only increment the
7943 `mono_stats.inflated_type_count' if we actually inflated
7945 (mono_class_get_full): Check the classes type to see whether we
7946 need to inflate it; also inflate MONO_TYPE_(M)VAR.
7948 2004-04-01 Jackson Harper <jackson@ximian.com>
7950 * reflection.c: Set culture for assembly references.
7952 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
7954 * reflection.[ch], icall.[ch], Fix support for pinning variables.
7956 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7959 (do_mono_assembly_open): the critical section also covers
7960 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
7962 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7965 (mono_manage_threads): abort the background threads when finishing.
7968 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7970 * gc.c: only close the done_event handle if there was no timeout.
7973 2004-03-30 Martin Baulig <martin@ximian.com>
7975 * icall.c (icall_entries): It's called "System.Activator", not
7976 "System.Activation".
7978 2004-03-30 Martin Baulig <martin@ximian.com>
7980 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
7981 (mono_class_create_from_typespec): Likewise.
7983 2004-03-30 Martin Baulig <martin@ximian.com>
7985 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
7986 `has_ctor_constraint' and `initialized'.
7988 2004-03-30 Martin Baulig <martin@ximian.com>
7990 * reflection.c (encode_new_constraint): New static function to add
7991 the constructor constraint attribute to a type parameter.
7992 (encode_constraints): Call encode_new_constraint() if necessary.
7995 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
7997 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
7999 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
8001 * reflection.c, icall.c: add support for pinning variables.
8003 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
8005 * marshal.c (mono_marshal_get_managed_wrapper):
8006 init bool local with zero rather than null.
8008 2004-03-29 Martin Baulig <martin@ximian.com>
8010 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
8011 the "official" behavior here.
8012 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
8014 2004-03-29 Martin Baulig <martin@ximian.com>
8016 * icall.c: Reflect latest API changes.
8018 2004-03-29 Martin Baulig <martin@ximian.com>
8020 * loader.c (mono_get_method_from_token): Also call
8021 mono_metadata_load_generic_params () for abstract and interface
8022 methods; replace the type arguments in the method signature with
8023 the ones which are loaded from the metadata.
8025 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
8027 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
8028 of the lock is not the current thread. MS.NET don't do it, in spite of
8029 what the documentation says. See bug #56157.
8031 2004-03-28 Martin Baulig <martin@ximian.com>
8033 * class.c (mono_class_init): Don't call init_properties() and
8034 init_events() for generic instances; set `prop->parent' when
8035 inflating properties.
8037 * reflection.c (mono_generic_inst_get_object): Call
8038 `mono_class_init (ginst->klass)'.
8039 (mono_type_get_object): Only create a MonoGenericInst if your
8040 generic type is a TypeBuilder.
8041 (do_mono_reflection_bind_generic_parameters): Only set
8042 `ginst->is_dynamic' if our generic type is a TypeBuilder.
8044 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
8046 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
8049 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8051 * icall.c: added Kill_internal icall.
8052 * process.[ch]: added Kill_internal icall.
8054 2004-03-25 Martin Baulig <martin@ximian.com>
8056 * class.h (MonoStats): Added `generic_instance_count',
8057 `inflated_method_count', `inflated_type_count' and
8058 `generics_metadata_size'.
8060 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8062 * reflection.c: no warnings now.
8064 2004-03-25 Martin Baulig <martin@ximian.com>
8066 * class.c (mono_class_get_full): New public function; does a
8067 mono_class_get(), but also takes a `MonoGenericContext *'.
8069 * loader.c (mono_field_from_memberref): Renamed to
8070 `field_from_memberref', made static and added `MonoGenericContext *'
8072 (mono_field_from_token): Added `MonoGenericInst *' argument.
8073 (method_from_memberef): Likewise.
8074 (mono_get_method_from_token): Likewise.
8075 (mono_get_method_full): New public function; does a
8076 mono_get_method(), but also takes a `MonoGenericContext *'.
8078 * verify.c (mono_method_verify): Get the method's generic context
8079 and pass it to mono_field_from_token(), mono_get_method_full() and
8080 mono_class_get_full().
8082 2004-03-25 Martin Baulig <martin@ximian.com>
8084 * class.c (mono_class_inflate_generic_type): Take a
8085 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
8086 `MonoGenericMethod *'.
8088 2004-03-25 Martin Baulig <martin@ximian.com>
8090 * loader.h (MonoMethodInflated): Store the MonoGenericContext
8091 instead of the MonoGenericMethod here.
8093 2004-03-25 Martin Baulig <martin@ximian.com>
8095 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
8096 each time we create a new MonoGenericInst, we also create a new
8097 context which points back to us.
8099 * class.c (inflate_method): Use `ginst->context' instead of
8100 creating a new context.
8102 * loader.c (method_from_memberref): Use
8103 `klass->generic_inst->context' instead of creating a new context.
8105 2004-03-25 Martin Baulig <martin@ximian.com>
8107 * class.h (MonoGenericContext): New struct.
8108 (MonoGenericMethod): Removed `generic_inst'.
8110 * class.c (mono_class_inflate_generic_method): Take a
8111 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
8113 2004-03-25 Martin Baulig <martin@ximian.com>
8115 * loader.h (MonoMethodInflated): New typedef.
8117 * metadata.h (MonoMethodSignature): Removed `gen_method', make
8118 `generic_param_count' consume just 30 bits, added `is_inflated'
8119 and `has_type_parameters' flags (one bit each).
8121 * class.c (mono_class_inflate_generic_method): Create a
8122 MonoMethodInflated instead of a MonoMethodNormal and set
8123 `is_inflated' in the method signature.
8125 * class.h (MonoGenericMethod): Removed `generic_method'.
8127 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
8129 * image.c: Make sure the name of a MonoImage is always an absolute path.
8130 This fixes bug #54415.
8132 2004-03-24 Martin Baulig <martin@ximian.com>
8134 * class.c (mono_class_setup_vtable): If we're a generic instance,
8135 use our generic type's vtable size.
8137 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
8139 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
8140 MONO_NO_UNLOAD env var as a temporary workaround for unloading
8143 2004-03-23 Martin Baulig <martin@ximian.com>
8145 * class.h (MonoDynamicGenericInst): Added `int count_events' and
8146 `MonoEvent *events'.
8148 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
8149 (typebuilder_icalls): Added "get_event_info"; calls
8150 mono_reflection_event_builder_get_event_info().
8152 * reflection.c (mono_reflection_generic_inst_initialize): Added
8153 `MonoArray *events'.
8154 (mono_reflection_event_builder_get_event_info): New function.
8156 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
8158 * object.h: add mono_type_initialization_init
8160 * object.c (mono_runtime_class_init):
8161 implement class constructor synchronization rules
8162 to cope with threading issues.
8163 add mono_type_initialization_init
8165 * appdomain.c (mono_runtime_init): call
8166 mono_type_initialization_init
8168 * class.h: removing initializing field from MonoVTable
8170 2004-03-23 Martin Baulig <martin@ximian.com>
8172 * class.c (my_mono_class_from_generic_parameter): Use
8173 `param->name' if it's not NULL.
8175 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
8177 * class.c: do not insert non-virtual methods in the vtable.
8178 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
8179 that means the method is non-virtual. This never would have
8182 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
8184 * profiler.c: Added lock for accessing coverage_hash.
8186 2004-03-22 Martin Baulig <martin@ximian.com>
8188 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
8189 `method->method->signature->generic_param_count != 0' to make it
8190 work for interface methods.
8192 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8194 * process.c: quote the string passed to the shell using g_shell_quote.
8196 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8199 (mono_threads_manage): don't remove the finalizer thread and self
8200 from the threads hash table so that mono_thread_manage can be called
8203 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8205 * process.c: quote the arguments when UseShellExecute is true. Fixes
8208 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8210 * threads.c: set mono_thread_detach as a cleanup routine for every
8211 thread. This way it's always executed upon thread termination, either
8212 aborted or finished normally. No more xsp hangs!
8214 2004-03-17 Martin Baulig <martin@ximian.com>
8216 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
8217 `int count_nested' and a `MonoType **nested'.
8219 * reflection.c (mono_reflection_bind_generic_parameters): Moved
8220 most of the functionality into a new static
8221 do_mono_reflection_bind_generic_parameters() and don't take a
8222 `MonoType *nested_in' argument any more. Don't compute nested
8224 (mono_reflection_generic_inst_get_nested_types): New public method
8225 to get nested types.
8227 * class.c (mono_class_create_generic): Set `klass->nested_in' if
8228 we're a nested class.
8230 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
8231 mono_reflection_generic_inst_get_nested_types() to compute the
8234 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
8236 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
8237 descriptive error message under windows.
8239 2004-03-17 Martin Baulig <martin@ximian.com>
8241 * class.c (dup_type): Added `const MonoType *original' argument;
8242 copy the attrs from the original type.
8244 2004-03-17 Martin Baulig <martin@ximian.com>
8246 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
8247 `m->generic_inst_cache' here.
8249 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
8251 * exception.h exception.c: Add stack_overflow_exception.
8253 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8256 (overlapped_callback): call SetEvent *after* invoking the callback.
8257 No need to call CloseHandle.
8259 2004-03-16 Martin Baulig <martin@ximian.com>
8261 * reflection.c (mono_image_get_fieldref_token): Take a
8262 `MonoReflectionField *' instead of a `MonoClassField *' and a
8263 `MonoClass *'; store the `MonoReflectionField *' in the hash.
8265 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8267 * appdomain.c: don't add the culture to the filename we're looking for
8268 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
8270 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8272 * locales.c: don't ignore symbols when doing case insensitive compares.
8273 Thanks Dick! Fixes bug #54046.
8275 * threads.c: surround 'threads' usage with enter/leave in
8278 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
8280 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
8281 implicitly marshalled as [Out]. Fixes #55450.
8283 (mono_marshal_get_runtime_invoke): Zero out the result if there is
8286 2004-03-16 Martin Baulig <martin@ximian.com>
8288 * class.c (mono_class_from_generic_parameter): Use the actual
8291 2004-03-16 Martin Baulig <martin@ximian.com>
8293 * reflection.c (type_get_signature_size): New static function.
8294 Compues the size of the type in a method signature.
8295 (method_get_signature_size): New static function; calls
8296 type_get_signature_size() to compute the actual size of the
8298 (method_encode_signature): Use method_get_signature_size() to get
8299 the signature's size rather than using `nparams * 10'.
8301 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8303 * file-io.h: define here WapiOverlapped on windows. I don't want the
8304 regular OVERLAPPED one.
8307 * threadpool.c: somehow, BindIoCompletionCallback is not found.
8308 Disabling AIO on windows.
8310 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8312 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
8315 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8317 * appdomain.c: upgraded corlib version.
8319 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
8320 and BeginWrite. Allow opening files for asynchrnous operations.
8322 * file-io.h: new struct that maps FileStreamAsyncResult.
8323 * icall.c: added new icalls.
8324 * process.[ch]: support setting child process environment variables
8325 and use the SHELL or COMSPEC when UseShellExecute is true.
8327 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
8328 callback for async. IO is here and also BindHandle.
8330 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
8333 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
8335 * reflection.c (create_custom_attr): Allow len == 0.
8337 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
8338 computation on big-endian machines.
8340 2004-03-13 Martin Baulig <martin@ximian.com>
8342 * class.h (MonoGenericInst): Added `int count_ifaces'.
8344 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
8345 `ginst->count_ifaces' instead `klass->interface_count' since we
8346 may get called before the vtable is created.
8348 * loader.c (mono_method_get_param_names): If we're a generic
8349 instance, return and don't initialize the class.
8351 * reflection.c (mono_reflection_setup_generic_class): Don't call
8352 ensure_runtime_vtable().
8353 (mono_reflection_bind_generic_parameters): Set
8354 `ginst->count_ifaces'.
8356 2004-03-11 Jackson Harper <jackson@ximian.com>
8360 * unicode.h: Remove unused System.Char icalls.
8362 2004-03-11 Miguel de Icaza <miguel@ximian.com>
8364 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
8365 code when we P/Invoke the first library in Windows.Forms, instead
8366 of when we first open the assembly.
8368 * assembly.c: Drop the lookup from here.
8370 2004-03-10 Martin Baulig <martin@ximian.com>
8372 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
8373 class for properties, fields and events. Finally fixes #54945.
8375 2004-03-10 Martin Baulig <martin@ximian.com>
8377 * metadata.c (mono_metadata_class_equal): New static function;
8378 checks whether two generic instances or two generic parameters are
8380 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
8383 2004-03-10 Martin Baulig <martin@ximian.com>
8385 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
8387 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
8388 argument and write it into the `reflection_info' field.
8391 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
8392 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
8394 2004-03-09 Jackson Harper <jackson@ximian.com>
8396 * char-conversions.h: use 8 bits for numeric data its all we need
8397 * icall.c: numeric data is only 8 bits now.
8399 2004-03-09 Martin Baulig <martin@ximian.com>
8401 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
8403 * class.c (init_properties, init_events): Initialize the new
8406 * reflection.c (typebuilder_setup_properties): Likewise.
8407 (typebuilder_setup_events): Likewise.
8409 * reflection.h (MonoEventInfo): Replaced `parent with
8410 `declaring_type' and `reflected_type'.
8412 * icall.c (ves_icall_get_property_info): Distinguish between
8413 declaring and reflected type.
8414 (ves_icall_get_event_info): Likewise.
8416 2004-03-09 Martin Baulig <martin@ximian.com>
8418 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
8419 (ves_icall_Type_GetField): Correctly set field->klass.
8421 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
8423 * loader.h: Fix warning.
8425 2004-03-08 Miguel de Icaza <miguel@ximian.com>
8427 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
8428 library routine if present. Notice that it will still continue
8429 executing even if its missing, for those working on the Gtk#
8430 edition of Windows.Forms.
8432 * assembly.c (do_mono_assembly_open): If loading the
8433 System.Windows.Forms call mono_loader_wini_init.
8435 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
8437 * class.h: Added MonoRemoteClass struct.
8438 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
8439 function for MonoStrings.
8440 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
8441 Added internal call for getting the proxy type.
8442 * marshal.c: Get the type of transparent proxies from its remote_class.
8443 Added methods that generate the IL for type checks and casts:
8444 mono_marshal_get_isinst, mono_marshal_get_castclass,
8445 mono_marshal_get_proxy_cancast.
8446 * marshal.h: Declaration of the previous new methods.
8447 * object.c: Added new moethods for creating and updating MonoRemoteClass
8448 instances: mono_remote_class, mono_upgrade_remote_class,
8449 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
8450 * verify.c: FIx transparent_proxy_fields layout.
8451 * appdomain.c: Bump corlib version.
8453 2004-03-04 Jackson Harper <jackson@ximian.com>
8455 * icall.c: Add icall to access char conversion tables.
8456 * char-conversions.h: Character conversion tables.
8457 * Makefile.am: Add char-conversions.h private header file.
8459 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
8461 * appdomain.c (unload_thread_main): Increase unloading timeout to
8462 10 sec as a temporary workaround for Nant problems.
8464 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
8466 * gc.c: Add checks for GC_enable and GC_disable.
8468 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
8469 (jaak@zd.com.pl). Fix memory corruption in String.Replace
8472 2004-02-27 Martin Baulig <martin@ximian.com>
8474 * reflection.c (mono_reflection_bind_generic_parameters): Take a
8475 `MonoReflectionType *' instead of a `MonoType *'.
8477 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
8479 * gc.c (run_finalize): Avoid finalizing the object representing the
8481 (finalizer_thread): Fix warning.
8483 2004-02-25 Martin Baulig <martin@ximian.com>
8485 * class.c (_mono_class_get_instantiation_name): Added `int offset'
8486 argument for nested types.
8487 (mono_class_create_generic): Added support for nested generictypes.
8489 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
8492 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
8494 * reflection.c (method_encode_signature): Increase the minimum
8495 value of `size' from 10 to 11.
8496 (mono_reflection_bind_generic_parameters): Take `int type_argc'
8497 and `MonoType **types' arguments instead of the `MonoArray
8498 *types'; added `MonoType *nested_in'. Recursively instantiate
8501 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
8503 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
8504 stack_overflow_ex members which are used by exception handling.
8506 * appdomain.c (mono_runtime_init): Initialize the new members.
8508 * gc.c (mono_gc_enable): New helper function.
8509 * gc.c (mono_gc_disable): New helper function.
8511 2004-02-23 Martin Baulig <martin@ximian.com>
8513 * icall.c: I must have been really stupid - make it actually work
8516 2004-02-23 Martin Baulig <martin@ximian.com>
8518 * loader.c (method_from_memberref): Only inflate the method if
8519 it's in another klass.
8521 2004-02-23 Martin Baulig <martin@ximian.com>
8523 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
8524 (mono_class_init): If we're a generic instance and an interface,
8525 compute `class->interface_id'; also create `class->interfaces'
8526 here and inflate them.
8528 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
8530 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
8532 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
8534 2004-02-15 Miguel de Icaza <miguel@ximian.com>
8536 * reflection.c (method_encode_code): Improved the error message
8537 generated by the exception.
8539 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8541 * icall.c: Martin did not do what he said in the ChangeLog for
8542 2004-02-18, but put back the changes for properties and events.
8543 Commenting those changes out again and adding comment to bug #54518.
8545 * process.c: removed warning.
8547 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
8549 * marshal.c (emit_struct_conv): Print an error message instead of
8550 asserting when a type does not have the StructLayout attribute.
8552 2004-02-20 Martin Baulig <martin@ximian.com>
8554 * reflection.c (mono_type_get_object): Also use the cache for
8556 (mono_reflection_bind_generic_parameters): Always compute
8559 2004-02-20 Martin Baulig <martin@ximian.com>
8561 * class.h (MonoGenericMethod): Removed `klass'.
8563 * class.c (mono_class_inflate_generic_method): Added `MonoClass
8566 2004-02-20 Martin Baulig <martin@ximian.com>
8568 * reflection.c (method_encode_methodspec): Actually use the
8569 uninflated signature for the memberref.
8571 2004-02-20 Martin Baulig <martin@ximian.com>
8573 * class.h (MonoGenericMethod): Removed `declaring'.
8575 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
8576 is NULL, compute it here.
8578 2004-02-20 Martin Baulig <martin@ximian.com>
8580 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
8582 * metadata.c (mono_metadata_generic_inst_hash): New method.
8583 (mono_metadata_generic_inst_equal): New method.
8585 * reflection.c (mono_reflection_bind_generic_parameters): Use the
8586 `klass->image->generic_inst_cache' cache to avoid creating
8587 duplicate MonoGenericInst's.
8589 * class.c (mono_class_inflate_generic_type): Use the cache.
8591 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
8593 * object.c: fixed gc descriptor calculation for embedded valuetypes.
8595 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8597 * icall.c: added Socket.WSAIoctl icall.
8599 * socket-io.[ch]: implemented
8600 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
8602 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
8604 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
8606 2004-02-18 Urs C Muff <umuff@quark.com>
8608 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
8609 this work on PPC and other big-endian architectures.
8611 * debug-mono-symfile.h: Prepended the names of all the `guint32'
8612 fields with an underscore to make sure they're only accessed by
8615 2004-02-18 Martin Baulig <martin@ximian.com>
8617 * icall.c: Put the klass->refclass changes back for methods and
8618 fields, but not for properties and events. We're currently not
8619 distinguishing between DeclaringType and ReflectedType for
8620 properties and events, that's what caused the regressions.
8622 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8625 (mono_async_result_new): the handle can be NULL.
8627 * threadpool.c: Use an event instead of a semaphore, don't initialize
8628 it until needed. This saves quite a few semaphores from being created
8629 when using the threadpool.
8631 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
8633 * object.c (mono_string_is_interned_lookup): Fix interning of long
8634 strings. Fixes #54473.
8636 * domain.c (ldstr_equal): Optimize if the two strings are equal.
8638 * icall.c: Revert the klass->refclass changes since they introduce
8639 regressions (bug #54518).
8641 2004-02-18 Martin Baulig <martin@ximian.com>
8643 * class.c (mono_class_init): If we're a generic instance and don't
8644 come from a TypeBuilder, inflate our members here.
8645 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
8646 (mono_class_create_generic): New public method.
8647 (mono_class_initialize_generic): Removed.
8648 (get_instantiation_name): Renamed to
8649 _mono_class_get_instantiation_name() and made it public.
8651 2004-02-18 Martin Baulig <martin@ximian.com>
8653 * class.c (mono_class_inflate_generic_type): Clear the new
8654 instance's `nginst->klass' when inflating a generic instance.
8655 (mono_class_is_subclass_of): Added (basic) support for generic
8658 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
8660 * appdomain.h, domain.c: use a MonoCodeManager instead of a
8661 MonoMempool to hold compiled native code.
8663 2004-02-17 Martin Baulig <martin@ximian.com>
8665 * class.h (MonoDynamicGenericInst): Added `count_properties' and
8668 * reflection.c (mono_reflection_generic_inst_initialize): Added
8669 `MonoArray *properties' argument.
8671 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
8673 2004-02-17 Martin Baulig <martin@ximian.com>
8675 * icall.c (ves_icall_Type_GetFields): Renamed to
8676 ves_icall_Type_GetFields_internal() and added a
8677 `MonoReflectionType *rtype' argument; pass it to
8678 mono_field_get_object() to set the field's "reflected" type.
8679 (ves_icall_Type_GetConstructors): Likewise.
8680 (ves_icall_Type_GetEvents): Likewise.
8681 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
8682 argument; pass it to mono_method_get_object() to set the method's
8685 2004-02-17 Martin Baulig <martin@ximian.com>
8687 * class.h (MonoDynamicGenericInst): New type.
8688 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
8690 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
8691 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
8692 (ves_icall_MonoGenericInst_GetFields): New interncall.
8694 * class.c (mono_class_from_generic): Don't call
8695 mono_class_initialize_generic() if this is a dynamic instance;
8696 ie. it's being created from a TypeBuilder.
8697 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
8698 `class->byval_arg.type'.
8700 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
8701 to `inflate_method' and made static.
8702 (mono_reflection_inflate_field): Removed.
8703 (mono_reflection_generic_inst_initialize): New public method.
8705 * reflection.h (MonoReflectionGenericInst): Removed `methods',
8706 `ctors' and `fields'; added `initialized'.
8708 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
8710 * debug-helpers.c (mono_method_full_name): Fix output for empty
8713 2004-02-12 Martin Baulig <martin@ximian.com>
8715 * class.h (MonoClassField): Added `MonoType *generic_type'.
8717 * reflection.c (mono_image_get_fieldref_token): Added support for
8718 instantiated generic types.
8719 (field_encode_inflated_field): Removed.
8720 (mono_image_get_inflated_field_token): Removed.
8721 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
8723 * reflection.h (MonoReflectionInflatedField): Removed.
8725 2004-02-12 Martin Baulig <martin@ximian.com>
8727 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
8728 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
8730 * reflection.c (mono_image_get_methodspec_token): Take a
8731 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
8732 (mono_image_create_token): Check whether we have a
8733 `method->signature->gen_method' and call
8734 mono_image_get_methodspec_token() if appropriate.
8735 (inflated_method_get_object): Removed.
8736 (mono_reflection_bind_generic_method_parameters): Return a
8737 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
8738 (mono_reflection_inflate_method_or_ctor): Likewise.
8740 * reflection.h (MonoReflectionInflatedMethod): Removed.
8742 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
8744 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
8745 for custom valuetype marshalling.
8747 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
8749 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8751 * icall.c: fixed WSAGetLastError_internal name.
8753 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
8755 * threads.c (mono_thread_attach): Allow this to be called multiple
8758 * threads.c (build_wait_tids): Do not wait for ourselves.
8760 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
8761 appdomain list is empty.
8763 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
8764 memory returned by mono_string_builder_to_utf16, since it points into
8765 managed memory. Thanks to Bernie Solomon for noticing this.
8767 * icall.c: Add AppDomainSetup icalls.
8769 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
8771 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
8774 * reflection.c (reflection_methodbuilder_to_mono_method): Save
8775 custom attributes to the method_aux struct. Also fix array indexes etc.
8777 * loader.c (mono_method_get_param_names): Make dynamic case work again.
8779 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
8781 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
8782 (both static and runtime) and reduce startup time.
8784 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
8786 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
8787 AsAny marshalling conversion instead of crashing.
8789 * marshal.c: Fix warnings.
8791 2004-02-09 Martin Baulig <martin@ximian.com>
8793 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
8795 * reflection.h (MonoReflectionInflatedMethod): Removed the
8796 `declaring' field, it's now in the unmanaged MonoGenericMethod.
8798 * reflection.c (method_encode_methodspec): Removed the `method'
8799 argument; we get it from `gmethod->declaring'.
8800 (inflated_method_get_object): Removed the `declaring' argument.
8802 2004-02-09 Martin Baulig <martin@ximian.com>
8804 * class.h (MonoGenericMethod): New type.
8805 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
8808 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
8809 a `MonoGenericMethod *gen_method' one.
8811 * class.c (mono_class_inflate_generic_type): Take an additional
8812 `MonoGenericMethod * argument. This is only non-NULL if we're
8813 inflating types for a generic method.
8814 (mono_class_inflate_generic_signature): Renamed to
8815 inflate_generic_signature() and made static; take a
8816 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
8817 (inflate_generic_header): Take a `MonoGenericMethod *' argument
8818 instead of a `MonoGenericInst *' one.
8819 (mono_class_inflate_generic_method): Likewise.
8821 * reflection.c (encode_generic_method_sig): Take a
8822 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
8823 (method_encode_methodspec): Likewise.
8824 (inflated_method_get_object): Likewise.
8826 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
8827 field with a `MonoGenericMethod *gmethod' one.
8829 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
8831 * class.h (mono_class_has_parent): add parens to expansion
8834 2004-02-08 Martin Baulig <martin@ximian.com>
8836 * image.h (MonoImage): Removed `generics_cache'.
8838 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
8839 instead of a `MonoType *' argument; removed the `inflate_methods'
8840 argument. Don't inflate methods here.
8842 * loader.c (find_method): If it's a generic instance, call
8843 mono_class_init() on the `sclass->generic_inst->generic_type'.
8845 * metadata.c (mono_type_size): Make this work on uninitialized
8846 generic instances; call it on the `ginst->generic_type's class.
8848 * reflection.c (mono_reflection_bind_generic_parameters): Call
8849 mono_class_from_generic() to create the `ginst->klass'.
8851 2004-02-08 Martin Baulig <martin@ximian.com>
8853 * class.h (MonoClass): Changed type of `generic_inst' from
8854 `MonoType *' to `MonoGenericInst *'.
8856 2004-02-08 Martin Baulig <martin@ximian.com>
8858 * icall.c (ves_icall_Type_BindGenericParameters): Just call
8859 mono_type_get_object(), this is now creating a `MonoGenericInst'
8860 for MONO_TYPE_GENERICINST.
8861 (ves_icall_MonoGenericInst_GetParentType): Likewise.
8862 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
8864 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
8865 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
8866 (inflated_method_get_object): Added `MonoClass *refclass' argument.
8867 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
8870 * reflection.h (MonoReflectionInflatedMethod): Removed
8871 `declaring_type' and `reflected_type'.
8873 2004-02-08 Martin Baulig <martin@ximian.com>
8875 * class.h (MonoGenericInst): Added `MonoType *parent' and
8876 `MonoType **ifaces'.
8878 * reflection.h (MonoReflectionGenericInst): Removed `klass',
8879 `parent' and `interfaces'.
8881 * reflection.c (mono_reflection_bind_generic_parameters): Take a
8882 `MonoType *' argument and return a `MonoType *'.
8885 (ves_icall_MonoGenericInst_GetParentType): New interncall.
8886 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
8888 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
8890 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
8891 valuetype marshalling.
8893 2004-02-06 Martin Baulig <martin@ximian.com>
8896 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
8897 (my_mono_class_from_generic_parameter): Likewise.
8899 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
8901 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
8902 contents of the symbol files lazily.
8904 * object.h (MonoThread): Add 'name' and 'name_len' fields.
8906 * threads.h threads.c icall.c: New icalls for getting and setting the
8909 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
8911 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
8912 Raise an exception when the domain is not found.
8914 2004-02-03 Martin Baulig <martin@ximian.com>
8916 * reflection.c (mono_image_get_methodspec_token): Use the
8917 uninflated signature; fixes gen-33.
8919 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
8921 * gc.c threads.c: Make the finalizer thread a normal managed thread so
8922 the finalizer code can use thread functionality.
8924 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
8925 the finalizer thread.
8927 * threads.c: Make some functions more robust.
8929 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
8931 * metadata.h: Add new marshalling conventions.
8933 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
8934 stringbuilder marshalling. Fixes #53700.
8936 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
8938 * reflection.c (mono_image_get_type_info): Save declarative security
8941 * reflection.c (mono_image_get_field_info): Handle uninitialized
8942 unmanaged fields as well.
8944 * appdomain.c: Bump corlib version.
8946 2004-02-01 Martin Baulig <martin@ximian.com>
8948 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
8949 method type arguments.
8951 2004-01-30 Duncan Mak <duncan@ximian.com>
8953 * marshal.h: Add prototype for
8954 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
8956 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
8959 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
8961 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
8962 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
8964 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
8966 * marshal.c (mono_marshal_get_native_wrapper): Add support for
8967 custom marshalling of valuetypes.
8969 * marshal.c: Fix some warnings.
8971 2004-01-29 Martin Baulig <martin@ximian.com>
8973 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
8974 for generic method parameters.
8976 * reflection.c (method_encode_methodspec): Write the uninflated
8977 signature into the methodspec table.
8978 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
8979 is always the uninflated method.
8980 (reflection_methodbuilder_to_mono_method): Copy the generic
8981 parameters from the MethodBuilder into `header->gen_params'.
8983 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
8985 * class.c (mono_class_from_generic_parameter): Fix warning.
8987 2004-01-27 Martin Baulig <martin@ximian.com>
8989 * class.c (mono_class_from_generic_parameter): Don't create
8990 `klass->methods' here.
8992 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
8994 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
8995 extension since it does not work with libraries named lib<FOO>.dll.so.
8997 2004-01-25 Martin Baulig <martin@ximian.com>
8999 * class.c (mono_class_inflate_generic_type): Added support for
9000 MONO_TYPE_GENERICINST.
9002 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
9003 inflate methods on open constructed types.
9005 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9007 * object.c: fire ProcessExit event in the root AppDomain after running
9008 Main. Fixes bug #53299.
9010 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
9012 * socket-io.c: include the new socket-wrappers.h header.
9013 Use the wrappers instead of the unix socket functions to make the code
9016 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
9018 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
9020 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
9023 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
9025 * reflection.c (mono_image_create_pefile): Handle the case when the
9026 entry point is not a MethodBuilder.
9028 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
9029 field to ReflectionMethod since it is not allways a builder.
9031 * reflection.c (type_get_fully_qualified_name): New helper function to
9032 return the fully qualified name of a type.
9034 * reflection.c (encode_marshal_blob): Always emit the fully qualified
9035 type name for custom marshallers.
9037 * reflection.c (mono_marshal_spec_from_builder): Ditto.
9039 * class.c (mono_class_setup_vtable): If a parent class already
9040 implements an interface, use the implementing methods from that class.
9043 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9045 * threadpool.c: just return instead of ExitThread to allow for thread
9048 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
9050 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
9051 when closing resource modules.
9053 * reflection.c (mono_image_create_pefile): Handle the case when the
9054 entry point is not a MethodBuilder.
9056 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
9057 field to ReflectionMethod since it is not allways a builder.
9059 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
9061 * marshal.c (mono_marshal_get_managed_wrapper):
9062 mono_marshal_alloc takes native int so CONV_I
9065 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
9067 * reflection.c (fixup_cattrs): New function to fixup the methoddef
9068 tokens in the cattr table. Fixes #53108.
9070 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9072 * loader.c: don't trim ".dll" before looking up in the config file.
9073 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
9075 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
9077 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
9078 Return the module which contains the resource as well.
9079 (ves_icall_System_Reflection_Module_Close): New icall.
9081 * appdomain.c: Bump corlib version number.
9083 * image.c (mono_image_addref): New public function.
9085 * assembly.c: Call mono_image_addref.
9087 * reflection.c (mono_module_get_object): Increase reference count of
9090 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
9093 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
9094 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
9095 proper exceptions on DllImport problems.
9097 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
9099 * class.c, metadata.c: eliminate CSIZE macro.
9101 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
9103 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
9104 * object.h: Added async_callback field in MonoAsyncResult.
9105 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
9106 * verify.c: Added async_callback in MonoAsyncResult layout.
9108 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
9110 * reflection.c (mono_reflection_get_custom_attrs): Add support
9113 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
9115 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
9117 (mono_marshal_method_from_wrapper): Add null pointer check.
9119 2004-01-16 Martin Baulig <martin@ximian.com>
9121 * debug-mono-symfile.h: Set version number to 36 and reflect
9122 latest symbol writer changes.
9124 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
9126 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
9127 multi-dimensional arrays.
9128 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
9129 (mono_class_from_mono_type): Use bounded_array_class_get.
9131 * class.c (mono_bounded_array_class_get): New function which takes
9132 a 'bounded' bool argument to distinguish vectors from one dimensional
9135 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
9136 bounded_array_class_get if the array has bounds.
9138 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
9139 Search modules loaded using AssemblyBuilder:AddModule as well.
9141 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9143 * appdomain.c: increased corlib version.
9144 * filewatcher.c: removed g_print.
9146 (get_property_info): only allocate what is actually requested.
9147 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
9149 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9151 * Makefile.am: added filewatcher.[ch]
9152 * filewatcher.[ch]: FileSystemWatcher runtime support.
9153 * icall.c: added new FSW icalls.
9155 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9157 * string-icalls.c: fix stringbuilder regression as suggested by
9158 Iain McCoy <iain@mccoy.id.au>.
9160 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
9162 * process.c (process_read_stringtable_block): Recognize '007f' as
9163 a language neutral stringtable block.
9165 2004-01-12 Patrik Torstensson
9167 * object.h (MonoStringBuilder) : Changed layout to support our
9168 new stringbuilder class.
9169 * marshal.c: Change marshalling to support the new layout of
9171 * appdomain.c: increased version number because new layout of
9174 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
9176 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
9177 assembly name as an string instead of an AssemblyName, since it is
9178 easier to extract info from it.
9180 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
9181 the culture subdirectories too. Fixes #52231.
9183 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9185 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
9186 It takes 2 new parameters with an optional name for the method to look
9187 for and case ignoring info.
9189 * threadpool.c: removed unused variable.
9191 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9193 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
9194 It takes 2 new parameters with an optional name for the property to look
9195 for and case ignoring info.
9198 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
9200 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
9203 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9206 * assembly.c: escape the uri before passing it to g_filename_from_uri.
9209 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
9211 * reflection.c: Add support for more than one unmanaged resource.
9213 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
9214 in field->def_value, as done in all other cases.
9216 * reflection.c (mono_reflection_get_custom_attrs): Add support for
9219 * reflection.c (mono_reflection_create_runtime_class): Remove
9220 errorneous assignment to klass->element_class, since it is already
9221 done in mono_reflection_setup_internal_class.
9223 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9225 * gc.c: added missing LeaveCriticalSection.
9226 * icall.c: indented a couple of lines.
9227 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
9228 if we call EndInvoke inside a callback. Fixes bug #52601.
9230 2004-01-07 Martin Baulig <martin@ximian.com>
9232 * mono-debug-debugger.h
9233 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
9235 2004-01-06 Miguel de Icaza <miguel@ximian.com>
9237 * appdomain.c: Use messages in NotImplementedException.
9239 * exception.c (mono_get_exception_not_implemented): Now this takes
9242 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
9243 exception instead of g_asserting an aborting when something is not
9246 Add some inline docs.
9248 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
9250 * reflection.h: Update after changes to object layout.
9252 * reflection.c: Implement saving of unmanaged aka win32 resources.
9254 * appdomain.c: Bump version number.
9256 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
9257 Handle missing domains gracefully.
9259 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
9261 * file-io.c : On Windows, there are much more invalid_path_chars.
9263 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
9265 * class.h, object.c: prepare for GetType () speedup.
9267 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
9269 * profiler.c: workaround for --profile null reference exception on
9270 cygwin. Patch by Patrik Torstensson.
9272 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
9274 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
9275 make work for unaligned access.
9277 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
9279 * class.c: small cleanup (class->fields [i] -> field).
9280 * image.c: check address of metadata is valid.
9282 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
9284 * assembly.h assembly.c (mono_assembly_loaded): New public function to
9285 search the list of loaded assemblies.
9287 * reflection.c (mono_reflection_type_from_name): Use
9288 mono_assembly_loaded instead of mono_image_loaded.
9290 * reflection.c: Fix warnings.
9292 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
9294 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
9295 is dynamic. This is needed since an assembly can contain both dynamic and
9298 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
9301 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
9303 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
9304 to store modules loaded using AddModule.
9306 * reflection.c (mono_image_fill_file_table): Generalize this so it works
9309 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
9311 * reflection.c (mono_image_fill_export_table_from_module): New function to
9312 fill out the EXPORTEDTYPES table from a module.
9314 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
9315 into a separate function. Also handle loaded non-dynamic modules.
9317 * reflection.c (mono_image_basic_init): Fix memory allocation.
9319 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9321 * assembly.c (mono_assembly_load_references): Make this public.
9323 2003-12-19 Martin Baulig <martin@ximian.com>
9325 * class.c (mono_class_initialize_generic): Made this static, take
9326 a `MonoGenericInst *' instead of a `MonoClass *'.
9327 (mono_class_from_generic): Call mono_class_initialize_generic()
9328 unless we're already initialized or being called from
9329 do_mono_metadata_parse_generic_inst().
9331 * class.h (MonoGenericInst): Added `initialized' and
9332 `init_pending' flags.
9334 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
9335 `mono_class_init (gklass)' or mono_class_initialize_generic()
9336 here; set `generic_inst->init_pending' while parsing the
9339 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
9341 * locales.c: include string.h for memxxx prototypes
9343 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
9345 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
9346 constructor when accessing literal fields.
9348 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
9350 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9352 * reflection.c (assembly_add_resource_manifest): New function to fill
9353 the MANIFESTRESOURCE table.
9355 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
9357 * reflection.h: Update to changes in class layout.
9359 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
9360 Reenable call to mono_runtime_is_shutting_down ().
9362 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
9363 determine if the runtime is shutting down.
9365 2003-12-16 Jackson Harper <jackson@ximian.com>
9367 * icall.c: comment out call to mono_runtime_is_shutting_down to
9370 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
9372 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
9373 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
9375 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
9377 * reflection.c: move definition of swap_with_size
9378 to before its first call
9380 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
9382 * appdomain.c (mono_runtime_is_shutting_down): New public function.
9384 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
9387 * object.c: Fix warnings.
9389 * icall.c (ves_icall_Type_Get...): Only consider inherited static
9390 members if FlattenHierarchy is set.
9392 * reflection.c (mono_image_add_decl_security): New function to emit
9393 declarative security.
9395 * reflection.h reflection.c: Add support for declarative security.
9397 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
9399 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
9401 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
9403 * appdomain.c verify.c: Moved corlib version checking into its own
9404 function in appdomain.c since it needs to create vtables etc.
9406 2003-12-13 Patrik Torstensson <p@rxc.se>
9408 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
9409 instead of unwrapped server.
9411 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
9413 * verify.c (check_corlib): Fix field index.
9415 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
9417 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
9420 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
9422 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
9423 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
9424 cope with sizeof(size_t) != sizeof(guint32).
9426 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9428 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
9431 2003-12-10 Mark Crichton <crichton@gimp.org>
9433 * icall.c: removed the GetNonZeroBytes. We now handle this case
9436 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
9438 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
9440 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
9443 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
9445 * verify.c (check_corlib): Handle the case when the version field is
9446 initialized by a static constructor.
9448 2003-12-08 Patrik Torstensson <p@rxc.se>
9450 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
9452 2003-12-08 Martin Baulig <martin@ximian.com>
9454 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
9455 a MonoReflectionGenericParameter, also take the parameter index
9456 and name as arguments.
9457 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
9458 (ves_icall_MonoGenericParam_initialize): New interncall.
9459 (ves_icall_Type_make_byref_type): New interncall.
9461 * reflection.h (MonoReflectionGenericParam): Derive from
9462 MonoReflectionType, not just from MonoObject. Added `refobj' and
9465 * reflection.c (mono_reflection_define_generic_parameter): Create
9466 and return a new MonoReflectionGenericParam; don't initialize the
9468 (mono_reflection_initialize_generic_parameter): New public method;
9469 initializes the constraints and creates the `param->pklass'.
9471 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
9473 * reflection.h reflection.c: Use the new fields 'num_types',
9474 'num_fields' and 'num_methods' to track the number of types etc.
9476 * verify.c (check_corlib): Check corlib version number.
9478 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
9480 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
9481 function works on all methods.
9483 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
9485 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
9486 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
9487 the custom_type_info flag of the transparent proxy.
9488 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
9489 objects that supports IRemotingTypeInfo.
9490 * object.h: Added custom_type_info field in transparent proxy.
9492 2003-12-06 Martin Baulig <martin@ximian.com>
9494 * class.c (mono_class_create_from_generic): Removed.
9495 (mono_class_from_generic): Check `ginst->klass' before doing
9496 anything else. This is important to fully support "recursive"
9499 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
9500 empty `generic_inst->klass' before doing anything else.
9502 2003-12-06 Dick Porter <dick@ximian.com>
9507 * locales.c: Use C structs to access class fields. Don't do a
9508 conversion between MonoString and UChar because both are
9509 platform-endian UTF-16. Compare now takes startindex and count
9510 parameters. Add a char overload for IndexOf. Speed up the
9511 invariant string IndexOf.
9513 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
9515 * Makefile.am (monosn_LDADD): Fix parallel build.
9517 2003-12-04 Martin Baulig <martin@ximian.com>
9520 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9521 (ves_icall_Type_make_array_type): New interncall.
9523 2003-12-04 Martin Baulig <martin@ximian.com>
9525 * locales.c: also change it in the !HAVE_ICU case.
9527 2003-12-04 Dick Porter <dick@ximian.com>
9530 * locales.c: construct_compareinfo is now in CompareInfo, not
9533 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
9535 * image.c (mono_image_load_file_for_image): Cache loaded images in the
9538 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
9541 * assembly.c (mono_assembly_load_references): Only load references
9544 * class.c (mono_class_from_name): Avoid linear search of the
9547 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
9549 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
9551 * image.h (MonoImage): Add 'field_cache' field.
9553 * loader.c (mono_field_from_token): Cache field lookups.
9555 * reflection.c (mono_module_get_object): Fix name property.
9557 * icall.c (ves_icall_get_enum_info): Update after changes to
9558 mono_metadata_get_constant_index ().
9560 * icall.c: Get rid of get_type_info icall, use a separate icall for
9561 each type property to avoid needless memory allocations. Fixes #51514.
9563 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
9564 to avoid needless binary searches.
9566 * class.c (class_compute_field_layout): Move the initialization of
9567 field->def_value to mono_class_vtable ().
9569 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
9572 * object.c (mono_object_allocate): Make it inline.
9574 * object.c (mono_object_allocate_spec): Make it inline.
9576 2003-12-02 Dick Porter <dick@ximian.com>
9578 * locales.c (create_NumberFormat): NumberFormatInfo construction.
9579 Patch by Mohammad DAMT (mdamt@cdl2000.com).
9581 2003-12-01 Dick Porter <dick@ximian.com>
9583 * threads.c: Fix signature and call in CreateMutex and
9586 2003-12-01 Dick Porter <dick@ximian.com>
9589 * locales.c: Implement string compares and searching
9591 * object.h: Add extra Thread field
9593 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
9595 * reflection.c (fixup_method): Add support for MonoCMethod.
9597 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
9599 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
9601 * reflection.c (assembly_name_to_aname): Allow extra characters in
9602 assembly names. Fixes #51468.
9604 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
9606 * exception.c (mono_exception_from_name_domain): New helper function.
9608 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
9609 exception object in the correct domain.
9611 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
9612 formatting + make a copy a the input data.
9614 * loader.c (mono_get_method_from_token): Methods which contain
9615 native code do not have entries in the ImplMap.
9617 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
9618 Thanks to Gonzalo for spotting this.
9620 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
9621 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
9623 * assembly.h (mono_assembly_load_from): Split the second part of
9624 assembly loading into a new public function.
9626 * exception.h (mono_get_exception_bad_image_format): New function.
9628 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
9630 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
9631 Enumerate all modules inside a dynamic assembly. Fixes #51293.
9633 * icall.c: Add new icall for creating dynamic methods.
9635 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
9637 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
9639 * reflection.c (mono_reflection_create_dynamic_method): New icall to
9640 create a dynamic method.
9642 * reflection.c (resolve_object): New helper function.
9644 * reflection.c: Generalize ReflectionMethodBuilder and the functions
9645 which manipulate it so they can also work on dynamic methods.
9647 * reflection.c (reflection_method_builder_to_mono_method): Avoid
9648 creating the MonoReflectionMethodAux structure if it is not needed.
9650 * reflection.h verify.c: Update after changes to object layout.
9652 * reflection.c (method_builder_encode_signature): Fix compilation on
9655 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
9657 * appdomain.h: Added support for context static fields. Added static_data
9658 field to MonoAppContext and renamed thread_static_fields to a more
9659 generic special_static_fields in MonoAppDomain, since it can now contain
9660 context static fields.
9661 * domain.c: Updated hashtable name.
9662 * object.c: Replaced field_is_thread_static() for a more generic
9663 field_is_special_static() which also checks for context static attribute.
9664 In mono_class_vtable(), added support for static context fields.
9665 * threads.c: Changed methods that manage thread static fields to more
9666 generic methods so they can be reused both for thread and context static
9668 * threads.h: Declared some new methods.
9670 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
9672 * reflection.h: Update after changes to the managed types.
9674 * reflection.c (encode_custom_modifiers): New helper function.
9676 * reflection.c (method_encode_signature): Emit custom modifiers.
9678 * reflection.c (field_encode_signature): Emit custom modifiers.
9680 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
9682 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
9684 * icall.c (ves_icall_System_ValueType_Equals): New optimized
9687 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
9690 * object.c (mono_field_get_value_object): New function.
9692 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
9695 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
9697 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
9698 return a preallocated out-of-memory exception instance.
9700 * object.c (out_of_memory): Use the new function.
9702 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
9703 flag is before the custom modifiers. Fixes #49802.
9705 2003-11-16 Martin Baulig <martin@ximian.com>
9707 * class.c (mono_class_is_open_constructed_type): Implemented the
9708 MONO_TYPE_GENERICINST case.
9710 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
9712 * assembly.c (mono_assembly_fill_assembly_name): New function to
9713 fill out the MonoAssemblyName structure.
9714 (mono_assembly_open): Use the new function.
9716 * icall.c (fill_reflection_assembly_name): New helper function.
9718 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
9721 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
9723 2003-11-15 Martin Baulig <martin@ximian.com>
9725 * class.c (mono_class_is_open_constructed_type): New public
9726 function; checks whether a type is an open constructed type,
9727 ie. whether it still contains type parameters.
9728 (mono_class_inflate_generic_type): If we're a type parameter and
9729 the inflated type is also a MONO_TYPE_(M)VAR, return the original
9732 * class.h (MonoGenericInst): Added `guint32 is_open'.
9734 * loader.c (method_from_methodspec): Check whether we're an open
9735 or closed constructed type and set `ginst->is_open'.
9737 * reflection.c (mono_reflection_bind_generic_parameters): Check
9738 whether we're an open or closed constructed type and set
9740 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
9741 from open constructed types.
9743 2003-11-15 Martin Baulig <martin@ximian.com>
9745 * reflection.c (mono_reflection_bind_generic_parameters): If we're
9746 a generic instance (instead of a generic type declaration) with
9747 unbound generic parameters, bind them to our actual types.
9749 2003-11-14 Martin Baulig <martin@ximian.com>
9751 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
9753 * reflection.c (mono_reflection_bind_generic_parameters): If we're
9754 an interface type, populate `res->interfaces' with instantiated
9755 versions of all the interfaces we inherit.
9757 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
9759 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
9760 when MONO_PATH is set but doesn't contain the install dir.
9762 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9765 (ves_icall_Type_GetInterfaces): don't return an interface twice when
9766 it's also implemented in base classes. Fixes bug #50927.
9768 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
9770 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
9771 if this method is called from a finalizer. Fixes #50913.
9773 2003-11-12 Miguel de Icaza <miguel@ximian.com>
9775 * threads.c: Implement VolatileRead/VolatileWrite
9777 * icall.c: Add new icalls for VolatileRead/VolatileWrite
9779 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
9781 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
9782 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
9785 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
9786 from Peter Ross (pro@missioncriticalit.com).
9788 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
9790 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
9792 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
9794 * assembly.c (mono_assembly_load_references): Disable check because it
9795 triggers on older corlibs which lots of people have.
9797 2003-11-12 Jackson Harper <jackson@ximian.com>
9799 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
9800 load corlib.dll if mscorlib.dll is not found.
9801 * assembly.h: Remove corlib name define.
9804 * image.c: Change corlib name to mscorlib.
9806 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
9808 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
9810 2003-11-11 Miguel de Icaza <miguel@ximian.com>
9812 * appdomain.h: Added loader_optimization here to sync with the C#
9813 code, and add disallow_binding_redirects field.
9815 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
9817 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
9819 * reflection.c (mono_image_build_metadata): Fix crash on modules
9822 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
9824 * icall.c (ves_icall_get_method_info): Return callingConvention as
9827 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
9828 namespaces from the EXPORTEDTYPE table as well.
9830 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
9831 from all modules inside the assembly.
9833 2003-11-11 Martin Baulig <martin@ximian.com>
9835 * reflection.c (mono_reflection_bind_generic_parameters): Make
9836 this work for interfaces.
9838 2003-11-11 Martin Baulig <martin@ximian.com>
9840 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
9842 2003-11-11 Martin Baulig <martin@ximian.com>
9844 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
9845 "MonoInflatedMethod" and "MonoInflatedCtor".
9847 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
9849 * reflection.c (resolution_scope_from_image): Use the assembly table
9850 from the manifest module, since other modules don't have it.
9852 * debug-helpers.c (mono_type_full_name): New helper function.
9854 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
9856 * image.c (mono_image_load_file_for_image): New public function which
9857 is a replacement for the load_file_for_image in class.c.
9859 * assembly.c (mono_assembly_load_module): A wrapper for the function
9860 above which does assembly association and reference loading too.
9862 * class.c (mono_class_from_name): Call mono_assembly_load_module.
9864 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9866 * appdomain.c: not all of the attributes for the full assembly name
9867 are required and the order doesn't matter. Fixes bug #50787.
9869 2003-11-10 Dick Porter <dick@ximian.com>
9871 * locales.c: Use platform-endian UTF16
9873 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
9875 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
9877 2003-11-10 Martin Baulig <martin@ximian.com>
9880 (mono_metadata_load_generic_params): Make this actually work.
9882 * reflection.c (mono_reflection_bind_generic_parameters): If our
9883 parent is a generic instance, pass all the `types' to it, no
9884 matter whether it has the same number of type parameters or not.
9886 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
9888 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
9890 * assembly.c (mono_assembly_load_references): Move the image<->assembly
9891 assignment code to this function so it gets called recursively for all
9894 * image.c (load_modules): Remove the assembly assignment since it is
9895 now done by mono_assembly_load_references.
9897 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
9898 Add 'module' argument.
9899 (mono_module_get_types): New helper function.
9900 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
9902 2003-11-08 Martin Baulig <martin@ximian.com>
9904 * class.c (mono_class_inflate_generic_method): Interface method
9905 don't have a header.
9907 * reflection.c (mono_image_get_methodspec_token): Take an
9908 additional `MonoGenericInst *' argument instead of reading it from
9909 the header; this is necessary to support interfaces.
9910 (mono_image_create_token): Pass the `MonoGenericInst *' from the
9911 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
9912 (inflated_method_get_object): Take an additional `MonoGenericInst *'
9915 * reflection.h (MonoReflectionInflatedMethod): Added
9916 `MonoGenericInst *ginst'.
9918 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
9920 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
9922 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
9924 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
9926 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
9929 (reflection_methodbuilder_from_method_builder):
9930 (reflection_methodbuilder_from_ctor_builder): New helper functions to
9931 initialize a ReflectionMethodBuilder structure.
9932 (mono_image_get_methodbuilder_token):
9933 (mono_image_get_ctorbuilder_token): New functions to emit memberref
9934 tokens which point to types in another module inside the same assembly.
9936 * reflection.c: Use the new helper functions.
9938 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
9940 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
9941 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
9943 * reflection.c (resolution_scope_from_image): Emit a moduleref if
9946 * reflection.c (mono_image_build_metadata): Emit metadata only for the
9947 current module. Emit the manifest only for the main module.
9949 * reflection.c (mono_image_create_token): Add assertion when a
9950 memberref needs to be created.
9952 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
9954 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
9955 larger buffer for the custom attribute blob. Fixes #50637.
9957 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9959 * threadpool.c: notify listener on async processing handles after
9960 invoking the async callback. Thanks to Zoltan.
9962 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
9964 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
9965 avoid code duplication.
9967 * reflection.h (MonoDynamicImage): New type which is currently unused,
9968 but will be used through the ref.emit code in place of
9969 MonoDynamicAssembly.
9971 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
9974 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
9975 a MonoDynamicImage instead of just a MonoImage.
9977 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
9978 icalls to ModuleBuilder but keep their semantics, so they will work
9979 with moduleb->assemblyb. This will change later.
9981 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
9983 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
9986 * reflection.c (mono_image_build_metadata): Avoid creation of a default
9987 main module, since it is now done by the managed code.
9989 2003-11-03 Martin Baulig <martin@ximian.com>
9991 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
9992 `ginst->klass' here.
9993 (method_encode_methodspec): Don't use the `ginst->generic_method's
9994 klass if it's a generic instance, use `ginst->klass' in this case.
9996 2003-11-03 Martin Baulig <martin@ximian.com>
9998 * reflection.c (mono_image_get_generic_method_param_info):
9999 Removed, use mono_image_get_generic_param_info() instead.
10000 (mono_image_get_type_info): Write the GenericParam table before
10001 the Method table. This is neccessary because in the GenericParam
10002 table, type parameters of the class (ie. '!0' etc.) must come
10003 before the ones from its generic methods (ie. '!!0' etc).
10005 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
10007 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
10009 2003-11-02 Martin Baulig <martin@ximian.com>
10011 * reflection.c (create_generic_typespec): Take a
10012 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
10013 the generic parameters from it.
10015 2003-11-02 Martin Baulig <martin@ximian.com>
10017 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
10018 instead of a `MonoClassField *' since we just need the type.
10019 (create_generic_typespec): New static function. Creates a
10020 TypeSpec token for a generic type declaration.
10021 (mono_image_get_generic_field_token): New static function.
10022 (mono_image_create_token): If we're a FieldBuilder in a generic
10023 type declaration, call mono_image_get_generic_field_token() to get
10026 2003-11-02 Martin Baulig <martin@ximian.com>
10029 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
10030 `MonoReflectionGenericInst *declaring_type' and
10031 `MonoReflectionGenericInst *reflected_type' fields.
10033 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
10034 `MonoReflectionGenericInst *declaring_type' and a
10035 `MonoReflectionGenericInst *reflected_type' argument instead of a
10036 single `MonoReflectionGenericInst *type' one. Set
10037 `res->declaring_type' and `res->reflected_type' from them.
10038 (mono_reflection_inflate_field): Likewise.
10040 2003-11-02 Martin Baulig <martin@ximian.com>
10042 * class.c (mono_class_setup_vtable): Don't store generic methods
10045 2003-11-02 Martin Baulig <martin@ximian.com>
10047 * reflection.h (MonoReflectionGenericInst): Added
10048 `MonoReflectionType *declaring_type'.
10050 * reflection.c (mono_reflection_bind_generic_parameters): Use
10051 `if (tb->parent)' instead of `klass->parent'.
10053 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
10055 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
10056 with an empty ASSEMBLY table.
10058 * reflection.c (mono_image_build_metadata): Avoid using the same loop
10059 variable in the inner and outer loops.
10061 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
10063 * metadata.h (mono_metadata_make_token): Put parentheses around macro
10066 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
10068 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
10069 icalls. Instead, do everything in managed code. This is needed since
10070 it is hard to restore the original domain etc. in unmanaged code in the
10071 presence of undeniable exceptions.
10073 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
10074 New icalls to push and pop appdomain refs.
10076 2003-10-31 Martin Baulig <martin@ximian.com>
10078 * class.c (inflate_generic_type): Renamed to
10079 mono_class_inflate_generic_type() and made it public.
10081 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
10084 * loader.c (mono_field_from_memberref): Also set the retklass for
10087 * fielder.c (mono_image_get_inflated_field_token): New static
10088 method; creates a metadata token for an inflated field.
10089 (mono_image_create_token, fixup_method): Added support for
10090 "MonoInflatedField".
10091 (fieldbuilder_to_mono_class_field): New static function.
10092 (mono_reflection_inflate_field): New public function.
10095 (MonoReflectionGenericInst): Added `MonoArray *fields'.
10096 (MonoReflectionInflatedField): New typedef.
10098 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
10100 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
10101 for Solaris and other platforms without s6_addr16
10103 2003-10-30 Martin Baulig <martin@ximian.com>
10105 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
10106 argument instead of two.
10107 (mono_class_inflate_generic_signature): Likewise.
10108 (inflate_generic_header): Likewise.
10109 (mono_class_inflate_generic_method): Likewise. In addition, if
10110 `ginst->klass' is set, it becomes the new `method->klass'.
10112 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
10115 * reflection.c (encode_generic_method_sig): Write a 0xa as the
10116 first byte. [FIXME]
10117 (method_encode_methodspec): If we have generic parameters, create
10118 a MethodSpec instead of a MethodRef.
10119 (fixup_method): Added support for "MonoInflatedMethod" and
10120 "MonoInflatedCtor".
10121 (mono_image_create_token): Added support for "MonoInflatedMethod"
10122 and "MonoInflatedCtor".
10123 (inflated_method_get_object): New static function; returns a
10124 managed "System.Reflection.MonoInflatedMethod" object.
10125 (mono_reflection_bind_generic_method_parameters): Return a
10126 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
10127 (mono_reflection_inflate_method_or_ctor): Likewise.
10128 (mono_image_get_generic_method_param_info): Initialize unused
10130 (mono_image_get_generic_param_info): Likewise.
10132 * reflection.h (MonoReflectionInflatedMethod): New public
10133 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
10134 "S.R.MonoInflatedCtor" classes.
10136 * loader.c (method_from_memberref): If we're a TypeSpec and it
10137 resolves to a generic instance, inflate the method.
10139 2003-10-28 Dick Porter <dick@ximian.com>
10141 * object.c (mono_runtime_run_main): Convert command-line arguments
10142 into utf8, falling back to the user's locale encoding to do so.
10144 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
10146 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
10149 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
10151 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
10152 up icalls at method definition time. Partially fixes #33569.
10154 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
10156 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
10157 marshalling of arrays. Fixes #50116.
10159 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
10161 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
10162 points to a vtable in the dying appdomain.
10164 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
10165 listeners into unmanaged code inside the lock.
10167 * object.c (mono_class_vtable): Turn off typed allocation in non-root
10168 domains and add some comments.
10170 2003-10-25 Martin Baulig <martin@ximian.com>
10172 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
10174 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
10176 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
10177 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
10178 currently parsing. Create the generic class and store it in
10179 `generic_inst->klass' before parsing the type arguments. This is
10180 required to support "recursive" definitions; see mcs/tests/gen-23.cs
10182 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
10183 to support recursive typespec entries.
10185 * class.c (mono_class_setup_parent): If our parent is a generic
10186 instance, we may get called before it has its name set.
10187 (mono_class_from_generic): Splitted into
10188 mono_class_create_from_generic() and mono_class_initialize_generic().
10190 2003-10-25 Martin Baulig <martin@ximian.com>
10192 * icall.c (ves_icall_Type_BindGenericParameters): Return a
10193 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
10194 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
10195 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
10197 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
10198 (create_typespec): Likewise.
10199 (mono_reflection_bind_generic_parameters): Return a
10200 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
10201 (mono_reflection_inflate_method_or_ctor): New public function.
10203 * reflection.h (MonoReflectionGenericInst): New typedef.
10205 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
10207 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
10208 inside the domain lock. Fixes #49993.
10210 * object.c (mono_class_vtable): When typed allocation is used,
10211 allocate vtables in the GC heap instead of in the mempool, since the
10212 vtables contain GC descriptors which are used by the collector even
10213 after the domain owning the mempool is unloaded.
10215 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
10217 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
10218 reflect what it does. Also invalidate mempools instead of freeing
10219 them if a define is set.
10221 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
10224 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
10225 hold the finalizable objects in this domain.
10227 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
10230 * appdomain.c (mono_domain_set): New function to set the current
10231 appdomain, but only if it is not being unloaded.
10233 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
10234 appdomain which is being unloaded.
10236 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
10237 unloading of the root appdomain.
10239 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
10240 icall to execute a method in another appdomain. Intended as a
10241 replacement for InternalSetDomain, which can confuse the code
10242 generation in the JIT.
10244 * appdomain.c (mono_domain_is_unloading): New function to determine
10245 whenever an appdomain is unloading.
10247 * appdomain.c (mono_domain_unload): New function to correctly unload
10250 * assembly.c (mono_assembly_load_references): Check that an assembly
10251 does not references itself.
10253 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
10254 domain manually, it asks the finalizer thread to do it, then waits for
10255 the result. Also added a timeout.
10257 * icall.c: Register the new icalls.
10259 * threads.h threads.c: Export the mono_gc_stop_world and
10260 mono_gc_start_world functions.
10262 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
10263 function to fill out the mempool with 0x2a.
10265 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
10267 * reflection.h (MonoReflectionMethodAux): New structure to store
10268 information which is rarely used, thus is not in the MonoMethod
10271 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
10272 store the aux info.
10274 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
10275 and marshalling info into the aux structure.
10277 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
10278 from the aux structure.
10280 * loader.c (mono_method_get_param_names): Retrieve the param names from
10283 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
10285 * exception.h exception.c: Add AppDomainUnloadedException && fix
10288 2003-10-21 Dick Porter <dick@ximian.com>
10291 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
10292 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
10294 2003-10-21 Martin Baulig <martin@ximian.com>
10296 * reflection.c (mono_reflection_bind_generic_parameters):
10297 `klass->parent' is NULL for interfaces.
10299 2003-10-21 Martin Baulig <martin@ximian.com>
10301 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10303 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
10305 * exception.c (mono_exception_from_name_msg): New helper function for
10306 creating exceptions and initializing their message field.
10308 * exception.c: Simplify functions using the new helper.
10310 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
10313 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
10314 mono_raise_exception, since otherwise gcc doesn't generate the function
10315 epilog for raise_exception, confusing the stack unwinding in the JIT.
10318 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
10319 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
10322 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10324 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
10327 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
10329 * icall.c: Removed GetUninitializedObject method because
10330 AllocateUninitializedClassInstance does the same.
10332 2003-10-18 Martin Baulig <martin@ximian.com>
10334 * class.c (inflate_generic_signature): Renamed to
10335 mono_class_inflate_generic_signature() and made it public.
10336 (my_mono_class_from_generic_parameter): New static function; if we
10337 don't already have the generic parameter's MonoClass, create a
10338 very simple one which is just used internally in the runtime and
10339 not passed back to managed code.
10341 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
10343 * metadata.h (MonoMethodSignature): Moved the
10344 `MonoGenericParam *gen_params' to the MonoMethodHeader.
10345 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
10347 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
10348 ves_icall_MonoMethod_GetGenericArguments(); this is now an
10349 interncall on the MonoMethod class, not on MethodInfo.
10350 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
10351 calling mono_reflection_bind_generic_method_parameters() directly.
10353 * loader.c (mono_method_get_signature): If this is a MethodSpec;
10354 return the already computed `method->signature'.
10355 (method_from_methodspec): New static function to load a method
10356 from a MethodSpec entry.
10357 (mono_get_method_from_token): Call the new method_from_methodspec()
10358 for MethodSpec tokens.
10359 (mono_get_method_from_token): If we're a generic method, load the
10362 * reflection.c (mono_image_get_memberref_token): Allow
10363 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
10365 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
10366 (mono_image_create_token): First check whether it's a generic
10367 method (so we'd need to create a MethodSpec), then do the other
10369 (mono_reflection_bind_generic_method_parameters): Return a
10370 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
10371 called directly from the interncall.
10373 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
10375 * reflection.c (load_public_key): Move loading of the public key
10378 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
10380 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
10383 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
10384 culture, hash_alg and public_key. Fixes #49555.
10386 2003-10-17 Martin Baulig <martin@ximian.com>
10388 * class.h (MonoGenericInst): Moved this declaration here and added
10389 `MonoMethod *generic_method'.
10392 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
10393 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
10395 * metadata.c (mono_metadata_type_equal): Two types of
10396 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
10397 index; ie. don't compare the address of the `MonoGenericParam'
10399 (mono_metadata_load_generic_params): Removed the `MonoMethod
10402 * metadata.h (MonoGenericInst): Moved declaration to class.h.
10403 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
10405 * reflection.c (method_encode_signature): Encode the number of
10406 generic parameters.
10407 (encode_generic_method_sig): New static function.
10408 (method_encode_methodspec): New static function; creates an entry
10409 in the MethodSpec table for a generic method.
10410 (mono_image_get_methodspec_token): New static function.
10411 (mono_image_create_token): Call mono_image_get_methodspec_token()
10412 for generic methods.
10413 (mono_reflection_bind_generic_method_parameters): New public
10414 function. Instantiates a generic method.
10416 2003-10-16 Martin Baulig <martin@ximian.com>
10418 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
10419 *gen_params' here from MonoMethodHeader.
10421 * metadata.c (mono_metadata_parse_method_signature): If we have
10422 generic parameters, initialize `method->gen_params' and then set
10423 the correct `type->data.generic_param' in all the parameters.
10425 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
10427 * threads.c (mono_threads_get_default_stacksize): New function to
10428 return the default stacksize.
10430 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
10431 termination of the finalizer thread, since the previous method had
10432 race conditions. Fixes #49628.
10434 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
10435 as for the other managed threads.
10437 2003-10-16 Martin Baulig <martin@ximian.com>
10439 * class.c (inflate_generic_signature): Copy `generic_param_count'
10442 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
10445 * metadata.c (mono_metadata_parse_method_signature): Actually set
10446 the `method->generic_param_count' here.
10447 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
10449 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
10451 * object.h: Add a new field to TypedRef to simplify the implementation
10452 of the REFANY opcodes in the JIT.
10454 * icall.c: Make use of the new field.
10456 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
10459 2003-10-15 Martin Baulig <martin@ximian.com>
10461 * class.c (mono_class_from_gen_param): Renamed to
10462 mono_class_from_generic_parameter() and moved most of the
10463 functionality from mono_reflection_define_generic_parameter()
10464 here; ie. we create a "real" class here.
10465 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
10466 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
10467 previously been called.
10469 * class.h (MonoGenericParam): Moved the declaration of this struct
10470 here from metadata.h and added `MonoMethod *method'.
10472 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
10475 * loader.c (mono_get_method_from_token): If we have any generic
10476 parameters, call mono_metadata_load_generic_params() to read them
10477 from the MONO_TABLE_GENERICPAR.
10479 * metadata.c (mono_metadata_load_generic_params): Added
10480 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
10482 * metadata.h (MonoMethodSignature): Replaced
10483 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
10484 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
10486 * reflection.c (mono_reflection_define_generic_parameter): Moved
10487 most of the functionality into the new
10488 mono_class_from_generic_parameter(); set the `method' field if
10489 we're a method parameter.
10491 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
10493 * marshal.c (emit_struct_conv): if native size is 0
10496 2003-10-14 Martin Baulig <martin@ximian.com>
10498 * icall.c: The generics API has changed in the spec since it was
10499 added to System.Type; these modifications make it match the spec
10501 (ves_icall_Type_GetGenericParameters): Renamed to
10502 `ves_icall_Type_GetGenericArguments'.
10503 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
10504 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
10505 `ves_icall_MonoType_get_HasGenericArguments'.
10506 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
10507 `ves_icall_MonoType_get_IsGenericParameter'.
10508 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
10509 this is no interncall anymore.
10510 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
10511 `ves_icall_TypeBuilder_get_IsGenericParameter'.
10513 2003-10-14 Martin Baulig <martin@ximian.com>
10515 * reflection.c (mono_reflection_bind_generic_parameters): Also
10516 inflate generic methods if we're reading the class from IL.
10518 2003-10-13 Martin Baulig <martin@ximian.com>
10520 * reflection.c (mono_reflection_define_generic_parameter): This
10521 method isn't called directly from the icall anymore; take a
10522 `MonoReflectionAssemblyBuilder *' so we can use this for type and
10523 method generic parameters.
10524 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
10525 (method_builder_encode_signature): Encode generic parameters.
10526 (mono_image_get_method_info): Write generic params to the
10527 MONO_TABLE_GENERICPARAM table.
10529 * reflection.h (MonoReflectionMethodBuilder): Added
10530 `MonoArray *generic_params'.
10532 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
10534 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
10535 wrapper for mono_reflection_define_generic_parameter().
10536 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
10538 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
10540 * marshal.h: Add missing function to fix build.
10542 * marshal.c (mono_marshal_get_native_wrapper): Add support for
10543 the SetLastError pinvoke attribute.
10545 * marshal.c (mono_marshal_set_last_error): New helper function called
10546 by the generated code.
10548 * marshal.c (mono_mb_emit_branch): New helper function.
10550 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
10552 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
10553 classes as parameters and return values of delegates. Fixes #29256.
10555 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
10557 * locales.c: use gint32 in non HAVE_ICU case
10559 2003-10-11 Martin Baulig <martin@ximian.com>
10561 * mono-debug.c (mono_debug_add_method): Added a workaround for
10564 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
10566 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
10567 delegates passed to native code must use the STDCALL calling
10568 convention. Fixes #35987.
10570 2003-10-10 Martin Baulig <martin@ximian.com>
10572 * class.c (inflate_generic_type): If we're inflating for a generic
10573 type instance (and not for a generic method), return
10574 MONO_TYPE_MVAR unchanged.
10576 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10578 * string-icalls.c: Join ignores null strings in the source array.
10579 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
10580 * threads.c: GetAvailableTheads is slightly more accurate.
10582 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
10584 * threads.h threads.c : add mono_threads_set_default_stacksize
10585 and pass default to CreateThread calls.
10587 2003-10-09 Dick Porter <dick@ximian.com>
10591 * locales.c: Internal calls for constructing CultureInfo and
10592 related objects from libicu (if its available.)
10594 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
10596 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
10598 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10600 * threadpool.c: added an argument to async_invoke_thread that is the
10601 item to process, pass the MonoAsyncResult to the thread start function
10602 when creating a new thread. This way we don't need to acquire any lock
10603 when we're creating a new thread. Readded a semaphore for faster
10604 response times (instead of that Sleep i added).
10606 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
10608 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
10609 get daylight change dates better on Windows, fix handling
10610 of platforms without tm_gmtoff.
10612 2003-10-06 Martin Baulig <martin@ximian.com>
10614 * class.c (inflate_generic_method): Renamed to
10615 mono_class_inflate_generic_method() and made public.
10616 (mono_class_init): Don't inflate the generic methods here.
10617 (mono_class_from_generic): Added `gboolean inflate_methods'
10618 argument. Inflate the methods here.
10620 * loader.c (mono_method_get_param_names): Ignore instances of
10621 generic types for the moment.
10623 * reflection.c (fixup_method): Added support for inflated methods.
10624 (mono_image_create_token): Use mono_image_get_methodref_token()
10625 for inflated methods.
10626 (mono_custom_attrs_from_param): Ignore instances of generic types
10628 (mono_reflection_bind_generic_parameters): New public function.
10629 Moved all the functionality from
10630 ves_icall_Type_BindGenericParameters() here and added support for
10632 (mono_reflection_define_generic_parameter): Initialize
10633 `klass->methods' here.
10635 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
10636 functionality into mono_reflection_define_generic_parameter().
10637 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
10638 TypeBuilder, return that TypeBuilder.
10640 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10642 * appdomain.c: removed mono_delegate_semaphore.
10645 (mono_thread_pool_add): moved hash table creation inside and the thread
10646 creation outside of the critical region.
10647 (mono_thread_pool_finish): removed obsolete code.
10648 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
10649 continue or exit the thread depending on the queue.
10651 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
10653 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
10654 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
10655 handle more bool marshalling options
10657 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
10659 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
10660 arrays of structs. Also add a more descriptive error message when
10661 a structure member is marshalled as LPArray.
10663 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
10665 * marshal.c (mono_marshal_get_native_wrapper): Add support for
10666 marshalling arrays of complex types. Fixes #29098. Also remove an
10667 usused and incomplete function.
10669 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
10671 * gc.c: report heap_size - free_bytes as total memory allocated
10674 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
10676 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
10677 fix timezone handling problems on Windows.
10679 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
10680 asserts when the year is outside the range handled by ms the functions.
10682 * class.c (setup_interface_offsets): If the class is an interface,
10683 fill out its interface_offsets slot.
10685 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10687 * threadpool.c: mark threadpool threads as background.
10689 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
10691 * decimal.c - define DECINLINE to nothing if not using GCC
10693 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
10695 * assembly.c: More refcount fixes.
10697 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10699 * string-icalls.c: if we're not trimming, return the same string.
10700 When not splitting, don't create a new string.
10702 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10705 (mono_image_open): increment the ref_count inside the critical section.
10707 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
10709 * image.c (mono_image_open): Fix reference counting bug.
10711 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
10713 * marshal.c (mono_marshal_type_size) struct alignment changed for
10714 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
10715 64bits. Avoid leak in mono_marshal_get_native_wrapper when
10716 mono_lookup_pinvoke_call throws.
10718 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
10720 * reflection.c (mono_reflection_parse_type): Fix #49114.
10722 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
10723 temporary workaround for cygwin header problem.
10725 * object.c (mono_object_isinst): Synchronize this with the code
10726 generated by the JIT for casts.
10728 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
10730 * reflection.c (encode_type): Fix #38332.
10732 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
10734 * marshal.c (mono_marshal_method_from_wrapper): New function to return
10735 the original method from the wrapper method.
10737 2003-09-25 Martin Baulig <martin@ximian.com>
10739 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
10740 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
10741 (ves_icall_Type_get_IsGenericInstance): New interncall.
10743 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
10745 * object.c: fix cast warning in big endian code.
10747 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
10749 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
10751 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10753 * assembly.c: don't call check_env from mono_assembly_load. It's
10754 already done once in mono_assemblies_init and may cause headaches when
10755 multiple threads are loading assemblies.
10757 2003-09-19 Martin Baulig <martin@ximian.com>
10759 * reflection.c (mono_reflection_define_generic_parameter): Don't
10760 allocate `klass->methods', set `klass->flags' to
10761 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
10763 2003-09-18 Martin Baulig <martin@ximian.com>
10765 * class.c (mono_class_init): Don't create `class->methods' if it's
10766 already initialized.
10768 * metadata.c (mono_metadata_load_generic_params): Make this
10771 * reflection.c (mono_reflection_define_generic_parameter): Set
10772 parent class and interfaces from the constraints.
10774 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
10775 to keep this struct in sync with the declaration in TypeBuilder.cs.
10777 2003-09-17 Martin Baulig <martin@ximian.com>
10779 * metadata.h (MonoType): Replaced the data's `int type_param'
10780 field with `MonoGenericParam *generic_param'.
10781 (MonoGenericParam): Added `MonoClass *klass'.
10783 * class.c (mono_class_from_gen_param): Removed the
10784 `MonoImage *image' and `int type_num' arguments.
10786 * metadata.c (mono_metadata_parse_generic_param): New static
10787 method; creates a MonoGenericParam which just contains the index.
10788 (do_mono_metadata_parse_type): Call
10789 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
10792 * reflection.c (mono_image_typedef_or_ref): Generic type
10793 parameters may be in the same assembly, but never use a typedef
10795 (mono_reflection_define_generic_parameter): We're now creating a
10796 "real" class for the type parameter; it's now safe to call
10797 mono_class_from_mono_type() on the class'es type, it'll do the
10800 2003-09-16 Martin Baulig <martin@ximian.com>
10802 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
10803 `symfile->range_entry_size' and `symfile->class_entry_size' here;
10804 the `symfile' data structure must be fully initialized before it
10805 gets added to the table.
10807 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
10809 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
10811 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
10812 class init trampolines.
10814 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
10816 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
10817 to the built-in profiler to turn off time and allocation profiling
10820 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
10822 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
10825 * debug-helpers.c (mono_method_full_name): Print the wrapper type
10826 in human readable form.
10828 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
10830 * reflection.c icall.c: Fixed warnings.
10832 * image.c (load_class_names): Use a temporary hash table to hold the
10833 namespaces in order to avoid doing many string comparisons.
10835 * image.h: Fix typo.
10837 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
10838 Pass NULL instead of g_direct_equal to the GHashTable constructor
10839 since the NULL case is short-circuited inside g_hash_table_lookup,
10840 leading to better performance.
10842 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
10843 obtain the first custom attribute for a given index. Depends on the
10844 CustomAttribute table being sorted by the parent field.
10846 * reflection.c (mono_custom_attrs_from_index): Use the new function
10847 for better performance.
10849 2003-09-07 Martin Baulig <martin@ximian.com>
10851 * class.c (mono_class_init): If we're a generic instance, inflate
10852 all our methods instead of loading them from the image.
10853 (mono_class_from_generic): Set `class->methods = gklass->methods'.
10855 2003-09-07 Martin Baulig <martin@ximian.com>
10857 * mono-debug-debugger.c: Added support for constructors.
10859 2003-09-06 Martin Baulig <martin@ximian.com>
10861 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
10864 * reflection.c (mono_reflection_setup_generic_class): Call
10865 ensure_runtime_vtable() to create the vtable.
10867 2003-09-05 Martin Baulig <martin@ximian.com>
10869 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
10872 2003-09-04 Martin Baulig <martin@ximian.com>
10874 * reflection.c (mono_reflection_define_generic_parameter): Generic
10875 parameters start with zero.
10877 2003-09-04 Martin Baulig <martin@ximian.com>
10879 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10881 * reflection.h (MonoReflectionGenericParam): New typedef.
10882 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
10883 the generic parameters from the managed TypeBuilder.
10885 * reflection.c (mono_reflection_define_generic_parameter): New function.
10886 (mono_reflection_create_runtime_class): Encode generic parameters.
10887 (mono_reflection_setup_generic_class): New function; this is
10888 called after adding adding all generic params to the TypeBuilder.
10889 (encode_type): Added MONO_TYPE_VAR.
10891 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
10893 * class.h class.c (mono_class_needs_cctor_run): Moved this method
10896 * assembly.h assembly.c: Moved the AOT loading code into an assembly
10899 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
10901 * reflection.h reflection.c class.h class.c: Delete duplicate
10902 definition of mono_type_get_name () from reflection.c and export the
10905 * class.c: Class loading fixes from Bernie Solomon
10906 (bernard@ugsolutions.com).
10908 * reflection.c: Endianness fixes from Bernie Solomon
10909 (bernard@ugsolutions.com).
10911 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
10913 * assembly.h assembly.c: Define a file format version for AOT
10916 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
10918 * appdomain.h (MonoJitInfo): New field to determine whenever the
10919 code is domain neutral.
10921 2003-08-31 Miguel de Icaza <miguel@ximian.com>
10923 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
10925 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
10927 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
10928 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
10929 Avoid caching the result since strings must be domain specific. Fixes
10932 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
10934 * marshal.c (mono_marshal_init): Make this callable multiple times
10935 since it is hard to find a correct place to call it.
10937 * object.c (mono_runtime_class_init): Execute static constructors in
10938 the correct appdomain.
10940 * image.c (build_guid_table): Handle the case when multiple images have
10943 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10945 * icall.c: added a couple of icalls for System.Web.
10947 2003-08-28 Martin Baulig <martin@ximian.com>
10949 * icall.c (ves_icall_Type_BindGenericParameters): Use
10950 `klass->generic_inst' instead of `&klass->byval_arg' in the
10951 mono_type_get_object() call. The returned type must be
10952 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
10954 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
10958 * object.c (mono_class_proxy_vtable): Make it thread safe.
10960 * pedump.c: Fix warning.
10962 * object.c appdomain.h: Get rid of metadata_section.
10963 It is no longer needed and it was causing deadlocks with domain->lock.
10965 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
10967 2003-08-26 Martin Baulig <martin@ximian.com>
10969 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
10971 2003-08-26 Martin Baulig <martin@ximian.com>
10973 * pedump.c (main): Call mono_metadata_init(),
10974 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
10975 and mono_loader_init().
10977 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
10979 * loader.h: Add missing include to fix build.
10981 * image.h: mono_image_load_references is no more.
10983 * assembly.c: Reworked assembly loading to make it really thread safe.
10984 After these changes, the assembly returned by mono_assembly_open is
10985 fully initialized, i.e. all its references assemblies are loaded.
10987 * assembly.c (mono_image_load_references): Renamed to
10988 mono_assembly_load_references, and made private, since clients no
10989 longer need to call it.
10991 * class.c: Removed calls to mono_assembly_load_references, since it was
10992 a source of deadlocks.
10994 * loader.h loader.c class.h class.c: Protect data structures using a
10995 new lock, the loader lock.
10997 * class.c (mono_class_setup_vtable): Create temporary hash tables and
10998 GPtrArrays only when needed.
11000 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
11001 into empty structures by mcs. Fixes pinvoke7.cs.
11003 * domain.c (mono_init): Call a new initialization function.
11005 * appdomain.c (mono_runtime_init): Call the new initializer function
11006 of the marshal module.
11008 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
11009 inserted into empty structures by mcs. Fixes pinvoke7.cs.
11011 * marshal.h marshal.c: Added locks around the wrapper caches to make
11012 this module thread safe.
11014 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
11015 this argument. Fixes pinvoke1.exe.
11017 2003-08-25 Lluis Sanchez <lluis@ximian.com>
11019 * object.h: Added call_type field to MonoMethodMessage and the corresponding
11020 enumeration of values. Removed fields to store remote call output values in
11021 MonoAsyncResult. Not needed any more.
11022 * object.c: Initialize call_type and async_result fields in mono_message_init.
11023 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
11024 dispatching the message.
11025 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
11026 async call to finish. To do it use a message with EndInvoke call type.
11028 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
11030 * loader.h loader.c (mono_method_hash_marhal_info): New function which
11031 determines whenever a method has marshalling info.
11033 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11035 * assembly.c: fix the build on windows.
11037 2003-08-22 Lluis Sanchez <lluis@ximian.com>
11039 * object.cs: Fixed bug #47785.
11041 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
11043 * string-icalls.c (StringReplace): If their are no occurances of
11044 the old string found return a reference to the supplied
11045 string. This saves some memory and matches MS behavoir.
11047 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11049 * socket-io.c: fixed compilation for systems that define AF_INET6
11050 and don't define SOL_IP/SOL_IPV6.
11052 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
11054 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
11055 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
11057 * rawbuffer.c rawbuffer.h: Make this module thread safe.
11059 * domain.c: Make this module thread safe.
11061 * domain.c (mono_init): Call new initialization function.
11063 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
11064 reference types too. Fixes #38812.
11066 * image.c (mono_image_init): Fixed warnings.
11068 * class.c (mono_class_from_typeref): Handle assembly load failure
11071 * appdomain.c (add_assemblies_to_domain): Handle the case when
11072 the references of an assembly are not yet loaded.
11074 * metadata.c image.c assembly.c: Moved initialization of global
11075 variables to a separate function called at startup since lazy
11076 initialization of these variables is not thread safe.
11078 * image.c assembly.c: Made this module thread safe by adding locks in
11079 the appropriate places.
11081 * domain.c (mono_init): Call the new initialization functions of the
11084 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
11086 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
11087 make a direct call. It is proxy's work to make the call asynchronous.
11088 mono_delegate_end_invoke(): If the targe is a proxy, just collect
11090 * object.cs: mono_method_call_message_new(): read AsyncResult and
11091 state object from parameters list, if this info is requested.
11092 * object.h: Added fields to store remote call output values in
11093 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
11095 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11097 * object.h: add needed fields to MonoThread.
11098 * threads.c, threads.h: allow registering a function to cleanup data
11099 allocated per thread by the JIT.
11101 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11103 * loader.h: portability fix by Bernie Solomon
11104 * <bernard@ugsolutions.com>.
11106 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
11108 * reflection.h reflection.c (mono_param_get_objects): Changed this to
11109 return a MonoArray. This simplifies the code and also ensures that
11110 the cache allways contains an object reference as a value.
11112 * icall.c (ves_icall_get_parameter_info): Simplified using the new
11115 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11117 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
11118 fixes a problem with byte ordering when getting the address family for
11121 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
11123 * .cvsignore: Added monosn.
11125 * reflection.h reflection.c loader.c: Added support for parameter
11126 marshalling to dynamically created types. Fixes #47295.
11128 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
11130 * rand.c: remove useless warnings.
11132 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11134 * class.c: implemented ldtoken for methods and fieldrefs.
11136 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11138 * threadpool.c: when mono_async_invoke was called, no one took care of
11139 monitoring the queue. So if the method invoked took some time and we
11140 got new async invoke requests after 500 ms (the thread created waited
11141 that long in WaitForSingleObject), the new async invoke was not called
11142 until the previous one finished.
11144 This is fixed now. Thanks to Totte for helping with it.
11146 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11148 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
11150 2003-08-11 Martin Baulig <martin@ximian.com>
11152 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
11154 2003-08-06 Martin Baulig <martin@ximian.com>
11156 * mono-debug-debugger.c: Added support for static fields,
11157 properties and methods.
11159 2003-08-06 Martin Baulig <martin@ximian.com>
11161 * mono-debug-debugger.c: Don't store the MonoString's vtable to
11162 make this work for applications with multiple application domains.
11164 2003-08-04 Martin Baulig <martin@ximian.com>
11166 * mono-debug-debugger.c: Completely reworked the type support; the
11167 most important thing is that we're now just using one single
11168 `MonoType' instance per type.
11170 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
11172 * mono-endian.h, mono-endian.c, icall.c: Added icall
11173 ves_icall_System_Double_AssertEndianity to assert double word endianity
11174 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
11176 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11178 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
11179 support, icalls and fixes.
11181 2003-07-31 Miguel de Icaza <miguel@ximian.com>
11183 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
11184 classes that are a punctuation character in .NET is not the same a
11187 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11189 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
11191 2003-07-29 Miguel de Icaza <miguel@ximian.com>
11193 * icall.c: Add new MemCopy internalcall.
11194 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
11195 Simplified code; It is not necessary to handle all the cases here,
11196 as the C# code takes care of it. Only handle the case of the name
11197 resource embedded into the assembly.
11199 Changed signature to return the data pointer and the size of the
11202 2003-07-26 Miguel de Icaza <miguel@ximian.com>
11204 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
11205 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
11207 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
11209 * socket-io.c: ignore EINTR error in select.
11211 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
11213 * class.h, class.c: removed unused subclasses field in MonoClass.
11215 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
11217 * icall.c: improve fix of get_base_definition(). If the parent class
11218 doesn't have the mehod, look at the parent of the parent.
11219 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
11220 to check if a parameter is an in or out parameter
11221 (PARAM_ATTRIBUTE_IN is not set by default).
11222 mono_method_return_message_restore(): Use mono_class_value_size to
11223 get the size of a value type. mono_type_stack_size (parameterType)
11224 does not return the correct value if parameterType is byRef.
11225 mono_load_remote_field(), mono_load_remote_field_new(),
11226 mono_store_remote_field(), mono_store_remote_field_new():
11227 raise exception if the remote call returns an exception.
11229 2003-07-28 Martin Baulig <martin@ximian.com>
11231 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
11232 method. This is a wrapper around mono_runtime_invoke() which
11233 boxes the instance object if neccessary.
11235 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11237 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
11238 metadata.h, row-indexes.h, verify.c: first cut of generics support.
11240 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11242 * icall.c: disable mcs bug workaround.
11244 2003-07-21 Miguel de Icaza <miguel@ximian.com>
11246 * object.c (mono_runtime_class_init): Take the metadata_section
11247 mutex before obtaining the domain mutex.
11249 * appdomain.h: Added definition of metadata_section mutex here.
11251 * object.c: define metadata_mutex here.
11253 2003-07-24 Ravi Pratap <ravi@ximian.com>
11255 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
11258 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
11260 * reflection.c: Fix bug #46669
11262 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11267 * object.h: fill in the type name for TypeLoadException.
11269 2003-07-23 Ravi Pratap <ravi@ximian.com>
11271 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
11272 relationship between TypeBuilders while compiling corlib) and bug
11273 45993 (Array types returned from the runtime while compiling
11274 corlib were from the loaded corlib).
11276 2003-07-22 Martin Baulig <martin@ximian.com>
11278 * mono-debug-debugger.c: Reworked the type support a bit more;
11279 distinguish between types and classes.
11281 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
11283 * icall.c: add IsArrayImpl icall.
11285 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
11287 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
11288 initializing real_size only once. Also fix bug #46602.
11290 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
11292 * object.c: Renamed mono_metadata_section to metadata_section.
11294 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
11296 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
11297 empty array if the type is an array. Fixed.
11298 ves_icall_MonoMethod_get_base_definition: if the base method
11299 is abstract, get the MethodInfo from the list of methods of
11301 * reflection.c: ParameterInfo.PositionImpl should be zero-based
11302 and it was 1-based. Fixed in mono_param_get_objects.
11304 2003-07-20 Martin Baulig <martin@ximian.com>
11306 * mono-debug.h: Set version number to 31.
11307 (mono_debug_init): Added `MonoDomain *' argument.
11309 * mono-debug-debugger.c: Reworked the type support; explicitly
11310 tell the debugger about builtin types; pass the `klass' address to
11313 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
11315 * image.c: Allow new metadata tables to be loaded without a
11316 warning. Also update the warning message to give the new constant value.
11318 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
11320 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
11321 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
11322 array type representation changes.
11324 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
11326 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
11327 on Environment.Exit () call.
11329 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11331 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
11332 requires a matching corlib.
11334 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
11336 * Changelog: My editor decided to add a CR to each line. Sorry about that.
11337 Committed again without the CRs.
11339 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
11341 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
11342 getting it from the "this" socket instance. Did not work
11343 if the socket is a subclass of Socket.
11344 Also fixed bug #35371.
11346 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
11348 * metadata.c: fixed size for TypedByRef.
11349 * loader.c: when searching for a method, consider the vararg amrker.
11350 * unicode.c, decimal.c: constify some arrays.
11352 2003-07-15 Dick Porter <dick@ximian.com>
11354 * socket-io.c: Fixed compilation for gcc < 3.2.
11356 Fixed compilation for machines that don't have AF_INET6 (thanks to
11357 Bernie Solomon <bernard@ugsolutions.com> for that part.)
11359 Fixed compile warnings.
11361 Fixed formatting and line endings.
11363 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
11366 * socket-io.c: Added IPv6 support.
11368 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
11370 * class.c (mono_class_is_assignable_from): New function to implement
11371 the is_assignable_from logic. Used by mono_object_isinst,
11372 Type::IsAssignableFrom () and the interpreter.
11374 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
11375 Object, even interfaces.
11377 * object.c (mono_object_isinst): Implement in terms of
11378 is_assignable_from.
11380 * icall.c (ves_icall_type_is_assignable_from): New icall.
11382 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
11384 * domain.c (foreach_domain): fix compiler warning.
11386 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
11388 * image.c (load_metadata_ptrs): use g_strndup because strndup is
11389 not available on all plattforms
11391 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
11393 * image.h image.c: Store the metadata version string in MonoImage.
11394 * icall.c: New icall to retrieve the image version.
11395 * reflection.c (create_dynamic_image): Fill in the image version field
11396 * reflection.c (build_compressed_metadata): Use the image version
11397 from the image structure.
11399 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11401 * appdomain.c: modified comment.
11402 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
11403 That will be its last iteration when mono_gc_cleanup is called from
11404 mono_runtime_cleanup and before the domain is unloaded.
11408 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
11410 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
11413 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11415 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
11416 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
11417 Bernie Solomon <bernard@ugsolutions.com>.
11419 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
11421 * object.c, object.h: provide mono_object_new_fast() for faster
11422 allocation in some special cases.
11424 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
11426 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
11427 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
11429 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
11431 * threadpool.c: fix leaks.
11433 2003-07-01 Dick Porter <dick@ximian.com>
11435 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
11436 using MonoGHashTables. Fixes threadpool bug posted to list.
11438 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
11440 * image.h, image.c: added support to load an assembly from a byte array.
11441 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
11442 assembly bundle support.
11444 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
11446 * threadpool.c (mono_thread_pool_add): keep a reference to the
11447 AsyncResult to prevent GC
11449 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
11451 * class.c: leak fix.
11453 2003-06-25 Dick Porter <dick@ximian.com>
11455 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
11456 for the async object, the WaitHandle object will close the handle.
11459 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
11461 * class.c: in mono_array_class_get (), lookup from the hash with the
11462 same type we insert: this works around a bug in
11463 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
11464 lluis. The real fix will have to wait for after the release.
11466 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11468 * icall.c: fix memory leak when getting type members.
11470 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
11472 * reflection.c: added more pubtoken special cases.
11474 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
11476 * class.c: handle field offset correctly when class size
11477 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
11479 2003-06-20 Martin Baulig <martin@ximian.com>
11481 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
11484 2003-06-20 Martin Baulig <martin@ximian.com>
11486 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
11488 2003-06-20 Martin Baulig <martin@ximian.com>
11490 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
11491 just distinguish between variables in registers and variables at
11492 an offset relative to a register.
11494 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11496 * icall.c: #ifdef out latest changes until mcs is fixed.
11498 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11500 * icall.c: return members in metadata order.
11502 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
11504 * icall.c: avoid infinite loop in GetTimeZoneData.
11506 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
11508 * icall.c: added Marshal.Prelink/All icalls.
11510 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
11512 * object.c, object.h: fix warnings and do some overflow checking
11513 when creating arrays.
11515 2003-06-17 Dick Porter <dick@ximian.com>
11518 * file-io.c: File attributes need to be tweaked slightly when
11519 passed from the managed to the w32 world.
11521 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
11522 * profiler.h profiler-private.h profiler.c: Rework last patch
11523 based on suggestion by Paolo.
11525 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
11527 * profiler.h profiler-private.h profiler.c: Added infrastructure for
11528 instruction level coverage data collection.
11529 * profiler.h profiler.c (: Added new callback function which can be
11530 used by the profiler to limit which functions should have coverage
11532 * profiler.c (mono_profiler_load): Call g_module_build_path to
11533 generate the file name of the profiler library.
11535 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11537 * profiler.c, profiler.h, profiler-private.h: added basic block
11538 coverage profiling API.
11540 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
11542 * reflection.c (mono_reflection_create_runtime_class): Add support
11543 for events in dynamically generated code.
11545 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
11548 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
11550 * icall.c: when getting timezone info, return reasonable values if we
11551 can't get the actual data.
11553 2003-06-14 Dick Porter <dick@ximian.com>
11555 * threads.c (start_wrapper): Remove the reference to the thread
11556 object in the TLS data, so the thread object can be finalized.
11557 This won't be reached if the thread threw an uncaught exception,
11558 so those thread handles will stay referenced :-( (This is due to
11559 missing support for scanning thread-specific data in the Boehm GC
11560 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
11562 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
11564 * reflection.c: ensure streams and tables are first allocated with
11565 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
11567 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11569 * icall.c: fixed GetElementType for byrefs (bug# 44792).
11571 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
11573 * reflection.c (mono_reflection_create_runtime_class): Add support for
11574 properties to dynamically created classes.
11575 * reflection.c: Fix a few places where non-MonoObjects were inserted
11576 into the tokens hashtable.
11578 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
11580 * object.c: some support to handle out of memory exceptions.
11582 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
11584 * marshal.c (mono_marshal_get_native_wrapper): support reference
11587 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
11589 * object.h, object.c: more portability stuff from Bernie Solomon.
11590 Unexport mono_object_allocate(). Added mono_object_unbox ().
11591 Set exitcode when an unhandled exception is thrown.
11593 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
11595 * marshal.c (mono_marshal_get_native_wrapper): use custom
11596 marshaler for return types.
11598 2003-06-10 Dick Porter <dick@ximian.com>
11600 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
11601 ip_mreq is available
11603 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
11605 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
11606 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
11607 by Bernie Solomon <bernard@ugsolutions.com>.
11609 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
11611 * gc.c (mono_gc_init): Avoid error message on shutdown when
11612 GC_DONT_GC=1 is used.
11614 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
11615 New icall to return the GUID of a module.
11617 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
11619 * class.c: ensure instance size always includes the parent's size
11620 even whem class size is set explicitly (fixes bug#44294).
11622 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
11624 * profiler.h, profiler.c: made the simple profiler thread-safe,
11625 get more accurate timing info. Allow the loading of an
11626 externally-developed profiler module.
11628 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
11630 * marshal.c (mono_marshal_get_native_wrapper): improved
11631 class/byref arguments.
11632 (mono_marshal_get_native_wrapper): better string marshaling support.
11634 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
11636 * class.c: ensure .pack and .size are handled correctly and
11637 simplified layout of static fields.
11639 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
11642 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
11644 * loader.c (mono_lookup_pinvoke_call): look for modules in the
11645 current directory (fix bug 44008)
11647 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
11649 * marshal.c (mono_marshal_get_native_wrapper): started support for
11651 (mono_delegate_to_ftnptr): consider marshalling specifications
11653 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
11655 * reflection.c, reflection.h: emit custom marshal info.
11657 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11659 * object.c: free the GError.
11660 * icall.c: added CloseEvent_internal.
11662 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
11665 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
11667 * loader.c (mono_method_get_signature): Add support for dynamic
11670 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
11672 * reflection.c: fixed bug #43905.
11674 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
11676 * class.c, domain.c, icall.c, metadata.h, object.h: support for
11677 handling TypedReference and ArgIterator.
11678 * loader.c, loader.h: added function to get signature at call site.
11680 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
11682 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
11683 data readonly. Buglets and warning fixes. Some MethodSpec support.
11685 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
11687 * class.h, class.c, object.c: remove relative numbering support.
11689 2003-05-26 Miguel de Icaza <miguel@ximian.com>
11691 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
11692 free the string, until we get a chance to fix Gtk#
11694 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11696 * marshal.c: revert last patch.
11698 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
11700 * icall.c: updates for new mono_class_vtable() not calling
11701 the type constructor anymore.
11703 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
11705 * object.h, object.c: separate vtable creation from type
11706 initialization. Make running the .cctor thread safe.
11708 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
11710 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
11712 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
11714 * loader.c (mono_get_method): consider calling convention
11716 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
11718 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
11719 to return the invisible global type for a module.
11721 * reflection.c (mono_image_build_metadata): Emit global fields too.
11723 2003-05-20 Peter Williams <peterw@ximian.com>
11725 * loader.c (mono_lookup_internal_call): Add a few newlines.
11727 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
11729 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
11732 * appdomain.c (set_domain_search_path): Recalculate search path when
11733 AppDomainSetup.PrivateBinPath changes.
11735 * object.c (mono_class_compute_gc_descriptor): It turns out some
11736 parts of the class libs (like System.Thread) holds pointers to
11737 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
11738 to treat native int a pointer type here.
11740 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
11742 * appdomain.h, domain.c: add hashtable for jump target resolution.
11744 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
11746 * reflection.h reflection.c icall.c: Added new icalls
11747 GetManifestResourceInfoInternal, GetModulesInternal and support
11750 2003-05-16 Dick Porter <dick@ximian.com>
11754 * file-io.c: Implement System.IO.MonoIO::GetTempPath
11756 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
11758 * object.c: mono_store_remote_field: little fix to previous patch.
11760 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11762 * class.c: add constructors to array classes.
11763 * icall.c: special case array construction for InternalInvoke (),
11765 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
11767 * class.h class.c reflection.c object.c: Added support for field
11768 defaults in dynamically generated classes.
11770 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
11772 * reflection.c: properly encode charset for ddlimport.
11774 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
11776 * threads.c: allow compiling without GC.
11778 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
11780 * appdomain.h, object.c, object.h, threads.c, threads.h: added
11781 handling of thread static data.
11783 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11785 * reflection.h, reflection.c: added mono_custom_attrs_free ().
11787 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
11789 * class.c (mono_array_class_get): always set the serializable flags
11790 (mono_array_class_get): always set the SEALED attribute for array types
11792 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
11794 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
11795 attributes (fix for bug 42021).
11797 2003-05-12 Dick Porter <dick@ximian.com>
11799 * gc.c: Don't run finalizers when the finalizer thread is
11800 finishing up, because the default domain has already been
11803 2003-05-11 Miguel de Icaza <miguel@ximian.com>
11805 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
11806 value is null, we should throw an exception. This is slightly
11807 different than the other conventions used for the constructor.
11809 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11811 * socket-io.c: fixed windows build.
11813 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11815 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
11817 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
11819 * object.c (mono_string_new_wrapper): Compatibility fix for MS
11822 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
11824 * class.c (mono_class_layout_fields): Add experimental GC aware
11825 auto layout facility. Requires class library changes to work correctly.
11827 (mono_class_setup_vtable): Avoid overriding explicit interface
11828 method implementations. Fixes iface3.exe test.
11830 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
11832 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
11833 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
11835 * metadata.h: Add new type classification macro which determines
11836 whenever the type holds an object reference.
11838 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
11840 * marshal.c (mono_marshal_get_native_wrapper): cleanups
11842 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
11844 * gc.c (finalizer_thread): Work around a GC bug.
11846 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
11848 * marshal.c (emit_struct_conv): allow unions
11850 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
11852 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
11854 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
11856 2003-05-06 Martin Baulig <martin@ximian.com>
11858 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
11860 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11863 (Select_internal): allow NULLs, don't create arrays if not needed.
11864 Coupled with Socket.cs changes.
11867 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
11868 register a finalizer for it that will close the semaphore handle. This
11869 fixes the leak and make Lupus' test run with > 4080 loops.
11871 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
11873 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
11874 Jerome Laban (bug #42287)
11876 2003-05-02 Martin Baulig <martin@ximian.com>
11878 * debug-mono-symfile.h
11879 (MonoSymbolFile): Moved declaration into mono-debug.h.
11880 (MonoDebugMethodJitInfo): Likewise.
11881 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
11883 (_mono_debug_address_from_il_offset): Take a
11884 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
11887 (MonoDebugDomainData): New struct.
11888 (mono_debug_get_domain_data): New function.
11889 (mono_debug_add_method): Take an additional `MonoDomain *'
11891 (mono_debug_source_location_from_address): Likewise.
11892 (mono_debug_il_offset_from_address): Likewise.
11893 (mono_debug_address_from_il_offset): Likewise.
11895 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
11897 * reflection.c: one more check for null type in custom attrs.
11899 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11901 * reflection.c: avoid warning (comparison is always false due to limited
11902 range of data type).
11904 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11906 * icall.c: throw an exception in Type.GetField if the argument 'name'
11909 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
11911 * reflection.c: fixed handling of enums in named arguments to custom
11912 attributes (bug #42123).
11914 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
11916 * reflection.c: use the right array element type and handle
11917 a null for a Type argument, too.
11919 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
11921 * reflection.c: handle arrays as arguments to custom attributes.
11923 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
11925 * reflection.c: handle a string value in a custom attr
11926 ctor that takes an object.
11928 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
11930 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
11933 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
11935 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
11937 2003-04-27 Martin Baulig <martin@ximian.com>
11939 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
11940 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
11941 MONO_DEBUGGER_EVENT_BREAKPOINT.
11942 (mono_breakpoint_trampoline_code): Removed.
11943 (mono_debugger_event_handler): The last argument is now a
11945 (mono_debugger_insert_breakpoint_full): Removed the
11946 `use_trampoline' argument.
11947 (mono_debugger_method_has_breakpoint): Likewise.
11948 (mono_debugger_trampoline_breakpoint_callback): Renamed to
11949 mono_debugger_breakpoint_callback(); take the method and
11950 breakpoint number as arguments.
11952 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
11954 * metadata.c: fix off by one when loading parameters attributes.
11956 2003-04-24 Martin Baulig <martin@ximian.com>
11958 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
11960 2003-04-24 Martin Baulig <martin@ximian.com>
11962 * mono-debug-debugger.c: Moved all code which interacts with the
11963 Mono Debugger here.
11965 * debug-mono-symfile.c: This code now just deals with the symbol
11966 file itself, the debugger code is now in mono-debug-debugger.c.
11968 2003-04-23 Martin Baulig <martin@ximian.com>
11970 * mono-debug.c (mono_debug_source_location_from_il_offset):
11971 New method; like mono_debug_source_location_from_address(), but
11972 takes an IL offset instead of a machine address.
11974 2003-04-23 Martin Baulig <martin@ximian.com>
11976 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
11977 `line' field; this is now computed by the debugger.
11979 2003-04-23 Martin Baulig <martin@ximian.com>
11981 * mono-debug.[ch]: New files. This is the new debugging interface.
11983 * mono-debug-debugger.[ch]: New files. Moved all code which
11984 interacts with the Mono Debugger here.
11986 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
11988 * domain.c (mono_init): initialize mono_defaults.monitor_class
11990 2003-04-21 Miguel de Icaza <miguel@ximian.com>
11992 * reflection.c (method_encode_code): Add a spicy exception to help
11993 future compiler authors.
11995 2003-04-21 Martin Baulig <martin@ximian.com>
11998 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11999 Make this work with relative pathnames; g_filename_to_uri() needs
12000 an absolute filename.
12002 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
12004 * icall.c: Track name changes in Object and ValueType.
12006 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
12008 * metadata.c (mono_type_stack_size): size should be a multiple of
12011 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12014 (internal_domain_finalize): moved into mono_domain_finalize. No need
12015 to create another thread because the finalizers will be run in the
12018 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
12019 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
12020 to be run (MS does this too).
12022 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
12024 * object.c (mono_class_compute_gc_descriptor): Update comment.
12026 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
12028 * image.h: Add synchronized wrapper cache.
12030 * image.c (do_mono_image_open): Initialize cache.
12032 * reflection.c (create_dynamic_mono_image): Initialize cache.
12034 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12036 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
12037 ves_icall_System_Buffer_ByteLengthInternal.
12039 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12041 * reflection.c: setup klass->nested_in earlier. Allow
12042 a dash in the assembly name.
12044 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
12046 * metadata.c (mono_type_to_unmanaged): dont access
12047 type->data.klass for MONO_TYPE_OBJECT
12048 (mono_type_to_unmanaged): consider System.Delegate class
12050 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
12052 * class.c: just setup supertypes in the proper place instead of
12053 initializing the full element class for arrays.
12055 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12057 * class.c: ensure the element class of arrays is initialized.
12058 Setup the supertype info for array classes, too.
12060 2003-04-14 Miguel de Icaza <miguel@ximian.com>
12062 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
12064 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12066 * Makefile.am: re-added -m option when running cygpath. This way,
12067 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
12069 * mono-config.c: same codepath for locating mono config file for WIN32
12071 * assembly.c: if mono_assembly_setrootdir is called, don't override
12074 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12076 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
12077 MONO_ASSEMBLIES variable.
12079 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
12081 * icall.c: added Assembly::GetNamespaces() icall.
12083 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12085 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
12087 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
12089 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
12090 * object.c: fixed bug in the construction of vtable for proxies
12092 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
12094 * object.c (mono_array_new): Mark mono_array_new as an icall.
12096 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12098 * class.c: fixed test for public method when overriding interfaces.
12101 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12103 * appdomain.h, domain.c: added mono_domain_foreach() to
12104 be able to access the currently loaded appdomains.
12105 * object.c: make string interning work across sppdomains.
12106 Mark some functions for use as icalls.
12108 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
12110 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
12112 * reflection.h reflection.c: Allocate long living data using
12113 GC_MALLOC_ATOMIC so the collector does not need to scan it.
12115 * reflection.c: Double the allocation size in streams instead of
12116 increasing it, to prevent unneccesary copying on large assemblies.
12118 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
12119 creation if the assembly does not have the Run flag set.
12121 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12123 * class.h: avoid the C++ keywords in header files (Jerome Laban
12124 spotted and fixed this).
12126 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12129 (mono_unhandled_exception): fill in the arguments for the
12130 UnhandledException event. Only trigger that event for the default
12131 domain (as MS does).
12133 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
12135 * object.c: Improve typed allocation stuff based on suggestions from
12136 Paolo. Also turn it on if the GC library supports it.
12138 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
12140 * object.c object.h class.h: Added experimental typed allocation
12141 facility using the interfaces in gc_gcj.h.
12143 * os/gc_wrapper.h: Added new include files.
12145 2003-04-03 Martin Baulig <martin@ximian.com>
12147 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
12148 which is not yet enabled by default.
12150 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
12152 (mono_gc_lock, mono_gc_unlock): New static functions.
12154 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
12155 functions; stop/start the world for the garbage collector. This
12156 is using the windows API; we need to complete the SuspendThread()/
12157 ResumeThread() implementation in the io-layer to make this work on Unix.
12158 (mono_gc_push_all_stacks): New public function; tells the garbage
12159 collector about the stack pointers from all managed threads.
12161 2003-04-03 Martin Baulig <martin@ximian.com>
12163 * object.h (MonoThread): Added `gpointer stack_ptr'.
12165 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
12167 2003-04-03 Martin Baulig <martin@ximian.com>
12169 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
12171 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
12173 * reflection.c (typebuilder_setup_fields): Initialize field.first and
12176 2003-04-02 Miguel de Icaza <miguel@ximian.com>
12178 * loader.c (mono_lookup_internal_call): Report the corlib that is
12181 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
12183 * icall.c (ves_icall_type_GetTypeCode): fixed check for
12184 System.DBNull (it's class not valuetype).
12186 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12188 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
12189 if the array method was already assigned a token (fixes bug#40646).
12191 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
12193 * reflection.c (mono_reflection_get_type): Attempt type resolve even
12194 if no assembly is given.
12196 2003-04-01 Miguel de Icaza <miguel@ximian.com>
12198 * metadata.h: Added the new tables.
12200 * row-indexes.h: Added definitions for new tables.
12202 * metadata.c: Add schemas for new tables, and add support for
12203 computing the sizes of them.
12205 * class.c: Update for handling the new type cases.
12207 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
12209 * metadata.h (MONO_TYPE_IS_VOID): new macro
12211 2003-03-31 Martin Baulig <martin@ximian.com>
12213 * threads.h (MonoThreadCallbacks): Added `thread_created'.
12215 * threads.c (mono_thread_new_init): Call `thread_created' in the
12216 mono_thread_callbacks.
12218 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
12220 * loader.h: added marshalbyrefobject_class to mono_defaults
12221 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
12222 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
12223 generation of output parameters.
12224 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
12225 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
12226 contextbound and the target object belongs to the context of the caller.
12227 * object.h: added context and unwrapped_server variables in MonoRealProxy.
12228 * object.c: Implemented support for interfaces and abstract classes
12229 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
12230 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
12232 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
12234 * class.h class.c (mono_class_is_subclass_of): New function.
12236 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
12237 routines for most common case (calls from ArrayList::ToArray).
12239 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
12240 routine so programs which call Environment::Exit() can be profiled.
12242 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
12243 Added MONO_ARCH_SAVE_REGS.
12245 * icall.c (ves_icall_type_is_subtype_of): Use new function.
12247 2003-03-29 Miguel de Icaza <miguel@ximian.com>
12249 * blob.h: Add a couple of new MonoType types definitions.
12251 * tabledefs.h: Add a couple of new call convs.
12253 2003-03-27 Zoltan Varga <vargaz@freemail.h>
12255 * reflection.h (MonoReflectionDynamicAssembly): track changes in
12256 the layout of the class.
12258 * reflection.c (alloc_table): double the size on overflow to avoid
12259 unnecessary copying.
12261 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
12262 avoid filling out metadata tables and blobs. Also set mb->ilgen to
12263 null so it can be garbage collected.
12265 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
12267 * reflection.c (mono_reflection_get_type): Return the resolved type
12268 only if it is in the assembly we searched.
12270 * reflection.c (ensure_runtime_vtable): Initialize method slots.
12272 * class.c (mono_class_setup_vtable): Set the slot of the overriding
12275 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12278 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
12279 the right one is 'file:///blah', but MS allows it.
12281 (mono_assembly_open): allow 'file://blah'
12283 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
12285 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
12287 * socket-io.c: fixes bug #40310.
12289 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
12291 * reflection.c (mono_reflection_parse_type): handle deeply nested
12294 * reflection.c (mono_image_create_token): Use unique token values
12295 since they will be put into a hash table.
12297 * class.c (mono_class_setup_vtable): If a method occurs in more than
12298 one place in the vtable, and it gets overriden, then change the
12299 other occurances too.
12301 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12302 object as return type.
12304 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
12306 * icall.c: Deleted "ToString" implementation for double and float
12307 because they are full implemented in managed code.
12309 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12311 * reflection.c, reflection.h: implemented and exported functions
12312 to retrieve info about custom attributes.
12314 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12316 * appdomain.c: moved Uri handling to assembly.c
12317 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
12318 work when using a file Uri in *nix and windows.
12320 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
12321 GetReferencedAssemblies.
12323 2003-03-18 Dick Porter <dick@ximian.com>
12325 * icall.c: Rename a couple of internal calls
12327 * threads.c: Set the thread state to Stopped when a thread exits.
12330 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
12332 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
12335 * object.c (mono_class_vtable): fix warning.
12337 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
12339 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
12341 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
12343 (method_encode_clauses): Create exception info structures in the right
12345 (mono_reflection_setup_internal_class): Initialize supertypes field.
12347 * class.c object.c: Handle interfaces which implement other interfaces
12350 * class.h class.c: Move the supertypes array initialization code into
12351 a separate function so it can be used for dynamic types too. Also call
12352 it earlier, in mono_class_init(), since it can be used before the
12353 type is initialized.
12355 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12359 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
12364 * object.c: remove warnings.
12366 2003-03-13 Martin Baulig <martin@ximian.com>
12368 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
12369 (MonoDebugLexicalBlockEntry): New types.
12371 * debug-mono-symfile.c
12372 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
12374 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12376 * process.c: ret can be any non-zero value accroding to MS doc.
12378 2003-03-07 Miguel de Icaza <miguel@ximian.com>
12380 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
12381 fixing a warning for a miss-used prototype, would have cause
12382 random memory corruption.
12384 2003-03-07 Martin Baulig <martin@ximian.com>
12386 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
12387 getting really annoying ....
12389 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
12391 * reflection.c (fixup_method): added support for array methods.
12393 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12395 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
12396 (pointed out by Michael Adams).
12398 2003-03-04 Dick Porter <dick@ximian.com>
12400 * icall.c: Temporarily reverted the Double and Single ToString()
12401 change, because it broke nunit.
12403 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
12405 * object.h, threads.h: make include files compatible with C++
12406 (patch by Jerome Laban <jlaban@wanadoo.fr>).
12408 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
12410 * icall.c: Erased ToString helper functions for Double and Single.
12411 Now, that implementations ar all in managed code (Double and Single
12414 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
12416 * appdomain.c: Added method for initializing the default context of
12417 a domain. Added internal call for getting the default context.
12418 * appdomain.h: Added context variable in MonoDomain struct.
12419 * domain.c: mono_domain_set also sets the default context of the domain
12420 * icall.c: Mapped internal method InternalGetDefaultContext.
12421 * object.c: mono_object_get_virtual_method returns always a remoting
12422 wrapper if the object is a transparent proxy.
12423 mono_runtime_invoke_array: when creating an object by calling the
12424 constructor, if the created object is a proxy, then the constructor should
12425 be called using the a remoting wrapper.
12427 2003-03-03 Dick Porter <dick@ximian.com>
12429 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
12430 variable so it compiles on solaris. Problem spotted by
12431 Christopher Taylor <ct@cs.clemson.edu>
12433 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12436 (get_info_from_assembly_name): don't leak value.
12439 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
12442 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12444 * assembly.c: export mono_image_load_references ().
12445 * class.c: handle function pointers. mono_class_from_name() now
12446 supports nested type names directly.
12448 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
12450 * reflection.h reflection.c: Encode already created dynamic methods
12451 and fields correctly as a DEF instead of a REF.
12453 * reflection.c: Get rid of the force_ref argument to
12454 mono_image_typedef_or_ref since it was wrong in the first place.
12456 * string-icalls.c: add error checking to string constructors according
12459 * reflection.c: Emit types in the order their TypeBuilders were
12460 created. Previously, a new table index was assigned to each type before
12461 the tables were emitted. This was wrong because the signature blob
12462 might already refer to a type by its original table index.
12464 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
12466 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
12469 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12471 * Makefile.am: make assemblies dir have \ instead of / on windows.
12473 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
12475 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
12476 iterate over the NESTEDCLASS table using a linear search since the
12477 table is not guaranteed to be sorted by the secondary key.
12479 * class.c (mono_class_create_from_typedef): fixed up call to
12480 mono_metadata_nesting_typedef.
12482 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
12484 * marshal.c (mono_string_to_byvalstr): clear the memory as
12485 suggested by Jerome Laban <jlaban@wanadoo.fr>
12487 2003-02-26 Dick Porter <dick@ximian.com>
12489 * process.c: Cope with padding in .rsrc blocks
12491 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
12493 * metadata.h: reverted the filter_len change, it breaks reflection
12495 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
12497 * metadata.h: added a new field to store the filter_len
12500 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12502 * reflection.c: handle custom attributes for types and members
12503 created with Reflection.Emit (bug#38422).
12505 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
12507 * reflection.c: define RTSpecialName automatically for constructors for
12508 compatibility with MS.NET.
12510 * reflection.c (mono_reflection_create_runtime_class): initialize
12511 nested_in field of dynamically created classes.
12513 2003-02-22 Martin Baulig <martin@ximian.com>
12515 * debug-mono-symfile.h: Incremented version number.
12517 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
12519 * object.h icall.c process.c: fix warnings.
12521 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
12523 * appdomain.h appdomain.c:
12524 (mono_domain_try_type_resolve): split the
12525 name_or_tb argument into a name and a tb argument.
12526 (mono_domain_has_type_resolve): new function to check whenever the
12527 application has registered a TypeResolve event handler.
12529 * icall.c reflection.h reflection.c: move the type resolve logic into
12530 mono_reflection_get_type () so it will be invoked when
12531 Assembly::GetType () is called.
12534 (mono_reflection_get_type): renamed to get_type_internal.
12535 (mono_reflection_get_type): fixed type name generation so it works
12536 for nested types too.
12537 (mono_reflection_get_type): call has_type_resolve () to avoid the
12538 costly type name generation if there is no resolve event handler.
12540 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12542 * class.c, image.c: load exported types from file references.
12544 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
12546 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
12547 used to cache the managed methods used to create proxies and make
12548 remote invocation of methods.
12549 * class.h: Added in MonoVTable a flag to indicate that a class needs
12550 to be remotely created.
12551 * object.c: Modified the method mono_class_vtable(). It now initializes
12552 the remote flag of the vtable. Modified mono_object_new_specific(),
12553 so now it checks the remote flag.
12554 * icall.c: Added a couple of internal methods, one for enabling instance
12555 creation interception for a type, and one for creating objects bypassing
12558 2003-02-18 Martin Baulig <martin@ximian.com>
12560 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
12561 New interncall to get a method's metadata token.
12563 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
12564 New interncall for the debugger.
12566 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
12568 * class.c (mono_class_setup_vtable): allocate supertype array
12570 2003-02-18 Martin Baulig <martin@ximian.com>
12572 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
12574 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12577 (assembly_name_to_aname): jump over unknown properties (i've found
12578 something like: 'type, assembly, version=xxx, custom=null, public...',
12579 so now will ignore custom=null and still get the rest of the values).
12581 2003-02-17 Dick Porter <dick@ximian.com>
12583 * threads.c: Have Thread.Start() wait for a semaphore to signal
12584 that the thread has set up all its local data. This fixes bug
12585 34323, where Abort() raced the new thread's TLS data.
12587 Also removes the handle_store() call from start_wrapper, because
12588 threads are now always created suspended and there is no longer a
12589 race between the parent and child threads to store the info.
12591 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
12593 * image.c: explain the #- heap issue in a message, hopefully
12594 avoiding FAQs on mono-list.
12596 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12599 (GetEntryAssembly): if the domain has not invoked
12600 AppDomain.ExecuteAssembly yet, return the assembly of the default
12603 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
12605 * class.c (mono_ldtoken): make it work in dynamic assemblies.
12607 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12609 * metadata.c, reflection.c: simple speedup to type hash
12612 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
12614 * image.c, image.h, class.c, assembly.c: move module loading
12615 to MonoImage. When loading metadata, consider alignemnet from
12616 the start of metadata, not from the metadata address in memory.
12618 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
12620 * reflection.c (mono_reflection_get_custom_attrs): Added support for
12621 AssemblyBuilder objects. Factored out custom attribute creation into
12622 a separate function.
12623 (create_custom_attr): new function to create custom attributes.
12625 2003-02-12 Miguel de Icaza <miguel@ximian.com>
12627 * Makefile.am: Got tired of typing the full pathname to pedump.
12628 Until there is another option, am installing this.
12630 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
12632 * class.c (class_compute_field_layout): always set field->parent
12633 (mono_ldtoken): use mono_defaults.fieldhandle_class;
12635 2003-02-11 Dick Porter <dick@ximian.com>
12638 * monitor.c: Rewrote Monitor, making lock much faster and
12639 Pulse/Wait work as specified. Also uses much fewer handles, and only
12640 creates them as needed.
12642 * exception.c: Added SynchronizationLockException
12644 * threads.c: Deleted old Monitor implementation. The new one is
12647 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12649 * class.c: handled TypedReference type code. Set the correct size for
12650 class data. Setup interface_offsets for interface classes, too.
12652 2003-02-09 Martin Baulig <martin@ximian.com>
12654 * debug-mono-symfile.h: Reflect latest symbol writer changes.
12656 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
12658 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
12659 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
12660 * object.c: fixed mono_object_get_virtual_method () for interfaces.
12661 * verify.c: check for code that runs after the end of the method.
12663 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
12665 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
12666 "System.Math::Round2".
12667 * sysmath.h: Added Floor, Round and Round2 definitions.
12668 * sysmath.c: Modified certain functions that were not 100% compliant
12669 with MS.NET (math precision) and added the implementation of Floor,
12672 2003-02-07 Martin Baulig <martin@ximian.com>
12674 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
12676 2003-02-07 Martin Baulig <martin@ximian.com>
12678 * debug-mono-symfile.c: Reflected latest symwriter changes.
12679 (mono_debug_create_mono_symbol_file): Removed.
12680 (mono_debug_open_mono_symbol_file): Take an argument which
12681 specifies whether to create a dynamic symbol file.
12683 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
12685 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
12687 2003-02-05 Martin Baulig <martin@ximian.com>
12689 * reflection.c (mono_image_build_metadata): Make this public,
12690 protect it against being called multiple times, don't create
12691 resources and don't build the compressed metadata here.
12692 (mono_image_create_pefile): Do this here.
12695 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
12697 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12699 * socket-io.c: fixed bug #36322.
12701 2003-02-06 Piers Haken <piersh@friskit.com>
12705 * debug-mono-symfile.c:
12711 * socket-io.c: warning cleanups
12713 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
12715 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
12716 function. works like remoting invoke, but does a check for the Proxy first.
12718 2003-02-05 Miguel de Icaza <miguel@ximian.com>
12720 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
12722 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
12724 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
12726 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
12727 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
12729 * object.c (mono_store_remote_field_new): used by the new jit
12730 instead of mono_store_remote_field
12731 (mono_load_remote_field_new): used by the new jit
12732 instead of mono_load_remote_field
12734 2003-02-05 Patrik Torstensson
12736 * appdomain.c: changed unload to take the domain id instead
12739 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
12742 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12744 * appdomain.c: don't look for assemblies in ApplicationBase if
12745 PrivateBinPathProbe is set.
12747 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12749 * object.c: make the first argument in main_args contain the absolute
12750 path to the assembly. Fixes bug #37511.
12752 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12754 * icall.c: get correct UTC offset for countries not using daylight
12755 time saving. Fixes bug #30030.
12757 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12759 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
12760 and 1 are the family).
12762 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
12764 * icall.c (ves_icall_InternalExecute): removed wrong assertion
12766 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
12768 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
12770 * reflection.c: added support for SignatureHelper tokens, which is
12771 needed by the Calli opcode.
12773 * reflection.h: track changes to SignatureHelper class.
12775 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
12777 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12779 * appdomain.c: fixed loading assemblies from PrivateBinPath.
12781 2003-02-03 Patrik Torstensson
12782 * appdomain.[c|h], domain.c :
12783 - Added support for getting a domain via domain id
12784 - Support for setting and getting domain from System.AppDomain
12785 (used in cross appdomain channel)
12786 - Added support for get/set for a MonoAppContext on a thread
12787 (Context class in System.Runtime.Remoting.Contexts),
12788 - Removed hack in Get/SetData and ExecuteAssembly.
12790 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
12791 the managed world to get control when a proxy is created.
12793 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
12795 2003-02-03 Miguel de Icaza <miguel@ximian.com>
12798 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
12799 Populate the codebase field as well.
12801 2003-02-02 Martin Baulig <martin@ximian.com>
12803 * debug-mono-symfile.c
12804 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
12805 (mono_debug_symfile_add_method): Allow interncalls.
12807 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12809 * icall.c: throw parse exception if strtod fails or the string is empty.
12811 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
12813 * marshal.c: handle object type separately from defined
12816 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
12818 * marshal.c: handle NATIVE_LPSTR for strings when it's
12819 explicitly specified.
12821 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
12823 * reflection.c, reflection.h, icall.c: setup the reflection
12824 handle cache for ModuleBuilders and AssemblyBuilders.
12826 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
12828 * reflection.c (reflection_methodbuilder_to_mono_method): set
12831 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12833 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
12835 2003-01-29 Dick Porter <dick@ximian.com>
12837 * threads.c: No need for the fake_thread kludge now that Thread
12838 doesn't run a class constructor
12840 2003-01-29 Dick Porter <dick@ximian.com>
12842 * threads.c: Use g_direct_hash instead of the rather bogus
12845 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
12847 * marshal.c (mono_marshal_get_native_wrapper): add check for null
12848 (fix pinvoke12.exe)
12849 (mono_marshal_get_struct_to_ptr): generate valid IL code
12850 (mono_marshal_get_ptr_to_struct): generate valid IL code
12851 (*): correctly set sig->pinvoke, we need to memdup the signature
12854 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12856 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
12857 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
12859 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
12861 * profiler.c: provide more callers information.
12863 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
12865 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
12867 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
12869 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
12871 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
12873 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
12874 exception instead of going into an infinite loop on dates which it
12877 * string-icalls.c (ves_icall_System_String_get_Chars): raise
12878 out-of-range exception if needed.
12880 * class.c (mono_class_setup_vtable): allow a virtual method to provide
12881 an implementation for an interface method and to override an inherited
12882 method at the same time.
12883 Imagine a scenario when a virtual method is used to override a
12884 virtual abstract method in a parent class, and this same method
12885 provides an implementation for an method inherited from an interface.
12886 In this case, the interface resolution code will set im->slot, which
12887 means that the virtual method override pass will skip this method
12888 which means a pointer to the abstract method inherited from the parent
12889 will remain in the vtable of this non-abstract class.
12891 * class.c: (mono_class_setup_vtable): continue search for a real
12892 method if only an abstract method is found.
12894 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
12896 * reflection.c: add size to encoding for ByValStr and ByValArray
12897 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
12899 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
12901 * class.c (mono_class_setup_vtable): pass the override info as an
12904 * class.c (mono_class_setup_vtable): set the slot of overriding methods
12907 * reflection.c (ensure_runtime_vtable); add support for method
12910 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
12912 * reflection.c (resolution_scope_from_image): Hack to work to work with
12913 dynamic assemblies.
12915 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
12916 added a 'force_ref' argument to force this function to allways return
12917 a TypeRef. This is needed by mono_image_get_memberref_token ().
12919 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
12921 * reflection.c (mono_image_get_type_info): interfaces really don't have
12924 * reflection.c (mono_image_basic_init): fill out missing fields of
12927 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
12928 dynamic assemblies. This is required so dynamic assemblies show up in
12929 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
12930 Type::GetType() etc. This is consistent with MS behaviour.
12932 * image.c image.h reflection.c: add newly created classes to the name
12933 cache so mono_class_get () will find them.
12935 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
12937 First part of changes to get IKVM.NET running under mono.
12939 * appdomain.h, appdomain.c: added new function
12940 mono_domain_try_type_resolve() which will emit TypeResolve events.
12941 This function will call AppDomain::DoTypeResolve to do the actual work.
12943 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
12944 moved existing code dealing with dynamic tokens to a new function
12945 called mono_reflection_lookup_dynamic_token (). This function will
12946 raise TypeResolve events when appropriate. Since reflection.c is not
12947 part of libmetadata, a new hook function called
12948 mono_lookup_dynamic_token() is added to class.c which will call this.
12950 * assembly.h assembly.c: make the invoke_load_hook function public,
12951 so it can be called for dynamic assemblies.
12953 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
12955 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
12958 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
12959 MonoGHashTable, since it contains pointers to objects which the GC
12962 * assembly.c (search_loaded): remove unused variable.
12964 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
12966 * object.c: fixed issue exposed by gcc-generated IL programs
12967 that use RVA data for pointers.
12969 2003-01-25 Martin Baulig <martin@ximian.com>
12971 * threads.c (start_wrapper): Moved the initialization of
12972 `start_func' above the mono_new_thread_init() call to which we
12973 pass it as argument.
12975 2003-01-24 Martin Baulig <martin@ximian.com>
12977 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
12978 the MonoThread pointer.
12980 2003-01-21 Miguel de Icaza <miguel@ximian.com>
12982 * icall.c: Rename `PowImpl' to Pow.
12984 2003-01-23 Dick Porter <dick@ximian.com>
12986 * threads.c (start_wrapper): Create a Thread object if needed, so
12987 the Main() thread can do the class initialisation in a subthread
12988 that has been set up to allow managed code execution.
12990 Pass the thread ID instead of the MonoThread pointer to the thread
12991 start and attach callbacks. This change is required, because the
12992 jit thread start callback must be called _before_ the Thread
12993 object can be created.
12995 (mono_thread_init): Removed much object creation code that is no
12996 longer needed. No managed code is called from here now.
12998 * object.c (mono_runtime_exec_managed_code): Create a subthread
12999 for Main, and call back to the runtime to use it.
13000 Set the exit code when Main exits.
13002 * gc.c: Make sure domain finalisation happens in a subthread.
13003 Re-enable threaded GC, fixing bug 31333 (again).
13005 * environment.c: System.Environment internall calls (so far just
13006 ExitCode is here, the others are still in icall.c)
13008 * appdomain.c (mono_runtime_cleanup): All threads running managed
13009 code should have finished before mono_runtime_cleanup() is
13010 reached, so no need to clean up threads.
13012 2003-01-22 Martin Baulig <martin@ximian.com>
13014 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
13015 `gpointer func' arguments.
13016 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
13017 but added `MonoThread *thread' argument.
13018 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
13020 * threads.c (mono_new_thread_init): Added `gpointer func' argument
13021 and pass it to the mono_thread_start_cb callback.
13022 (mono_install_thread_callbacks): New public function to install a
13023 set of callbacks which are set by the debugger.
13024 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
13026 2003-01-22 Martin Baulig <martin@ximian.com>
13028 * Makefile.am: Install debug-mono-symfile.h.
13030 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
13032 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
13034 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
13036 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
13037 * class.c (mono_ptr_class_get): correctly set access levels of pointers
13038 (mono_array_class_get): correctly set access levels of arrays
13040 2003-01-20 Patrik Torstensson
13041 * image.h (MonoAssemblyName): changed major, minor, build, revision
13042 from signed to unsigned.
13044 2003-01-20 sean kasun <skasun@azstarnet.com>
13046 * reflection.c (load_cattr_value): Now this handles
13047 MONO_TYPE_SZARRAY. Fixes bug #35629
13049 2003-01-20 Miguel de Icaza <miguel@ximian.com>
13051 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
13054 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13056 * decimal.c: fixed bug #26056.
13058 2003-01-17 Martin Baulig <martin@ximian.com>
13060 * gc.c: Raise an ExecutionEngineException instead of using g_error().
13062 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13065 (mono_get_exception_type_initialization): new function.
13067 * object.c: throw a TypeInitializationException when an exception is
13068 thrown invoking the class constructor.
13070 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13072 * reflection.c: fixed attribute reading.
13074 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13077 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
13078 provided, look for the type in the calling assembly and then in
13079 mscorlib; if the assembly name is provided, only try that one.
13081 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
13083 * object.c: register the vtable before there is a chance it's
13084 queried again recursively.
13086 2003-01-13 Duncan Mak <duncan@ximian.com>
13088 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
13091 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
13093 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
13095 2003-01-11 Martin Baulig <martin@ximian.com>
13097 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
13098 this to 20 for the release.
13100 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
13102 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
13104 * loader.c (mono_method_get_marshal_info): bug fix
13106 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
13107 structures with explicit layout
13109 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13111 * profiler.c: made the output more readable (and sorted).
13112 Added caller information for the allocation profiler.
13114 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
13116 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
13118 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13120 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
13121 to get value types.
13123 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
13125 * object.c, profiler.h, profiler.c, profiler-private.h:
13126 Added object allocation profiler.
13128 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
13130 * reflection.h, reflection.c: handle global methods.
13131 Compress blob entries.
13133 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
13135 * marshal.c: fix compilation.
13137 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
13139 * loader.c (mono_method_get_marshal_info): impl.
13141 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
13143 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13145 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
13146 for reference types.
13148 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
13150 * loader.c: fixed off by one error in loaded parameter names.
13152 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
13154 * marshal.c (mono_marshal_get_icall_wrapper): like
13155 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
13156 instead of a MonoMethod.
13158 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13160 * decimal.c: fixed bug #36537.
13162 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
13164 * marshal.c: throw a missing method exception if a
13165 P/Invoke method is not found.
13167 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13169 * icall.c: allow a null this for constructors.
13171 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
13173 * icall.c: raise the proper exceptions if the arguments to the
13174 internal Invoke are incorrect.
13176 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
13178 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
13180 2003-01-03 Martin Baulig <martin@ximian.com>
13182 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
13184 2002-12-31 Martin Baulig <martin@ximian.com>
13186 * debug-mono-symfile.c: Completely rewrote the type section.
13187 Instead of using individual malloc()ed fields, we use one big
13188 continuous memory area and offsets into this area.
13189 See the comments in the source code for details.
13191 2002-12-30 Martin Baulig <martin@ximian.com>
13193 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
13195 2002-12-30 Martin Baulig <martin@ximian.com>
13197 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
13198 line number table in this data blob instead of using an external
13201 2002-12-28 Martin Baulig <martin@ximian.com>
13203 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
13205 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
13207 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
13208 as a boxed return type.
13210 2002-12-21 Miguel de Icaza <miguel@ximian.com>
13213 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
13214 g_build_filename to properly get separators on the filename created.
13216 * object.h: Small change, introduce MonoMarshalByRefObject to
13217 track the layout of that structure in the C# universe as we make
13220 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
13222 * object.c: removed assert to allow static fields on interfaces.
13223 * loader.c: a TypeSpec may be used for any type, not just arrays.
13225 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13227 * class.c, class.h: added mono_class_array_element_size ().
13228 Ignore static methods in interfaces.
13230 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13232 * threads.c: fixed the build under cygwin.
13234 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
13236 * reflection.c: handle nullref constants. Allocate keys for
13237 reflection handles with the GC.
13239 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
13241 * threads.c, threads.h: added mono_thread_get_abort_signal()
13242 to get a suitable signal for thread abort.
13244 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
13246 * metadata.c: fix handling of ExportedType table.
13248 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13250 * icall.c: added WriteWindowsDebugString internal call.
13252 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13254 * reflection.h: added fields to match C# implementation.
13256 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13258 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
13260 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
13262 * gc.h, gc-internal.h: Rename header for GC internal calls to
13263 gc-internal.h from gc.h as to not clash with Boehm GC having its
13264 header installed as <gc.h> in outside include paths.
13265 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
13266 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
13268 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13270 * icall.c: assign minor, build and revision in FillName.
13272 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
13274 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
13275 Added support for running code generated by Reflection.Emit.
13277 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13279 * appdomain.c: check for NULL argument in LoadFrom.
13281 2002-12-10 Dick Porter <dick@ximian.com>
13283 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
13285 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13287 * appdomain.c: fix buglet when building exe file name. Handle full
13288 assembly name (needed after latest changes to AssemblyName).
13290 (mono_image_close): free some hashtables.
13292 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
13294 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
13295 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
13296 on some systems (redhat 7.3)
13298 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
13300 * threads.c: delete the critical section of a sync block,
13301 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
13303 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
13305 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
13307 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13309 * appdomain.[ch]: handle the assembly preload event to try loading the
13310 assemblies using the paths we have in the current domain.
13312 * assembly.[ch]: created an assembly preload hook that is called to try
13313 loading the assembly by other means that the ones provided here.
13315 * domain.c: initialize the domain search path.
13317 From now on, assemblies (TODO: except corlib and System) are loaded
13318 according to these rules when using mono_assembly_load ():
13320 1. It tries to load the assembly from the ApplicationBase
13321 of the current domain appending .dll and .exe (TODO: have to
13322 try loading from name/name.dll and name/name.exe).
13324 2. It tries the search path specified in PrivateBinPath for the
13325 current domain (if any).
13327 3. Previous behavior.
13329 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
13331 * icall.c: implemented GetInterfaceMap() related icall.
13332 * domain.c, loader.h: load MethodInfo in mono_defaults.
13334 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
13336 * gc.c: disable the finalizer thread for now, untill all the issues
13337 with it are resolved.
13339 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13341 * string-icalls.c: handle embedded nulls in string ctor when the
13342 length is specified.
13344 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13346 * class.c: look for explicit interface implementation in parent
13349 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
13351 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
13353 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
13355 * gc.c: protect handles with a critical section.
13357 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13360 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
13361 parameters. If no assembly specified, try getting the type from all
13362 the assemblies in the current domain, else, load the assembly and get
13365 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13367 * marshal.c: applied patch from Aleksey Demakov that fixes
13368 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
13370 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13372 * icall.c: fixed get_location.
13374 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
13376 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
13377 declarations to make it work with older gcc.
13379 * loader.c (mono_get_method): set signature->pinvoke for native calls
13381 2002-11-20 Dick Porter <dick@ximian.com>
13383 * threads.c (mono_thread_init): Set the main thread's handle
13385 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
13387 * gc.c: allow compilation without GC support. Changed to match the
13390 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13392 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
13394 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
13396 * reflection.c: set a public key token on the core assemblies.
13398 2002-11-18 Dick Porter <dick@ximian.com>
13400 * threads.c: Split out some thread initialisation so that other
13401 files can set the start callback function.
13403 * gc.c: Run finalisers in a separate thread, to avoid stack
13404 overflow. Fixes bug 31333.
13406 * appdomain.c: Set up GC finalisation thread.
13410 * domain.c: Use gc.h macros for GC_malloc
13412 2002-11-15 Dick Porter <dick@ximian.com>
13416 * appdomain.c: Removed mono_runtime_init_with_attach(),
13417 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
13418 merging the extra parameter with the existing function. Removed
13419 unneeded code in mono_thread_attach().
13421 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
13423 * image.c (mono_image_loaded_by_guid): a method to get loaded
13425 (load_metadata_ptrs): we store the guid as string.
13427 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
13429 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
13431 * metadata.c (mono_guid_to_string): imported method form Zoltan
13432 Varga (slightly modified)
13434 * assembly.c (mono_assembly_open): load precompiled code
13436 * loader.h (MonoMethod): we store the method token for use in the
13439 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13441 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
13442 the hook function called when an assembly is loaded.
13444 * domain.c: Modified file.
13445 (mono_domain_assembly_load): removed hash table insertion of assemblies.
13449 2002-11-07 Miguel de Icaza <miguel@ximian.com>
13451 * reflection.c: Map PEFileKind to the value expected by the WinNT
13454 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13456 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
13457 Read until the buffer is filled completely.
13459 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13461 * icall.c: implemented MonoType.InternalGetEvent ().
13463 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13465 * appdomain.c: implemented InitAppDomainSetup. Delayed
13466 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
13467 the entry_assembly.
13469 * assembly.c: base_dir is now an absolute path ending with
13472 * icall.c: modified get_location according to the above changes.
13474 * object.c: init AppDomain.SetupInformation for the default domain after
13475 we have the entry assembly.
13477 * domain.c: when unloading a domain, setup = NULL.
13479 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
13481 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
13483 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
13485 * object.h, object.c: introduced mono_object_get_virtual_method ()
13486 to lookup the method invoked on an object when a callvirt is done on
13488 * icall.c: make MethodInfo::Invoke() always do a virtual call.
13490 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13492 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
13493 current domain when loaded an assembly and failed to load it.
13495 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
13497 2002-10-31 Dick Porter <dick@ximian.com>
13501 * file-io.c: Return the error status in a parameter, as the
13502 GetLastError() value has long since been blown away if we try and
13503 look it up in a subsequent internal call invocation. Delete the
13504 GetLastError() internal call, because it's useless.
13506 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
13508 * class.[ch]: added cast_class to fix bug 29517
13510 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
13512 * marshal.c: create valid IL code in the filter clause:
13513 the new JIT is less forgiving:-)
13515 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13517 * icall.c: removed get_property internal call.
13519 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
13521 * appdomain.h domain.c: Added an ID to appdomains.
13523 * threads.c threads.h icall.c: Implement icall
13524 Thread:GetDomainID(), and remove unused icall
13525 CurrentThreadDomain_internal.
13527 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13529 * icall.c: Don't recurse through the base types in GetConstructor.
13532 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
13534 * mempool.h, mempool.c: added mono_mempool_empty() and
13535 mono_mempool_stats().
13537 2002-10-23 Dick Porter <dick@ximian.com>
13541 * icall.c: Added MonoIO.GetFileType internal call
13543 2002-10-17 Dick Porter <dick@ximian.com>
13545 * appdomain.c (mono_runtime_cleanup): Don't signal the async
13546 delegate semaphore before waiting for all threads to finish,
13547 because new threads can also call async delegates. Fixes bug
13550 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
13551 of 3 seconds, in case another async job is queued. (This part is
13552 needed because the bug fix reintroduced the 3s exit lag.) This
13553 makes the mono_runtime_shutdown flag superfluous.
13555 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
13557 * reflection.c: include ehader size in method section headers.
13558 Really check for suplicated modules entries.
13560 2002-10-17 Martin Baulig <martin@gnome.org>
13562 * debug-mono-symfile.c: Added back support for locals.
13564 2002-10-14 Martin Baulig <martin@gnome.org>
13566 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
13569 2002-10-14 Martin Baulig <martin@gnome.org>
13571 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
13572 mono_class_get() instead of looking in the class cache.
13574 2002-10-13 Martin Baulig <martin@gnome.org>
13576 * debug-mono-symfile.c: Set version number to 28, include the
13577 signature in method names.
13579 2002-10-13 Martin Baulig <martin@gnome.org>
13581 * debug-mono-symfile.h: Set version number to 27.
13583 2002-10-11 Martin Baulig <martin@gnome.org>
13585 * gc.c: Don't register/unregister NULL pointers as disappearing links.
13587 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
13589 * metadata.c, metadata.h: added helper function to allocate signatures.
13591 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13593 * icall.c: added internal call to get the location of machine.config.
13595 2002-10-08 Martin Baulig <martin@gnome.org>
13597 * debug-mono-symfile.c: Ignore classes with a pending init for the
13600 2002-10-03 Dick Porter <dick@ximian.com>
13602 * threads.c: Freebsd pthread_t is a pointer
13604 2002-10-03 Dick Porter <dick@ximian.com>
13606 * socket-io.c: Implemented GetHostName_internal
13608 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13611 (mono_config_parse_file): don't leak the text.
13613 2002-10-02 Martin Baulig <martin@gnome.org>
13615 * debug-mono-symfile.c: Added support for methods.
13617 2002-10-01 Martin Baulig <martin@gnome.org>
13619 * debug-mono-symfile.c: Don't emit methods and line numbers for
13620 the dynamic symbol file, just write the type table. We can easily
13621 have an external helper program which creates a symbol file for an
13624 2002-10-01 Dick Porter <dick@ximian.com>
13626 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
13627 Only add the handle to the cleanup array when we're about to
13628 launch the thread. Bug 31425 deadlocked when the test was run on
13631 2002-10-01 Martin Baulig <martin@gnome.org>
13633 * debug-mono-symfile.c: Added support for properties.
13635 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
13637 * reflection.c: unaligned store fix from Mark Crichton
13638 <crichton@gimp.org>.
13640 2002-09-27 Martin Baulig <martin@gnome.org>
13642 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
13645 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
13647 * assembly.h, assembly.c: use a sane API to hook into the assembly
13648 loading process instead of a useless special-purpouse hack
13649 (ngen needs a hook, too, for example).
13651 2002-09-27 Dick Porter <dick@ximian.com>
13653 * threads.c (mono_thread_init): Call GetCurrentProcess() so
13654 io-layer can set up some process handle info. Not needed on w32,
13655 but doesn't hurt either.
13657 * process.c: Pass the program name in the second parameter to
13658 CreateProcess, so the path is searched. Include the working
13659 directory. Implemented process name, process enumeration, and some
13660 process detail internal calls.
13662 * icall.c: Added internal calls for process lookup, and some
13665 2002-09-26 Martin Baulig <martin@gnome.org>
13667 * assembly.c (mono_install_open_assembly_hook): New global
13668 function to install a function to be invoked each time a new
13669 assembly is loaded.
13670 (mono_assembly_open): Run this callback function if set.
13672 * debug-mono-symfile.c: Put back line numbers for the dynamic
13673 symbol file and also record the .il file as source file. This
13674 allows us to install the temporary symbol file as `file.dbg' just
13675 like a compiler-generated one.
13677 2002-09-26 Nick Zigarovich <nick@chemlab.org>
13679 * Corrected typo in gc.c (BOHEM vs BOEHM).
13681 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13683 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
13684 GetProperties. Also avoid calling g_slist_length in GetProperties and
13687 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13689 * reflection.c: avoid unaligned stores (bug spotted by
13690 Mark Crichton <crichton@gimp.org>).
13692 2002-09-25 Martin Baulig <martin@gnome.org>
13694 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
13695 instead of guint64 for addresses and added prologue/epilogue info.
13697 2002-09-25 Martin Baulig <martin@gnome.org>
13699 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
13700 store line number info. For the dynamic symbol file, we only need
13701 to provide the JIT generated dynamic line number info for the dynamic
13704 2002-09-25 Martin Baulig <martin@gnome.org>
13706 * debug-mono-symfile.h: Incremented version number.
13708 2002-09-24 Martin Baulig <martin@gnome.org>
13710 * class.c (mono_debugger_class_init_func): New global function
13712 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
13715 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
13716 function. This is called via the mono_debugger_class_init_func
13717 hook to add all types to the dynamic type table.
13718 (ves_icall_MonoDebugger_GetType): New interncall to get a class
13719 from its metadata token.
13721 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
13722 New interncall for the debugger.
13724 2002-09-24 Nick Drochak <ndrochak@gol.com>
13726 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
13727 before using it in case it is null.
13729 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13731 * metadata.c: allow custom modifiers in local var signatures
13732 (bug spotted by Zoltan Varga).
13734 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
13736 * class.c: deal with the <Module> class that may have a NULL vtable.
13737 Eliminate warnings.
13739 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13741 * image.c, image.h: more strong name helpers.
13742 * monosn.c: more work: convert pem keys to cryptoapi format.
13744 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13746 * string-icalls.c: speedup IndexOf.
13748 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13750 * icall.c: updates from Zoltan.2.Varga@nokia.com.
13752 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13754 * icall.c: cleanup: use mono_object_domain ().
13756 2002-09-23 Martin Baulig <martin@gnome.org>
13758 * debug-mono-symfile.c: Improved type support.
13760 2002-09-22 Martin Baulig <martin@gnome.org>
13762 * debug-mono-symfile.c: Added support for reference types and strings.
13764 2002-09-22 Martin Baulig <martin@gnome.org>
13766 * debug-mono-symfile.c: Started to work on the type table.
13768 2002-09-21 Martin Baulig <martin@gnome.org>
13770 * debug-mono-symfile.c: Largely reworked the symbol table format.
13771 The symbol table is now incrementally updated each time a new
13772 method is added. We're now also using our own magic and version
13773 so that you don't need to recompile all your classes if the
13774 dynamic table changes.
13775 (mono_debug_update_mono_symbol_file): Removed.
13776 (mono_debug_symfile_add_method): New function to add a method.
13778 2002-09-21 Martin Baulig <martin@gnome.org>
13781 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
13784 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
13785 New interncall to get a method from its metadata token.
13787 2002-09-21 Martin Baulig <martin@gnome.org>
13789 * debug-mono-symfile.c: Create type table.
13791 2002-09-20 Martin Baulig <martin@gnome.org>
13793 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
13795 2002-09-20 Martin Baulig <martin@gnome.org>
13797 * debug-mono-symfile.c: Provide information about params and locals.
13799 2002-09-20 Martin Baulig <martin@gnome.org>
13801 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
13804 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
13805 interncall to get a method from its metadata token.
13807 2002-09-20 Martin Baulig <martin@gnome.org>
13809 * debug-mono-symfile.c: Added a few checks for method->header
13810 being non-NULL. This should never happen, but for the moment
13811 let's use a g_warning() rather than a g_assert().
13813 2002-09-19 Mark Crichton <crichton@gimp.org>
13815 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
13816 even if support for it isn't present. Added an #ifdef to fix this.
13818 * socket-io.c: Added checks back for Solaris support.
13820 2002-09-19 Martin Baulig <martin@gnome.org>
13822 * debug-mono-symfile.c (read_string, write_string): Reflect latest
13823 changes in the symbol file format.
13825 2002-09-18 Martin Baulig <martin@gnome.org>
13827 * debug-mono-symfile.c: Set version number to 21.
13829 2002-09-18 Dick Porter <dick@ximian.com>
13831 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
13832 on netbsd. Fixes bug 30051.
13834 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13837 (set_version_from_string): little fix.
13839 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13841 * monosn.c, Makefile.am: added strong name utility.
13842 * reflection.h, reflection.c: implemented delayed signing,
13843 locale, version and hash id assembly attributes.
13845 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13847 * loader.c, metadata.c: load param attributes in signatures.
13849 2002-09-16 Martin Baulig <martin@gnome.org>
13851 * debug-mono-symfile.c: Added string table with all method names.
13853 2002-09-14 Martin Baulig <martin@gnome.org>
13855 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
13856 fast method lookup.
13858 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13860 * reflection.c: record the public key token of referenced assemblies.
13862 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13864 * image.c, image.h: added functions to get the strong name and the
13865 public key of an assembly.
13866 * pedump.c: use them.
13868 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
13870 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
13872 2002-09-12 Miguel de Icaza <miguel@ximian.com>
13874 * marshal.c (mono_marshal_get_managed_wrapper): Added
13877 2002-09-11 Martin Baulig <martin@gnome.org>
13879 * gc.c: Call GC_unregister_disappearing_link() on all links when
13880 finalizing them, this is necessary to aviod a crash in boehm's
13883 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13885 * gc.c: handle GetTarget for finalized objects spotted and fixed by
13888 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
13890 * icall.c: implemented MonoType::Module.
13891 * reflection.c, reflection.h: mono_module_get_object () from
13892 Tomi Pakarinen <tomi.pakarinen@welho.com>.
13894 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
13896 * icall.c: ignore overridden methods in GetMethods ().
13897 Fix for FieldInfo::SetValue().
13898 * object.c: handle float/double in runtime invoke.
13900 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13902 * object.c: allow a constructor to be called again on an object.
13904 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13906 * class.h, class.c: move field layout code to it's own function and
13907 export it. Get an interface id earlier. Move fields in MonoClass
13908 so they are more cache friendly and align the bitfields.
13909 * loader.c: temporary handle get_param_names() for a runtime method.
13910 * reflection.c, reflection.h: more code to handle runtime creation of
13913 2002-09-09 Martin Baulig <martin@gnome.org>
13915 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
13916 signature with the pinvoke field being set for the actual call.
13918 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13920 * icall.c: removed some unused icalls. Start of map of glib charsets
13921 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
13923 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
13925 * debug-helpers.c: break infinite loop (found and fixed by
13926 Holger Arnold <harnold@gmx.de>).
13928 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13930 * icall.c: target may be null in create_delegate.
13932 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13934 * marshal.c: handle a boolean return type.
13936 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13938 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
13940 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
13942 * gc.c: fix weakreferences.
13944 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
13946 * icall.c: added icall to get default codepage.
13948 2002-09-03 Dick Porter <dick@ximian.com>
13951 * threads.c: Use MonoThread instead of MonoObject where
13954 Store running thread objects in a hash table, so that we have all
13955 the info to hand when waiting for them to finish
13956 (means we don't need OpenThread() any more, so mingw builds should
13957 be fully functional again.)
13960 * object.h: Added thread ID to MonoThread
13962 2002-09-03 Martin Baulig <martin@gnome.org>
13964 * icall.c (System.Reflection.Assembly::get_location): New interncall.
13966 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13968 * icall.c: fixed leak in get_temp_path. Thanks lupus.
13970 2002-09-03 Martin Baulig <martin@gnome.org>
13972 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
13973 argument to store the end address of the disassembled instruction.
13975 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
13976 here from debug-symfile.h.
13977 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
13978 JIT into this struct.
13979 (MonoSymbolFile): Added `char *image_file' field.
13980 (MonoDebugGetMethodFunc): Removed.
13981 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
13982 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
13983 (mono_debug_find_method): New method.
13985 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
13986 create a full symbol file.
13987 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
13988 and static symbol files.
13989 (mono_debug_find_method): The symbol file keeps an internal method hash,
13990 call this to get a MonoDebugMethodInfo from a MonoMethod.
13992 * debug-symfile.[ch]: Removed.
13994 2002-08-29 Miguel de Icaza <miguel@ximian.com>
13996 * image.c (do_mono_image_open): Remove linker version check.
13998 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
14000 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
14001 wrappers for instance methods.
14003 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14005 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
14007 2002-08-28 Dick Porter <dick@ximian.com>
14009 * Makefile.am: Export HOST_CC for w32 builds
14011 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14013 * file-io.c process.c: MonoString are null terminated, no
14014 need for mono_string_to_utf16() anymore.
14016 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14018 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
14020 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
14022 * icall.c, reflection.h: speedup System.MonoType.
14024 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14026 * reflection.c: allow null as the value of a string argument in
14027 custom attributes constructors.
14029 2002-08-27 Martin Baulig <martin@gnome.org>
14031 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
14032 `trampoline_address' field.
14034 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
14036 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
14037 check (fixes bug #29486)
14039 2002-08-27 Martin Baulig <martin@gnome.org>
14041 * debug-mono-symfile.c: Changed the file format in a way that allows us
14042 open it read-only and to use a specially malloced area for all the
14043 dynamic data. We can now also generate a symbol file on-the-fly if we're
14044 debugging IL code and there is no MCS generated symbol file for it.
14046 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14048 * object.c: added a define for a good string and array
14049 creation speedup (not enabled by default because we need to deal with
14052 2002-08-26 Martin Baulig <martin@gnome.org>
14054 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
14055 function to create a dynamic symbol file. This is used by the
14056 debugger to create a symbol file for IL code on-the-fly.
14058 2002-08-26 Martin Baulig <martin@gnome.org>
14060 * loader.c (mono_lookup_pinvoke_call): Include the error message
14061 from g_module_error() in the error message.
14063 2002-08-24 Martin Baulig <martin@gnome.org>
14065 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
14066 function to update the symbol file. The symbol file is mmap()ed
14067 writable, but private. This allows us to install the symbol file
14068 together with the assembly.
14070 2002-08-24 Martin Baulig <martin@gnome.org>
14072 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
14073 but they can read the new symbol file format which mcs is now creating.
14075 * debug-symfile.c (mono_debug_find_source_location): Moved to
14076 debug-mono-symfile.c; this is now operating on the new symbol file.
14078 2002-08-23 Martin Baulig <martin@gnome.org>
14080 * debug-helpers.c (mono_method_desc_from_method): New function to get
14081 a MonoMethodDesc from a MonoMethod.
14083 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14085 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
14086 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
14088 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
14090 * string-icalls.[ch]: make helper methods static.
14092 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14094 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
14095 types to it and to SetValueInternal.
14097 * object.c: Moved handle_enum label to its proper place. This was the
14100 This time i compiled mcs and gtk-sharp and they both work.
14102 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14104 * icall.c: reverted partially my previous patch until
14105 object.c:set_value handles enums correcly.
14107 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14110 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
14111 (ves_icall_System_Environment_get_MachineName): removed warning when
14112 compiling under cygwin.
14114 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14116 * object.c: fixed field_get_value() for reference types.
14118 2002-08-22 Dick Porter <dick@ximian.com>
14120 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
14121 Don't free a buffer while it's still needed. Patch from Jonathan
14122 Liger <Jonathan.liger@wanadoo.fr>
14124 2002-08-21 Miguel de Icaza <miguel@ximian.com>
14126 * icall.c (ves_icall_System_Environment_get_Platform): Add new
14129 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
14131 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
14132 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
14134 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
14135 we call unmanaged code which throws exceptions.
14137 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14139 * appdomain.h: added per-domain entry_assembly.
14140 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
14142 * icall.c: Assembly::GetEntryAssembly icall.
14143 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
14144 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
14146 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14148 * appdomain.h, gc.c: added mono_domain_finalize ().
14150 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14153 (mono_print_unhandled_exception): changed g_warning by g_printerr
14154 because g_log has a 1024 characters limit (yeah, i got a big stack
14155 trace). Don't print exception name, that should be in ToString
14158 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14160 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
14161 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
14163 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14166 (mono_print_unhandled_exception): after previous commit, i realized
14167 that MS calls ToString on the exception. I changed this function to
14168 do that. This way we get stack_trace for free.
14170 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14173 (mono_print_unhandled_exception): invoke Message property instead of
14174 getting 'message' field from Exception. Don't allocate memory for
14175 'trace' and 'message' if not needed.
14177 2002-08-18 Dick Porter <dick@ximian.com>
14179 * unicode.c: Fix asserts to match Encoder.cs checks
14181 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14183 * marshal.c: fix unaligned store issue and a few wrong
14184 opcode argument types.
14186 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14188 * icall.c: added GetUninitializedObjectInternal internal call.
14190 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
14192 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
14193 to the right domain.
14195 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
14197 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
14199 * class.c (class_compute_field_layout): set blittable to false for Strings
14201 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
14203 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14205 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
14206 first chunk of code to create types at runtime. Code to
14207 handle ReflectedType/DeclaringType. Make reflection handles
14210 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
14212 * class.c: set correct name in arrays.
14214 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
14216 * appdomain.c (mono_domain_transfer_object): make it work with
14217 valuetypes. bug fixes.
14219 2002-08-12 Dick Porter <dick@ximian.com>
14221 * object.h: Rename some parameters to avoid c++ keywords (Patch
14222 from Joseph Wenninger <kde@jowenn.at>)
14224 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
14226 * icall.c: added icall to implement Assembly.GetFile*.
14228 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14230 * reflection.h, reflection.c: code to embed managed resources.
14232 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14234 * class.c: move all the type size stuff into
14235 class_compute_field_layout().
14237 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14239 * class.c: ensure enums have always the correct instance size.
14240 * unicode.c: remove wrong assert.
14242 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14244 * assembly.c: fix mem corruption issue.
14245 * image.h, image.c: added mono_image_get_resource () to access
14247 * icall.c: implemented Assembly.EntryPoint property and some
14248 Managed Resources related internalcalls.
14251 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14253 * image.c, image.h: impemented mono_image_get_entry_point ().
14254 * appdomain.c: use mono_image_get_entry_point.
14256 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14258 * reflection.c: support the object type argument when loading
14261 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
14263 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
14264 String as return type.
14266 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
14268 * reflection.c: fix encoding of named args for custom attrs to match
14269 the ms implementation. Read them back when instantiating custom
14272 2002-08-02 Radek Doulik <rodo@ximian.com>
14274 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
14275 by Dietmar as quick fix
14276 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
14277 16 as stack size, used on more places as quick fix before Dietmar
14278 will fix it properly
14280 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14282 * object.h, object.c: added accessors for fields and properties.
14284 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14286 * class.c, class.h: made mono_class_get_field_from_name ()
14287 loop on parent types.
14288 Added mono_class_get_property_from_name ().
14290 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14292 * class.c, class.h: move the code to setup the type vtable in its own
14293 function so that it can be reused also for types created at runtime.
14294 Eliminate the "class" identifier from the header file.
14295 * reflection.c: setup the vtable for enums so that we can create
14296 objects for use in SetConstant ().
14298 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
14300 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
14301 instead of the delegate itself as this pointer (bug #28383)
14303 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
14305 * marshal.c (mono_marshal_get_managed_wrapper): added return type
14308 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14310 * loader.c: don't set the pinvoke bit on icalls.
14312 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
14314 * debug-helpers.c (mono_method_full_name): only print a number to
14315 indicate wrapper type (so that the output is more readable in traces).
14317 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
14319 * class.c (mono_class_init): include method override patch from Paolo
14321 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
14323 * icall.c: fixed GetTypeCode().
14325 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
14327 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
14328 use real delegate invoke function to make it work with multicast
14329 delegates (fix bug# 28291).
14331 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14333 * object.c: load constant strings.
14335 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14337 * reflection.c: no magic numbers.
14338 * tabledefs.h: security action enum.
14340 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14342 * assembly.c: fix possible memory corruption.
14344 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14346 * reflection.h, reflection.c: added support for linking resources.
14347 * verify.c: check we have an updated corlib.
14349 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
14351 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
14353 (mono_marshal_string_array): null terminate unmanaged string arrays.
14354 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
14356 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14358 * icall.c: Type.GetType () can now return also types from the
14361 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
14363 * loader.h, loader.c: stack walking support.
14364 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
14365 GetCallingAssembly.
14367 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
14369 * marshal.c: added optimisations for blittable types
14371 * class.c (mono_array_class_get): do not set blittable attribute on arrays
14372 (mono_class_setup_mono_type): set blittable attribute for single
14375 * marshal.c (mono_string_utf8_to_builder): impl.
14376 (mono_string_builder_to_utf8): impl.
14377 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
14379 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
14381 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
14382 (mono_marshal_get_managed_wrapper): impl. byref types
14384 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14387 (search_method): don't display debug message.
14389 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
14391 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
14393 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
14395 * appdomain.c: set the missing filename when throwing exception.
14397 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
14399 * metadata.c (mono_type_size): code cleanup
14400 (mono_type_stack_size): removed some test code
14402 2002-07-21 Miguel de Icaza <miguel@ximian.com>
14404 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
14405 mono_get_exception_file_not_found now.
14407 * exception.c (mono_exception_from_name_two_strings): New version
14408 that will call a constructor with two string arguments.
14409 (mono_get_exception_file_not_found): New helper routine, used to
14410 report file-not-found errors.
14412 2002-07-20 Dick Porter <dick@ximian.com>
14415 * process.c: Pass file handles to CreateProcess
14419 * file-io.c: Implemented CreatePipe
14421 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
14423 * metadata.c (mono_get_param_info): set alignment for value types
14425 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14427 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
14428 Constify mono_domain_assembly_open().
14429 * loader.c: handle null namespace in icalls.
14431 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
14433 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
14434 (emit_str_to_ptr_conv): marshal object as structs
14436 * metadata.c (mono_type_to_unmanaged): marshal object as structs
14438 * marshal.c (mono_marshal_get_runtime_invoke): support value types
14440 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
14442 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
14443 (mono_marshal_get_native_wrapper): we an now return value types
14445 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14447 * verify.c: more checks implemented.
14449 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
14451 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
14453 (mono_marshal_get_native_wrapper): allow byref arguments
14454 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
14455 impl. PtrToStringXXX methods
14456 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
14457 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
14458 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
14459 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
14460 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
14462 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14464 * reflection.c: fix buglet in parsing an assembly name.
14466 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
14468 * marshal.c (emit_ptr_to_str_conv): first impl.
14470 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14472 * object.c, class.h: cache the vtable in the class as suggested by
14473 vargaz@freemail.hu (Zoltan Varga).
14475 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14477 * class.h, loader.c: added mono_field_from_token().
14478 * verify.c: first cut of type checking code.
14480 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
14482 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
14484 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
14486 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
14488 (mono_marshal_get_remoting_invoke): impl.
14489 (mono_delegate_begin_invoke): impl.
14490 (mono_mb_emit_save_args): impl.
14491 (mono_delegate_end_invoke): impl.
14492 (mono_marshal_get_delegate_begin_invoke):
14493 (mono_marshal_get_delegate_end_invoke):
14494 (mono_marshal_get_delegate_invoke): generate a special name for
14495 those methods (including the signature) and associate them whith
14496 the delegate class.
14498 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
14501 (mono_reflection_type_from_name): now it has a MonoImage parameter
14502 which is used as the default image to search the type in. If the image
14503 is NULL or getting the type from it fails, it defaults to corlib.
14505 * icall.c: changed 1 call to mono_reflection_type_from_name to match
14508 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14510 * reflection.c: update the parameter table index.
14512 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14514 * domain.c: don't include the mark byte in the string hash.
14516 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14518 * icall.cs: icall for Type.GetTypeCode ().
14519 * verify: a couple of fixes and disabled local initialization checks.
14521 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
14523 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
14525 * debug-helpers.c (mono_method_full_name): print the type of the
14528 * metadata.c (mono_signature_hash): a hash function for signatures
14529 (mono_signature_hash): better hash algorithm
14531 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
14533 * debug-helpers.c (mono_method_full_name): this can now generate
14534 method names with signatures
14536 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
14537 method dont have this pointers.
14539 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14541 * reflection.c: fixup typebuilder tokens.
14542 * image.c: fix buglet.
14543 * marshal.h: remove whitespace.
14544 * metadata.h, metadata.c: reinstate code that was removed.
14545 * verify.c: handle catch directives and fix another couple of bugs.
14547 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
14549 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
14550 (mono_marshal_get_native_wrapper): make it comp. with the old code
14551 (mono_marshal_get_native_wrapper): support boolean
14552 (mono_marshal_get_managed_wrapper): support more types
14554 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
14556 * class.c (class_compute_field_layout): compute class->blittable attribute.
14558 2002-07-09 Dick Porter <dick@ximian.com>
14560 * threads.c: Make the thread cleaning up cope with threads that
14563 2002-07-08 Radek Doulik <rodo@ximian.com>
14565 * reflection.c (method_encode_code): use non-translated values to
14566 compute finally_start, this fixes exception handling on ppc, yay!
14568 * decimal.h (struct signscale): fix endianess
14570 2002-07-07 Radek Doulik <rodo@ximian.com>
14572 * reflection.c: swap box_val and not val
14574 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
14576 * reflection.c, reflection.h: handle full assembly info in type name.
14577 Handle Type arguments when loading custom attributes.
14578 * icall.c: updated to use new mono_reflection_type_from_name () method.
14580 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14583 (method_from_memberref): also print assembly name when method not found.
14585 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14588 (ves_icall_TypeGetProperties): fixed bug #27473.
14590 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14592 * reflection.c: display image name and token when cannot find the
14593 .ctor for an attribute.
14595 2002-07-05 Martin Baulig <martin@gnome.org>
14597 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
14599 2002-07-04 Dick Porter <dick@ximian.com>
14601 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
14602 compile on mingw. This will cause mingw builds to not wait for
14603 subthreads to terminate after the main thread does. I've lodged a
14604 bug with the mingw developers for them to wrap OpenThread().
14606 2002-07-03 Dick Porter <dick@ximian.com>
14608 * threads.c: Store thread IDs instead of handles, because
14609 GetCurrentThread() returns a pseudohandle and therefore stores
14610 useless values. mono_thread_cleanup() continues checking the
14611 array of threads until it is empty, to cope with subthreads
14612 spawning new threads after the main thread has finished.
14616 * profiler-private.h: Pass the thread ID to thread profiler
14617 functions, instead of a handle
14619 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14621 * verify.c: fixes to make it more usable.
14622 * pedump.c: added --verify code to verify IL code in an assembly.
14624 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14626 * reflection.c: turn errors into warnings to allow compiling corlib.
14628 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
14630 * reflection.c: add special cases to compile corlib.
14632 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14634 * reflection.c: handle properties with only a set method.
14636 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14638 * opcodes.h: add enum with opcodes in opval order.
14640 2002-07-01 Dick Porter <dick@ximian.com>
14643 * object.c (mono_runtime_run_main): Removed unneeded argument
14645 2002-06-28 Martin Baulig <martin@gnome.org>
14647 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
14649 2002-06-27 Dick Porter <dick@ximian.com>
14651 * threads.c: Store the handle in both the parent thread and in the
14652 subthread, to minimise the time between starting a new thread and
14655 2002-06-26 Dick Porter <dick@ximian.com>
14657 * appdomain.c (mono_runtime_cleanup): Close the socket library
14658 after all the threads have finished, not before
14660 2002-06-26 Martin Baulig <martin@gnome.org>
14662 * debug-symfile.c (mono_debug_find_source_location): Added
14663 `guint32 *line_number' argument. If it's not NULL, store the line number
14664 there and return the file name without the line number.
14666 2002-06-25 Dick Porter <dick@ximian.com>
14670 * process.c: Process forking and other support functions
14672 2002-06-25 Dick Porter <dick@ximian.com>
14674 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
14675 things dont happen when the image is closed.
14676 (mono_image_lookup_resource): Walk the resource section looking
14677 for a particular entry
14679 * cil-coff.h: PE resource section decoding
14681 2002-06-25 Dick Porter <dick@ximian.com>
14685 (mono_assembly_foreach): Accessor functions to walk the list of
14687 (mono_assembly_set_main):
14688 (mono_assembly_get_main): Process methods need to know which
14689 assembly is the "main" one
14691 * object.c (mono_runtime_run_main): Record the main assembly
14693 * debug-helpers.c: Fix typo
14695 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
14697 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
14698 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
14700 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
14702 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
14704 2002-06-21 Miguel de Icaza <miguel@ximian.com>
14706 * image.c (do_mono_image_open): Initialize reference count,
14707 otherwise we leak the MonoImage.
14709 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
14711 * reflection.c: small tweak to handle self-hosting.
14713 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14715 * reflection.c: fix type name parse code.
14717 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14719 * reflection.c: break out of the loop.
14720 * image.c: special case corlib.
14722 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14724 * reflection.c: add all the custom attrs at the end to ensure the
14725 ctors have been properly initialized when the attributes are defined
14726 in the current assembly.
14728 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14730 * reflection.c: handle correctly multiple-nested types.
14732 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
14734 * row-indexes.h: fix typos.
14735 * reflection.c: adjust for typos and fix method_def_or_ref
14736 encoding in MethodImpl table.
14738 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14740 * reflection.c: fix entry point patching (thanks Serge!).
14742 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
14744 * verify.c: add check for System.Exception
14746 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14748 * image.c, class.c: minifix for code just c&p'ed.
14749 * reflection.c: warning fix.
14750 * object.h, loader.h, domain.c: load also StringBuilder.
14752 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14754 * marshal.h, marshal.c: some support code to handle complex marshaling.
14756 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14758 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
14759 Better signatures with vtable error dump.
14761 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
14763 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
14765 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
14767 * icall.c (ves_icall_Type_GetField): impl.
14769 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14771 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
14772 to retrieve a marshal description blob for a field or param.
14774 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14776 * reflection.h, reflection.c: change order of nested type emission
14777 to avoid table corruption. The NestedTypes table is sorted.
14778 * icall.c: change order of GetConstructor results to workaround mcs bug.
14780 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14782 * reflection.h, reflection.c: handle field and param marshal
14785 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14787 * icall.c, marshal.c marshal.h: more Marshal class implementation.
14789 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14791 * reflection.c: fix call convention.
14793 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14795 * reflection.h, reflection.c: mono_image_get_memberref_token()
14796 takes a type instead of a class, now. Added
14797 mono_image_get_array_token() to create tokens for the special
14798 multi-dim array methods.
14800 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14802 * assembly.c: handle modules (no assembly table). Split
14803 loading references in its own function.
14804 * class.c: handle moduleref resolution scope.
14805 * image.c, image.h: cache module name in image.
14807 2002-06-07 Martin Baulig <martin@gnome.org>
14809 * reflection.c (mono_image_get_type_info): Only add a class layout entry
14810 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
14812 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
14814 * icall.c: more signature fixes that used uint instead of int.
14816 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14818 * reflection.c: fixed signature of field refs.
14820 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14822 * class.c, reflection.c: handle typerefs of nested types
14823 (both on read and when writing files).
14825 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
14827 * icall.c: fix method signatures that tried to workaround the previous
14830 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14832 * debug-helpers.c: fix typo.
14834 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14836 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
14837 rewrote the PE/COFF writing code (our programs are understood by the
14840 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
14842 * gc.c, gc.h, icall.c: weakreference support.
14844 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14846 * Makefile.am, mono-config.c: use $(sysconfdir).
14848 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14850 * icall.c: changed default precision of Double.ToString() to 15.
14851 Fixed memory leak. Unified with Single.ToString.
14853 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
14855 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
14857 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14859 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
14860 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
14861 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
14864 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14866 * debug-symfile.c, sysmath.c: yet more compilation fixes.
14868 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14870 * reflection.c, socket-io.c: more compilation fixes.
14872 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14874 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
14875 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
14876 unicode.c: warning and compiler compatibility fixes.
14878 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14880 * class.h, metadata.c: fixed warnings/compilation errors.
14882 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
14884 * Makefile.am, mono-config.c, mono-config.h: configuration file
14886 * loader.c, loader.h: make Dll mapping configurable at runtime in the
14887 config file. Export methods to insert and lookup mappings.
14889 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14891 * reflection.c: handle types and boxed objects in custom attr
14894 2002-05-30 Martin Baulig <martin@gnome.org>
14897 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
14899 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
14901 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
14902 to lookup the implmap row for a P/Invoke method.
14903 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
14904 P/Invoke method from the runtime on an as needed basis.
14906 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
14908 * metadata.c (mono_metadata_parse_signature): impl.
14910 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14912 * class.c: handle .pack directive.
14914 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14916 * object.c: initialize static fields with RVA data.
14918 2002-05-25 Martin Baulig <martin@gnome.org>
14921 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
14923 2002-05-24 Martin Baulig <martin@gnome.org>
14926 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
14927 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
14928 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
14930 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14932 * object.c: special case string ctros in invoke.
14933 * gc.c: silly whitespace changes.
14935 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
14937 * threadpool.[ch]: impl. a threadpool that can
14938 be used by mint and mono.
14940 2002-05-22 Martin Baulig <martin@gnome.org>
14942 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
14943 The first argument is now a `MonoReflectionModuleBuilder *', the return
14944 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
14945 `methods' field to get the method builder. The `token' argument is the
14948 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
14949 invalid characters instead of g_assert_not_reached()ing. This seems
14950 to be the behaviour of mscorlib.
14952 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
14954 * object.c (mono_runtime_invoke_array): applied patch from Rachel
14955 Hestilow to fix bug #25104
14957 2002-05-21 Martin Baulig <martin@gnome.org>
14959 * debug-symfile.c (mono_debug_find_source_location): New function.
14960 Looks up an IL offset in the line number table and returns the source
14961 location as a string.
14963 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14966 (mono_double_ToStringImpl): changed %f by %g until we have something
14969 2002-05-21 Nick Drochak <ndrochak@gol.com>
14971 * icall.c : Use different name for Math.Pow's icall. Needed to check
14972 parameters first in C#.
14974 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14976 * icall.c, reflection.h: added icall to get info about an event.
14978 2002-05-20 Radek Doulik <rodo@ximian.com>
14980 * object.c (mono_value_box): don't use memcpy for boxing on BIG
14982 (mono_value_box): don't use memcpy for small sizes on
14983 architectures with unaligned access
14985 2002-05-20 Martin Baulig <martin@gnome.org>
14987 * reflection.c (mono_reflection_setup_internal_class): Don't crash
14988 if `tb->parent == NULL'.
14989 (mono_reflection_create_internal_class): New function. This is
14990 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
14993 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
14996 2002-05-19 Martin Baulig <martin@gnome.org>
14998 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
14999 argument to get the length, don't default to the array length.
15001 2002-05-18 Miguel de Icaza <miguel@ximian.com>
15003 * assembly.c (mono_assembly_setrootdir): New function used to
15004 override the MONO_ASSEMBLIES directory.
15006 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15008 * icall.c: ValueType_GetHashCode() initialize local var.
15010 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15012 * reflection.c: sort custom attributes table.
15014 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15016 * reflection.c: support named args in custom attributes (write support).
15018 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
15020 * reflection.c: fix finally position calculation.
15022 2002-05-15 Radek Doulik <rodo@ximian.com>
15024 * reflection.c: fixed endianess at many places
15026 * icall.c (ves_icall_InitializeArray): comment out debug msg
15028 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
15030 * object.c (mono_unhandled_exception): new function to handle
15031 unhandled exceptions.
15032 (mono_unhandled_exception): call the UnhandledException event.
15033 (mono_runtime_delegate_invoke): impl.
15035 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
15037 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
15038 returns the RVA, not the direct pointer to the data. Handle the case
15039 when the class size is fixed.
15041 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15043 * reflection.c: fix some endianess issues.
15045 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
15047 * object.c (mono_runtime_invoke): is now able to catch exceptions.
15049 * threads.c (mono_thread_init): added a callback which is invoked
15052 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
15054 * icall.c: make GetHashCode return non-negative values.
15056 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
15058 * object.c, icall.c, gc.c: revert to address-based hashcode.
15060 2002-05-13 Miguel de Icaza <miguel@ximian.com>
15062 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
15064 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15066 * icall.c, class.c: special case <Module>.
15068 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
15070 * icall.c: fix bug in GetNow().
15072 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
15074 * object.c (mono_runtime_class_init): make sure that we call all
15075 static class constructors.
15077 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15079 * reflection.c: sort methodsemantics table.
15081 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15083 * reflection.h, reflection.c: honour init locals setting.
15085 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
15087 * icall.c: copied Double ToStringImpl for Single ToStringImpl
15089 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15091 * reflection.c: support ContructorBuilders in attribute blob creation.
15093 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15095 * reflection.c: some changes to build a binary that can be run
15096 directly in windows.
15098 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
15100 * loader.c: print a big message when an icall can't be found.
15102 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15104 * string-icalls.c: fix bug 24248.
15106 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15108 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
15109 icall.c, reflection.h: separate assembly loading by pathname and by
15110 assembly name. Use the MONO_PATH env var to search for assemblies.
15112 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15114 * assembly.c, image.h: add some support for assemblies
15115 with multiple modules.
15116 * class.c, class.h: export mono_class_from_typeref().
15117 * loader.c: remove duplicated code and use mono_class_from_typeref(),
15120 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15122 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
15123 documentation says (the ECMA one is correct).
15125 2002-05-02 Dick Porter <dick@ximian.com>
15127 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
15128 Don't name the synchronisation mutex.
15130 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
15133 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
15134 Make the prototypes match.
15135 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
15139 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
15140 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
15141 all systems have tm.tm_zone, so use strftime() with %Z to print
15142 the timezone abreviation into a temp string.
15144 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
15145 rather than mono_array_addr() on a MonoString on Big Endian
15148 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
15150 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
15153 2002-04-30 Dick Porter <dick@ximian.com>
15155 * socket-io.c: Cope with SOCKET being an integer rather than a
15158 * threads.c: Added Thread_free_internal, to deal with thread
15159 handle cleanup. Moved calls to handle_store() and handle_remove()
15160 to start_wrapper(), so each can only be called once. Allocate
15161 synchronisation blocks with GC_malloc(), and use GC finalisation
15162 to close the handles.
15164 * icall.c: added System.Threading.Thread::Thread_free_internal
15166 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15168 * icall.c: support Environment.Exit, CommandLineArgs().
15170 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15172 * object.c, object.h: added mono_runtime_run_main () and
15173 mono_runtime_get_main_args () for use in System.Environment.
15175 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15177 * gc.c: fix thinko, enable actual finalization since the jit is now
15180 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15182 * gc.c, object.c: take into account that an object may be offset wrt the address
15183 returned by GC_malloc().
15185 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15187 * image.c: handle files without entries in the assembly table (modules).
15189 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
15191 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
15192 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
15193 allowed to be null when it's System.Object class setup.
15195 2002-04-27 Martin Baulig <martin@gnome.org>
15197 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
15198 if `tb->parent == NULL' rather than crashing.
15200 2002-04-28 Nick Drochak <ndrochak@gol.com>
15202 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
15203 calling acos() where asin() should have been called.
15205 2002-04-26 Martin Baulig <martin@gnome.org>
15207 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
15208 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
15209 there's a subdirectory called `System', but we don't want to read that
15210 subdirectory as an assembly.
15212 2002-04-25 Martin Baulig <martin@gnome.org>
15214 * debug-symfile.c: Reflect latest MonoString changes.
15216 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15218 * rand.c, rand.h: instance method icalls need to have an explicit
15219 this pointer as first argument in the C implementation.
15221 2002-04-25 Nick Drochak <ndrochak@gol.com>
15223 * icall.c: Fix typo in map for GetNonZeroBytes
15225 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
15227 * string-icalls.c : String does now passes unit tests without any
15228 errors, the following changes has been made:
15230 Implemented replace methods.
15231 Renaming of methods to (try) follow the standard.
15232 Fixed compare ordinal
15233 Made all memory allocated directly to function instead of via icall function.
15234 Small performance fix in is_in_array function
15236 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
15238 c (mono_string_Internal_ctor_charp_int_int):
15239 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
15240 sindex < 0, throw ArgumentOutOfRangeException instead of
15241 ArgumentNullException.
15243 Added new check for length == 0, however
15244 I need to make it return String.Empty from the C code.
15246 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
15247 that calculate the length for us here.
15249 (mono_string_Internal_ctor_sbytep_int_int): Replaced
15250 mono_string_new_utf16 with mono_string_new, since value is utf8.
15252 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15254 * object.c: register the object for finalization if needed.
15255 Allocate one more char in the string for the terminating 0 char.
15257 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15259 * class.c, class.h, image.c: check if a type implemenst a destructor.
15260 Use the proper key for array class lookups.
15261 * icall.c: register the icalls in the System.GC class.
15262 * gc.c, gc.h: GC-related functions and icalls.
15264 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15268 * unicode.c: free some strings gotten from mono_string_to_utf8 and
15269 changed a couple of free () by g_free ().
15271 * decimal.c: one-liner in the comments for decimal2string ().
15273 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
15275 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
15277 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
15279 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
15280 * object.c (mono_runtime_invoke_array) : handle null in params
15282 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
15284 * string-icalls.c: fixed bug in split (one off bug)
15286 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
15288 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
15289 * icalls.c: added String::Equals as internal method
15291 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
15293 * threads.c: fixed bug in the double interlocked functions
15295 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
15297 * threads.c: implemented all of the new interlocked icalls.
15298 * string-icalls.c: fix a bug in insert.
15299 * icalls.c: added the icalls for interlocked, removed old string functions.
15301 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15303 * loader.c: fix off-by-one error when reading argument names.
15305 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15307 * profiler.c: win32 counter implementation (untested).
15308 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
15309 (the latter needs testing and more complete impl. from win32 folks).
15311 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
15313 * object.c: mono_array_new_full workaround mono_array_class_get
15316 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
15318 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
15319 * object.h (mono_string_chars): Changed casting type.
15321 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
15323 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
15324 method signatures to use gunichar2 instead of gint16.
15326 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
15328 * object.h, object.c: domain-specific versions of mono_object_new and
15331 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
15333 * object.c: changed String layout
15335 * string-icalls.c (mono_string_Internal_ctor_chara): added
15336 internal string constructors.
15338 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
15340 * threads.c: pass 'this' to the thread start routine.
15342 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15344 * string-icalls.c: fix IndexOf and LastIndexOf. Now
15345 InternalCompareStr don't call twice mono_string_cmp_char for the last
15346 character. Improved performance in mono_string_cmp_char.
15348 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15350 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
15351 code into its own library: libmonoruntime.
15353 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
15355 * object.h, object.c: changed array format so that szarrays do not
15356 require a bounds structure.
15357 * icall.c, appdomain.c: support for new szarray format.
15359 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
15361 * metadata.c: compare also the retuns type when comparing signatures:
15362 we didn't do this as an optimization since really overloaded methods
15363 must differ also in the arguments, but this doesn't work with
15364 low-level IL code (or when using explicit conversion operators: see
15365 bug#23498 for an example).
15367 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15369 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
15371 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15373 * icall.c: make MonoType::GetElementType its own icall.
15375 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15377 * icall.c: remove MonoMethod_get_Name().
15378 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
15381 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
15383 * string-icalls.c: optimized a few methods.
15385 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
15387 * icall.c: added all new string internal calls
15388 * string-icalls.c: added, new string internal call implementation.
15389 * object.c: added mono_string_new_size for allocating a string a size
15391 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
15393 * object.c (mono_object_isinst): use the same code as in the
15394 optimized x86 version.
15396 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15398 * profiler.c: TSC-based timer code (faster and more accurate).
15399 Not hooked up in configure, yet (set USE_X86TSC to 1).
15401 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
15403 * profiler.c, profiler.h: track time spent compiling methods.
15404 * threads.c: track thread creation/destruction.
15406 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
15408 * profiler.c, profiler.h, profiler-private.h: profiling interface
15409 and sample implementation. Moved here so that it can be used also by
15412 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
15414 * reflection.c, reflection.h: keep types and other handles separate in
15415 the hash tables for referred tokens. Add guid for modules.
15417 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15419 * assembly.c: fix bugs found with valgrind.
15420 * metadata.h, metadata.c: added mono_metadata_guid_heap().
15422 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
15424 * threads: added icall support for getting current domain for
15427 2002-04-13 Martin Baulig <martin@gnome.org>
15429 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
15430 (MonoDebugVarInfo): Added `index' field for register based addresses.
15431 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
15432 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
15433 `MonoDebugVarInfo *params' and `guint32 this_offset' with
15434 `MonoDebugVarInfo *this_var'.
15436 * debug-symfile.c (relocate_variable): New static function to write
15437 a location description for a local variable or method parameter.
15439 2002-04-12 Martin Baulig <martin@gnome.org>
15441 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
15442 stack offset and begin/end scope address of a local variable.
15443 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
15444 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
15445 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
15447 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
15448 Added new relocation types for start/end scope of a local variable.
15450 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15452 * object.h: add mono_object_domain() macro.
15453 * reflection.c: handle typespecs.
15454 * icall.c: MonoMethod::get_Name() implementation.
15456 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15458 * icall.c: String::GetHashCode() icall implementation.
15460 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15462 * icall.c: String::IndexOfAny icall.
15463 * object.c, object.h: make array->max_length more useful.
15464 Intrduced mono_object_class() and mono_string_length() macros.
15466 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15468 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
15469 instead of g_unichar_isdigit.
15471 2002-04-11 Nick Drochak <ndrochak@gol.com>
15473 * icall.c: Implement a simple Double.ToString().
15475 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15477 * appdomain.h: only io-layer.h is supposed to be included.
15478 * icall.c: explicitly import environ. Fix warning.
15480 2002-04-10 Nick Drochak <ndrochak@gol.com>
15482 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
15483 return true even if it's not Daylight Savings time.
15484 Only return false for the case where the function isn't
15485 implemented for a plaform (read Windows).
15487 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15489 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
15492 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
15494 * mempool.c (mono_mempool_alloc): only use g_malloc when
15495 absolutely necessary.
15497 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
15499 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
15501 * class.c (mono_class_vtable): use domain mempool to allocate vtable
15502 (mono_class_proxy_vtable): use domain mempool
15504 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15506 * appdomain.h, appdomain.c: split initialization that requires the
15507 execution engine support into mono_runtime_init().
15509 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
15511 * class.c (mono_class_init): don't include vtable inside MonoClass
15512 to save some memory, gather some statistics.
15513 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
15515 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15517 * icall.c: internalcall implementation for ValueType.Equals().
15519 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
15521 * object.c (mono_message_init): moved
15522 (mono_runtime_exec_main): new arch. independent impl.
15523 (mono_runtime_invoke_array): new method - like
15524 mono_runtime_invoke, but you can pass an array of objects.
15525 (mono_remoting_invoke): new arch. independent impl.
15526 (mono_message_invoke): new arch. independent impl.
15527 (mono_runtime_class_init): new arch. independent impl.
15528 (mono_runtime_object_init): new arch. independent impl.
15530 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15532 * metadata.c, object.c, reflection.c: documented the exported
15535 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15537 * icall.c: simpler code to pass the assembly builder data to corlib.
15538 Implement GetNestedTypes() internalcall.
15540 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15542 * class.c: warn if a type can't be loaded.
15544 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
15546 * image.h: typedef MonoImageOpenStatus
15547 * types.h: removed unused file
15549 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
15551 * icall.c: Enum_ToObject accepts enum value arguments.
15553 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15555 * class.c: move initialization of properties, events and nested
15556 classes, so that they happen for interfaces, too.
15558 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15560 * icall.c: cleanup some ugly casts in Array_SetValue*.
15562 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15564 * icall.c: the values array fro enums is of the correct type, now.
15565 Implement (correctly) getFullName instead of assQualifiedName for
15567 * reflection.h, reflection.c: added mono_type_get_name ().
15569 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15571 * assembly.c, image.h: for each MonoImage, record from wich assembly
15573 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
15574 Make Type.Assembly work.
15576 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
15578 * debug-symfile.h: use char* instead of gpointer to avoid
15581 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
15583 * icall.c (ves_icall_InternalExecute): impl. FielSetter
15584 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
15586 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
15588 * icall.c (mono_message_init): impl. (code cleanup)
15589 (ves_icall_InternalExecute): impl. FieldGetter
15591 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
15592 defined we call all (non-static)methods through the vtable.
15594 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
15596 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
15597 finalizer even though the memory is still referenced (and the chunk of
15598 memory is not freed).
15600 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
15602 * assembly.c: fix brokeness.
15604 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
15606 * class.c: kill some warnings. Check explicit interface method
15607 implementation also without considering the namespace.
15608 Load also literal strings in static class data.
15610 2002-03-29 Miguel de Icaza <miguel@ximian.com>
15612 * assembly.c (default_assembly_name_resolver): Kill memory leak.
15613 (default_assembly_name_resolver): Make the resolver take the
15614 "base" directory where the assembly was originally defined, so we
15615 can load DLLs that are in the same directory as the assembly that
15616 is being referenced.
15618 2002-03-28 Dick Porter <dick@ximian.com>
15624 * unicode.c: Warning cleanups
15626 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
15628 * object.h, reflection.h: use the correct type instead of MonoObject.
15630 2002-03-28 Martin Baulig <martin@gnome.org>
15632 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
15633 (mono_debug_update_symbol_file): Initialize classes if necessary.
15635 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
15637 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
15638 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
15640 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
15642 * assembly.h: fix function prototype.
15643 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
15644 * mono-endian.h: use const cast.
15646 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
15648 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
15650 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
15652 * loader.c: don't assert when a typeref can't be loaded, give
15653 a chance to the runtime to trow an exception instead.
15654 * loader.h: fix warning.
15656 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
15658 * class.c (mono_class_proxy_vtable): added proxy support
15660 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
15662 * icall.c: removed last of PAL calls, added System.Environment
15663 * file-io.h, file-io.c: MonoIO implementation
15664 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
15666 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
15668 * appdomain.c: do not use the byte marker in ldstr table lookup.
15669 * debug-helpers.c: allow two ':' to separate class and method name.
15670 * object.c: allocate arrays bounds with the GC, too.
15671 * verify: add a few more checks.
15673 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
15675 * reflection.c: output also literal strings. Allocate parameter data
15676 with GC_malloc() (thanks, Martin, for catching this!).
15678 2002-03-26 Martin Baulig <martin@gnome.org>
15680 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
15681 include the `this' offset in the `param_offsets'.
15683 2002-03-25 Martin Baulig <martin@gnome.org>
15685 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
15686 mono_debug_get_class() function to get the classes. Added new
15687 relocation types for arrays and strings.
15688 (mono_debug_get_class): New static function to search in all
15689 referenced assemblies for a metadata token.
15691 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
15693 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15695 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
15696 hold gc-allocated objects. Make the string heap a stream like the
15697 others. Removed duplicated code when writing stream info.
15698 Added asserts to catch possible buffer overflows. Set the sorted map
15699 for tables that need sorting. Added some documentation.
15701 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
15703 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
15704 for interned strings and vtables.
15706 2002-03-24 Martin Baulig <martin@gnome.org>
15708 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
15709 it in the array since it was created with g_slist_prepend().
15711 2002-03-24 Martin Baulig <martin@gnome.org>
15713 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
15714 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
15715 (mono_debug_method_from_token): Renamed to
15716 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
15717 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
15719 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
15722 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
15724 2002-03-24 Martin Baulig <martin@gnome.org>
15726 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
15727 (mono_debug_method_from_token): New func.
15729 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
15730 New interncall, calls mono_debug_local_type_from_signature().
15731 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
15732 calls mono_debug_method_from_token().
15734 2002-03-23 Martin Baulig <martin@gnome.org>
15736 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
15737 specifies the number of bytes to be converted, not the array size.
15738 Return the number of chars, not the number of bytes.
15739 (ves_icall_iconv_get_chars): The `byteCount' argument
15740 specifies the number of bytes to be converted, not the array size.
15742 2002-03-23 Martin Baulig <martin@gnome.org>
15744 * reflection.h (MonoReflectionSigHelper): New type.
15746 * reflection.c (mono_reflection_sighelper_get_signature_local),
15747 (mono_reflection_sighelper_get_signature_local): New functions.
15749 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
15750 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
15753 2002-03-23 Martin Baulig <martin@gnome.org>
15755 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
15756 is_writeable is set.
15757 (mono_raw_buffer_update): New function to write the modified map
15760 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
15762 * debug-symfile.c (mono_debug_update_symbol_file): Call
15763 mono_raw_buffer_update() when done writing.
15765 2002-03-23 Martin Baulig <martin@gnome.org>
15767 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
15769 * debug-symfile.c: Added support for arguments and local variables.
15771 2002-03-23 Dick Porter <dick@ximian.com>
15773 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
15774 protected by ifdefs, hence breaking the w32 build.
15776 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15778 * object.c: implement is_interned() the right way.
15780 2002-03-21 Martin Baulig <martin@gnome.org>
15782 * debug-symfile.[ch]: New files to handle debugging information
15783 files. There's also support to dynamically update these symbol
15784 files to include machine dependent information.
15786 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
15788 * threads.c (mono_thread_create): new function to create thread
15791 2002-03-20 Martin Baulig <martin@gnome.org>
15793 * icall.c (ves_icall_InternalInvoke): Create a new object if the
15794 method is a constructor.
15795 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
15796 points to ves_icall_InternalInvoke().
15798 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
15800 * file-io.c: Flush shouldn't throw exceptions.
15802 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
15804 * file-io.c: FileStream flush support; FileSetLength now
15805 restores file pointer.
15807 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
15809 * class.c: set image for pointer classes.
15811 2002/03/19 Nick Drochak <ndrochak@gol.com>
15813 * sysmath.c: Forgot one.
15815 2002-03-18 Miguel de Icaza <miguel@ximian.com>
15817 * sysmath.c: Avoid redefining existing names.
15819 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
15821 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
15822 handled by runtime as icall rather than dllimport from libm.so
15823 * file-io.c, file-io.h: fixed handle argument type.
15825 2002-03-18 Dick Porter <dick@ximian.com>
15827 * reflection.c (mono_image_get_type_info): rename interface to
15828 iface, because of "#define interface struct" on windows.
15830 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
15832 * class.c, class.h: rename and export mono_ptr_class_get().
15833 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
15834 * reflection.c, reflection.h, icall.c: better/saner type name
15835 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
15838 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
15840 * class.c (mono_class_init): removed hardcoded GHC_SLOT
15842 * icall.c (ves_icall_InternalInvoke): impl.
15844 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15846 * reflection.c: output the interface map table, too.
15848 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
15850 * class.c (class_compute_field_layout): separate computation of
15851 static field layout
15853 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
15855 * icall.c: added System.Buffer support.
15856 * file-io.c: moved file icalls from PAL to FileStream.
15858 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
15860 * icall.c (ves_icall_System_Object_GetHashCode): impl.
15862 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
15864 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
15866 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15868 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
15870 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
15872 * debug-helpers.{c,h}: moved here from monograph some useful functions
15873 to locate a method by name/signature in a class or image. Included
15874 also a small and flexible IL disassembler.
15876 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15878 * reflection.c: fixup tokens in methods with small header size, too.
15880 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
15882 * object.c (mono_string_to_utf8): remove assert(!error), instead
15885 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
15887 * icall.c: update to the new mono_Array_class_get interface.
15889 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
15891 * appdomain.c, object.c: Boehm-GC enable.
15892 * icall.c: make get_data_chunk() support split data requests.
15893 Ensure a class is initialized in more cases. Return only the first
15894 property found in GetProperties() or the compiler gets confused.
15895 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
15896 * reflection.h, reflection.c: add fixup mechanism for field and method
15897 tokens. Initialize assembly->typeref in a single place. Output
15898 properties after events. Support custom attributes for events, too.
15899 Typo fix for paramter custom attrs.
15901 2002-03-07 Martin Baulig <martin@gnome.org>
15903 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
15905 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
15907 * class.c (mono_array_class_get): fix. for multi. dim. arrays
15909 2002-03-06 Martin Baulig <martin@gnome.org>
15911 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
15912 non-zero lower bounds. See testcases #F10-#F13.
15914 2002-03-05 Martin Baulig <martin@gnome.org>
15916 * exception.c (mono_get_exception_argument_out_of_range): New exception.
15918 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
15919 ves_icall_System_Array_GetValue(), only calculate the absolute array position
15921 (ves_icall_System_Array_SetValue): Likewise.
15922 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
15923 as argument and does the actual work. This function is used when copying a
15924 multi-dimensional array.
15925 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
15926 now do all the widening conversions of value types.
15927 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
15929 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15931 * class.c: remove some magic numbers and use the smbolic names,
15932 instead. Added init_events() to load event info at class init time.
15933 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
15934 and mono_metadata_methods_from_event().
15935 * reflection.h, reflection.c: added support for writing out the evnets
15936 related information.
15938 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
15940 * reflection.h, icall.c: use a different method (GetInterfaces)
15941 to gather interface info and add isbyref, isprimitive and
15942 ispointer to the ves_icall_get_type_info() return value.
15944 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
15946 * class.h: stared adding support for events.
15947 * icall.c: split find_members implementation. Added debug icall to get
15948 the address of an object.
15949 * reflection.c: handle TypeBuilders in mono_type_get_object().
15951 2002-03-01 Martin Baulig <martin@gnome.org>
15953 * icall.c (ves_icall_System_Array_GetLength): This must throw an
15954 ArgumentOutOfRangeException(), not an ArgumentException().
15955 (ves_icall_System_Array_GetLowerBound): Likewise.
15956 (ves_icall_System_Array_GetValue): Improved argument checking.
15957 (ves_icall_System_Array_SetValue): Improved argument checking.
15959 2002-03-01 Martin Baulig <martin@gnome.org>
15961 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
15962 called with invalid arguments rather than just dying with g_assert().
15963 (ves_icall_System_Array_SetValue): Likewise.
15964 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
15965 raise a NotImplementedException instead.
15966 (ves_icall_System_Array_GetLength): Added argument checking.
15967 (ves_icall_System_Array_GetLowerBound): Added argument checking.
15969 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
15971 * object.h (mono_assert): new macros mono_assert and
15972 mono_assert_not_reached
15974 2002-02-28 Martin Baulig <martin@gnome.org>
15976 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
15977 and "System::String::IsInterned" to "System::String::_IsInterned".
15979 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
15981 * icall.c: remove hacks for typebuilder. Added icall to create a
15982 modified type from a tybebuilder.
15983 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
15984 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
15985 to create a backing MonoClass for a TypeBuilder.
15987 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15989 * class.c, class.h: more refactoring of class init.
15990 Export mono_class_setup_mono_type() and mono_class_setup_parent().
15992 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
15994 * marshal.c, marshal.h: start of marshaling interface.
15996 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
15998 * icall.c: fix order in assembly qualified name icall.
16000 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
16002 * class.c: do not free str, since we store it in the hash table.
16003 * reflection.h: add label field to MonoILExceptionInfo.
16004 * reflection.c: handle references to more than one assembly. Handle
16005 case when there isn't a module created in the assembly.
16007 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
16009 * class.c: Fix typo. Start refactoring of class init code.
16011 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
16013 * appdomain.c: exit with 1 on error.
16014 * class.c: we already have the name in MonoClassField.
16015 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
16016 MonoStreamHeader instead of an offset of image->raw_metadata.
16018 2002-02-26 Miguel de Icaza <miguel@ximian.com>
16020 * appdomain.c (mono_init): Be even more descriptive about the error.
16022 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
16024 * appdomain.c: give the user an informative message when corlib can't
16027 2002-02-26 Martin Baulig <martin@gnome.org>
16029 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
16030 New icall to get the time zone data.
16032 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16034 * reflection.c: set virtual and raw size of section correctly.
16035 * threads.c: transfer domain information to newly created threads.
16037 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
16039 * class.c: when instancing a class in a domain, load the default
16040 vaules for static fields from the constant table. Fix System.Enum to
16042 * icall.c: implement Object::GetType() internalcall. Implemented
16043 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
16044 Fixed checking of binding flags in find_members().
16045 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
16046 * reflection.c: handle enumerations when writing to the constant
16047 table. Use a different object cache for types.
16050 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
16052 * object.c (mono_object_isinst): fix for arrays
16054 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
16056 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
16058 * object.c: don't use mprotect () and fix intern pool hash table
16059 lookup for big endian systems.
16061 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16063 * icall.c: change type_is_subtype_of () signature.
16065 2002-02-21 Mark Crichton <crichton@gimp.org>
16067 * rand.c, rand.h: Added random number generator for
16068 System.Security.Cryptography classes.
16070 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
16072 * icall.c: Added System.Security.Cryptography calls.
16074 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
16076 * class.c, icall.c, metadata.c: better support for pointer types.
16077 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
16078 * reflection.c: Add support for getting custom attrs for properties
16079 and simplify some code.
16081 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16083 * icall.c: change getToken () and add custom attribute GetBlob()helper
16085 * reflection.h: add custom attrs array to the reflection builder structures.
16086 * reflection.c: encode and emit custom attributes for all the relevant
16087 reflection objects. Cache fieldref and methodref tokens. Change
16088 mono_image_create_token() interface to take a MonoDynamicAssembly.
16089 More complete custom attributes decoder. Load custom attributes for
16090 Assembly, Field, Method and Constructor objects, too. Make the
16091 returned array an Attribute[] one, not object[]. Added
16092 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
16093 custom attribute constructor.
16095 2002-02-20 Dick Porter <dick@ximian.com>
16099 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
16100 problem code out for now).
16102 2002-02-19 Radek Doulik <rodo@ximian.com>
16104 * object.c (mono_ldstr): use hash table to avoid multiple swapping
16106 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
16108 * icall.c: register the GetCustomAttributes method.
16109 * object.c, object.h: add mono_string_new_len ().
16110 * reflection.h, reflection.c: added mono_runtime_invoke(),
16111 mono_install_runtime_invoke(). Added
16112 mono_reflection_get_custom_attrs () to load custom attributes and
16113 create the attribute objects.
16115 2002-02-19 Dick Porter <dick@ximian.com>
16116 * threads-dummy-types.c:
16117 * threads-dummy-types.h:
16120 * threads-pthread-types.c:
16121 * threads-pthread-types.h:
16122 * threads-pthread.c:
16123 * threads-pthread.h: Deleted obsolete files
16125 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
16127 * class.c (mono_class_vtable): runtime init the class when we
16128 allocate static class data.
16130 * icall.c (ves_icall_System_Array_SetValue): check for null values.
16132 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
16133 and String - but we will need generic marshalling support in the
16135 (mono_init): set the domain name in a ms compatible way
16137 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
16140 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
16142 * object.c (mono_array_clone): use alloca() instead of g_malloc
16145 * appdomain.c (mono_domain_unload): impl.
16147 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16149 * appdomain.c, object.c: fix intern pool implementation.
16150 * class.c: fix alignment code.
16152 2002-02-16 Radek Doulik <rodo@ximian.com>
16154 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
16155 and s2 > s1, just copy lower bytes to be compatible with little
16156 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
16157 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
16159 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
16160 force big_endian to be 1 for big endian machines
16161 (ves_icall_iconv_new_decoder): ditto
16163 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
16165 * socket-io.c (convert_sockopt_level_and_name): If the system
16166 doesn't define SOL_IP or SOL_TCP, get them by hand using
16167 getprotobyname() and caching the values (because this could be a
16169 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
16170 Use the appropriate struct when the system does support it. Ie,
16171 not all systems have struct ip_mreqn so use struct ip_mreq when
16174 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
16176 * reflection.c: handle finally clauses.
16178 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
16180 * socket-io.c: use g_snprintf() instead of snprintf.
16182 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
16184 * reflection.c (mono_param_get_objects): Cast second argument to
16185 mono_method_get_param_names to a const char** to silence the
16188 * appdomain.c (mono_domain_assembly_open): Put parens around the
16189 truth statement in the for-loop.
16191 * unicode.c (iconv_convert): Got rid of a compiler warning about
16192 int i being unused when the system has a new iconv.
16193 (iconv_get_length): Same.
16195 * image.c (load_class_names): Cast the second argument to
16196 g_hash_table_insert() to char* to hush compiler warnings about the
16198 (mono_image_open): Same here.
16200 * socket-io.c: Don't conditionally include sys/filio.h or
16201 sys/sockio.h here anymore since we now get them from
16202 io-layer/io-layer.h
16203 (inet_pton): If the system doesn't support inet_aton, implement
16204 using inet_addr and also #define INADDR_NONE if it isn't defined
16207 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
16209 * metadata.c, metadata.h: added function to get packing and size info
16211 * reflection.h, reflection.c: handle field RVA data. Save info about
16212 the table layout if needed. Assign typedef indexes to all the types
16213 before dumping the info about them to avoid forward reference problems.
16215 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
16217 * socket-io.c (convert_sockopt_level_and_name): ifdef
16218 SO_ACCEPTCONN because it is not defined on my system (old debian)
16220 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16222 * opcode.c: use stddef.h to get NULL.
16224 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
16226 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
16227 for FIONBIO, FIONREAD and SIOCATMARK.
16228 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
16229 define INADDR_NONE and besides, inet_addr() is deprecated and
16230 should not be used. Use inet_pton() instead - it also has the
16231 added bonus that it can easily handle IPv6 addresses as well.
16232 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
16234 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
16236 * decimal.c: remove _MSC_VER conditional.
16238 2002-02-13 Dick Porter <dick@ximian.com>
16241 * icall.c: Internal calls for Blocking, Select, Shutdown,
16242 GetSocketOption and SetSocketOption
16244 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16246 * assembly.cs: better resolver: use it instead of some kludgy
16249 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
16251 * reflection.c: the best way to speed-up the compiler is to avoid
16254 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
16256 * class.c (mono_class_vtable): changed the object layout
16257 (obj->vtable->class).
16258 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
16260 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16262 * assembly.c: look for assemblies in the assembly dir, too.
16264 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16266 * class.c: fix thinko in mono_class_from_type().
16268 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16270 * exception.h, exception.c: added TypeLoadException.
16271 * object.h, object.c: added mono_array_clone ().
16272 * icall.c: handle throwOnError in AssemblyGetType().
16273 Added Array.Clone().
16274 * opcode.h, opcode.c: use a single value for the opcode val.
16275 Compile fix for non-gcc compilers.
16277 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
16279 * opcodes.c, opcodes.h: export interesting info about opcodes.
16281 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
16283 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
16286 * class.c (class_compute_field_layout): set element_class for enums
16287 (mono_class_create_from_typedef): set element_class for normal classes
16289 * icall.c (ves_icall_System_Enum_get_value): impl.
16291 * class.c (mono_class_create_from_typedef): do not set valuetype
16292 flag for System.ValueType and System.Enum
16294 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
16296 * unicode.c (iconv_convert): fix big endian problem.
16298 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16300 * class.c: add asserts if we are ever going to scribble over memory.
16301 * socket-io.c: not all systems have AF_IRDA defined.
16303 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
16305 * class.c (class_compute_field_layout): do not consider static
16306 fields to compute alignment
16308 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
16310 * appdomain.c (mono_appdomain_get): impl.
16311 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
16313 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
16315 * icall.c: ignore "file://" prefix when loading an assembly.
16317 2002-01-23 Dick Porter <dick@ximian.com>
16321 * Makefile.am: Added socket support
16323 2002-01-23 Miguel de Icaza <miguel@ximian.com>
16325 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
16326 code back. This should return the assemblies that are loaded by
16327 the runtime on behalf of an application domain.
16329 The current implementation is still broken, it just returns every
16330 assembly loaded, but until we get real applications domain this
16333 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
16335 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
16338 2002-01-23 Miguel de Icaza <miguel@ximian.com>
16340 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
16341 the mono_class_from_name lookup.
16342 (ves_icall_get_parameter_info): ditto.
16343 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
16345 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
16347 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
16349 * class.c: load also nested classes on class init.
16350 System.ValueType instance methods gets passed boxed
16351 values, unless methods in derived classed that get a pointer to the
16353 * icall.c: use better name parsing code in GetType().
16354 * image.c, image.h: add mono_image_loaded ().
16355 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
16356 * reflection.c, reflection.h: added mono_reflection_parse_type().
16358 2002-01-22 Veronica De Santis <veron78@interfree.it>
16360 * icall.c : Added mapping of internal calls for Manual and Auto reset events
16361 * threads.c : Added the implementation of internal calls for events
16362 * threads.h : Added prototypes of internal calls for events
16364 2002-01-21 Radek Doulik <rodo@ximian.com>
16366 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
16368 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
16370 * class.c (mono_class_init): set min_align to 1 (instead of 0)
16371 (mono_class_value_size): use min_align
16373 2002-01-20 Dick Porter <dick@ximian.com>
16376 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
16377 so it compiles on w32.
16379 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
16381 * metadata.c (mono_type_stack_size): impl.
16383 * class.c (mono_class_get_field): impl. memberref token
16385 2002-01-16 Veronica De Santis <veron78@@interfree.it>
16387 * icall.h : Added the internal calls mapping for CreateMutex_internal
16388 and ReleaseMutex_internal.
16389 * threads.h : Added the prototype of mutexes internal calls.
16390 * threads.c : Added the implementations of mutexes internal calls.
16392 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
16394 * metaparse.h: removed unused file.
16395 * reflection.c, reflection.h: added stream_data_align () function
16396 to align data in streams and keep stream aligned. Add support for
16397 exception support in method headers.
16399 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
16401 * unicode.c: make iconv_convert () return the number of bytess written
16402 in the output buffer.
16404 2002-01-15 Dick Porter <dick@ximian.com>
16405 * threads.c: Make the runtime's idea of infinite timeouts coincide
16406 with the class library's
16408 Fix a particularly egregious bug in mono_thread_cleanup(). That
16409 code was so utterly bogus it must have been written on a Monday.
16411 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
16413 * reflection.h: add subtypes field to TypeBuilder.
16414 * reflection.c: encode constants for literal fields.
16415 Handle subtypes. Fix user string token (and add a zero byte)
16418 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
16420 * class.c (mono_class_init): bug fix: assign slot numbers for
16423 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16425 * reflection.c: don't try to output a code RVA for abstract methods.
16426 Small fixes for method header format. Output parameter info to the
16427 ParamDef table. Save method overriding info to MethodImpl table.
16428 Fix property support. Allow typedef.extends to be a type in the
16430 * verify.c: fix off-by-one error.
16432 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
16434 * class.c: fix mono_class_from_mono_type () for szarray types.
16435 Remove unused cache check in mono_class_from_type_spec().
16436 * icall.c: *type_from_name () functions handle simple arrays and byref.
16437 * reflection.c: handle byref and szarray types. Handle methods without
16438 body (gets P/Invoke compilation working). Handle types and fields in
16440 * reflection.h: add rank to MonoTypeInfo.
16442 2002-01-10 Dick Porter <dick@ximian.com>
16444 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
16447 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
16449 * icall.c: initialize class in type_from_handle ().
16450 Loop also in parent classes for get_method ().
16451 * reflection.c: properly encode class and valuetype types.
16452 Start on encoding TypeBuilder types. Handle fieldrefs.
16453 Use correct length when registering a user string.
16454 Handle ConstructorBuilder and MonoMethod in get_token ().
16455 Make mono_type_get_object () aware of cached types.
16456 * object.c: back out change to mono_string_new ().
16458 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
16459 * object.c: mono_string_new should return a NULL when the string
16460 passed in is NULL -- not try to deference it.
16462 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
16464 * icall.c: hack to make IsSubType work for TypeBuilders.
16465 * reflection.c: emit constructors before methods.
16466 Retrieve param names in mono_param_get_objects().
16468 2002/01/05 Nick Drochak <ndrochak@gol.com>
16470 * Makefile.am: fix list of headers and sources so automake 1.5
16471 doesn't complain. Removed \# at end of list.
16473 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
16475 * reflection.c: get token for a method ref. Set return type of
16476 constructor to void.
16477 * loader.c: debug message.
16478 * class.c: typo fix.
16480 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
16482 * icall.c: fix array init with rank > 1. FindMembers
16483 loops in parent class as well.
16484 * image.c: do not insert nested types in name cache.
16485 * reflection.c: warning fix.
16486 * reflection.h: add override method (for interface impl).
16488 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
16490 * metadata.c: fix customattr decoding.
16492 2001-12-21 Miguel de Icaza <miguel@ximian.com>
16494 * rawbuffer.cs: Added native Win32 implementation, avoids using
16495 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
16497 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
16499 * class.c: make the low-level routines handle the cache.
16501 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
16503 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
16505 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
16507 * class.c: fix mono_array_element_size() for objects.
16508 * class.h, class.c: add properties to MonoClass and load them
16510 * icall.c: check with isinst() when assigning a value to an array
16511 instead of requiring the classes to match exactly.
16512 Implemented icall for System.Type::GetType().
16513 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
16514 enums. Handle bindingflags when looking for methods and fields.
16515 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
16516 and mono_metadata_methods_from_property().
16517 * reflection.h, reflection.c: added structures for propreties,
16518 parameters and enums. Implemented mono_property_get_object() and
16519 mono_param_get_objects().
16521 2001-12-18 Dick Porter <dick@ximian.com>
16523 * file-io.c: Use mono_string_to_utf16() instead of
16524 mono_string_chars()
16526 * object.c: Added mono_string_to_utf16(), which copies the non
16527 NULL-terminated MonoString into a new double-null-terminated
16530 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
16532 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
16534 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
16536 * file-io.c: raise exceptions if handle is invalid.
16538 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
16540 * assembly.c: yet another check for mscorlib.
16541 * class.c, class.h: load nesting info for classes.
16542 * icall.c: many new functions to support the Reflection classes.
16543 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
16544 * reflection.h, reflection.c: mono_image_create_token(),
16545 mono_assembly_get_object(), mono_type_get_object(),
16546 mono_method_get_object(), mono_field_get_object(): methods to return
16547 objects that parallel the C representation of assemblies, types,
16550 2001-12-11 Dick Porter <dick@ximian.com>
16553 * file-io.c: Internal calls for file IO.
16555 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
16557 * tabledefs.h: missing FileAttributes.
16558 * verify.h, verify.c: use is_valid_string () to simplify and check for
16559 valid strings more correctly. Fix warnings and speeling.
16560 Check more tables: Filed, File, ModuleRef, StandAloneSig.
16561 Check code: branches, maxstack, method calls.
16563 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
16565 * object.c (mono_object_allocate): removed static, so that the jit
16566 can allocate value types.
16568 * icall.c (ves_icall_System_DateTime_GetNow): impl.
16570 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
16572 * class.c: init enum types right away and register the
16573 token->MonoClass map in mono_class_create_from_typedef ().
16574 * verify.h, verify.c: first cut of the verifier.
16575 * pedump.c: add --verify switch to verify metadata tables.
16576 * tabledefs.h: add some missing enums.
16578 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
16580 * class.c (mono_install_runtime_class_init): impl.
16581 (mono_class_init): renamed mono_class_metadata_init to
16582 mono_class_init, also removed the metadata_inited flag
16584 * object.c (mono_object_isinst): use faster algorithm
16586 2001-11-30 Radek Doulik <rodo@ximian.com>
16588 * mono-endian.h: reverted last change
16589 added function prototypes
16591 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
16592 add mono-endian.c back
16594 * mono-endian.c: returned back, as Paolo pointed out, it's needed
16595 for unaligned access, I've mistaked it with endianess. I am
16597 (mono_read16): fix reverted endianess
16598 (mono_read64): ditto
16599 (mono_read32): ditto
16601 2001-11-30 Dick Porter <dick@ximian.com>
16603 * exception.c: Implement mono_exception_from_name()
16605 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
16607 * metadata.h, metadata.c: remove params_size and locals_size and their
16608 calculation from the metadata code: they are only usefult to the
16611 2001-11-29 Radek Doulik <rodo@ximian.com>
16613 * object.c (mono_ldstr): swap bytes here, it's probably not the
16614 best place, but works for me now, I'll redo it once I know mono
16615 better, also note that I add PROT_WRITE and don't reset back, also
16616 note that it's only affects big endians, so x86 should be OK
16618 * mono-endian.h (read16): use just glib macros for both endians
16620 * mono-endian.c: removed as glib macros are used in in
16621 mono-endian.h so we don't need to care about endianess for read
16622 macros as glib does that for us already
16624 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
16626 * class.h, class.h: take minimum alignment into consideration so
16627 that the fields of a class remain aligned also when in an array.
16629 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
16631 * loader.h, loader.c: add mono_method_get_param_names().
16632 * class.c: 0-init class fields.
16634 2001-11-26 Dick Porter <dick@ximian.com>
16638 * threads.c: New file that handles System.Threading on all platforms
16641 * object.h: Remove the synchronisation struct from MonoObject,
16642 replace it with a pointer that gets initialised on demand
16644 * Makefile.am: Replace all the system-specific threading code with
16645 a single file that uses the new wrapper library
16647 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
16649 * class.c, class.h: add mono_install_trampoline() so that the runtime
16650 can register a function to create a trampoline: removes the ugly
16651 requirement that a runtime needed to export arch_create_jit_trampoline.
16652 * object.h, object.c: added mono_install_handler() so that the runtime
16653 can install an handler for exceptions generated in C code (with
16654 mono_raise_exception()). Added C struct for System.Delegate.
16655 * pedump.c: removed arch_create_jit_trampoline.
16656 * reflection.c: some cleanups to allow registering user strings and
16657 later getting a token for methodrefs and fieldrefs before the assembly
16659 * row-indexes.h: updates and fixes from the new ECMA specs.
16661 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
16663 * class.h, class.c: add enum_basetype field to MonoClass.
16664 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
16665 to get index in the constant table reated to a field, param or
16667 * reflection.h, reflection.c: handle constructors. Set public-key and
16668 version number of the built assembly to 0.
16669 * row-indexes.h: update from new ECMA spec.
16671 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
16673 * class.h, class.c: add a max_interface_id to MonoClass.
16674 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
16675 since it's used to do that. Added mono_type_type_from_obj().
16676 Make GetType() return NULL instead of segfaulting if the type was not
16677 found. Handle simple arrays in assQualifiedName.
16678 * object.h: add a struct to represent an Exception.
16679 * reflection.c: output call convention in method signature.
16680 Add code to support P/Invoke methods and fixed offsets for fields.
16682 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
16684 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
16686 * icall.c: use mono_array_addr instead of array->vector: fixes the
16687 reflection image writing.
16688 * reflection.c: init call convention byte to 0 in method signature.
16689 Encode the property signature. Don't output property-related methods
16690 twice. Really process the properties for a type (don't cast a field to
16691 a property, my mom always told me that).
16692 Fix 64 bit issues in pointer alignment in a different and more
16695 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
16697 * loader.h: Removed type class from MonoDefaults, added monotype
16699 * loader.c: Loaded MonoType, removed loading of Type
16701 * icall.c (my_mono_new_object): Now returns a System.MonoType,
16702 and fills in System.Type._impl with a RuntimeTypeHandle rather
16703 than the actual MonoClass *
16705 (ves_icall_type_from_handle): change from type_class to
16708 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
16711 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
16714 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
16716 (ves_icall_System_Reflection_Assembly_GetType): implemented
16718 (ves_icall_System_MonoType_assQualifiedName): implemented
16720 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
16722 2001-11-09 Miguel de Icaza <miguel@ximian.com>
16724 * assembly.c (mono_assembly_open): Implement a cache for the
16727 (mono_assembly_close): only destroy the assembly when the last
16730 2001-11-09 Dick Porter <dick@ximian.com>
16732 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
16734 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
16736 * class.c (mono_class_metadata_init): bug fix: compute the right slot
16738 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
16740 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
16741 from Martin Weindel.
16742 * object.h: add mono_string_chars ().
16744 2001-11-07 Miguel de Icaza <miguel@ximian.com>
16746 * reflection.c (build_compressed_metadata): Eliminates warnings
16747 and uses 64-bit clean code.
16749 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
16750 (mono_type_equal): Change signature to eliminate warnings.
16752 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
16754 * icall.c, loader.c: remove the internalcall array constructors.
16755 Changes to match the new MonoArray structure.
16756 * object.h, object.c: an array object doesn't allocate an extra
16757 vector. Add mono_array_new_full () to create jagged arrays easily.
16759 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
16761 * metadata.h, metadata.c: add mono_metadata_field_info () to
16762 retreive all the info about a field from vairous tables.
16763 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
16764 * class.h, class.c: augment MonoClassField with more info.
16765 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
16766 policy and load a field's RVA if needed.
16768 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
16770 * class.c (mono_class_metadata_init): create a trampoline for all
16771 virtual functions instead of actually compiling them.
16773 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
16775 * class.h, class.c: include name in MonoClassField.
16776 * class.c: fix fundamental type of System.Object and System.String.
16777 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
16779 * icall.c: remove internalcalls for the Reflection stuff that is now
16781 * loader.c: mono_field_from_memberref () implementation.
16782 * mono-endian.c: thinko (s/struct/union/g).
16783 * object.c, object.h: make the mono_string_* prototypes actually use
16784 MonoString instead of MonoObject.
16785 * reflection.c, reflection.h: updates for changes in the reflection
16786 code in corlib: we use C structures that map to the actual C# classes.
16787 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
16788 fat method header if needed and use the info from the ILGenerator for
16789 methods. Handle fields in types. Misc fixes.
16791 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
16793 * class.c (mono_class_metadata_init): bug fix: always allocate
16794 space for static class data
16796 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
16798 * class.c (mono_compute_relative_numbering): use relative
16799 numbering to support fast runtime type checks.
16801 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
16803 * class.c (mono_class_create_from_typeref): added debugging output
16804 to print class name when MonoDummy is returned instead of real class
16806 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
16808 * class.c (mono_class_metadata_init): interface offset table now
16809 contains pointers into the vtable - this is more efficient for the jit
16811 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
16813 * class.c (mono_class_metadata_init): use a temporary vtable (the
16814 old algorithm only worked for the interpreter, but not for the jit)
16816 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
16818 * loader.c (method_from_memberref): use mono_class_get to get the
16819 class of an array instead of using System.Array directly.
16820 (mono_get_method): also add MEMBERREF methods to the method cache
16821 which usefull for arrays.
16823 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
16825 * pedump.c (arch_compile_method): added to compute vtable entry
16827 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
16828 number of interfaces.
16830 * class.h: merged MonoArrayClass into MonoClass
16832 * class.c (mono_class_create_from_typedef): compute the vtable size and
16833 allocate space to include the vtable inside MonoClass
16834 (mono_class_metadata_init): initialize the vtable
16836 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
16838 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
16839 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
16840 * image.c: endian fixes by Laurent Rioux.
16841 * object.h, object.c: rename MonoStringObject to MonoString and
16842 MonoArrayObject to MonoArray. Change some function names to conform to
16843 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
16844 guint16* as first argument, so don't use char*.
16845 Provide macros to do the interesting things on arrays in a portable way.
16846 * threads-pthread.c: updates for the API changes and #include <sched.h>
16847 (required for sched_yield()).
16848 * icall.c: updates for the API changes above.
16849 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
16850 platforms that need them.
16852 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
16854 * class.c: set the correct type for all the fundamental
16855 type when loading the class.
16857 2001-10-05 Dick Porter <dick@ximian.com>
16859 * threads-pthread.c (pthread_mutex_timedlock): Simple
16860 compatibility version for C libraries that lack this call.
16862 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16864 * class.c: MonoTypes stored in MonoClass are stored as
16865 fundamental MonoTypes when the class represents a
16866 fundamental type (System.Int32, ...).
16867 The TypeHandle return by ldtoken is a MonoType*.
16868 * icall.c: ves_icall_get_data_chunk () write out all the
16869 PE/COFF stuff. Implement ves_icall_define_method (),
16870 ves_icall_set_method_body (), ves_icall_type_from_handle ().
16871 * image.c: properly skip unknown streams.
16872 * loader.h, loader.c: add type_class to mono_defaults.
16873 * metadata.c, metadata.h: export compute_size () as
16874 mono_metadata_compute_size () with a better interface.
16875 Typo and C&P fixes.
16876 * pedump.c: don't try to print the entry point RVA if there is no entry point.
16877 * reflection.c, reflection.h: many cleanups, fixes, output method
16878 signatures and headers, typedef and typeref info, compress the metadata
16879 tables, output all the heap streams, cli header etc.
16880 * row-indexes.h: typo fixes.
16882 2001-10-04 Dick Porter <dick@ximian.com>
16884 * object.h: Add a synchronisation mutex struct to MonoObject
16886 * object.c (mono_new_object): Initialise the object
16887 synchronisation mutexes
16889 * icall.c: System.Threading.Monitor internal calls
16891 * threads-pthread.h:
16892 * threads-pthread.c: System.Threading.Monitor internal calls
16894 * threads-types.h: New file, includes the system-specific thread
16897 * threads-pthread-types.h:
16898 * threads-pthread-types.c: New files, handle pthread-specific
16899 synchronisation types
16901 * threads-dummy-types.h:
16902 * threads-dummy-types.c: New files of dummy support for
16903 thread-specific types
16907 * pedump.c: include mono-endian.h not endian.h
16909 * Makefile.am: More threads files.
16910 Name mono-endian.h not endian.h
16912 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
16914 * Makefile.am, reflection.h, reflection.c: move here the reflection related
16915 stuff and implement a few more bits.
16916 * icall.c: a field needs to be dereferenced twice. Do not use the same
16917 name for two variables in the same scope.
16918 * image.c, image.h: cleanups.
16920 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
16922 * class.c (mono_class_metadata_init): bug fix: compute the right size
16924 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
16926 * icall.c: implemented some of the Reflection internalcalls.
16927 * image.c, image.h: start writing out the PE/COFF image.
16928 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
16929 that does the reverse than decode_blob_size ().
16930 * object.c: use mono_metadata_encode_value (). Move here
16931 temporary implementation of mono_string_to_utf8 ().
16932 * rawbuffer.c: make malloc_map static.
16934 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16936 * metadata.c: fix type comparison for arrays.
16937 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
16938 Added a couple of new classes to monodefaults.
16939 * icall.c: added a couple of Reflection-related internalcalls.
16940 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
16941 Added a byval_arg MonoType to MonoClass.
16943 2001-09-28 Dick Porter <dick@ximian.com>
16946 * threads-pthread.h:
16947 * threads-pthread.c: Implemented internal calls for
16948 LocalDataStoreSlot operations. Applied mutexes around all shared
16949 data. Reworked the thread creation and Start() operations to
16950 avoid a race condition.
16953 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
16955 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
16957 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
16959 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
16961 * class.c, loader.c: warn and return NULL instead of erroring out.
16962 * icall.c: added System.AppDomain::getCurDomain().
16963 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
16965 2001-09-25 Dick Porter <dick@ximian.com>
16967 * threads-pthread.h:
16968 * threads-pthread.c: Implemented timed thread joining and added
16969 System.Threading.Thread::Join_internal internal call
16971 * icall.c: Added System.Threading.Thread::Join_internal internal call
16974 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
16976 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
16978 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
16979 mono_string_intern () to implement the semantics of the ldstr opcode
16980 and the interning of System.Strings.
16981 * icall.c: provide hooks to make String::IsIntern and String::Intern
16984 2001-09-23 Dick Porter <dick@ximian.com>
16987 * threads-dummy.h: New files of dummy threading routines
16989 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
16990 support code based on system specifics
16992 Rename PTHREAD_LIBS to THREAD_LIBS
16994 2001-09-23 Dick Porter <dick@ximian.com>
16996 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
16997 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
16999 (mono_thread_init): Set up a Thread object instance to return when
17000 the main thread calls Thread.CurrentThread
17001 (mono_thread_cleanup): Wait for all subthreads to exit
17003 * icall.c: New internal calls for System.Threading.Thread::Sleep
17004 (including Schedule) and CurrentThread
17006 * threads.h: New file, to insulate thread-specific stuff from the
17009 2001-09-21 Dick Porter <dick@ximian.com>
17011 * threads-pthread.h:
17012 * threads-pthread.c: New file, for handling pthreads-style
17013 threading support. Start() now starts a new thread and executes
17014 the ThreadStart delegate instance.
17016 * icall.c: Added the internalcall for
17017 System.Threading.Thread::Start_internal
17019 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
17021 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
17023 * loader.c: work around the different signatures for delegates
17024 constructors csc generates in compiled code vs the ones compiled in mscorlib.
17026 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
17028 * class.h, class.c: add mono_class_get_field_from_name ().
17029 * *: Fix C comments and other ANSI C issues.
17031 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
17033 * endian.h, assembly.c: fix some endianness issues.
17035 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
17037 * loader.h, load.c: add delegate_class to mono_defaults.
17038 Handle runtime provided methods in mono_get_method ().
17040 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
17042 * loader.c (mono_get_method): use pinvoke for internal call
17044 * icall.c: use pinvoke for internal call
17046 * loader.c (method_from_memberref): set the method name
17048 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
17050 * metadata.c: help the compiler generate better code for
17051 mono_class_from_mono_type ().
17053 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
17055 * class.c (mono_class_metadata_init): delayed computing of the
17056 class size to mono_class_metadata_init ()
17058 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
17060 * class.c, class.h: add an interfaces member to MonoClass.
17061 * image.c, image.h: add assembly_name field to MonoImage
17062 from the assembly table.
17063 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
17065 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
17067 * class.c: Handle Array in mono_class_from_mono_type ().
17068 * metadata.c, pedump.c: some endian fixes.
17070 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
17072 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
17073 * metadata.c: fix small problem introduced with the latest commit.
17075 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
17077 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
17078 We don't need a MonoMetadata pointer anymore to compare signatures in
17079 mono_metadata_signature_equal (), update callers.
17080 Reduced memory usage an number of allocations for MonoMethodHeader and
17081 MonoMethodSignature.
17083 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
17085 * metadata.c: added compare for szarray.
17087 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
17089 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
17090 and add a couple more types to it and mono_defaults. Give an hint on
17091 classes that need implementing in our corlib and are referenced
17094 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
17096 * class.h, class.c: keep track if a class is also an Enum.
17097 * loader.c: Implement a couple more types for use in libffi
17098 marshalling. Gives better diagnostics when failing to dlopen
17099 a library. Set method->klass for P/Invoke methods, too.
17101 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
17103 * class.c, class.h: add a MonoType this_arg to MonoClass that
17104 represents a pointer to an object of the class' type that
17105 can be used by the interpreter and later the type cache.
17106 Add best guess alignment info for valuetype objects.
17108 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
17110 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
17111 into MonoType: one less level of indirection and allocation and
17112 simplifies quite a bit of code. Added cache for MonoTypes that are
17113 used frequently, so that we don't need to allocate them all the time.
17115 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
17117 * class.c (mono_class_create_from_typedef): System.Enum is also a
17118 value type, although it does not derive from System.ValueType
17119 (maybe a bug in the ms compiler?)
17121 * metadata.c (mono_type_size): return the right size for value types
17123 * loader.c (mono_get_method): only initialize method header if not abstract
17125 * class.c (mono_class_from_mono_type): use mono_default values.
17127 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
17129 * *: use MonoClass pointers instead of <type_tokens>
17131 * class.h: new flag: metadata_inited.
17133 * class.c (mono_class_metadata_init): impl.
17134 (mono_class_instance_size): impl.
17135 (mono_class_data_size): impl.
17137 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17139 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
17140 MonoClass now has the name and name_space fields.
17141 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
17142 mono_get_method () takes and optional MonoClass as argument.
17143 Removed mono_typedef_from_name() and added mono_class_token_from_name()
17144 instead that takes advantage of a map from class names to typedef
17145 tokens in MonoImage.
17147 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
17149 * metadata.c: zero is not a valid alignment boundary.
17150 Merge MONO_TYPE_VOID in default decoding code.
17152 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
17154 * image.h: merged MonoMetadata into MonoImage
17156 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
17157 identify the type of elements.
17159 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
17161 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
17162 * cil-coff.h: split MonoMSDOSHeader and add size info.
17163 * image.c: add some consistency checks.
17164 * metadata.c: fix row size computation: one programmer
17165 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
17166 add explanation for the locator routine.
17167 Fix decoding of size in method header.
17169 2001-08-20 Miguel de Icaza <miguel@ximian.com>
17171 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
17172 (g_concat_dir_and_file): Bring g_concat_dir_and_file
17173 function from gnome-libs. This uses the right path separator
17174 based on the OS, and also works around a bug in some systems where
17175 a double slash is not allowed.
17176 (default_assembly_name_resolver): Use g_concat_dir_and_file
17177 (mono_assembly_open): ditto.
17179 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
17181 * metadata.c (mono_metadata_signature_equal): impl.
17183 * *: void is now a realy MonoType (instead of using NULL)
17185 * metadata.c (do_mono_metadata_parse_type): use
17186 mono_metadata_parse_type to parse void value.
17188 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
17190 * metadata.c, metadata.h: in the signature and method header store
17191 only the space required for holding the loca vars and incoming arguments.
17193 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
17195 * metadata.c (do_mono_metadata_parse_type): treat void like any
17196 other type (instead of assigning NULL);
17198 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
17200 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
17202 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
17204 * image.c (do_mono_image_open): added a cache for arrays.
17206 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
17208 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
17209 decode a single column from a row in a metadata table and changes
17210 to take advantage of it in the typedef locator (gives a nice speed up).
17211 Store offset info for function params.
17213 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
17215 * image.h (MONO_IMAGE_IS_CORLIB): removed
17217 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
17219 * assembly.c: how could mono_assembly_close () had ever worked?
17220 * metadata.c, metadata.h: provide offset info for local vars.
17221 Implement mono_type_size () to take care of alignment as well
17222 as size (it was mono_field_type_size in cli/class.c before).
17224 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
17226 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
17228 * assembly.h (CORLIB_NAME): set to corlib.dll
17230 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
17232 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
17234 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
17235 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
17236 tokentype.h: massive namespace cleanup.
17238 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
17240 * metadata.h, metadata.c: decode exception clauses when parsing method header.
17242 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
17244 * metadata.c (mono_metadata_free_type): added check for type !=
17245 NULL (void) before calling mono_metadata_free_type()
17247 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
17249 * metadata.h, row_indexes.h: added header with enumerations to use
17250 to index in the columns from tables in metadata and to decode coded
17251 tokens: we should start using this instead of embedding magic numbers
17254 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
17256 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
17257 Move metadata_t info from cli_image_info_t to MonoImage, where
17258 it's easily accessible. Changed all the uses accordingly.
17259 Added the method and class caches to MonoImage.
17260 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
17261 and mono_metadata_decode_value () signature to be more consistent
17262 with the other parse functions (and simplify code). Taken advantage
17263 of zero-length array allocation with GCC. Removed reduntant (and
17264 wrong) MonoFieldType struct and use MonoParam instead. Changed
17265 mono_metadata_parse_field_type () to use common code for parsing.
17266 Added mono_metadata_typedef_from_field () and
17267 mono_metadata_typedef_from_method () to lookup a typedef index from a
17268 field or method token.
17269 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
17271 2001-07-23 Miguel de Icaza <miguel@ximian.com>
17273 * metadata.c (mono_metadata_parse_field_type): Implement.
17274 (do_mono_metadata_parse_type): Split engine from
17275 mono_metadata_parse_type, so that we can create smaller structures
17276 for things that just have one pointer to the MonoType (look at
17279 2001-07-20 Miguel de Icaza <miguel@ximian.com>
17281 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
17282 as Jan Gray found out, it is incorrect.
17284 2001-07-18 Miguel de Icaza <miguel@ximian.com>
17286 * assembly.c: Implement asssembly loading. This loads an image
17287 and loads all the referenced assemblies. Come to think of it, we
17288 could always do lazy loading of the assemblies.
17290 * image.c (mono_image_open): Keep loaded images in a hashtable.
17292 * image.h (MonoImage): Add reference count.
17294 2001-07-17 Miguel de Icaza <miguel@ximian.com>
17296 * assembly.c (mono_assembly_open): Keep track of the file name in
17297 case the assembly has no ASSEMBLY table.
17299 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
17302 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
17304 * metadata.c, metadata.h: decode local vars in method header
17305 parse function. Change callers accordingly.
17307 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
17309 * metadata.h, cil-coff.h: protect against multiple inclusion.
17310 Added some new structures to hold information decoded from metadata:
17311 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
17312 and relevant decoding/free functions.
17313 * metadata.c: implement decoding functions. Add warning for out of bounds
17314 index in mono_metadata_locate(). Implement mono_get_method () to retreive
17315 all the info about a method signature and invocation. Remove check on
17316 uninitialized local var in parse_mh() and fix memory leak.
17318 2001-07-12 Miguel de Icaza <miguel@ximian.com>
17320 * metadata.h: More macros.
17322 * tokentype.h: New file.
17324 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
17326 * assembly.c: added a consistency check and initialize
17327 some structures with g_new0().
17328 * metadata.c: fixed a couple more bugs in table size computation
17329 and add other checks for out-of bound access to metadata.
17331 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
17333 * metatada.c: fix bugs computing table sizes. Spew a
17334 warning when index in string heap is out of bounds.
17336 2001-07-04 Miguel de Icaza <miguel@ximian.com>
17338 * metadata.h: Add a couple of macros to manipulate tokens.
17340 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
17342 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
17343 cli_section_tables).
17345 2001-07-01 Miguel de Icaza <miguel@ximian.com>
17347 * metadata.c (mono_metadata_user_string): New function, provides
17348 access to the UserString heap.
17350 2001-06-27 Miguel de Icaza <miguel@ximian.com>
17352 * metadata.c: Add inline documentation.
17354 2001-06-26 Miguel de Icaza <miguel@ximian.com>
17356 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
17359 2001-06-22 Miguel de Icaza <miguel@ximian.com>
17361 * typeattr.h: New file, TypeAttribute flags.
17363 2001-06-21 Miguel de Icaza <miguel@ximian.com>
17365 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
17366 mono_assembly_ensure_section): Section loading code.
17367 (load_section_tables): Load the sections.
17369 * mono/metadata/metadata.c (mono_metadata_locate_token,
17370 mono_metadata_locate): Functions to locate the information
17371 definition given a token or a table and an index.
17372 (mono_metadata_compute_table_bases): New.
17373 (compute_size): New function to compute the sizes of the various
17376 * mono/metadata/metadata.h: Finish listing the different index
17379 * mono/metadata/pedump.c: Improve to dump new information.
17381 2001-06-19 Miguel de Icaza <miguel@ximian.com>
17383 * mono/metadata/metadata.c: Entered all the tables matching
17386 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2