2 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4 * threads.c: make sure the domain is correct, too when doing
7 2006-03-01 Zoltan Varga <vargaz@gmail.com>
9 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
10 windows. Fixes #77683.
12 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14 * object.h, *: introduced specific way to set elements of an array
15 of references to be used as write barrier. Still need to audit the
16 uses of mono_array_addr.
18 2006-03-01 Miguel de Icaza <miguel@novell.com>
20 * object-internals.h: New field to cache the assmebly name, patch
21 from Tambet Ingo (tambet@ximian.com)
23 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
25 * decimal.h, class-internals.h, metadata-internals.h,
26 file-io.h: mark a few function declarations as internal, to
27 reduce the number of PLT entries.
29 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31 * file-io.c: fix typo in warning message.
33 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
35 * loader.c: on unix, lookup the "*A" version of a function
36 if charset is auto as a second option before failing.
38 2006-02-28 Raja R Harinath <rharinath@novell.com>
40 * class.h (mono_class_inflate_generic_method): Revert to two
42 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
43 (mono_class_inflate_generic_method_full): Add.
44 * class.c (mono_class_inflate_generic_method_full): Rename from
45 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
46 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
47 * loader.c, reflection.c: Update to changes.
49 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
51 * icall.c: const fixes and small improvements.
53 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
55 * threadpool.c: for asynchronous connect(), enable the same workaround
56 for BSD 6 as for the Mac. Fixes bug #77637.
58 2006-02-24 Zoltan Varga <vargaz@gmail.com>
60 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
61 formatted classes. Fixes #77524.
63 2006-02-24 Raja R Harinath <rharinath@novell.com>
65 * class.c (inflate_generic_type): Add a couple more
67 (inflate_generic_context): Don't use the 'gmethod' from
69 (mono_class_inflate_generic_method): If the method has generic
70 parameters, but the passed-in context doesn't have a 'gmethod',
71 create one. Use the possibly simplified generic instantiation
72 from the declaring class instead of the one passed in.
74 2006-02-24 Raja R Harinath <harinath@gmail.com>
76 Make generic method signature and method header handling lazy.
77 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
78 (inflate_generic_header): Likewise.
79 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
80 parameter to avoid inflating types.
81 (mono_get_inflated_method): Empty out.
82 * class.h (mono_class_inflate_generic_method): Update to changes.
83 * loader.c (mono_get_method_from_token): Don't parse signature for
84 generic methods, nor methods of generic classes.
85 (mono_method_signature): Rename from 'mono_method_signature'.
86 Inflate signature on demand.
87 (mono_method_get_header): Inflate method header on demand.
88 * reflection.c: Update to changes.
90 2006-02-23 Raja R Harinath <rharinath@novell.com>
92 * metadata.c (mono_metadata_inflate_generic_inst): If the
93 instantiation is closed, don't bother expanding it in the new
95 * class.c (inflate_generic_class): If the generic instantiation
96 doesn't change after inflation, return the argument itself.
97 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
99 (inflate_generic_context): If neither the generic class nor the
100 generic method instantiations change, return the original context.
101 * reflection.c (mono_method_get_object): Do
102 'mono_get_inflated_method' before accessing the ->klass field.
103 (inflate_mono_method): Don't create a MonoGenericMethod unless
105 (inflate_method): Don't pass a constructed type as the declaring
106 type of a methodbuilder.
108 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
110 * object.c: fix memory overwrite.
112 2006-02-22 Dick Porter <dick@ximian.com>
114 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
115 it doesn't work any more.
116 (mono_threads_request_thread_dump): Fix unused variable warnings.
118 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
120 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
121 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
122 the public header file.
124 2006-02-21 Zoltan Varga <vargaz@gmail.com>
126 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
128 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
130 * class-internals.h, object.c: reduce the size of MonoVTable
131 and store the interface_offsets array at negative offsets.
133 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
135 * metadata.c: tweak table descriptors data structures to reduce
136 size and runtime relocations.
138 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
140 * marshal.c: fix some types and opcodes to be type-safe
141 in marshaling wrappers.
143 2006-02-21 Ankit Jain <jankit@novell.com>
145 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
147 2006-02-21 Raja R Harinath <rharinath@novell.com>
149 * metadata.c (get_constraints): Relax debugging checks for monodis.
151 2006-02-21 Ankit Jain <jankit@novell.com>
153 * metadata.c (mono_metadata_load_generic_params): Move the code
154 checking for ambiguous generic params from here to mono/dis/get.c
155 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
157 2006-02-21 Raja R Harinath <harinath@gmail.com>
159 Fix assertion triggered when compiling nemerle.
160 * class.c (mono_get_shared_generic_inst): Rename from
161 get_shared_inst and make non-static.
162 * loader.c (mono_get_shared_generic_method): New. Used to create
163 the MonoGenericContext-equivalent of a MonoGenericContainer.
164 (mono_get_method_from_token): Initialize the 'context' field of
165 the created MonoGenericContainer.
166 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
167 * metadata.c (get_constraints): Add sanity check.
168 * class-internals.h: Add new internal methods.
170 * reflection.c (verify_safe_for_managed_space): New sanity check.
171 Currently checks that owner-less generic parameters aren't allowed
173 (mono_type_get_object): Use it.
174 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
175 that are now in mono_type_get_object.
176 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
178 2006-02-19 Raja R Harinath <harinath@gmail.com>
180 * metadata.c (mono_type_create_from_typespec): Rename from
181 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
182 argument and caching of types in the generic container.
183 (unwrap_arrays, find_generic_param): Remove.
184 * metadata-internals.h: Update.
185 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
187 2006-02-18 Zoltan Varga <vargaz@gmail.com>
189 * class.c (mono_class_get_exception_for_failure): Fix a warning.
191 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
192 return values. Fixes #77581.
194 * class.c (mono_fnptr_class_get): Switch name and name_space.
196 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
197 classes and add support for [In, Out] attributes.
198 (mono_marshal_free_asany): Ditto. Fixes #77524.
200 2006-02-18 Raja R Harinath <harinath@gmail.com>
202 * class.c (mono_class_from_generic_parameter): Make more robust to
203 incomplete MonoGenericContainers from monodis.
205 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
207 * class-internals.h: added some more exception types.
208 * class.c, metadata.c: added a few checks to handle missing
211 2006-02-17 Raja R Harinath <rharinath@novell.com>
213 Use owner-less generic-params some more.
214 * class.c (my_mono_class_from_generic_parameter): Remove.
215 (mono_class_from_generic_parameter): Handle null image,
216 param->name and param->owner.
217 (mono_class_from_mono_type): Update.
218 (mono_class_create_from_typespec): Remove 'container' parameter.
219 If that parameter is non-null, the result is always inflated by
220 'mono_class_get_full' anyway.
221 (mono_class_get): Rename from _mono_class_get. Remove 'container'
223 (mono_class_get_full): Update.
225 * class.c (inflate_generic_type) [GENERICINST]: If the generic
226 instance is not open, don't bother inflating.
227 (mono_class_setup_fields): Hoist some loop-invariants. Don't
228 parse metadata for inflated classes.
229 (_mono_class_get): Change GenericContext* parameter to
231 (mono_class_create_from_typespec): Likewise. Simplify, and
232 implement trivially. All the cases are handled in
233 mono_class_from_mono_type. Don't inflate returned class.
234 (mono_class_get_full): Delegate GENERICINST optimization to
235 inflate_generic_type.
236 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
238 2006-02-16 Dick Porter <dick@ximian.com>
240 * socket-io.c (create_object_from_sockaddr): Fix typo.
241 (create_sockaddr_from_object): Check array lengths before
242 potentially accessing items off the end.
243 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
244 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
245 (ves_icall_System_Net_Sockets_Socket_Send_internal)
246 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
247 length checks to avoid wraparound overflows.
248 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
249 contents of the array of sockets
250 (hostent_to_IPHostEntry2)
251 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
252 Check return value of inet_ntop ().
253 (addrinfo_to_IPHostEntry): Fix typo
255 2006-02-16 Raja R Harinath <rharinath@novell.com>
257 Type metadata parsing doesn't use generic-instantiation information.
258 * metadata.c (mono_metadata_parse_array_full): Change
259 MonoGenericContext* parameter to MonoGenericContainer*.
260 (mono_metadata_parse_type_full): Likewise.
261 (mono_type_create_from_typespec_full): Likewise.
262 (mono_metadata_parse_mh_full): Likewise.
263 (mono_metadata_parse_generic_inst): Likewise.
264 (do_mono_metadata_parse_generic_class): Likewise.
265 (do_mono_metadata_parse_type): Likewise.
266 * metadata-internals.h: Update to changes.
267 * class.c (mono_class_find_enum_basetype): Likewise.
268 (mono_class_setup_fields): Likewise.
269 (mono_class_create_from_typespec): Likewise.
270 * loader.c (method_from_methodspec): Likewise.
271 (mono_get_method_from_token): Likewise.
272 (mono_method_get_header): Likewise.
274 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
276 * marshal.c: handle additional GENERICINST case (patch from
277 Thong Nguyen <tum@veridicus.com>).
278 Fix a few cases where LDIND_I/STIND_I was used for references.
280 2006-02-16 Raja R Harinath <rharinath@novell.com>
282 * reflection.c (mono_reflection_get_token): Remove unused variable.
284 2006-02-16 Martin Baulig <martin@ximian.com>
286 * reflection.c (mono_reflection_get_token): Add support for fields
287 in instantiated generic types.
290 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
292 2006-02-15 Martin Baulig <martin@ximian.com>
295 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
296 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
297 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
298 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
300 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
302 * class.c, metadata.c, metadata.h, object.c, icall.c,
303 marshal.c: changed mono_type_get_underlying_type () to do
304 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
305 Fixed handling of instantiated generic valuetypes (bug #75479).
307 2006-02-15 Raja R Harinath <rharinath@novell.com>
309 * metadata.c (mono_metadata_decode_signed_value): Simplify.
310 Delegate to mono_metadata_decode_value, and work on the returned value.
312 * icall.c (ves_icall_MonoType_GetGenericArguments):
313 Add consistency check here too.
315 2006-02-15 Ankit Jain <jankit@novell.com>
317 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
320 2006-02-15 Ankit Jain <jankit@novell.com>
322 * metadata.c (mono_metadata_decode_signed_value): New function to decode
323 signed values, used only for representing lower bounds of arrays.
324 (mono_metadata_parse_array_full): Use new
325 mono_metadata_decode_signed_value to decode lower bounds.
327 2006-02-14 Martin Baulig <martin@ximian.com>
330 (mono_reflection_get_token): Support "MonoGenericMethod" and
331 "MonoGenericCMethod" and allow generic instances / methods.
333 2006-02-11 Zoltan Varga <vargaz@gmail.com>
335 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
336 to obtain the terminal size using an ioctl.
338 * object.c (mono_nullable_init): Revert this as nullable reference
340 (mono_nullable_box): Ditto.
342 2006-02-09 Dick Porter <dick@ximian.com>
344 * threads.c (mono_thread_detach): Drop a reference to the thread
347 2006-02-09 Zoltan Varga <vargaz@gmail.com>
349 * object.c (mono_nullable_init): Handle nullable reference types.
350 (mono_nullable_box): Ditto. Fixes #77446.
352 2006-02-07 Martin Baulig <martin@ximian.com>
354 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
356 2006-02-07 Ankit Jain <jankit@novell.com>
358 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
359 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
360 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
361 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
362 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
363 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
365 2006-02-02 Zoltan Varga <vargaz@gmail.com>
367 * class.c (mono_class_create_generic): Set type_token as well.
369 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
372 2006-02-02 Martin Baulig <martin@ximian.com>
374 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
375 has never been used so far.
377 2006-02-02 Martin Baulig <martin@ximian.com>
379 * mono-debug-debugger.h: Changed comment at the top of this file;
380 the header is not installed, but it's safe to #include it from
383 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
384 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
386 2006-02-02 Martin Baulig <martin@ximian.com>
389 (MonoSymbolTable): Removed the `metadata_info' field.
392 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
394 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
395 (mono_debugger_add_builtin_types): Removed.
396 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
397 (mono_debugger_create_notification_function): We now operate on a
398 pre-allocated area; take a `gpointer' and return `void'.
400 * mono-debug-debugger.c
401 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
402 (mono_debugger_add_builtin_types): Removed.
404 2006-02-02 Martin Baulig <martin@ximian.com>
406 * threads.c (mono_debugger_create_all_threads): New public method.
408 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
410 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
411 breaks on several platforms.
413 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
415 * assembly.c: the VS.NET build doesn't supply default values for
416 MONO_ASSEMBLIES and MONO_CFG_DIR.
418 2006-02-01 Zoltan Varga <vargaz@gmail.com>
420 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
423 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
425 * loader.c (method_from_memberref): Fix a warning.
427 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
429 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
430 with explicit layout. Fixes #77433.
432 2006-01-31 Zoltan Varga <vargaz@gmail.com>
434 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
435 max_interface_id is initialized before using it. Fixes #77398.
436 (ves_icall_Type_GetInterfaces): Ditto.
438 2006-01-30 Raja R Harinath <rharinath@novell.com>
440 * metadata.c (mono_metadata_parse_method_signature_full): Don't
441 allocate memory for parameter attributes when parsing memberref
443 * loader.c (mono_loader_set_error_method_load): Don't warn.
444 (method_from_memberref): Ensure MissingMethodException gets thrown
445 if method is not found. Make warning more informative.
447 2006-01-29 Raja R Harinath <harinath@gmail.com>
450 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
451 return true if is byref.
452 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
453 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
454 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
456 2006-01-27 Raja R Harinath <rharinath@novell.com>
458 Fix tests/find-method.2.il
459 * loader.c (find_method, find_method_in_class): Remove is_inflated
460 argument. Revert 2006-01-18 change.
461 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
462 is generic, search for method in its generic definition.
463 * class.c (mono_class_setup_vtable_general): Print generic
464 arguments of generic types in debugging printf.
466 2006-01-26 Zoltan Varga <vargaz@gmail.com>
468 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
470 * threads.c (mono_threads_request_thread_dump): New helper function.
472 2006-01-25 Raja R Harinath <rharinath@novell.com>
474 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
476 2006-01-25 Ankit Jain <jankit@novell.com>
478 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
479 move definition to ..
480 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
482 2006-01-25 Ankit Jain <jankit@novell.com>
483 Raja R Harinath <rharinath@novell.com>
485 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
486 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
489 2006-01-25 Martin Baulig <martin@ximian.com>
491 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
492 `MonoDebuggerThread' into debug-debugger.c.
494 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
496 * profiler.c: fix printing of data.
498 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
500 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
501 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
503 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
505 * object.c: fix deadlock related to string interning.
507 2006-01-23 Martin Baulig <martin@ximian.com>
509 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
511 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
513 2006-01-23 Martin Baulig <martin@ximian.com>
515 * mono-debug.h: Moved the prototypes of some functions which are
516 used by the JIT here from mono-debug-debugger.h.
518 2006-01-21 Martin Baulig <martin@ximian.com>
520 * Makefile.am: Don't install mono-debug-debugger.h.
522 2006-01-21 Martin Baulig <martin@ximian.com>
524 * mono-debug-debugger.h: Enforce the private status of this header
525 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
526 Moved some stuff from mono-debugger-jit-wrapper.h here.
528 2006-01-20 Raja R Harinath <rharinath@novell.com>
530 * class.c (mono_class_from_typeref): Add a sanity test to help
531 catch lack of assembly load/search hooks.
533 2006-01-19 Zoltan Varga <vargaz@gmail.com>
535 * marshal.c (emit_struct_conv): Relax the fields with same offset
536 check even more. Fixes #77230.
538 2006-01-18 Martin Baulig <martin@ximian.com>
540 * loader.c (find_method_in_class): Added `gboolean is_inflated'
541 argument; if false, we compare the uninstantiated signatures.
542 (method_from_memberref): Compare the uninstantiated signatures;
545 2006-01-18 Robert Jordan <robertj@gmx.net>
547 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
548 Clear the weak link. Fixes bug #77170.
550 * gc.c (mono_gchandle_free):
551 Reflect *-gc.c changes (tiny optimization).
553 2006-01-18 Zoltan Varga <vargaz@gmail.com>
555 * metadata.c (mono_metadata_signature_dup): Applied patch from
556 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
559 2006-01-17 Zoltan Varga <vargaz@gmail.com>
561 * marshal.c (emit_struct_conv): Allow fields with the same offset when
562 marshalling from native to managed code. Fixes #77230.
564 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
566 * threadpool.c: fix problem (Mac only) when more than one asynchronous
567 connect. Fixes bug #77020.
569 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
571 * class.c: fixed id assignement for nested interfaces (bug #77275).
572 Added also better info for --print-vtable debugging.
574 2006-01-12 Martin Baulig <martin@ximian.com>
576 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
577 interfaces on-the-fly; fixes #76625.
580 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
581 don't need that anymore.
583 2006-01-12 Miguel de Icaza <miguel@novell.com>
586 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
587 To avoid initing the nested_classes when not needed I turned the
588 PeerCredData as a toplevel internal class, as it has to be shared
591 Fixes the CASA issue.
593 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
595 * domain.c: Accessors for MonoJitInfo
597 * profiler-private.h: Add jitinfo to the end jit hook
599 * profiler.[ch]: Define new hooks, called after jitting which give
600 the MonoJitInfo that was compiled
602 2006-01-10 Martin Baulig <martin@ximian.com>
604 * class.c (mono_class_setup_events): Add support for generic
605 classes; fixes #76440.
607 2006-01-06 Raja R Harinath <rharinath@novell.com>
610 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
613 2006-01-03 Zoltan Varga <vargaz@gmail.com>
615 * object.c (mono_runtime_invoke_array): Add Nullable support.
617 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
619 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
621 * file-io.c: Don't consider sockets as directory and avoid an endless
622 loop. Fix bug #76966.
624 2006-01-03 Zoltan Varga <vargaz@gmail.com>
626 * object.c (mono_nullable_init): New helper function.
627 (mono_nullable_box): Ditto.
629 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
631 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
633 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
635 2006-01-02 Zoltan Varga <vargaz@gmail.com>
637 * class.c (mono_class_is_assignable_from): Make T assignable to
640 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
642 * appdomain.c: Bump corlib version to 46.
643 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
644 serialization purpose) and changed ves_icall_System_Reflection_
645 Assembly_get_code_base signature to accept a boolean (to escape, or
646 not, the assembly code base).
648 2005-12-23 Dick Porter <dick@ximian.com>
652 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
653 CreateEvent icall now returns "created" boolean parameter.
655 2005-12-22 Zoltan Varga <vargaz@gmail.com>
657 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
660 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
661 when attr_klass is an interface. Fixes #77045.
663 2005-12-20 Zoltan Varga <vargaz@gmail.com>
665 * marshal.c (emit_struct_conv): Fix previous patch.
667 * marshal.c (emit_struct_conv): Add a check for fields with the same
670 2005-12-20 Raja R Harinath <rharinath@novell.com>
672 Fix regression in Mono.C5.
673 * class.c (mono_class_create_generic): If 'klass' is an interface
674 set up the interface offsets.
675 (mono_class_is_assignable_from): Don't throw away generic arguments.
677 2005-12-19 Raja R Harinath <rharinath@novell.com>
679 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
682 2005-12-15 Raja R Harinath <rharinath@novell.com>
684 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
686 (do_mono_metadata_parse_generic_class): Don't pass the current
687 generic context when parsing the type being instantiated: it
688 cannot use it, anyway.
690 * loader.c (method_from_memberref): Don't inflate a signature if
691 it doesn't contain any type parameters.
693 2005-12-15 Zoltan Varga <vargaz@gmail.com>
695 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
697 2005-12-14 Martin Baulig <martin@ximian.com>
700 (mono_type_get_name_recurse): Don't return null for type
701 parameters and open generic classes.
702 (mono_class_setup_methods): Don't exclude generic instances.
703 (mono_get_unique_iid): Use different IDs for different
704 instantiations of the same generic type.
705 (mono_class_setup_vtable): Only use setup_generic_vtable() for
706 open generic instances; create a normal vtable for closed generic
708 (mono_class_setup_vtable_general): We're now also called for
709 closed generic instances.
712 (mono_reflection_bind_generic_parameters): Correctly use
713 mono_metadata_lookup_generic_inst() everywhere.
715 2005-12-14 Zoltan Varga <vargaz@gmail.com>
717 * object.c (mono_class_create_runtime_vtable): Call
718 mono_class_setup_vtable ().
720 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
722 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
725 * loader.c (mono_loader_set_error_type_load): Print the type load
726 warnings to the console so they are more visible to the user.
727 (mono_loader_set_error_method_load): Ditto.
729 * reflection.c (ensure_runtime_vtable): Revert the last change as it
732 * reflection.c (ensure_runtime_vtable): Fix build.
734 * reflection.c (ensure_runtime_vtable): Disable an optimization which
735 doesn't work in all cases.
737 2005-12-13 Zoltan Varga <vargaz@gmail.com>
739 * object.c (mono_array_new_full): Treat a single dimensional array
740 with 0 lower bounds as an szarray. Fixes #76973.
742 * reflection.c (custom_attr_visible): Really fix this.
744 2005-12-12 Zoltan Varga <vargaz@gmail.com>
746 * reflection.c (custom_attr_visible): Allow nested public attributes
749 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
752 2005-12-12 Raja R Harinath <harinath@gmail.com>
754 * class.c (set_generic_param_owner): Delete.
755 (mono_class_create_from_typedef): Don't set ->owner field of
756 generic parameters to "param containers" of enclosing classes.
757 * reflection.c (mono_reflection_initialize_generic_parameter):
760 2005-12-11 Zoltan Varga <vargaz@gmail.com>
762 * reflection.c (custom_attr_visible): Fix build.
764 2005-12-10 Zoltan Varga <vargaz@gmail.com>
766 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
769 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
770 handling of null parameter defaults.
772 2005-12-09 Raja R Harinath <rharinath@novell.com>
774 * class.c (mono_class_from_generic_parameter): Don't set
775 klass->generic_container.
776 (my_mono_class_from_generic_parameter): Likewise.
778 2005-12-07 Zoltan Varga <vargaz@gmail.com>
780 * reflection.c (load_public_key): Fix a warning.
781 (method_encode_code): Fix unaligned accesses.
783 2005-12-07 Martin Baulig <martin@ximian.com>
785 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
788 (write_generic_param_entry): Encode our custom attrs.
790 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
792 2005-12-07 Martin Baulig <martin@ximian.com>
794 * reflection.c (encode_new_constraint): Removed; we don't use the
795 `NewConstraintAttribute' anymore.
797 2005-12-06 Zoltan Varga <vargaz@gmail.com>
799 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
800 not fire a TypeResolve event when Assembly.GetType () is called.
802 2005-12-05 Ben Maurer <bmaurer@ximian.com>
804 Beginning of support for nullable types in the runtime. Parts of
805 this patch are from Martin.
807 * appdomain.c (MONO_CORLIB_VERSION): Bump
809 * domain.c (mono_init_internal): get the nullable type
811 * class.c (mono_class_is_nullable): New method
812 (mono_class_get_nullable_param): New mehod
813 (mono_class_create_generic): In types T? set cast_class to T
815 * class-internals.h (MonoDefaults): new nullable default class
816 (mono_class_get_nullable_param, mono_class_get_nullable_param):
819 2005-12-05 Raja R Harinath <rharinath@novell.com>
821 * metadata.c (select_container): New. Refactor code to select the
822 appropriate GenericContainer given the type of generic parameter
824 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
825 not a MonoGenericContext. Use select_container. Update parameters.
826 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
828 (unwrap_arrays): Remove duplicate tests.
829 (find_generic_param): Rename from 'has_same_context'. Now walks a
830 generic instantiated class to find any arguments that are generic
832 (mono_type_create_from_typespec_full): Use find_generic_param to
833 avoid evicting some generic instantiations from the typespec
836 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
838 * reflection.c: fixed writing of doubles on ARM FPA.
840 2005-12-02 Robert Jordan <robertj@gmx.net>
842 * icall.c: Fixed EventInfo.ReflectedType (#76829).
844 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
846 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
847 least on SUSE 10 they are not the same (on debian, they are just the
850 2005-12-01 Raja R Harinath <rharinath@novell.com>
852 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
853 DeclaringType for VARs and MVARs.
854 * class.c (set_generic_param_owner): Fix initialization of owner
857 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
859 * icall.c: fixed Enum.ToObject() to correctly convert the values.
861 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
863 * threadpool.c: workaround for a bug that shows up on the Mac:
864 select()+connect() on a blocking socket is not like it should
865 be, so we proceed to connect() in that case, wasting the I/O
866 threadpool thread until connect succeedes. Fixes bug #75436.
868 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
870 * threadpool.c: fix typo when setting file descriptor states.
872 2005-11-28 Raja R Harinath <rharinath@novell.com>
874 * class-internals.h (MonoGenericContainer.is_signature): Remove.
875 * metadata.c (mono_metadata_parse_method_signature_full): Don't
876 create a temporary signature container.
877 (mono_metadata_parse_generic_param): Update to changes.
878 (mono_type_create_from_typespec_full): Update to changes.
879 * loader.c (method_from_memberref): Don't use a
880 MonoGenericContainer while parsing a memberref signature.
881 (method_from_methodspec): Remove dead-store of the 'container'
882 variable. It's overwritten before use.
884 * metadata.c (mono_type_create_from_typespec_full): Make debugging
886 (mono_metadata_parse_generic_param): Likewise.
887 * loader.c (find_method_in_class): Does not need a
888 MonoGenericContainer. Use 'mono_method_signature' rather than
889 'mono_method_signature_full'.
890 (find_method, mono_get_method_constrained, method_from_memberref):
893 * metadata.c (mono_type_create_from_typespec_full): Ensure that
894 owner-less generic-parameters are never evicted from the typespec
897 * loader.c (method_from_memberref): Don't use the current context
898 when parsing signatures.
899 (method_from_methodspec, mono_get_method_from_token): Update to changes.
901 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
902 side-effects in g_assert.
903 * loader.c (mono_get_method_from_token): Resolve klass earlier so
904 that we don't potentially lose information.
906 2005-11-26 Dick Porter <dick@ximian.com>
909 * threads.c: icalls to implement basic (ie, not named)
910 System.Threading.Semaphore.
912 2005-11-24 Dick Porter <dick@ximian.com>
915 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
916 Use GetProcessId() if it's available.
918 2005-11-23 Zoltan Varga <vargaz@gmail.com>
920 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
922 2005-11-23 Raja R Harinath <rharinath@novell.com>
923 Ankit Jain <jankit@novell.com>
925 * loader.c (mono_get_method_from_token): Initialize 'method' field
926 of all generic parameters before parsing the signature. Remove
927 code that "fixed"-up MVAR references.
929 2005-11-23 Ankit Jain <jankit@novell.com>
931 * metadata.c (mono_metadata_has_generic_params):
932 (mono_metadata_load_generic_param_constraints):
933 (mono_metadata_load_generic_params): Move duplicate code ...
934 (mono_metadata_get_generic_param_row): ... here. Returns the
935 first row-id in GenericParam table for a given owner (token).
936 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
939 2005-11-23 Raja R Harinath <rharinath@novell.com>
940 Ankit Jain <jankit@novell.com>
942 * metadata.c (mono_metadata_class_equal): Pass signature_only when
944 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
945 type->data.generic_param only if the type is an MVAR.
946 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
947 leak owner-less VARs and MVARs into managed space.
949 2005-11-21 Martin Baulig <martin@ximian.com>
952 (MonoMethod): Moved the `generic_container' here from
953 `MonoMethodNormal' since we now also need it for
955 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
956 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
957 an union containing both `MonoMethodNormal' and
961 (mono_get_method_from_token): Allow implementing generic methods
965 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
968 2005-11-17 Dick Porter <dick@ximian.com>
972 * process.c: Split the Process Start_internal icall into
973 ShellExecuteEx_internal and CreateProcess_internal, which are
974 called depending on whether UseShellExecute is true. Fixes bug
977 * appdomain.c (MONO_CORLIB_VERSION): Incremented
979 2005-11-17 Zoltan Varga <vargaz@gmail.com>
981 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
982 'msize' parameters, use the information in 'mspec' instead.
983 (emit_object_to_ptr_conv): Ditto.
985 * marshal.c (emit_struct_conv): Handle explicit layout structs with
986 fields out of order. Fixes #76733.
988 2005-11-17 Ankit Jain <jankit@novell.com>
990 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
992 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
994 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
997 2005-11-16 Zoltan Varga <vargaz@gmail.com>
999 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
1000 for types with non-auto layout. Fixes #76717.
1002 2005-11-16 Ankit Jain <jankit@novell.com>
1004 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
1005 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
1006 if generic_context is null.
1007 (mono_metadata_generic_param_equal): param->owner can be null.
1008 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
1011 2005-11-16 Zoltan Varga <vargaz@gmail.com>
1013 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
1016 2005-11-15 Martin Baulig <martin@ximian.com>
1018 * object.c (set_value): Use mono_class_from_mono_type() instead of
1019 the hack for generic instances; fixes #76136.
1021 2005-11-15 Zoltan Varga <vargaz@gmail.com>
1023 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
1026 * image.c (load_metadata_ptrs): Initialize the new fields.
1028 * reflection.c (create_dynamic_mono_image): Ditto.
1030 * reflection.c (build_compressed_metadata): Use the new fields.
1032 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
1035 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
1038 2005-11-15 Ankit Jain <jankit@novell.com>
1039 Raja R Harinath <harinath@gmail.com>
1041 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
1042 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
1043 new per-generic_container cache if the cached MonoType's context matches
1044 the current context.
1045 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
1046 to the expected context.
1047 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
1049 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1051 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
1052 we changed the signature of an icall.
1053 * icall.c: Modify to mono_double_ParseImpl return true/false
1054 depending on the success, instead of throwing the exception. This will
1055 help us in Double.TryParse methods.
1057 2005-11-14 Zoltan Varga <vargaz@gmail.com>
1059 * marshal.c (emit_marshal_object): Throw an exception when
1060 marshalling 'object' instead of crashing. Fixes #76696.
1062 2005-11-11 Zoltan Varga <vargaz@gmail.com>
1064 * class-internals.h: Add prototype for mono_type_get_full_name ().
1066 2005-11-11 Dick Porter <dick@ximian.com>
1068 * threads.c (mono_thread_manage): Make sure the main thread has
1069 abandoned all its mutexes when cleaning up. Fixes bug 74680.
1071 2005-11-11 Zoltan Varga <vargaz@gmail.com>
1073 * loader.c (mono_loader_set_error_type_load): Log a warning to the
1074 console about the missing type.
1075 (mono_loader_set_error_method_load): Ditto.
1077 2005-11-09 Miguel de Icaza <miguel@novell.com>
1079 * mono-config.c (mono_get_config_dir): Set the system defaults if
1082 * assembly.c (mono_set_dirs): New API entry point to set the
1083 assembly and the config directory in one call
1085 2005-11-09 Zoltan Varga <vargaz@gmail.com>
1087 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
1088 the ftnptr was created from a delegate in a domain other than the
1089 current domain. Fixes #75377.
1091 * exception.h exception.c: Add mono_get_exception_not_supported ().
1093 2005-11-08 Martin Baulig <martin@ximian.com>
1095 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
1097 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
1099 * security-manager.h: Added definitions to deal with strongname key
1100 pairs bigger (and smaller) than 1024 bits.
1101 * reflection.c: Remove hardcoded strongname size (128 bytes) and
1102 adjust wrt the public key length being used.
1104 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
1106 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
1107 Windows build (r51396-51397).
1109 2005-11-03 Martin Baulig <martin@ximian.com>
1111 * class.c (mono_class_setup_vtable_general): Also add generic
1112 methods to the vtable; fixes #76581.
1114 2005-11-01 Miguel de Icaza <miguel@novell.com>
1116 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
1117 sure that we lookup GetString method from the System.Text.Encoding
1118 class, not the derived class or we get an empty method.
1122 2005-10-25 Miguel de Icaza <miguel@novell.com>
1124 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
1125 if it has been previously set (embedders).
1127 Make mono_set_rootdir available also on Unix.
1129 005-10-24 Robert Jordan <robertj@gmx.net>
1131 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
1133 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
1135 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
1136 only calls which are made to native code use this flag.
1138 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
1140 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
1142 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
1143 Add support for FieldBuilders.
1145 2005-10-29 Martin Baulig <martin@ximian.com>
1148 (mono_debug_using_mono_debugger): New public method; returns
1149 whether we're running inside the debugger.
1151 2005-10-27 Zoltan Varga <vargaz@gmail.com>
1153 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
1154 for Method/Constructor/FieldBuilders.
1156 2005-10-26 Zoltan Varga <vargaz@gmail.com>
1158 * reflection.c (module_add_cattrs): Save custom attributes for global methods
1161 2005-10-26 Martin Baulig <martin@ximian.com>
1163 * mono-debug-debugger.c
1164 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
1166 2005-10-24 Raja R Harinath <harinath@gmail.com>
1168 * icall.c (base64_to_byte_array): Don't pass an out-of-range
1171 2005-10-21 Zoltan Varga <vargaz@gmail.com>
1173 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
1174 when passing valuetypes byref. Fixes #76502.
1176 2005-10-19 Jackson Harper <jackson@ximian.com>
1178 * profiler.c: Don't put a . in front of types that are not in a
1181 2005-10-18 Zoltan Varga <vargaz@gmail.com>
1183 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
1185 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
1187 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
1189 (mono_marshal_get_ldflda_wrapper): Fix a warning.
1191 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1193 * assembly.c metadata-internals.h icall.c: Define an additional
1194 parameter for mono_assembly_name_parse_full, so we can avoid creating
1195 S.R.AssemblyName.Version when no version info wasn't passed.
1197 2005-10-09 Miguel de Icaza <miguel@novell.com>
1199 * class.c (mono_type_get_full_name): Reimplement method that was
1202 * image.c: Some docs
1204 2005-10-10 Zoltan Varga <vargaz@gmail.com>
1206 * profiler.c (output_newobj_profile): Fix printing of Total memory
1209 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
1211 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
1213 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
1215 * threads.c: remove debug output.
1217 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
1219 * threads.c (mono_thread_manage): Fix crashes if more than 64
1220 threads need to be aborted. Hopefully fixes #75899.
1222 * assembly.c (mono_stringify_assembly_name): New helper function.
1224 * class.c: Use mono_stringify_assembly_name instead of the similar
1227 * assembly.h assembly.c: Add support for calling a postload search
1228 hook if an assembly cannot be loaded.
1230 * appdomain.c: Register new search hooks which call the AssemblyResolve
1231 events in AppDomain. Fixes #75231
1233 2005-10-07 Martin Baulig <martin@ximian.com>
1235 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
1236 methods without debug info.
1238 2005-10-07 Zoltan Varga <vargaz@gmail.com>
1240 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
1243 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1245 * file-io.c: now that we return symlinks, use lstat and, when the file
1246 is a symbolic link, stat, to get the file attributes. Also avoid the
1247 conversion to/from utf16/external.
1249 2005-10-06 Zoltan Varga <vargaz@gmail.com>
1251 * class.c (mono_class_layout_fields): Compute klass->has_references
1252 correctly if an embedded valuetype is not yet initialized. Fixes
1255 2005-10-04 Martin Baulig <martin@ximian.com>
1258 (mono_metadata_load_generic_param_constraints): New public
1259 function; splitted the constraints loading out from
1260 mono_metadata_load_generic_params().
1262 * class.c (mono_class_create_from_typedef): Call
1263 mono_metadata_load_generic_param_constraints() after setting up
1264 the type and creating our parent; fixes #75329.
1266 2005-10-04 Martin Baulig <martin@ximian.com>
1268 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
1269 non-dynamic parent classes.
1271 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
1273 * file-io.c : win32 build fix (ETXTBSY seems not found).
1275 2005-10-04 Martin Baulig <martin@ximian.com>
1278 (mono_image_get_methodspec_token): Make the cache actually work;
1281 2005-10-04 Martin Baulig <martin@ximian.com>
1283 * class.c (mono_class_name_from_token): Removed the unneccessary
1284 `MonoGenericContext *' argument.
1286 2005-10-04 Martin Baulig <martin@ximian.com>
1289 (method_from_methodspec): Make the caching work again; fixes the
1290 performance regression from #76262.
1292 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1296 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
1297 GetFileSystemEntries that performs the same work but without going
1298 into io-layer, locking, etc.
1300 2005-09-30 Zoltan Varga <vargaz@gmail.com>
1302 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
1303 ThreadState_Stopped as well. Fixes #76047.
1305 2005-09-29 Martin Baulig <martin@ximian.com>
1308 (inflate_generic_context): If the new context has a `gmethod', set
1309 its `container' that that gmethod's `container'.
1312 (mono_metadata_parse_generic_param): Simplify things;
1313 `generic_container = generic_context->container;' is just fine.
1315 * loader.c (method_from_methodspec): Code cleanups.
1317 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
1319 * decimal.c: fix warning (and let gcc generate correct
1320 code on ARM with optimizations).
1322 2005-09-28 Martin Baulig <martin@ximian.com>
1325 (method_from_memberref): Added `MonoGenericContext *class_context'
1326 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
1327 (method_from_methodspec): If we're a memberref, use the enclosing
1328 context when parsing its parent. Fixes #76262; see gtest-206.cs.
1330 2005-09-28 Martin Baulig <martin@ximian.com>
1332 * object.c (mono_runtime_invoke_array): Added support for
1333 MONO_TYPE_GENERICINST; fixes #75917.
1335 2005-09-27 Martin Baulig <martin@ximian.com>
1337 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
1338 `k->byval_arg.type' to determine the actual type.
1340 * loader.c (method_from_methodspec): Removed some hacks.
1342 2005-09-27 Ben Maurer <bmaurer@ximian.com>
1344 * class-internals.h (mono_field_is_deleted): Do the test for
1345 rtspecialname before we check the actual name of the field. This
1346 prevents us from dereferencing a pointer into the string table,
1347 saving us from accessing a few pages
1349 * *.c: Replace the use of {Enter,Leave}CriticalSection with
1350 macros. This will allow a deadlock debugger to easily be plugged
1353 2005-09-27 Martin Baulig <martin@ximian.com>
1355 * loader.c (method_from_methodspec): Create a "signature"
1356 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
1358 2005-09-27 Martin Baulig <martin@ximian.com>
1361 (inflate_generic_class): Correctly set the new context's
1365 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
1366 instead of a `MonoGenericContext *'.
1367 (mono_method_signature_full): Take a `MonoGenericContainer *'
1368 instead of a `MonoGenericContext *'.
1371 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
1372 instead of a `MonoGenericContext *'.
1373 (mono_metadata_parse_method_signature_full): Likewise.
1375 2005-09-26 Martin Baulig <martin@ximian.com>
1378 (mono_class_from_generic_parameter): Set `klass->generic_container'
1379 (mono_class_from_generic_parameter): Likewise.
1380 (mono_bounded_array_class_get): We inherit the generic container
1381 from the element class.
1384 (find_method, find_method_in_class): Take a `MonoGenericContext *'
1385 argument rather than computing it here.
1386 (method_from_memberref): Correctly set the generic context before
1387 parsing the signature. Fixes #75681.
1389 2005-09-26 Zoltan Varga <vargaz@gmail.com>
1391 * object.c (mono_class_has_special_static_fields): Fix warnings.
1393 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1395 * assembly.c: Add parse_public_key function, to
1396 par the public keys. Also added mono_assembly_name_parse_full,
1397 to define it the parsed key should be freed or not.
1398 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
1399 to parse a long format assembly name.
1400 * metadata-internals.h: Keep mono_assembly_name_parse_full as
1401 private, since calling it to preserve the key requires
1402 freeing it manually.
1404 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
1406 * locales.c : removed HAVE_ICU part.
1408 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
1410 * object.c (mono_class_create_runtime_vtable): Avoid calling
1411 field_is_special_static if the klass has no special static fields.
1413 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
1414 (MonoCachedClassInfo): Likewise.
1416 * object.c (mono_class_has_special_static_fields): New helper function.
1418 2005-09-23 Zoltan Varga <vargaz@gmail.com>
1420 * class.c (mono_class_create_from_typedef): Don't call
1421 interfaces_from_typedef_full for enums.
1422 (mono_class_create_from_typedef): Compute the base types of enums directly
1423 without calling mono_class_setup_fields ().
1424 (mono_class_find_enum_basetype): New helper function.
1426 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
1427 one place inside the string heap.
1429 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
1431 * class.c: locking fixes, code cleanups, some docs added.
1432 Allocate some data structures in the image mempool.
1434 2005-09-23 Zoltan Varga <vargaz@gmail.com>
1436 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
1439 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
1441 * class-internals.h, class.c, reflection.c: reduce memory taken by
1444 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
1446 * metadata.c, metadata.h, loader.h: documentation updates, code and
1449 2005-09-23 Zoltan Varga <vargaz@gmail.com>
1451 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
1454 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
1455 page faults caused by the runtime while reading metadata.
1457 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1459 * socket-io.c: the field names were changed 3 months ago and no one
1460 realized until bug #76077 got filed!
1462 2005-09-20 Martin Baulig <martin@ximian.com>
1464 * icall.c (assembly_icalls): Removed some unused debugger icalls.
1466 2005-09-20 Martin Baulig <martin@ximian.com>
1468 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
1469 write the rank into the class entry.
1471 2005-09-20 Martin Baulig <martin@ximian.com>
1473 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
1475 2005-09-19 Zoltan Varga <vargaz@gmail.com>
1477 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1479 * icall.c (custom_attrs_defined_internal): New icall.
1481 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
1483 (mono_custom_attrs_construct_by_type): New helper function.
1485 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
1487 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
1488 terminate the resulting string. Fixes #76123.
1490 2005-09-16 Martin Baulig <martin@ximian.com>
1493 (mono_debug_add_method): Ignore inflated methods for the moment.
1495 2005-09-14 Martin Baulig <martin@ximian.com>
1497 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
1499 2005-09-13 Zoltan Varga <vargaz@gmail.com>
1501 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
1502 return a success/failure indication.
1503 (mono_metadata_interfaces_from_typedef_full): Ditto.
1504 (get_constraints): Ditto.
1506 2005-09-12 Zoltan Varga <vargaz@gmail.com>
1508 * marshal.c (emit_marshal_array): Fix handling of null arrays.
1510 * marshal.c (emit_marshal_array): Add support for returning string
1511 arrays from delegates. Fixes #76063.
1513 * marshal.c: Use the emit_ldloc/stloc macros where possible.
1515 2005-09-11 Zoltan Varga <vargaz@gmail.com>
1517 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
1520 2005-09-09 Zoltan Varga <vargaz@gmail.com>
1522 * reflection.c icall.c: Fix after mono_get_exception_type_load
1525 * assembly.c (mono_assembly_get_assemblyref): New helper function.
1526 (mono_assembly_load_reference): Use the new helper.
1528 * class-internals.h (MonoLoaderError): New structure containing
1529 information about type loading errors.
1531 * class-internals.h loader.c: Add APIs to store per-thread loader
1534 * loader.c class.c: Set the loader error if needed.
1536 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
1538 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
1540 * decimal.c: fixed to handle the broken ARM fp format.
1542 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
1544 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
1547 2005-09-06 Martin Baulig <martin@ximian.com>
1549 * domain.c (supported_runtimes): Added v2.0.50727.
1551 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
1553 * culture-info.h: reduce the size of some structures.
1555 2005-09-05 Martin Baulig <martin@ximian.com>
1557 Reflect latest API changes in the August CTP.
1560 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
1561 ("MonoType.HasGenericArguments"): Removed.
1562 ("MonoMethod.BindGenericParameters"): Renamed to
1563 "MakeGenericMethod".
1564 ("MethodBuilder.BindGenericParameters"): Renamed to
1565 "MakeGenericMethod".
1567 2005-09-05 Martin Baulig <martin@ximian.com>
1569 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
1571 2005-09-05 Martin Baulig <martin@ximian.com>
1573 Applying a patch from Michal Moskal <malekith@nemerle.org>.
1575 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
1576 generic_container is non-NULL.
1578 2005-09-05 Martin Baulig <martin@ximian.com>
1580 Applying a patch from Michal Moskal <malekith@nemerle.org>.
1582 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
1584 2005-08-29 Michal Moskal <malekith@nemerle.org>
1586 * reflection.c (encode_locals,
1587 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
1588 for large generic types.
1590 2005-09-05 Martin Baulig <martin@ximian.com>
1592 Applying a patch from Michal Moskal <malekith@nemerle.org>.
1594 * class.c (mono_dup_array_type): New public method.
1595 (mono_metadata_signature_deep_dup): New public method.
1596 (dup_type): Correctly duplicate array and function types.
1598 2005-09-05 Martin Baulig <martin@ximian.com>
1600 Applying a patch from Michal Moskal <malekith@nemerle.org>.
1602 * reflection.c (get_default_param_value_blobs): Handle generic types
1603 and generic methods.
1605 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
1607 * class.c: Fixed error reporting (method/class were inversed) for
1608 inheritance demands.
1609 * security-manager.c|h: Added the AppDomain when calling the managed
1610 System.Security.SecurityManager.InheritanceDemand method.
1612 2005-09-01 Raja R Harinath <rharinath@novell.com>
1614 * reflection.c (encode_marshal_blob): 'marshaltype' and
1615 'marshaltyperef' are alternate sources for the custom marshaler
1618 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
1620 * class.c: fix creation of array classes with rank == 1
1621 (patch by Ankit Jain <jankit@novell.com>).
1623 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
1625 * object.c: fix check for creating the bound data for arrays vs
1628 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1630 * object.c: configuration file name is now based on the executable name,
1631 not the image name. Fixes bug #75931.
1633 2005-08-29 Zoltan Varga <vargaz@gmail.com>
1635 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
1636 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
1638 2005-08-25 Zoltan Varga <vargaz@gmail.com>
1640 * rand.c: Use wincrypt.h instead of WinCrypt.h.
1642 2005-08-24 Ankit Jain <jankit@novell.com>
1643 Raja R Harinath <rharinath@novell.com>
1645 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
1646 called by it recursively.
1647 (mono_class_init): Remove special case in pending_init handling, since it's
1648 superseded by the fix to mono_class_from_typeref.
1650 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
1652 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
1653 BROKEN_THREAD_START stuff.
1655 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
1657 * class-internals.h object.c: Add a new kind of trampoline called a delegate
1660 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
1662 * object.c (mono_delegate_ctor): Replace the original function address with
1663 a delegate trampoline.
1665 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
1667 * icall.c: add boolean argument to base64_to_byte_array and
1668 InternalFromBase64String to control whether a whitespace-only string
1669 is allowed (or should casue a FormatException to be thrown). We need
1670 this as the behavior has changed between MS.NET 1.x and 2.0, and we
1671 to match the MS behaviour in both profiles.
1672 * appdomain.c: Bump corlib version.
1674 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1676 This patch implements a big portion of publisher policy
1677 support, used to bind assembly versions and redirect
1678 one assembly from version A to version B.
1681 New GSList loaded_assembly_bindings, for storing the cached
1683 (assembly_binding_maps_name): New static function for checking if a
1684 assembly binding information maps an assembly name.
1685 (mono_assembly_binding_info_free): New function for freeing
1686 assembly binding information resources.
1687 (get_publisher_policy_info): New static function for retrieving
1688 assembly binding information from a MonoImage.
1689 (compare_versions): New static function for comparing an assembly
1690 binding information data and the version of an assembly name.
1691 (check_policy_versions): New static function for checking if an
1692 assembly binding info mapping an assembly name is valid for it.
1693 (mono_assembly_load_publisher_policy): New static function for
1694 loading the 'policy.major.minor.MyAssembly' image for an assembly
1695 with an assembly name 'aname'.
1696 (mono_assembly_bind_version): New static function for updating
1697 assembly redirection.
1698 (mono_assembly_apply_binding): New static function for applying
1700 (search_binding_loaded): New static function for searching
1701 loaded assembly binding infos in the cache domain.
1702 (mono_assembly_load_full): Don't apply assembly binding for
1703 reflection only assemblies.
1705 * metadata-internals.h: Add MonoAssemblyBindingInfo,
1706 which contains information about assembly binding. Also
1707 declare signature for mono_config_parse_publisher_policy ()
1708 function, used to retrieve pub policy info.
1711 (publisher_policy_start): New static function used to parse publisher
1712 policy config files.
1713 (publisher_policy_parser): New static MonoParseHandler containing
1714 the functions used when parsing config files.
1715 (mono_config_parse_publisher_policy): New function for parsing
1716 publisher policy files.
1718 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
1720 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
1722 * marshal.c (mono_delegate_free_ftnptr): Ditto.
1724 * object.c (mono_get_addr_from_ftnptr): New helper function.
1726 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
1728 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1730 2005-08-19 Dick Porter <dick@ximian.com>
1732 * threads.c, threads.h, appdomain.c, appdomain.h,
1733 profiler-private.h, monitor.c, object.c, object-internals.h,
1734 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
1735 store the thread ID, so it can hold a 64 bit value if needed.
1737 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
1739 * reflection.c (mono_reflection_create_dynamic_method): Store the
1740 handle class into the method references as well so ldtoken works in
1743 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
1746 2005-08-19 Ankit Jain <jankit@novell.com>
1749 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
1750 here rather than using the method signature of a arbitrary function
1751 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
1753 Hack done with Harinath.
1755 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1757 * threadpool.c: disable printing stack traces when we get a exception
1758 in a threadpool thread. I need to do more testing to figure out which
1759 cases actually print this. Fixes bug #75828.
1761 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1763 * icall.c: there might be ignored whitespace after the last '='. This
1764 fixes length computation and bug #75840.
1766 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
1768 * assembly.c (mono_assembly_load_full): Consider .exe extension as
1771 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
1774 * reflection.c (create_custom_attr_data): Ditto.
1776 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
1778 * locales.c, culture-info.h : removed RegionLCIDMap.
1779 * culture-info-tables.h : regenerated.
1781 2005-08-16 Martin Baulig <martin@ximian.com>
1783 * class.c (mono_type_get_name_recurse): Small fix.
1785 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
1787 * locales.c : indentation fixie.
1789 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
1791 * object-internals.h,
1795 icall.c : added RegionInfo table support.
1796 * culture-info-table.h : regenerated for region support.
1798 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
1800 * reflection.c (resolve_object): handle all kinds of MonoMethod
1801 including generic ones
1803 2005-08-12 Ankit Jain <jankit@novell.com>
1805 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
1806 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
1808 2005-09-12 Lluis Sanchez <lluis@ximian.com>
1810 * process.c: Don't close a thread handle when it's NULL. This is a
1811 workaround for bug #75733.
1813 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
1815 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
1817 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
1819 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
1821 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1823 * threadpool.c: if a work item in the thread pool has a callback that
1824 catches a exception, don't propagate it after invoking the callback.
1827 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
1829 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
1831 * class-internals.h (MonoCachedClassInfo): Add some new fields.
1833 * class.c (mono_class_init): Load field info lazily in the AOT case.
1835 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
1837 2005-08-03 Ankit Jain <jankit@novell.com>
1840 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
1841 PInvoke calling convention is 0.
1843 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
1845 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
1846 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
1848 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
1850 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
1851 to handle threads not started by the GC (patch by Michael Meeks
1852 <michael.meeks@novell.com>).
1854 2005-07-31 Kamil Skalski <nazgul@omega.pl>
1856 * reflection.c: Make buffer used in emitting types larger for some
1857 big generic types (patch by Michal Moskal).
1859 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
1861 * mono-debug.c: Fix some (not all) alignment problems.
1863 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1865 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
1866 Invoke mono_image_load_from_data_full passing the refonly
1870 (mono_assembly_open_from_bundle): Add the refonly argument,
1871 in order to pass it to other methods it calls to.
1872 (do_mono_assembly_open): Add the refonly argument, in order
1873 to pass it to other methods it calls to.
1874 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
1875 the refonly parameter to it.
1877 * image.c: Add loaded_images_refonly_hash and
1878 loaded_images_refonly_guid_hash to cache the reflection
1880 (mono_images_init): Initialize the hash tables used for
1881 caching the reflection only images.
1882 (load_modules): Invoke mono_image_open_full passing the refonly
1883 parameter to load the modules the correct way.
1884 (build_guid_table): Add the refonly argument, to re-build the
1886 (do_mono_image_open): Added the refonly argument, in order to
1887 define it for the loaded image.
1888 (mono_image_loaded_full): New function, which receives an
1889 additional parameter to look for the image in the refonly or
1890 non-refonly section.
1891 (mono_image_loaded): Updated, using mono_image_loaded_full.
1892 (mono_image_loaded_by_guid_full): The same case that happens
1893 with mono_image_loaded_full.
1894 (mono_image_loaded_by_guid): Likewise.
1895 (register_image): Use the ref_only variable inside MonoImage
1896 to decide in which hash table store the current image.
1897 (mono_image_open_from_data_full): Rename
1898 mono_image_open_from_data to mono_image_open_from_data_full,
1899 adding the refonly argument, to define the ref_only variable
1901 (mono_image_open_from_data): Return
1902 mono_image_open_from_data_full.
1903 (mono_image_open_full): Rename mono_image_open to
1904 mono_image_open_full, receiving the new refonly argument,
1905 to pass it to inner methods.
1906 (mono_pe_file_open): Update this function, to open
1907 a MonoImage as a non-refonly image.
1908 (mono_image_close): Use the refonly variable inside
1909 MonoImage to remove the image from the correct caches.
1911 * image.h: Add the signatures of mono_image_open_full,
1912 mono_image_open_from_data_full, mono_image_loaded_full,
1913 mono_image_loaded_by_guid_full.
1915 * metadata-internals.h: Add the ref_only field to
1918 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1920 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
1921 Fix the last behavior, which used to load the assemblies and
1922 extract MonoReflectionAssemblyName information, instead of
1923 extract it from the metadata tables. Needed for Reflection
1926 2005-07-29 Martin Baulig <martin@ximian.com>
1928 * mono-debug-debugger.c
1929 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
1933 (mono_debug_address_from_il_offset): Check whether we have
1934 debugging support before attempting to take the lock.
1935 (mono_debug_source_location_from_address): Likewise.
1936 (mono_debug_source_location_from_il_offset): Likewise.
1937 (mono_debug_il_offset_from_address): Likewise.
1938 (mono_debug_address_from_il_offset): Likewise.
1940 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
1942 * class.c (mono_class_from_name_case): Add support for dynamic images.
1945 * object.c (mono_class_compute_gc_descriptor): Add a workaround
1948 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
1950 * reflection.c (mono_method_get_object): Fix warning.
1952 2005-07-28 Martin Baulig <martin@ximian.com>
1955 (mono_debug_add_wrapper): Also write the wrapper type.
1957 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
1959 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
1961 * class.c (mono_class_init): Avoid reading nested classes if the AOT
1962 data indicates the class has none.
1964 2005-07-26 Ben Maurer <bmaurer@ximian.com>
1966 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
1967 loader lock with the debugger lock. Prevents deadlocks for beagle.
1969 Beagle can now run on an smp box for a weekend without any
1972 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
1974 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
1975 in a module. Fixes #75629.
1977 2005-07-26 Martin Baulig <martin@ximian.com>
1979 * mono-debug.c (mono_debug_add_wrapper): New static method.
1980 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
1981 interncall or a wrapper.
1983 * mono-debug.h (MonoDebugWrapperData): New public typedef.
1984 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
1985 (MONO_DEBUGGER_VERSION): Bump to 51.
1987 * mono-debug-debugger.c
1988 (mono_debugger_add_type): Removed this empty function.
1989 (mono_debugger_add_method): Likewise.
1991 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
1993 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
1994 before accessing method->slot.
1996 2005-07-21 Jb Evain <jbevain@gmail.com>
1998 * reflection.c (method_encode_clauses/class): Handle filters clauses.
2001 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
2003 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
2006 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
2008 * image.h image.c: Add mono_image_get_guid () API function.
2010 2005-07-19 Ben Maurer <bmaurer@ximian.com>
2012 There were issues when multiple threads tried to load
2013 assemblies. A deadlock was created between assemblies_mutex and
2014 mono_domain_assemblies_lock. This fixes the issue by making the
2015 assembly ref counting be lock free. See bug 75586.
2017 * image.c (mono_image_close): The add ref function here was using
2018 Interlocked operations while the unref was using a mutex and a
2019 --. I don't think this was ever a bug that would be exposed in a
2020 non-pendantic way (ie, by an embedder doing a ref on one thread
2021 and an unref on another), but for the sake of correctness, this is
2024 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
2025 (mono_assembly_load_reference): Call mono_assembly_addref rather
2026 than touching the refcount ourselves.
2027 (mono_assembly_close): Use InterlockedDecrement to unref the
2028 assembly. Don't acquire the lock unless it is actually needed.
2030 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
2032 * class.c (mono_class_layout_fields): Fix calculation of has_references
2035 2005-07-12 Martin Baulig <martin@ximian.com>
2037 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2040 (mono_type_hash): Provide better hashing for generic instances.
2041 (mono_generic_inst_hash): Improve hashing.
2042 (mono_generic_class_hash): Likewise.
2044 * reflection.c (mymono_metadata_type_hash): Improve hashing for
2047 2005-07-12 Martin Baulig <martin@ximian.com>
2049 * reflection.c (mono_reflection_create_runtime_class): Remove the
2050 hack for generic type definitions and non-`Run' assemblies.
2051 (mono_reflection_bind_generic_parameters): Also use
2052 `klass->wastypebuilder' to check for TypeBuilders.
2054 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
2056 * class.c (mono_class_layout_fields): Fix calculation of has_references
2059 * class.c (inflate_generic_class): Fix a leak.
2060 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
2063 2005-07-11 Martin Baulig <martin@ximian.com>
2065 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
2068 2005-07-11 Martin Baulig <martin@ximian.com>
2070 * loader.c (find_method): Also lookup in
2071 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
2073 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
2075 * appdomain.c (mono_domain_unload): Don't free the error message
2076 before passing it to mono_get_exception_...
2078 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
2080 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
2082 * threads.c: try to better guess an available RT signal (bug #75387).
2084 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
2086 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
2089 2005-07-07 Martin Baulig <martin@ximian.com>
2091 * class.c (mono_type_get_name_full): Return NULL for
2092 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
2095 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
2097 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
2098 exit the appdomain as well being aborted.
2100 * threadpool.c: Create all threadpool threads inside the root appdomain, and
2101 change back to the root domain after calling managed code. This enables
2102 appdomains using threadpools to be unloaded.
2104 2005-07-07 Martin Baulig <martin@ximian.com>
2107 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
2108 into `MonoDynamicGenericClass' since we only need it for dynamic
2111 * reflection.c (mono_class_bind_generic_parameters): We don't need
2112 to compute the `parent' here.
2114 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
2116 * culture-info-table.h : regenerated.
2118 2005-07-06 Martin Baulig <martin@ximian.com>
2121 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
2123 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
2125 2005-07-06 Martin Baulig <martin@ximian.com>
2127 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
2128 we're doing a signature-only comparision; fixes #74945.
2130 2005-07-06 Martin Baulig <martin@ximian.com>
2132 * class-internals.h (MonoGenericClass): Moved some things out into
2133 a new `MonoInflatedGenericClass' type.
2134 (MonoInflatedGenericClass): New type; the `klass' of a
2135 `MonoGenericClass' is now computed lazyly in
2136 mono_get_inflated_generic_class().
2138 * class.c (mono_get_inflated_generic_class): New public function.
2139 (mono_class_inflate_generic_method): Removed the unused
2140 `MonoClass *' argument.
2141 (setup_generic_vtable): Don't call mono_get_inflated_method() on
2143 (mono_class_create_generic): Make this static and merge it with
2144 mono_class_create_generic_2(); we're now called automatically from
2145 mono_get_inflated_generic_class().
2147 * loader.c (mono_method_signature): Call
2148 mono_get_inflated_method() here.
2150 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
2152 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
2153 type of fields with RVA.
2155 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
2156 for this pseudo class.
2157 (my_mono_class_from_generic_parameter): Likewise.
2158 (mono_class_init): Allow interfaces to have cctors.
2160 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
2162 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
2163 lazily for AOT methods.
2165 2005-07-05 Martin Baulig <martin@ximian.com>
2167 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
2168 returns FALSE for a successful match, not TRUE.
2170 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
2172 * loader.c (mono_method_get_index): Optimize this a bit.
2174 2005-07-04 Martin Baulig <martin@ximian.com>
2177 (class_compute_field_layout): Move the check for generic type
2178 definitions into mono_class_layout_fields(). Fixes #74684.
2179 (mono_class_from_generic_parameter): Correctly compute
2180 `klass->parent'; fixes #75457.
2182 * reflection.c (register_assembly, register_module): Make sure
2183 `domain->rejobject_hash' is already created.
2185 2005-07-02 Martin Baulig <martin@ximian.com>
2188 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
2189 `MonoDynamicGenericClass'.
2191 2005-07-01 Lluis Sanchez <lluis@ximian.com>
2193 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
2194 returned by a field getter is null, since null is a valid value.
2196 2005-07-01 Martin Baulig <martin@ximian.com>
2198 * reflection.c (mono_reflection_generic_class_initialize): Update
2199 the `dgclass->fields [i].parent' to the correct class.
2200 (mono_image_get_fieldref_token): Use the declaring type, not the
2203 2005-07-01 Martin Baulig <martin@ximian.com>
2205 * loader.c (find_method): Also look in the interfaces; fixes #75429.
2207 2005-06-30 Ben Maurer <bmaurer@ximian.com>
2209 * threads.c (thread_cleanup): assert that thread != NULL
2210 (wait_for_tids_or_state_change): We were using the wrong variable
2211 when accessing wait->threads. `i' was always out of the bounds of
2214 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2216 * loader.c: map user32 and kernel32 to libMonoSupportW
2218 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
2220 * appdomain.c (unload_thread_main): Mark this as WINAPI.
2222 2005-06-28 Martin Baulig <martin@ximian.com>
2224 * loader.c (method_from_methodspec): Fix #75334.
2226 2005-06-28 Martin Baulig <martin@ximian.com>
2228 Fix #74953 - Arrays now implement the generic IList<T> interface
2229 on the 2.0 platform.
2231 * class-internals.h (MonoDefaults): Added `generic_array_class'.
2233 * reflection.c (mono_class_bind_generic_parameters): New public
2234 function; similar to mono_reflection_bind_generic_parameters(),
2235 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
2237 * domain.c (mono_init_internal): Try to initialize.
2238 `mono_defaults.generic_array_class' here; this'll only succeed if
2239 we're using the 2.0 corlib.
2242 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
2243 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
2244 (mono_lookup_internal_call): Added support for nested classes.
2247 (mono_get_method_from_token): Set `result->signature->pinvoke' if
2248 we're an interncall and have generic arguments.
2251 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
2252 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
2253 instance of System.Array.InternalArray<T> for arrays, so they
2254 implement the generic IList<T> interface.
2256 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
2258 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
2259 (chastamar@yahoo.com). Fixes #75374.
2261 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
2263 * culture-info-table.h: regenerated.
2265 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2267 * icall.c: handle spaces correctly for base64 strings.
2269 2005-06-26 Ben Maurer <bmaurer@ximian.com>
2271 * *.c: Kill some warnings.
2273 2005-06-23 Duncan Mak <duncan@novell.com>
2275 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
2276 that this builds on Solaris 10 (x86).
2278 2005-06-23 Martin Baulig <martin@ximian.com>
2281 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
2282 generic type definitions.
2284 2005-06-23 Martin Baulig <martin@ximian.com>
2288 * metadata.c (mono_class_get_overrides): Renamed to
2289 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
2290 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
2291 pass it to mono_get_method_full().
2293 2005-06-22 Ben Maurer <bmaurer@ximian.com>
2295 * reflection.c (mono_reflection_create_runtime_class): take the
2296 mono_domain_lock in this method. Prevents deadlocks
2298 2005-06-22 Martin Baulig <martin@ximian.com>
2300 * loader.c (method_from_methodspec): Fix #75330.
2302 2005-06-22 Martin Baulig <martin@ximian.com>
2304 * reflection.c (type_get_qualified_name): Use
2305 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
2306 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
2307 argument; use it if we don't have an assembly name.
2309 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
2311 * object.c: In mono_message_init, set "copy out" flag for in
2312 parameters with the [Out] flag.
2314 2005-06-21 Martin Baulig <martin@ximian.com>
2317 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
2320 2005-06-21 Martin Baulig <martin@ximian.com>
2322 * class.c (mono_class_init): Don't initialize `class->fields' for
2323 generic instances since they're initialized again in
2324 compute_field_layout().
2325 (compute_field_layout): Set the field's `generic_info' here; fix
2328 2005-06-21 Martin Baulig <martin@ximian.com>
2331 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
2333 * metadata.c (mono_metadata_generic_method_equal): Also
2334 distinguish the `generic_class'; fixes #75334.
2336 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2340 * domain-internals.h:
2341 * reflection.c: 'domain_assemblies' field is now protected by its own
2342 lock. Don't call into managed code to run the AssemblyLoad event if we
2343 now there are no registered delegates for it.
2345 2005-06-20 Martin Baulig <martin@ximian.com>
2347 * class.c (mono_class_is_assignable_from): Use a custom version of
2348 mono_class_has_parent() to make things work for generic instances;
2351 2005-06-20 Martin Baulig <martin@ximian.com>
2353 * loader.c (method_from_methodspec): Apply a patch from
2354 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
2356 2005-06-20 Martin Baulig <martin@ximian.com>
2358 * class.c (mono_class_init): Reverted Zoltan's last change; it
2361 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
2363 * threads.c (wait_for_tids_or_state_change): Add missing locking.
2365 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2367 * socket-io.c: fix the index in the socket array for writable/error
2368 sockets. Fixes bug #75306.
2370 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
2372 * class.c (mono_class_init): Allow interfaces to have static ctors.
2374 2005-06-17 Martin Baulig <martin@ximian.com>
2376 * loader.c (method_from_methodspec): Use `context->container' when
2377 parsing the `gmethod->inst'.
2379 2005-06-17 Martin Baulig <martin@ximian.com>
2381 * class.c (mono_type_get_name_recurse): Don't add the assembly
2382 name for type arguments.
2384 2005-06-15 Martin Baulig <martin@ximian.com>
2386 * reflection.c (mono_image_get_inflated_method_token): Encode
2387 correct klass; fixes #75260.
2389 2005-06-13 Michal Moskal <malekith@nemerle.org>
2391 * icall.c: Make GetCorrespondingMethod/Constructor take
2392 MonoReflectionMethod method not MonoMethod. Removed
2393 MonoType.GetCorrespondingField, and make
2394 MonoGenericType.GetCorrespondingField take name not
2397 2005-06-13 Michal Moskal <malekith@nemerle.org>
2399 * reflection.c (field_encode_signature, encode_locals):
2400 Make sizes of buffers for types larger (for big generic types).
2401 (create_generic_typespec,
2402 mono_reflection_sighelper_get_signature_local,
2403 mono_reflection_sighelper_get_signature_field):
2404 Add asserts for too small buffers.
2406 2005-06-15 Martin Baulig <martin@ximian.com>
2408 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
2409 if our parent is not a dynamic type.
2411 2005-06-15 Martin Baulig <martin@ximian.com>
2413 * class-internals.h (MonoTypeNameFormat): New enum.
2416 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
2417 (mono_type_get_full_name): Removed.
2418 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
2419 argument instead of the boolean's.
2421 * icall.c (ves_icall_System_MonoType_getFullName):
2422 Added `gboolean assembly_qualified'.
2425 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
2427 * reflection.c (mono_reflection_parse_type): Parse the new type
2430 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2432 * icall.c: no need to convert from utf16 to utf8 and then back again
2433 after the call to GetLogicalDrives.
2435 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2437 * icall.c: frombase64. Fix problems exposed by new tests.
2439 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2441 * icall.c: added internal calls for converting char [] and strings in
2442 base64 into byte [].
2444 2005-06-10 Martin Baulig <martin@ximian.com>
2446 * class.c (mono_class_create_generic_2): Read the nested classes
2447 from the metadata rather than from `gklass->nested_classes' since
2448 `gklass' might not be initialized yet.
2450 2005-06-09 Duncan Mak <duncan@novell.com>
2452 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
2453 all public headers. Fixes #74919.
2455 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
2457 * domain.c: The key for proxy_vtable_hash is now a pointer
2458 array. Added new GHashFunc and GCompareFunc functions for this.
2460 * class.h: The list of interfaces in MonoRemoteClass is known in
2461 advance and can't grow (we create a new MonoRemoteClass if needed),
2462 so now the interface array can be allocated together with
2465 * object.c: Added a new method create_remote_class_key.
2466 Fixed mono_remote_class so it does not depend on
2467 mono_upgrade_remote_class.
2468 Removed extend_interface_array.
2469 Added new method clone_remote_class(), which makes a copy of a remote
2470 class and adds a new interface or class to it.
2471 mono_upgrade_remote_class() now creates a new remote class (or gets
2472 it from the cache) if an vtable upgrade is needed. In this way
2473 we make sure that other objects sharing the same remote class
2474 don't get the new vtable with unwanted interfaces.
2476 * object-internals.h:
2477 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
2479 * marshal.c: Track changes in mono_upgrade_remote_class().
2481 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
2482 * icall.c: Add runtime methods for obtaining members of inflated
2483 class, which were created from supplied non-inflated members. It
2484 is used in internal Get{Method,Constructor,Field} methods in
2487 2005-06-09 Martin Baulig <martin@ximian.com>
2490 (mono_reflection_bind_generic_method_parameters): Fix #75169.
2492 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2493 * reflection.c (mono_image_basic_init): Define
2494 Version in MonoDynamicAssembly.
2496 2005-06-08 Martin Baulig <martin@ximian.com>
2501 (mono_method_signature_full): New public method; takes a
2502 `MonoGenericContext *'.
2503 (find_method): Use mono_method_signature_full() and pass the
2504 klass'es context to it.
2506 * class.c (mono_class_is_inflated_method): Use
2507 mono_method_signature_full() and pass the context to it.
2509 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
2511 * object.c: add proper locking in mono_remote_class_vtable(),
2512 fixes possible memory corruption.
2514 2005-06-08 Michael Meeks <michael.meeks@novell.com>
2516 * marshal.c (mono_remoting_marshal_init): set
2517 initialized after initialization.
2519 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
2523 2005-06-06 Michael Meeks <michael.meeks@novell.com>
2525 * object.c (extend_interface_array): fix really silly
2526 memory corrupting / comparison bug.
2528 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2530 * reflection.c: Functions added to support the creation
2531 of CustomAttributeData, which includes Attribute data
2532 used by ReflectionOnly methods.
2534 * reflection.h: mono_reflection_get_custom_attrs_data and
2535 mono_custom_attrs_data_construct added (functions exposed).
2537 * icall.c: Added mono_reflection_get_custom_attrs_data
2540 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
2542 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
2545 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
2547 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
2549 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
2550 dynamic DllImportAttribute.
2552 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
2553 dynamic DllImportAttribute.
2555 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
2558 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2560 * threads.c: avoid segfault when an unstarted thread is aborted.
2562 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
2564 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
2565 Returns the name and version of the runtime for reporting.
2567 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2569 * appdomain.c: bump corlib version.
2570 * object-internals.h: new field in MonoReflectionAssembly.
2572 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2574 * object-internals.h: Carlos forgot to add this field.
2576 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2578 * icall.c: Added create_version to create instances
2579 of Version of MonoReflectionAssemblyName. This change helps
2580 the AssemblyName tests to keep running fine.
2582 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
2584 * object.c (mono_method_return_message_restore): A somehow less
2585 intrusive fix for #75138.
2587 2005-06-03 Raja R Harinath <rharinath@novell.com>
2589 * object.c (mono_method_return_message_restore): Fix computation
2590 of expected number of out args.
2592 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
2594 * reflection.c (mono_image_get_method_info): Fix the case when the
2597 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
2599 * object.c: Added missing null check in
2600 mono_method_return_message_restore.
2602 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
2604 * reflection.c (mono_image_get_method_info): Handle the case when
2607 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
2609 * object.c: When creating the vtable for a proxy, take into account
2610 all inherited interfaces, not only the ones registered in
2611 iclass->interfaces. This fixs bug #74996.
2612 Also, in mono_method_return_message_restore, verify that the array
2613 of out args has the expected lengh.
2615 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2617 * socket-io.c: update the timeout in Poll when the call is interrupte.
2619 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2621 * socket-io.c: support abort/suspend in Select_internal after last
2624 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2626 * threadpool.c: remove warning.
2628 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2631 * socket-io.[ch]: Select_internal uses poll() now when available, thus
2632 removing the 1024 limit from select(). Runtime part of the fix for
2635 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2637 * socket-io.c: when resolving the addresses for the same
2638 host returned by gethostname(), get the local IPs from the interface
2639 list. Loopback addresses are discarded if the are interfaces up with
2640 non-loopback ones. Fixes bug #63265.
2642 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
2644 * appdomain.c, verify.c, object-internals.h, reflection.c:
2645 bumped corlib number to 36, and added new extra_flags field
2646 to ReflectionMethodBuilder and friends. Fixes #75060.
2648 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
2650 * gc.c: register a new weak link only if the object is non-null
2653 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
2655 * culture-info.h : short time pattern too.
2657 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
2659 * culture-info.h : expand long time pattern string length.
2661 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
2663 * culture-info-table.h : update (more French date format; #72788).
2665 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
2667 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
2668 the method is static. Fixes #75029.
2670 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
2672 * reflection.c: Update the table_idx field of method builders after
2673 saving the module, since it can change. This is a workaround for
2676 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
2678 * culture-info-table.h : update (additional French date format).
2680 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
2682 * icall.c (ves_icall_type_Equals): Revert last change.
2684 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
2686 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
2688 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
2690 * class-internals.h: Added executioncontext_class field to
2691 MonoDefaults structure.
2692 * domain.c: Cache System.Threading.ExecutionContext class in
2694 * object.c: Capture the ExecutionContext for asynchroneous calls in
2695 mono_async_result_new.
2696 * object-internals.h: Added execution_context and original_context
2697 fields to MonoAsyncResult. Added execution_context to MonoThread.
2698 * security-manager.c|.h: Added mono_get_context_capture_method to
2699 return the capture method (if required by the security manager or by
2700 the framework version used).
2701 * threadpool.c: Apply capture (if present) ExecutionContext in
2702 mono_async_invoke and revert to original context after it completes.
2704 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
2706 * culture-info-table.h : updated (real hacky solution for zh-CHT).
2708 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
2710 * culture-info-table.h : zh-CHT related workaround.
2712 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
2714 * marshal.c (emit_marshal_custom): Add some error checking and call the
2715 methods in the ICustomMarshaler interface. Fixes #74875.
2717 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
2718 native->managed wrappers.
2720 2005-05-12 Martin Baulig <martin@ximian.com>
2722 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
2723 here and use the loader lock.
2725 * mono-debug.c: Properly lock when the debugger is not attached.
2726 (mono_debug_init): Release the initial lock if we're not running
2729 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
2731 * marshal.c (emit_marshal_custom): Pass through NULL values without
2732 calling the custom marshalling routines.
2734 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
2735 conversion in structures. Fixes #74882.
2737 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
2739 * culture-info-table.h : zh-* cultures were missing.
2741 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
2743 * threads.c: Added a new event background_change_event which is signaled
2744 when a thread changes its background mode.
2745 Moved here several checks previously done in managed code. The checks
2746 require the thread lock, and using the thread lock in managed code
2747 can result in deadlocks.
2748 Merged Start_internal and Thread_internal into a single method. Now
2749 Thread_internal does all work of creating and starting a thread.
2750 Added icalls for setting and getting the state of the object. Moved from
2751 managed code to avoid locking there.
2752 Added wait_for_tids_or_state_change() which is called instad of
2753 wait_for_tids when waiting for non-backround threads to end. This method
2754 will return if one of the threads ends or the background_change_event
2756 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
2757 the background mode. This method signals the background_change_event
2760 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
2761 removed Start_internal.
2763 2005-05-11 Martin Baulig <martin@ximian.com>
2765 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
2766 to order of some fields to get proper alignment on 64-bit machines.
2768 2005-05-11 Martin Baulig <martin@ximian.com>
2770 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
2771 changes as they're broken and completely fuck up the debugger.
2773 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
2775 2005-05-10 Martin Baulig <martin@ximian.com>
2777 * reflection.c (mono_reflection_generic_class_initialize): Don't
2778 call mono_class_setup_parent() here.
2780 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2782 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
2783 send/receive timeout use an integer in milliseconds. We were using a
2786 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2789 (internal_get_cultures): reserve the first slot of the array for the
2790 InvariantCulture, which will be filled in managed code.
2792 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
2794 * reflection.c (mono_image_fill_module_table): Initialize the
2795 GENERATION field as well.
2797 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2799 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
2800 Monitor.Enter on the object.
2802 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
2804 * threads.c: Enable the wait for running threads when exiting.
2805 * icall.c: Suspend all threads before exiting.
2807 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
2809 * assembly.c (mono_assembly_load_reference): Fix warning.
2811 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2813 * threadpool.c: changed the default number of threads per cpu. From now
2814 on, the default will be 20 + (5 * number of cpus) instead of 50.
2816 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
2818 * loader.c (mono_method_get_signature_full): Add locking here.
2820 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
2822 * appdomain.c: Moved methods for parsing and freeing assembly
2823 names to assembly.c.
2824 * assembly.c, domain-internals.h: Created public methods for parsing
2825 assembly names. Fixed mono_assembly_load_with_partial_name:
2826 it now finds the best match, taking into account the version,
2827 token and culture specified in the partial name. Also return
2828 the latest version if no version information is specified.
2830 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
2832 * threadpool.c: replace check for SocketAsyncCall class.
2834 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2836 * threadpool-internals.h:
2837 * Makefile.am: added threadpool-internals.h
2839 * threadpool.c: call mono_unhandled_exception on exceptions not handled
2840 that happen in threadpool threads (tested on MS).
2841 (mono_thread_pool_remove_socket): new function that dispatch any pending
2842 AIO call on a socket that is closing. By now only epoll really needs it,
2843 as select/poll wake up when the socket closes.
2846 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
2848 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
2850 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
2852 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
2854 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
2856 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
2858 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
2859 has an abort request, convert it into a suspend request.
2861 2005-04-30 Ben Maurer <bmaurer@ximian.com>
2863 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
2864 warning for the usage of `UnmanagedFunctionPointerAttribute' which
2865 is not supported yet.
2867 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2869 * image.c: register assemblies loaded from data (bundles) in the loaded
2870 assemblies hash. Fixes bug #74772.
2872 2005-04-29 Martin Baulig <martin@ximian.com>
2874 * class.c (mono_type_get_name_recurse): Update to the new naming
2875 schema from the latest .NET 2.x beta2.
2876 (mono_class_setup_vtable_general): If we're a generic instance,
2877 copy the vtable from our generic type definition and inflate all
2880 * loader.c (find_method): Update to the new naming schema from the
2881 latest .NET 2.x beta2.
2883 2005-04-29 Raja R Harinath <harinath@gmail.com>
2885 * class.c (mono_class_init): Add a mono_loader_unlock to the
2888 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
2890 * icall.c (ves_icall_System_Environment_Exit): Remove the
2891 suspend_all_other_threads () call for the time being, since it can hang.
2893 * threads.c (mono_thread_manage): Similarly, disable the waiting for
2894 the background threads to exit, since it can also hang.
2896 * class.c (mono_class_init): Applied patch from Ankit Jain
2897 (radical@gmail.com). Avoid pending init errors when a field refers
2898 to a nested class using a typeref. Fixes #74734.
2900 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
2901 this for dynamic modules.
2903 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2905 * threads.c: don't wait for threads that are in the process of aborting
2906 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
2907 and waiting for background threads to finish. This makes xsp and
2908 mod-mono-server exit without random length delays and/or hangs.
2910 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2912 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
2914 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
2916 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
2917 dynamic types to prevent infinite loops. Fixes #74727.
2919 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
2920 ..._is_assignable_to.
2922 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
2924 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
2926 2005-04-25 Martin Baulig <martin@ximian.com>
2928 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
2931 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
2933 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
2935 * reflection.c (build_compressed_metadata): Set metadata header
2938 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
2940 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
2941 number into an integral and a decimal part. Fixes #70473.
2943 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
2945 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
2947 * culture-info-table.h : reflected the latest locale-builder output.
2949 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2951 * threadpool.c: check for SuspendRequested too when deciding if
2952 mono_thread_interruption_checkpoint should be called.
2954 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2956 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
2957 * threads.c: remove interruption_mutex and use Interlocked instead. When
2958 suspending all the threads, wait for all the suspended events at once.
2959 If we're shutting down and get an APC that is going to be queued,
2960 call mono_thread_execute_interruption immediately, as the thread might
2961 be sleeping on a pthread condition or mutex.
2963 * icall.c: call mono_runtime_set_shutting_down before suspending the
2966 Fixes bug #74693. And now xsp is happier when exiting.
2968 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
2970 * loader.c (mono_stack_walk): Fix #74690.
2972 2005-04-22 Martin Baulig <martin@ximian.com>
2974 * mono-debug.h (MonoDebugMethodJitInfo): Added
2975 `MonoDebugMethodJitInfo *jit'.
2977 * mono-debug.c (mono_debug_read_method): Cache the
2978 MonoDebugMethodJitInfo in `address->jit'.
2979 (mono_debug_free_method_jit_info): New public method.
2981 2005-04-22 Martin Baulig <martin@ximian.com>
2983 * class.c (mono_class_is_assignable_from): Disallow
2984 type parameter -> interface.
2986 2005-04-21 Dick Porter <dick@ximian.com>
2988 * threads.c (mono_thread_create): Turn an assertion into an error.
2990 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
2992 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
2994 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
2995 Fix some gcc 4.0 warnings.
2997 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
2999 * file-io.c: fix alt dir separator char on unix systems
3000 and cleanup (fixes bug #71214).
3002 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
3004 * marshal.c: Use CALLVIRT instead of CALL when dispatching
3005 a call to a remote domain, since the method may be an
3006 interface method in the client domain. This fixes bug #74192.
3008 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3010 * threadpool.c: recv/send are now performed before going back to managed
3011 code to save one transition.
3013 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3015 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
3017 * metadata/threadpool.c: removed hack to workaround the bug above.
3021 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
3023 * reflection.c reflection.h: Fix handling of parameter defaults in
3024 dynamic methods. Also fixes handling of parameter attributes.
3027 * mono-debug.c (mono_debug_close_image): Fix warning.
3029 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3031 * socket-io.h: replaced old unused field with new 'blocking'.
3032 * threadpool.c: restore socket blocking state on windows(tm).
3034 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
3036 * icall.c: don't return the codebase in the AssemblyName[] returned by
3037 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
3038 * object-internals.h: Removed FIXME (fields were presents) and fixed
3039 versioncompat declaration.
3041 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3043 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
3044 not closed, so don't cleanup when it happens.
3046 2005-04-13 Chris Toshok <toshok@ximian.com>
3048 * mono-debug-debugger.h: change prototype for
3049 mono_debugger_lookup_type.
3051 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
3052 this function, although it should probably be named
3053 mono_debugger_init_type.
3055 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3057 * threadpool.c: fix non-AIO case.
3059 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
3061 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
3062 the built-in profiler to measure just JIT compilation times.
3064 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3066 * threadpool.c: the epollfd might be closed by another thread at
3067 any time, so ignore EBADF at treat it as a "we're closing" sign.
3069 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3071 * threadpool.c: release the semaphores with a count equals to the number
3072 of working threads in both IO and regular pools. Fixed typo that messed
3073 up the count of IO pool threads. Don't initialize the pipe handles if
3076 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3078 * threadpool.c: some systems don't like a NULL when deleting the socket
3081 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3083 * threadpool.c: fix semaphore allocation.
3085 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3087 * threadpool.c: added epoll() based implementation for asynchronous IO
3088 that is used instead of the default poll() when available.
3089 It can be disabled by setting MONO_DISABLE_AIO.
3091 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3093 * threadpool.c: windows needs 'closesocket' and instead of returning
3094 0 when the stream is closed while in select, it returns -1. Fixes bug
3097 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
3099 * class.c (class_compute_field_layout): Fix the regression caused by
3102 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3104 * threadpool.c: separate pool for socket async. IO.
3105 * threadpool.h: mono_max_worker_threads is not a global any more.
3107 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
3109 * class.c (class_compute_field_layout): Fix #74549.
3111 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3113 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
3114 use 2 connected sockets instead.
3116 2005-04-08 Miguel de Icaza <miguel@novell.com>
3118 * mono-config.c: Add new entry point for mkbundle
3119 mono_config_parse_memory.
3121 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3123 * threadpool.c: removed another unused function.
3125 2005-04-08 Ankit Jain <radical@corewars.org>
3127 * reflection.c (get_default_param_value_blobs): Add 'types'
3128 parameter to get the types encoded in the constant table.
3129 (mono_param_get_objects): Use the type from the constant table,
3130 not the type of the parameter, when creating default values.
3131 Handle null default values correctly.
3133 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3140 * socket-io.c: removed dead code for async IO.
3142 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3144 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
3146 * threadpool.c: intercept socket async. calls and pass them to a thread
3147 that is polling and dispatching the job items to the threadpool as
3148 socket become ready. Fixes bugs #71217, #71933.
3150 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
3151 between char and short/ushort arrays.
3153 * socket-io.c: remove dead code.
3155 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
3158 icall.c : removed InternalToUpper_Comp() and
3159 InternalToLower_Comp().
3161 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
3163 * char-conversions.h : The tables were incorrectly generated. Should
3164 be generated against invariant culture.
3166 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
3168 * object.c (mono_runtime_invoke_array): Fix return value when
3169 passing pre-created valuetype objects to ctors.
3171 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
3172 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
3175 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
3177 * domain.c: removed g_assert for runtimesecurityframe_class. This is
3178 only used with --security and hides the wrong corlib version error.
3180 2005-03-30 Joshua Tauberer <tauberer@for.net>
3182 * class.c: Changed mono_class_name_from_token so that types
3183 outside of a namespace don't have an initial period. Improved
3184 the g_warning message used in _mono_class_get when loading
3186 * assembly.c: In mono_assembly_load_reference, when an assembly
3187 can't be found, "No such file or directory" is misleading and
3188 unhelpful because a few paths were checked for the presence of
3189 the assembly. When that happens (ENOENT), display a nicer
3190 message indicating the directories that were searched. In all
3191 cases, the warning is made easier to read for non-hackers.
3193 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
3195 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
3197 * appdomain.h|domain.c: Removed inline from functions.
3198 * appdomain.c: Reduced warnings when compiling on windows.
3199 * icall.c: Fixed output_debug declaration to gunichar2*.
3200 * mono-config.c: Reduced warnings when compiling on windows.
3201 * rand.c: Added missing "windows.h". Added missing return value.
3202 * rawbuffer.c: Added missing winsock2.h for windows.
3203 * sysmath.h: Added mono-compiler.h header to allow/ease
3204 compilation with non-GCC compilers.
3205 * threads.c: Fixed declarations to compile with VS.NET C compiler.
3206 Removed cast warnings.
3208 Adapted from the work of J Lothian (for VC6).
3210 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
3212 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
3215 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
3217 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
3220 2005-03-27 Raja R Harinath <harinath@gmail.com>
3222 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
3223 has to be in $(exec_prefix). $(prefix) is for arch-independent
3224 stuff, and it would probably use $(prefix)/share rather than
3227 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3229 * console-io.c: added 2 includes that might be missing.
3231 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
3233 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
3236 * reflection.c (create_custom_attr): Allocate the params array using
3237 alloca so it gets GC tracking.
3239 2005-03-23 Chris Toshok <toshok@ximian.com>
3241 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
3244 2005-03-24 Raja R Harinath <rharinath@novell.com>
3246 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
3247 changes to pick up any changes in prefix, etc.
3249 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
3251 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
3253 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
3254 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
3256 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
3258 * class-internals.h object-internals.h class.c reflection.c: Extend the
3259 mono_lookup_dynamic_token () function to return the class of the
3262 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
3265 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
3267 * security-manager.c: Skip inheritance checks for intra-corlib
3268 class inheritance and method overrides. This skips a lot of checks
3269 and (anyway) permissions cannot work until corlib is loaded.
3271 2005-03-23 Martin Baulig <martin@ximian.com>
3273 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
3274 MONO_TYPE_GENERICINST.
3276 2005-03-23 Martin Baulig <martin@ximian.com>
3278 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
3280 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3282 * class.c: added locking comments to some functions.
3283 Cache the interface offsets arrays (saves about 20 KB
3284 of runtime memory in a typical app).
3285 Reduce the time overhead in mono_class_setup_supertypes ().
3287 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
3289 * icall.c: speedup and fix leaks in GetMethodsByName and
3290 GetPropertiesByName.
3292 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3294 * reflection.c: some locking fixes.
3296 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
3298 * metadata.c: added missing break in case statement.
3300 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
3302 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
3303 typedbyref return values. Fixes #73941.
3305 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
3307 * security-manager.c|h: Added demandunmanaged method and
3308 suppressunmanagedcodesecurity class to MonoSecurityManager.
3309 Renamed aptc class to allowpartiallytrustedcallers.
3311 2005-03-17 Martin Baulig <martin@ximian.com>
3313 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
3315 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3317 * file-io.c: disabled file async. IO using aio_*. It uses the
3318 threadpool now. Workaround for bug #73718.
3320 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3322 * assembly.h, mono-config.c: added code to deal with bundled configs
3323 for bundled assemblies.
3325 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
3327 * *.c, private.h: cleanup, removing old private.h header file.
3329 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
3331 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
3332 and throw_on_unmappable_char attributes.
3334 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
3336 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
3337 _ProcessName_internal.
3339 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
3341 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
3344 * icall.c threads.c threads-types.h: Remove slothash icalls as they
3347 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
3349 * object.c (compute_class_bitmap): Add support for generics. Fixes
3352 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
3354 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
3356 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3358 * filewatcher.c: commented out the code for windows watcher, as we don't
3359 use it (we use the managed implementation instead).
3361 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
3363 * object-internals.h (MonoThread): Remove 'unused1' field.
3365 * appdomain.c: Bump corlib version.
3367 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
3369 * reflection.c (mono_reflection_create_runtime_class): Remove the
3370 AssemblyBuilder.Save optimization since it causes too many problems.
3372 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
3374 * exception.c|h: Added mono_get_exception_reflection_type_load to
3375 create a ReflectionTypeLoadException object.
3376 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
3377 to return NULL is a InheritanceDemand fails during reflection. Updated
3378 ves_icall_System_Reflection_Assembly_GetTypes to throw a
3379 ReflectionTypeLoadException if an InheritanceDemand fails during
3380 reflection. Added icall mapping for GetLinkDemandSecurity.
3381 * security-manager.c|h: Added ves_icall_System_Security_
3382 SecurityManager_GetLinkDemandSecurity internal call to return the
3383 class and methods permissions set for a LinkDemand. Removed unused
3384 fields in MonoSecurityManager.
3386 2005-03-10 Martin Baulig <martin@ximian.com>
3388 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
3389 it's a generic instance.
3391 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
3393 * reflection.c (mono_get_object_from_blob): Applied patch from
3394 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
3396 * class.c (mono_class_is_assignable_from): Another try at fixing
3397 #73469 without breaking anything.
3399 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
3401 * class.c: (mono_class_is_assignable_from): Revert the last changes
3402 since they don't work with generics.
3404 * class.c (mono_class_is_assignable_from): Fix build bustage.
3406 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
3407 the managed IsAssignableFrom method. Fixes #73469.
3409 * reflection.c (mono_reflection_call_is_assignable_from): New helper
3412 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
3414 * object.c (mono_load_remote_field_new): Fix returning uninitialized
3415 memory when the remoting callback does not sets the out arguments.
3418 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
3421 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
3423 * object-internals.h (MonoStackFrame): Sync with managed object layout.
3425 * appdomain.c: Bump corlib version.
3427 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
3429 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
3432 * threads.c (mono_thread_attach): Detect threads which are not started
3433 by the GC pthread wrappers.
3435 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
3437 * icall.c: Added new icall for RNG.
3438 * rand.c|h: Added new icall to open the RNG. This allows to share a
3439 single handle on Linux to access /dev/urandom and fix #73183.
3441 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
3443 * object.c: setting the new vtable in a transparent proxy object must
3444 not change the GC descriptor.
3446 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3448 * object.c: fixed compilation without GCJ support.
3449 * reflection.c: for runtime-created types ensure klass->has_references
3450 is correct (bug #73215).
3452 2005-03-02 Martin Baulig <martin@ximian.com>
3454 * class.c (mono_class_is_assignable_from): Make this work if
3455 `oklass' is a generic instance; fixes #72831.
3457 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
3459 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
3462 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
3464 * marshal.c: Reorganize native->managed marshalling code to also use
3465 the emit_marshal_... functions.
3467 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
3469 * object.c: typed allocs have issues with bitmap sizes > 30,
3470 so check for max_set >= 30.
3472 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
3474 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
3475 managed code. Fixes #73012.
3477 * metadata.h (MonoMarshalSpec): Add elem_mult field.
3479 * metadata.c reflection.c: Load/Emit elem_mult as well.
3481 * metadata.h (MonoMarshalSpec): Add comment.
3483 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
3485 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
3486 num_elem to -1 if not given.
3488 * object-internals.h (MonoReflectionMarshal): Add has_size field.
3490 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
3493 2005-03-01 Marek Safar <marek.safar@seznam.cz>
3495 * null-gc.c (mono_gc_free_fixed): Was not compilable.
3497 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
3499 * reflection.c (encode_marshal_blob): Encode param_num field as well.
3501 * object-internals.h (MonoReflectionMarshal): Add param_num field.
3503 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
3505 * object.c: generalized the reference bitmap creation
3506 and added hooks for the new GC.
3507 * class-internals.c: removed the gc_bitmap field from MonoClass.
3509 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3511 * domain.c: help the compiler to produce better code
3512 in mono_jit_info_table_find ().
3514 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
3516 * object.c: make all allocations look typed.
3518 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3520 * socket-io.c: load Mono.Posix if it's not loaded already
3523 2005-02-24 Martin Baulig <martin@ximian.com>
3525 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
3526 * reflection.c (dup_type): Likewise.
3528 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
3530 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
3531 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
3533 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3535 * domain.c, threads.c, object-internals.h: make the critical thread
3536 local vars use the fast access mode (even when we're compiled in
3537 a lib). Provide accessors to be used by the jit during codegen.
3539 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3541 * appdomain.c: Changed hook functios behavior to include
3542 support for the reflection only assemblies. Some icalls were changed
3543 to support the mentioned assemblies too. Signatures of static methods
3544 try_assembly_resolve and real_load now have an additional parameter:
3547 * assembly.c: General changes to mono_assembly_ methods to support
3548 reflection only api. Functions mono_assembly_open, mono_assembly_load,
3549 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
3550 suffix, to support an additional gbool parameter to specify whether
3551 the assembli is reflection only or not. Created some new hook functions
3552 to add support for reflection only assemblies. Signatures of static
3553 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
3554 have now an additional parameter: refonly.
3556 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
3557 indicating whether the assembly is reflection only or not.
3559 * exception.c: Add mono_get_exception_invalid_operation.
3561 * icall.c: Throw an InvalidOperationException when trying to invoke
3562 a property/method/event, or trying to set/get the value of a field.
3563 Also add an icall to retrieve the ref_only flag to the
3564 MonoReflectionAssembly.
3566 2005-02-23 Chris Toshok <toshok@ximian.com>
3568 Part of fix for #72827.
3569 * mono-debug.c (mono_debug_add_method): add lexical block data to
3570 the info we write. Kind of a hack at the moment - we copy the
3571 lexical block info from the MonoDebugMethodInfo to the
3572 MonoDebugMethodJitInfo here, before writing it.
3573 (mono_debug_read_method): read the lexical block info.
3575 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
3577 * debug-mono-symfile.h: add lexical block support.
3579 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
3582 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
3584 * loader.c (mono_lookup_pinvoke_call): Fix warning.
3586 * object.c (mono_runtime_free_method): Call mono_free_method () and
3587 put the TODOs there.
3589 * loader.c (mono_free_method): Free up most memory allocated for
3592 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
3594 * reflection.c: properly flag a Type argument to a
3595 named custom attr value (bug #72248).
3597 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3599 * reflection.c: reduce code duplication in named custom
3602 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
3604 * reflection.c: properly encode custom attrs of type object
3607 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
3609 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
3611 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
3613 * socket-io.c: load System.dll if it's not loaded already
3614 (bug #72850 and #70477).
3616 2005-02-21 Martin Baulig <martin@ximian.com>
3618 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
3621 2005-02-21 Martin Baulig <martin@ximian.com>
3623 * reflection.c (mono_image_build_metadata): We also need to
3624 "fixup" the MethodImpl table after we computed the final method
3625 indices. Call fixup_methodimpl() to do that.
3626 (fixup_methodimpl): New private method.
3628 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
3630 * assembly.c: special case mscorlib.dll (bug#72536),
3631 patch from Carlos Alberto Cortez.
3633 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
3635 * threads-types.h threads.c: Fix build bustage.
3637 * threads.c: Use a union for long<->double conversions.
3639 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
3640 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
3642 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
3643 containing the checkpoint call with NOT_TAKEN.
3645 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
3646 checkpoint before pushing the arguments, so they won't have to be
3649 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3651 * domain.c, assembly.c, domain-internals.h: make some data
3652 const and relocation-free.
3654 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
3656 * object.c, appdomain.c, class-internals.h: introduce the
3657 MonoClassRuntimeInfo structure to hold the info needed to
3658 use a class at runtime. Made mono_class_vtable() lock-free
3659 for all the appdomains.
3661 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
3663 * metadata-internals.h, image.c: introduce a per-image mempool to
3664 be used for memory that has the same lifetime as the image.
3666 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
3668 * domain.c: In mono_init_internal(), instead of selecting the first
3669 runtime version supported by an executable, get a list of all
3670 supported versions and select the one for which an mscorlib exists
3671 (since even if the runtime supports a given version, it doesn't mean
3672 that the framework for that version is installed).
3673 Modified get_runtimes_from_exe to support this behavior.
3674 In supported_runtimes, added information about additional system
3677 * assembly.c: Added support for more than one system assembly version
3678 per runtime version. Updated the assembly list.
3679 In mono_assembly_remap_version, removed the initial version check,
3680 since we don't know to which version we need to compare until we
3681 get the version set on which the assembly is based.
3682 Moved the code for loading corlib into the new method
3683 mono_assembly_load_corlib(), so it can be used by the initialization
3686 * domain-internals.h: Updated data structures and added declaration
3687 for mono_assembly_load_corlib.
3689 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
3691 * reflection.c (resolve_object): Fix the creation of the signature in
3692 the SignatureHelper case.
3694 * assembly.c (mono_assembly_remap_version): Fix binary search.
3696 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
3698 * class.c: Added inheritance check when a method is overloaded (from a
3699 virtual method or when implementing an interface) and when a class is
3700 inherited. Added functions to set a failure for a class and to
3701 retreive the exception from a failure.
3702 * class-internals.h: Added fields to MonoClass to keep the exception
3703 information status for inheritance (or other exceptions) to be thrown
3704 later (i.e. not at load time).
3705 * object.c: Throw the inheritance SecurityException when a type is to
3706 be created with either class or method inheritance violations.
3707 * reflection.c|h: Fix when getting declsec from a class. Removed
3708 unrequired code for class. Improved sanity in parameter naming.
3709 * security-manager.c|h: Added functions to check for class and method
3712 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
3714 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
3715 and has_finalize in dynamic types as well.
3717 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
3719 * culture-info-table.h : fixed currency format for en-GB (and so on).
3721 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
3723 * gc.c: ensure the GC handles never have 0 as a value.
3725 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
3727 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
3728 a pointer to a struct to unmanaged code. Fixes #72625.
3730 2005-02-16 Martin Baulig <martin@ximian.com>
3732 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
3734 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
3736 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
3738 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
3740 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
3742 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
3743 UnmanagedFunctionPointerAttribute, use it for determining calling convention
3746 * reflection.c (mono_custom_attrs_get_attr): New helper function.
3748 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
3750 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
3752 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
3753 changes to make the current context a field in MonoThread.
3755 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
3757 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
3760 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
3761 extracted from mono_marshal_get_native_wrapper.
3763 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
3764 to create wrappers around native functions.
3766 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
3767 delegates for arbitrary function pointers. Fixes #71472.
3769 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
3771 * threads.c: cleaned up the code a little.
3773 2005-02-15 Martin Baulig <martin@ximian.com>
3775 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
3778 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
3779 allocate larger chunks if needed.
3781 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
3783 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
3786 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
3788 * domain.c: keep the domains in an array and ensure the domain ids
3789 are kept small, so they can be used as indexes to domain-specific data
3790 with a small memory overhead.
3792 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
3794 * icall.c: Handle byref types in Type icalls. Fixes #72544.
3796 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
3798 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
3800 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
3802 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
3804 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
3807 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
3809 2005-02-12 Ben Maurer <bmaurer@ximian.com>
3811 * domain-internals.h: add the hashtable here.
3813 * class-internals.h: Remove `info' from MonoMethod
3815 * domain.c: Add a new hashtable, jit_trampoline_hash
3817 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
3819 * object.c: don't set the value of static fields
3822 2005-02-11 Martin Baulig <martin@ximian.com>
3824 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
3825 (mono_debug_add_method): Silently ignore the method if it's too big.
3826 (mono_debug_add_type): Likewise.
3828 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
3830 * threads.c, appdomain.c: remove #ifdefs from the code.
3832 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
3834 * metadata-internals.h: Added flags to MonoAssembly to cache the most
3835 common security informations. This allows us to stay in unmanaged code
3836 when doing LinkDemand and it's special cases (except for the first
3837 time for initialization). The flags a very much used with --security.
3838 * reflection.c|h: Added code to get declarative security attributes
3839 for LinkDemand and InheritanceDemand. This required to refactor the
3840 existing code for Demand.
3841 * security-manager.c|h: Added new method fields for the special cases
3844 2005-02-10 Martin Baulig <martin@ximian.com>
3846 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
3847 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
3849 2005-02-10 Martin Baulig <martin@ximian.com>
3851 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
3852 debugging code; this is almost a complete rewrite.
3854 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
3856 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3858 * domain.c, object.h: expose mono_string_equal () and
3859 mono_string_hash ().
3860 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
3861 it's implemented in managed code.
3863 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3865 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
3866 lo leak objects between appdomains.
3868 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3870 * assembly.c: old compilers compilation fix from
3871 robertj@gmx.net (Robert Jordan).
3873 2005-02-09 Ben Maurer <bmaurer@ximian.com>
3875 * class-internals.h: Little reminder for the future.
3877 * debug-helpers.c: Fix up wrapper_type_names
3879 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3881 * image.c, metadata-internals.h: when loading an image from a file,
3882 mmap all of it and use the same codepaths as when using a
3883 in-memory image: the code is simpler and we use less memory
3884 (both writable and readonly).
3886 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
3888 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
3889 API to alloc runtime data structures that need to be tracked by the
3890 GC and contain pointers.
3891 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
3892 make the code more readable and eventually use a different GC.
3894 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
3896 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
3899 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
3901 * object.c: In release_type_locks(), don't release the cctor lock
3902 if it has already been released. This fixes a crash in the
3905 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3907 * gc.c, marshal.c, icall.c: register a delegate for finalization
3908 only when the native function pointer has been allocated for it.
3910 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3912 * object.c: cleaned up some code, allocate objects that are
3913 pointer free with the atomic malloc variant. Allocate memory
3914 for static data from the mempool if it's pointer-free.
3915 Allocate the bounds array at the end of the array data, when needed.
3916 * object-internals.h, object.h: move a private function in a private
3918 * class.c: handle missing case in tracking references in fields.
3920 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
3922 * class.c, class-internals.h: keep track if a type has
3923 reference fields in either the instance or static fields.
3925 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
3927 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
3928 and renamed to MonoRuntimeInfo. Added fields to store the expected
3929 framework assembly version. Changed mono_get_framework_version and
3930 mono_get_runtime_version for a single mono_get_runtime_info method.
3932 * assembly.c: Added method to remap system assembly versions to the
3933 current executing runtime version. Removed old mapping code.
3934 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
3936 * icall.c, reflection.c: Track api changes.
3938 2005-02-06 Miguel de Icaza <miguel@novell.com>
3940 * loader.c (method_from_memberref): Improve error reporting,
3941 produce the class name instead of the typeref/typedef index.
3943 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
3945 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
3947 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
3949 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
3950 stdcall and charset name mangling. Reorganize the code and add
3953 2005-02-05 Ben Maurer <bmaurer@ximian.com>
3955 * monodiet.c: More iters!
3957 * marshal.c: Iter usage.
3959 * icall.c: Iter usage.
3961 * object.c: Use iters.
3963 * debug-helpers.c: More iters
3965 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
3967 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
3970 2005-02-05 Ben Maurer <bmaurer@ximian.com>
3972 * mono-debug-debugger.c: use iters
3974 * class.c, class-internals.h: mono_class_setup_events is static
3977 * All callers: use iters
3979 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
3981 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
3982 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
3984 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
3986 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
3988 * marshal.h: Add prototypes for ldfld/stfld_remote.
3990 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
3991 this is called during startup.
3993 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
3995 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
3996 MonoThreadsSync struct private in monitor.c. Changed the way
3997 MonoThreadsSync is allocated so it's faster and there is no
3998 need to keep track of it with a finalizer and it uses less memory.
3999 This also finally allows us to allocate mono objects as ptrfree when
4000 there are no reference fields.
4002 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
4004 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
4005 disappearing link to the GC interface and use them to simplify
4008 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
4010 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
4011 stfld_remote which call mono_load/store_field_new. This allows methods
4012 calling ldfld/stfld wrappers to be AOTed.
4014 * console-io.c: Include sys/filio.h under solaris.
4016 * console-io.c: Include curses.h if needed correctly.
4018 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
4020 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
4021 method->klass as well.
4023 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
4025 * class.c (mono_class_init): Switch on lazy initialization of
4028 * class.c (mono_class_get_finalizer): Handle the case when the
4029 finalizer is inherited.
4031 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4033 * console-io.c: <curses.h> is needed by term.h on solaris.
4035 2005-02-03 Ben Maurer <bmaurer@ximian.com>
4037 * icall.c, class-internals.h, monodiet.c, class.c: Remove
4038 mono_class_setup_properties where possible. Remove this ftn from
4039 the header file, and make it static.
4041 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
4043 * loader.c: Add missing setup_... call.
4045 * class.c: Add missing setup_... calls.
4047 * class.c (mono_class_init): Switch on lazy initialization of
4050 * class.c (mono_class_init): Fix generics broken by the recent changes.
4052 * monodiet.c (handle_type): Add missing setup_... calls.
4054 * class.c: Back out garbage in previous patch.
4056 * class.c: Add missing setup_... calls.
4058 * class.c (mono_class_get_method_from_name_flags): Avoid calling
4059 mono_class_setup_methods () if possible.
4061 * class-internals.h (MonoClass): Add 'has_cctor' flag.
4063 * class-internals.h (MonoCachedClassInfo): New structure.
4065 * class.c: Initialize properties and events fields of MonoClass lazily.
4067 * class.c: Add infrastructure for lazily initializing the methods and
4068 vtable fields of MonoClass. Not yet used.
4070 * class.c (mono_class_get_finalizer): New helper function.
4072 * class.c: Add infrastructure for loading some class related data from
4075 * object.c: Add infrastructure for initializing the vtable from data
4078 * gc.c (run_finalize): Use mono_class_get_finalizer ().
4080 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
4081 appropriate initialization function before accessing parts of the
4082 MonoClass structure.
4084 * marshal.c: Fix warnings.
4086 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
4088 * mono-debug-debugger.c (get_exception_message): Use
4089 mono_class_get_method_from_name_flags ().
4091 2005-02-02 Ben Maurer <bmaurer@ximian.com>
4093 * reflection.c, appdomain.c: Replace a few manual searches that
4094 Zoltan missed. (Paolo approved this part of my initial patch).
4096 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
4098 * profiler.c: disable recording statistical events at report time.
4100 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4102 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
4103 to byteswap arrays of enum values, too (bug #72080).
4105 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
4107 * appdomain.c (set_domain_search_path): Allow this to be called if
4108 domain->setup is not yet set.
4110 * loader.c (mono_method_get_index): New helper function.
4112 * loader.c reflection.c: Use mono_method_get_index ().
4114 * class.c (mono_class_get_method_from_name_flags): New helper method.
4116 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
4119 * class.c (mono_class_get_cctor): New helper method.
4121 * string-icalls.c object.c class.c marshal.c reflection.c: Use
4122 mono_class_get_method () to look up methods.
4124 2005-02-01 Miguel de Icaza <miguel@novell.com>
4126 * console-io.c: Fix the build, this should work on Windows.
4128 2005-01-31 Ben Maurer <bmaurer@ximian.com>
4130 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
4131 be set to null to keep things valid
4133 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4135 * icall.c: added Console 2.0 icalls.
4136 * Makefile.am: added console-io.[ch]
4137 * console-io.[ch]: internal calls for Console 2.0 API.
4139 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4141 * class.c: make sure we consider all the interfaces
4142 when calculating max_interface_id (bug found by
4143 Jeroen Frijters running ikvm).
4145 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
4147 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
4148 valuetype fields to null.
4150 * object.c (set_value): Ditto. Fixes #71669.
4152 2005-01-31 Martin Baulig <martin@ximian.com>
4154 * metadata.c (mono_metadata_has_generic_params): New public
4155 function; checks whether something is a generic method.
4157 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
4159 * appdomain.c: fix infinite recursion when adding assemblies.
4161 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
4163 * object.c: Fix small typo to return all items for Environment.
4166 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4168 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
4169 reflection.c: more domain and assembly-unload related fixes
4170 and memory leaks plugs.
4172 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
4174 * 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.
4176 2005-01-29 Ben Maurer <bmaurer@ximian.com>
4178 * loader.c (mono_method_signature): Make this method lazy
4179 (mono_get_method_from_token): Don't computate the signature here.
4181 Doing this saves quite a bit of memory. I got 90 kb on starting up
4182 monodoc. It should also save some disk reads on startup.
4184 * *: MonoMethod->signature might be NULL now. You *MUST* use
4185 mono_method_signature.
4187 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
4189 * object.c (mono_runtime_get_main_args): Return an array from the
4190 current domain here. Fixes #71938.
4192 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
4194 * monitor.c: formatting changes to comply with the
4195 mono coding style and remove #ifdefs from the code.
4197 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4199 * metadata.c, private.h: remove some unneeded data
4200 and use a more compact representation for table schemas.
4202 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
4204 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
4205 to get a better distribution in hash tables.
4206 * *.c: use mono_aligned_addr_hash() where appropriate.
4207 * assembly.c: make var static.
4209 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
4211 * domain-internals.h: Put MonoJitInfo on a diet.
4213 * domain.c: Fix a warning.
4215 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4217 * gc.c: rework the gc handles code to reuse handles
4220 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4222 * domain.c: fixed long standing bug in mono_string_equal() which
4223 was brought to light with the ldstr changes.
4225 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
4227 * reflection.c: Remove warning by adding missing include for marshal.h
4229 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4231 * domain.c, object.c: change the ldstr_table to hold
4232 MonoString* as keys: makes the runtime isinterned lookup
4233 faster and simplifies memory management.
4235 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
4237 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
4238 possible to add imperative security checks before calling the icall.
4239 * reflection.c: Return security attributes on the original MonoMethod
4240 (and not the wrapped one). This fix permissions on icalls.
4242 2005-01-25 Dick Porter <dick@ximian.com>
4244 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
4245 the check for mktime() support actually test the mktime() return
4246 value. "Fixes" bug 71682, though the output is still different to
4249 2005-01-25 Martin Baulig <martin@ximian.com>
4251 * class.c (mono_class_is_assignable_from): Make this work for
4254 2005-01-24 Ben Maurer <bmaurer@ximian.com>
4256 * marshal.c (mono_string_utf8_to_builder)
4257 (mono_string_builder_to_utf16): We might not have ownership of the
4258 string. In thise case, we need to create a new buffer.
4260 * object-internals.h (mono_stringbuilder_capacity): sb->str might
4261 be null, in which case, use the default capacity.
4263 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4265 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
4266 GC events to the profiler.
4268 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4270 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
4271 if you don't want the GC to run.
4273 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
4275 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
4276 start providing a GC API and keeping different implementations in
4278 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
4280 2005-01-22 Ben Maurer <bmaurer@ximian.com>
4282 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
4283 mmap rather than allocating a huge buffer.
4284 (mono_debug_close_mono_symbol_file): Free the buffer allocated
4287 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
4289 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
4290 and CheckExecutionRights.
4291 * reflection.c|h: Keep the index of the declarative security to be
4292 used, instead of the pointer, when AOT compiler is used. Also add
4293 class initialization when requesting demands.
4294 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
4295 CheckExecutionRights. Both properties are now FALSE by default, and
4296 unmodifiable, unless the --security option is used.
4298 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4300 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
4301 reflection.c: properly refcount images and assemblies, many leaks fixed.
4303 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4305 * threadpool.c: increase the timeout for threads in the thread pool to
4306 10s. Fixes bug #67159.
4308 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
4310 * class-internals.h: Sun's compiler insists on explicit
4311 signed on bit fields to handle then correctly.
4313 2005-01-19 Miguel de Icaza <miguel@ximian.com>
4315 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
4316 Make the size of the array fit only the number of invalid path
4319 * class.c (_mono_class_get): Improve the error reporting when a
4320 class referenced is not found, to assist debugging.
4322 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
4324 * threads.c: fix off-by-one error.
4325 * domain.c: free data allocated in the domain.
4327 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
4329 * reflection.c (mono_method_body_get_object): Fill out exception info
4332 * object-internals.h: Add MonoReflectionExceptionHandlingClause
4335 2005-01-19 Martin Baulig <martin@ximian.com>
4337 * loader.c (mono_get_method_constrained): Make this work again.
4339 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
4341 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
4342 guint16 to match the managed side.
4344 * reflection.c (mono_reflection_body_get_object): Fill out local
4347 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
4350 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
4351 'local_var_sig_token'.
4353 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
4355 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
4358 * reflection.c (mono_method_body_get_object): Handle abstract and
4361 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
4363 * marshal.c, loader.c, class-internals.h, reflection.c:
4364 store the emthod data for a wrapper in an array instead of a list.
4366 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
4368 * marshal.c: change the code to allocate memory more
4369 conservatively for method wrappers.
4371 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
4373 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
4374 fields from MonoClass to the marshal info structure where they belong.
4376 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4378 * class.c, object.c, class-internals.h, marshal.c: rearrange
4379 some fields and tweak some types to lower memory usage.
4381 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
4383 * threads.c (signal_thread_state_change): Handle the case when the
4384 target thread is the current thread.
4386 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
4388 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
4389 emit_ptr_to_object_conv.
4391 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
4392 marshalling. Fixes #71352.
4394 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4396 * metadata.h, blob.h: move table enum to blob.h so it can be included
4398 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
4399 cut the size of MonoImage/MonoDynamicImage.
4401 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
4403 * profiler.c (mono_profiler_install_simple): Fix default arguments.
4405 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
4407 * reflection.c, reflection.h, icall.c: add a function to check
4408 if an attribute type is defined for a metadata object.
4410 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
4412 * object-internals.h: Added some needed fields from StringBuilder class.
4413 * marshal.c: Set the maxCapacity when creating a StringBuilder.
4415 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
4417 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
4418 threads before shutting down the runtime.
4420 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
4422 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4424 * object-internal.h, threads.c: implement stacksize and
4425 parameterized thread start functionality (requires
4426 matching corlib). Marked broken code for later removal.
4428 2005-01-12 Martin Baulig <martin@ximian.com>
4430 * class-internals.h (MonoGenericClass): Moved the `initialized'
4431 flag to MonoDynamicGenericClass, removed `init_pending'.
4432 (MonoGenericInst): Added `is_reference' flag.
4434 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
4436 * reflection.c (mono_image_create_pefile): Only set the pe_offset
4437 inside the MSDOS header. Fixes #71201.
4439 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
4441 (mono_domain_finalize): Ditto.
4443 2005-01-12 Martin Baulig <martin@ximian.com>
4445 * class.c (mono_get_shared_generic_class): Use the cache for
4446 non-dynamic generic classes.
4448 * class-internals.h (mono_class_create_generic_2): Removed
4449 function prototype, this function is now static inside class.c.
4451 * class.c (mono_class_create_generic_2): Made this static, only
4452 call it from mono_class_init() and mono_class_setup_parent().
4453 (collect_implemented_interfaces_aux): Call mono_class_init() on
4454 the interfaces we collect.
4455 (mono_class_setup_vtable): Call mono_class_init (class->parent).
4457 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
4459 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
4460 it a real thread handle.
4462 * domain-internals.h: Move exvar_offset from MonoJitInfo to
4463 MonoJitExceptionInfo, since each catch clause needs its own variable.
4465 2005-01-11 Dick Porter <dick@ximian.com>
4467 * image.c (mono_pe_file_open): New variant on mono_image_open()
4468 that does not set up the CLI metadata; used for FileVersionInfo so
4469 it can get the data for windows binaries too.
4471 * process.c (process_read_string_block): Don't read off the end of
4472 the StringTable block.
4474 These both fix bug 70766.
4476 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
4478 * gc.c: set some fields to NULL at GC cleanup time.
4479 * threads.c: if we quit the main thread, call exit ().
4481 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
4483 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
4485 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
4487 * threads.h, threads.c, object.c: added accessor and settor for
4488 main_thread. Handle it specially when exiting from it: wait
4489 for other foreground threads to exit.
4491 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
4493 * process.c, verify.c: remove some bloat.
4495 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
4497 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
4498 the calling convention to cdecl under win32.
4500 2005-01-08 Ben Maurer <bmaurer@ximian.com>
4502 * object.c (mono_object_get_size): New function to get the size of
4505 * profiler.c (simple_allocation): Use above.
4507 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
4509 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
4510 ves_icall_System_AppDomain_getRootDomain (as it's not required to
4511 get an appdomain by it's id and we can't assume the root's id is 0).
4512 * domain-internals.h: Change the function prototype to match.
4513 * icall.c: Change the icall table for AppDomain.
4515 2005-01-08 Miguel de Icaza <miguel@ximian.com>
4517 * locales.c (string_invariant_compare_char): Only compute
4518 GUnicodeTypes in the case where we need them. Test for ordinality
4519 first and return if so.
4524 * FIXME: here we must use the information from c1type and c2type
4525 * to find out the proper collation, even on the InvariantCulture, the
4526 * sorting is not done by computing the unicode values, but their
4527 * actual sort order.
4530 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4532 * loader.c: for P/Invoke methods, allow the "Internal" shared
4533 library name to refer to the calling process symbol namespace.
4535 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
4537 * Makefile.am: Add the security manager to the build.
4538 * security-manager.c|h: New. Initialization of the security manager.
4540 2005-01-07 Dick Porter <dick@ximian.com>
4543 * monitor.c: Update thread state during Monitor and WaitHandle
4544 waits. Fixes bug 71031.
4546 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
4548 * reflection.c (property_encode_signature): Correctly handle when the
4549 property has no methods.
4551 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
4553 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
4555 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
4556 fields from mb, not rmb. Fixes #71017.
4558 * marshal.c (emit_ptr_to_str_conv): Add support for
4559 ByValTStr -> string conversion. Fixes #71015.
4561 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
4563 * mempool.c (mono_mempool_contains_addr): New helper function.
4565 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
4567 * metadata.c (mono_metadata_compute_size): Fix size calculation of
4568 HasSematics encoded fields.
4570 * metadata.c (mono_type_to_unmanaged): Improve error message for
4571 invalid string marshalling.
4573 * metadata.c: Fix warnings.
4575 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4577 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
4580 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
4582 * domain.c object.c domain-internals.h: Revert part of r38077 since the
4583 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
4586 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
4588 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
4589 so methods containing these can be AOTed.
4591 2005-01-03 Martin Baulig <martin@ximian.com>
4593 * loader.c (find_method): Removed the hack for generic instances.
4594 (method_from_memberref): If our parent is a generic instance, pass
4595 its generic type definition to find_method() and then inflate the
4597 (mono_get_method_constrained): Pass the generic type definition to
4598 find_method() and inflate the method later.
4600 * class-internals.h (MonoStats): Added `generic_class_count'.
4602 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
4603 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
4605 * reflection.c (mono_custom_attrs_from_params): Don't ignore
4606 generic type definitions.
4608 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
4610 * loader.c icall.c: Fix warnings.
4612 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
4614 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
4615 blittable types. Fixes #70864.
4617 2004-12-29 Martin Baulig <martin@ximian.com>
4620 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
4622 * reflection.c (mono_method_get_object): Create a
4623 "System.Reflection.MonoGenericMethod" for inflated methods; don't
4624 call mono_get_inflated_method().
4626 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
4628 2004-12-27 Martin Baulig <martin@ximian.com>
4630 * class-internals.h (MonoMethod): Added `is_inflated' flag.
4631 (MonoMethodInflated): Added `inflated' field.
4633 * class.c (mono_class_inflate_generic_method): Don't really
4634 inflate the method here; just set the `is_inflated' flag in the
4636 (mono_class_get_inflated_method): Actually inflate the method here
4637 if it's not already inflated; we use the MonoMethodInflated's new
4638 `inflated' field as a cache.
4640 2004-12-26 Martin Baulig <martin@ximian.com>
4643 (inflate_generic_class): Moved some code out of inflate_generic_type().
4644 (mono_class_inflate_generic_method): If we're already inflated,
4645 inflate the context and use the declaring method; ie. make sure
4646 the declaring method of an inflated method is always the generic
4648 (mono_class_create_from_typedef): Create
4649 `class->generic_container->context->gclass'.
4651 2004-12-24 Ben Maurer <bmaurer@ximian.com>
4653 * metadata-internals.h, marshal.c, reflection.c: More
4654 MonoGHashTable->GHashTable.
4656 * domain-internals.h, class.c: Change MonoGHashTable's into
4657 GHashTables for some cases where no gc stuff is used
4659 All users: update apis
4661 2004-12-23 Ben Maurer <bmaurer@ximian.com>
4663 * metadata.c (builtin_types): Make this `const'. Makes this get
4664 put into the shareable section.
4665 (mono_metadata_init): Casts to make gcc happy.
4667 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
4669 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
4671 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
4673 * icall.c: Added an internal call to retrieve the position and length
4674 of assembly-level declarative security attributes (RequestMinimum,
4675 RequestOptional and RequestRefuse). This is used by the Assembly class
4676 to re-create the corresponding permission sets.
4678 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
4680 * marshal.c: fix the stelemref wrapper to be type correct
4683 2004-12-20 Ben Maurer <bmaurer@ximian.com>
4685 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
4686 to do key & 0x7fffffff. Hashtable already does this. It just
4687 results in longer code.
4689 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
4691 * appdomain.c: Bump corlib version.
4692 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
4693 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
4694 * reflection.c|h: Add functions to get declarative security infos
4695 (blob position and length) for assemblies, classes and methods.
4697 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
4699 * reflection.c: sort the constant table (bug #70693).
4701 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
4703 * object-internals.h, threads.c, domain.c: add accessors for
4704 the MonoThread and MonoDomain tls keys.
4706 2004-12-18 Martin Baulig <martin@ximian.com>
4708 * class.c (inflate_generic_type): If we're inflating a generic
4709 instance, set `ngclass->context->container = context->container';
4710 ie. the container we inflated into.
4712 * metadata.c (mono_metadata_parse_generic_param): Reflect above
4713 inflate_generic_type() changes.
4715 2004-12-17 Martin Baulig <martin@ximian.com>
4718 (MonoGenericClass): Replaced `MonoType *generic_type' with
4719 `MonoClass *generic_class'. Removed `dynamic_info'; if
4720 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
4721 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
4723 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
4725 * exception.c (mono_exception_from_token): New helper function.
4727 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
4729 * assembly.c (mono_assembly_load_with_partial_name): Call
4730 mono_assembly_loaded before invoking the preload hooks. Fixes
4733 * object-internals.h (MonoThread): Change culture_info and
4734 ui_culture_info into an array.
4736 * threads.c: Cache culture info objects from more than one appdomain.
4738 * threads.c threads-types.h icall.c: Add icalls for manipulating the
4741 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
4743 * threads.h threads.c appdomain.c: Clear the culture_info field of
4744 all threads during unloading if they point to an object in the dying
4747 2004-12-13 Ben Maurer <bmaurer@ximian.com>
4749 * culture-info.h (TextInfoEntry): New struct
4750 * object-internals.h: sync with managed
4751 * locales.c: fill the `text_info_data' field
4752 * culture-info-tables.h: update
4754 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
4756 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
4759 2004-12-12 Ben Maurer <bmaurer@ximian.com>
4761 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
4762 (ves_icall_ModuleBuilder_getMethodToken): Ditto
4764 2004-12-12 Martin Baulig <martin@ximian.com>
4766 * mono-debug-debugger.c (write_type): If we're an enum and the
4767 builtin types have already been initialized, call mono_class_init().
4769 2004-12-11 Martin Baulig <martin@ximian.com>
4771 * metadata.c (mono_metadata_load_generic_params): Added
4772 `MonoGenericContainer *parent_container' argument; automatically
4773 compute `container->is_method'; pass the correct owner to
4776 * reflection.c (compare_genericparam): Sort the GenericParam table
4777 according to increasing owners.
4779 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
4781 * profiler.c: allow disabling the default profiler.
4783 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
4785 * decimal.c, icall.c: allow disabling System.Decimal support.
4787 2004-12-09 Marek Safar <marek.safar@seznam.cz>
4789 * reflection.c: Add support for null attribute arguments.
4791 2004-12-09 Martin Baulig <martin@ximian.com>
4793 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
4794 names to get rid of compiler warnings.
4796 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
4798 * marshal.c (mono_marshal_get_struct_to_ptr): Call
4799 mono_marshal_load_type_info (). Fixes #69625.
4800 (mono_marshal_get_ptr_to_struct): Likewise.
4802 2004-12-08 Martin Baulig <martin@ximian.com>
4804 * mono-debug.h: Bumped version number to 47.
4806 * mono-debug-debugger.c
4807 (mono_debugger_event_handler, mono_debugger_event): Take two
4808 guint64 arguments insteed of a gpointer and a guint32.
4810 2004-12-08 Martin Baulig <martin@ximian.com>
4812 * debug-mono-symfile.h
4813 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
4814 `address' to `native_offset'.
4816 2004-12-08 Martin Baulig <martin@ximian.com>
4818 * class.c (mono_class_create_from_typespec): Only inflate if we
4819 either have `context->gclass' or `context->gmethod'.
4821 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
4823 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
4825 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
4827 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
4829 * reflection.c (mono_assembly_get_object): Remove the workaround put
4832 * appdomain.c: Use the corlib_internal field from MonoAssembly.
4834 * appdomain.c: Bump corlib version.
4836 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
4837 be visible in other appdomains.
4839 2004-12-07 Ben Maurer <bmaurer@ximian.com>
4841 * threads.c: Interlocked inc and dec for longs were messed up,
4842 use a KISS based impl for this. Fixes 70234
4844 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
4846 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
4848 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
4850 * icall.c: fix to follow policy not to allow struct
4851 arguments in icalls.
4853 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4855 * process.c: make the patch that handles spaces in file paths work
4856 on mono/windows too.
4858 2004-12-06 Martin Baulig <martin@ximian.com>
4860 * class.c (mono_class_create_generic): Call
4861 mono_class_setup_supertypes() if we're dynamic.
4862 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
4864 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
4866 * object-internals.h: Add new fields to MonoThread.
4868 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4870 * icall.c threads-types.h threads.c: Add new icalls.
4872 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
4874 * object-internals.h (MonoReflectionAssembly): Sync object layout with
4877 * appdomain.c: Bump corlib version.
4879 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
4880 internal assemblies. Fixes #69181.
4882 2004-12-05 Martin Baulig <martin@ximian.com>
4884 * class.c (mono_class_inflate_generic_signature): Make this a
4885 no-op if `context' is NULL or we don't have any type parameters;
4886 also copy `sentinelpos'.
4888 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
4890 * image.c: Add unbox_wrapper_cache.
4892 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
4894 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
4897 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
4900 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
4902 2004-12-04 Martin Baulig <martin@ximian.com>
4904 * loader.c (mono_method_get_signature_full): New public function;
4905 like mono_method_get_signature(), but with an additional
4906 `MonoGenericContext *' argument.
4908 * class.c (mono_class_inflate_generic_signature): Formerly known
4909 as inflate_generic_signature(); make this public.
4911 2004-12-04 Martin Baulig <martin@ximian.com>
4914 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
4915 instead of a `MonoGenericContainer *'.
4916 (mono_metadata_parse_array_full): Likewise.
4917 (mono_metadata_parse_signature_full): Likewise.
4918 (mono_metadata_parse_method_signature_full): Likewise.
4919 (mono_metadata_parse_generic_inst): Likewise.
4920 (mono_metadata_parse_generic_param): Likewise.
4921 (mono_metadata_parse_mh_full): Likewise.
4922 (mono_type_create_from_typespec_full): Likewise.
4924 2004-12-03 Martin Baulig <martin@ximian.com>
4926 * class-internals.h (MonoGenericContainer): Replaced the
4927 `MonoGenericContext * pointer with a `MonoGenericContext'
4928 structure and made it the first element.
4930 2004-12-03 Martin Baulig <martin@ximian.com>
4933 (inflate_generic_type): Set the `context->container' when creating
4934 a new MonoGenericContext.
4935 (mono_class_inflate_generic_method): Likewise.
4936 (mono_class_create_from_typespec): Just use `context->container'
4937 to get the container.
4939 * loader.c (method_from_methodspec): Set `context->parent' from
4940 `context->container' - and if that's a method container, use its
4941 parent. Also set the `context->container' when creating a new
4943 (mono_get_method_from_token): Use just `context->container' to get
4946 * metadata.c (do_mono_metadata_parse_generic_class): Also set
4947 `gclass->context->container'.
4949 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
4950 the `context->container' when creating a new MonoGenericContext.
4952 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
4954 * reflection.c (compare_genericparam): Sort params with identical
4955 owner by their number. Fixes gen-111 on sparc.
4957 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
4959 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
4960 around the domain changes.
4962 * appdomain.c (mono_domain_unload): Handle the case when the thread
4963 calling Unload is itself being aborted during unloading. Fixes #70022.
4965 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
4967 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
4968 checkpoint_func as an icall so it gets a wrapper.
4969 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
4970 in the cross-appdomain wrappers too.
4972 * threads.c (mono_thread_has_appdomain_ref): Make this public.
4974 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
4976 * reflection.c: Fix some memory leaks.
4978 2004-12-02 Martin Baulig <martin@ximian.com>
4980 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
4982 * metadata.c (generic_class_cache): New static hashtable.
4983 (mono_metadata_lookup_generic_class): New public method.
4985 2004-12-02 Martin Baulig <martin@ximian.com>
4987 * class.c (mono_class_create_from_typedef): Call
4988 mono_class_setup_parent() and mono_class_create_mono_type() before
4989 parsing the interfaces.
4991 2004-12-02 Martin Baulig <martin@ximian.com>
4993 * metadata.c (generic_inst_cache): New static hashtable.
4994 (mono_metadata_lookup_generic_inst): New public function.
4995 (mono_metadata_inflate_generic_inst): New public function.
4996 (mono_metadata_parse_generic_inst): New public function.
4997 (do_mono_metadata_parse_generic_class): Use the new
4998 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
4999 since this'll also use the cache.
5001 * reflection.c (mono_reflection_bind_generic_method_parameters):
5002 Use mono_metadata_lookup_generic_inst() to use the new cache.
5004 * class.c (inflate_mono_type): Use
5005 mono_metadata_inflate_generic_inst() to inflate a generic
5006 instance; this'll also use the new cache.
5008 * loader.c (method_from_methodspec): Use
5009 mono_metadata_parse_generic_inst() and
5010 mono_metadata_inflate_generic_inst() rather than parsing it
5011 manually, so we can use the new cache.
5013 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
5015 * threads.c (wait_for_tids): Do not incorrectly free threads when
5018 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
5020 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
5021 iter->args based on whether parameters are passed in registers (i.e.
5022 MONO_ARCH_REGPARMS is defined)
5024 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
5026 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
5027 the exception message. Fixes #70070.
5028 (method_from_methodspec): Fix warnings.
5030 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5032 * process.c: (complete_path) return the path quoted
5034 2004-12-01 Martin Baulig <martin@ximian.com>
5036 * class-internals.h (MonoGenericInst): New structure.
5037 (MonoGenericClass): Replaced `type_argc', `type_argv' and
5038 `is_open' with `MonoGenericInst *inst'.
5039 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
5040 `is_open' with `MonoGenericInst *inst'.
5042 2004-11-30 Martin Baulig <martin@ximian.com>
5044 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
5046 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
5047 to `generic_class_cache'.
5050 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
5051 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
5052 (mono_generic_inst_is_valuetype): Renamed to
5053 mono_generic_class_is_valuetype().
5056 (MonoGenericInst): Renamed to MonoGenericClass.
5057 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
5058 (MonoClass): Renamed `generic_inst' to `generic_class'.
5059 (MonoGenericContext): Renamed `ginst' to `gclass'.
5061 * object-internals.h
5062 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
5064 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
5065 mono_reflection_generic_class_initialize().
5067 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
5068 now known as "System.Reflection.MonoGenericClass".
5069 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
5071 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
5073 * class-internals.h: Added a flag field to MonoClass to cache the
5074 declarative security attributes actions associated with the class.
5075 * domain-internals.h: Added booleans to MonoJitInfo to cache the
5076 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
5077 applicable to the JITted method.
5078 * reflection.c|h: Added functions to extract (as flags) which security
5079 actions are available (declaratively) for a method, class or assembly.
5080 * metadata.c|h: Added functions to search the declarative security
5081 table in the metadata.
5083 2004-11-29 Ben Maurer <bmaurer@ximian.com>
5085 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
5086 EXPORTEDTYPES are already in the class name cache, so there is no
5087 need to add extra code here to look at them. Just removes a bit of
5090 (ves_icall_System_Environment_get_TickCount): No need for #if
5091 WINDOWS. We already have the code in io-layer.
5093 2004-11-28 Martin Baulig <martin@ximian.com>
5096 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
5099 2004-11-27 Miguel de Icaza <miguel@ximian.com>
5101 * assembly.c (do_mono_assembly_open): Instead of having a
5102 conditional WITH_BUNDLE, incorporate support for bundles here, by
5103 having a global `bundles' variable holding a pointer to the actual
5106 (mono_register_bundled_assemblies): New API call used by the
5109 See mkbundle.1 for details.
5111 2004-11-27 Martin Baulig <martin@ximian.com>
5113 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
5114 the vtable for generic methods.
5116 2004-11-26 Martin Baulig <martin@ximian.com>
5119 (mono_metadata_generic_method_hash): New public function.
5120 (mono_metadata_generic_method_equal): Likewise.
5123 (MonoGenericContainer): Added `GHashTable *method_hash'.
5125 * reflection.c (ReflectionMethodBuilder): Added
5126 `MonoGenericContainer *generic_container'.
5127 (reflection_methodbuilder_to_mono_method): Don't create a new
5128 MonoGenericContainer each time we're called.
5129 (mono_reflection_bind_generic_method_parameters): Use
5130 `container->method_hash' to cache the results so we don't create a
5131 different method if we're called several times with the same
5134 * loader.c (method_from_methodspec): Use the new
5135 `container->method_hash' here, too.
5137 2004-11-26 Martin Baulig <martin@ximian.com>
5139 * class.c (inflate_generic_signature): Correctly compute
5140 `res->has_type_parameters'.
5141 (mono_class_vtable): Use the `has_type_parameters' flag to
5142 determine whether we're a generic method.
5144 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
5146 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
5148 * object.c (mono_runtime_run_main): Fix a small memory leak.
5150 2004-11-25 Martin Baulig <martin@ximian.com>
5152 * class.c (set_generic_param_owner): Fixed the loop.
5154 2004-11-25 Martin Baulig <martin@ximian.com>
5156 * object.c (mono_class_vtable): Don't create any JIT wrappers for
5159 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
5161 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
5162 names. Fixes #69787.
5164 2004-11-24 Martin Baulig <martin@ximian.com>
5166 * class.c (mono_class_create_generic_2): If we don't have a
5167 `ginst->parent', inflate `gklass->parent' to get our parent.
5169 2004-11-24 Martin Baulig <martin@ximian.com>
5171 * reflection.c (compare_genericparam): Correctly sort the
5172 GenericParam table; fixes #69779.
5174 2004-11-23 Ben Maurer <bmaurer@ximian.com>
5176 * reflection.c: When writing a PE file, don't create a huge
5177 buffer in memory. Just write the arrays we have to the file.
5178 This reduces memory usage.
5180 * metadata-internals.h: MonoDynamicStream pefile is no longer used
5183 2004-11-17 Martin Baulig <martin@ximian.com>
5185 * class.c (mono_class_init): Don't setup `class->parent' for
5186 dynamic instances; moved this to mono_class_generic_2().
5187 (mono_class_create_generic): Also set `klass->inited' for dynamic
5189 (mono_class_create_generic_2): Don't do anything for dynamic
5190 generic instances. Set `klass->parent' here and also call
5191 mono_class_setup_parent() here.
5193 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
5194 `MonoType *parent' argument; set `ginst->parent' before calling
5195 mono_class_create_generic_2(), so we set the correct parent.
5197 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
5199 * reflection.c: allow getting attributes from ModuleBuilder
5202 2004-11-17 Martin Baulig <martin@ximian.com>
5204 * class.c (mono_class_create_from_typedef): If a type parameter is
5205 inherited from an outer class, set its owner to that class.
5207 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
5209 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
5210 for (int*) written size. This fixes bug #69592.
5212 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
5214 * icall.c: Added IsAuthenticodePresnet internal call.
5215 * image.c|h: New function that check a MonoImage for an Authenticode
5216 signature in the certificate PE data directory.
5217 * security.c|h: New internal call to ask the runtime if an
5218 Authenticode signature seems referenced in the PE header.
5220 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
5222 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
5224 * reflection.c (mono_image_create_pefile): Free the assembly streams
5225 after writing out the assembly file.
5227 * object.c (mono_runtime_run_main): Fix small memory leak.
5229 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
5230 property access modifiers. Fixes #69389.
5232 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
5234 * domain.c, object.c, object-internals.h, domain-internals.h,
5235 object.h, marshal.c: keep dynamic code info per domain.
5237 2004-11-15 Martin Baulig <martin@ximian.com>
5239 * class.c (mono_type_get_name_recurse): Put type arguments in
5240 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
5243 2004-11-15 Martin Baulig <martin@ximian.com>
5245 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
5246 (mono_class_setup_vtable): When computing `the_cname' for a
5247 generic instance, don't include the namespace since we'd otherwise
5250 2004-11-15 Martin Baulig <martin@ximian.com>
5252 * class.c (mono_class_create_generic): Changed return type to void.
5253 (mono_class_create_generic_2): New public function; setup
5254 `class->method', `class->field' and `class->interfaces' here
5255 instead of in mono_class_init().
5257 * class.h (mono_class_create_generic): Moved to class-internals.h.
5259 2004-11-14 Ben Maurer <bmaurer@ximian.com>
5261 * reflection.c (mono_image_create_pefile): take a file HANDLE.
5262 rather than writing to memory, write to this file. Right now,
5263 we are just writting into a buffer, and copying that. However
5264 we can avoid the buffer later.
5266 (mono_dynamic_stream_reset): new function
5268 * icall.c, object-internals.h: update for the above.
5270 2004-11-13 Ben Maurer <bmaurer@ximian.com>
5272 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
5273 have been using gc'd memory. First it is slower, unlikely
5274 the comment in the source code said, secondly, it increases
5275 our footprint to do it in the gc.
5277 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
5278 the method so that it does not have to copy to managed code.
5280 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
5282 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
5284 2004-11-12 Martin Baulig <martin@localhost>
5286 * reflection.c (mono_image_create_token): Allow generic method
5287 definitions here, since they may appear in an `.override'; see
5288 gen-98/gen-99 for an example.
5290 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
5292 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
5295 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
5298 2004-11-11 Martin Baulig <martin@ximian.com>
5300 * class.c (mono_class_setup_vtable): In an explicit interface
5301 implementation, the method name now includes the arity.
5303 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
5305 * object.c (mono_array_full_copy): Fix warning.
5307 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
5309 * appdomain.c: Removed look_for_method_by_name(). Use the new method
5310 mono_class_get_method_from_name() instead.
5312 * class-internals.h: Added two new types of wrappers.
5313 Added MonoRemotingTarget enum. Added new trampoline function type, which
5314 takes an additional MonoRemotingTarget value as parameter, so it is
5315 possible to request a trampoline for a specific target.
5317 * class.c: Added new mono_class_get_method_from_name() method.
5319 * class.h: In MonoRemoteClass, we can have now to vtables, one for
5320 general remoting sinks and one specific for cross domain calls.
5322 * debug-helpers.c: Added new wrapper names.
5324 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
5327 * image.c: Porperly delete value objects form the remoting invoke hashtable.
5329 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
5330 with several other methods (mono_marshal_get_xappdomain_dispatch,
5331 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
5332 and others) can generate a fast remoting wrapper for cross domain calls.
5333 More information can be found in docs/remoting.
5334 Other changes: Removed mono_find_method_by_name, and used
5335 mono_class_get_method_from_name instead.
5336 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
5337 is stored in the remoting invoke hashtable.
5339 * marshal.h: published the new method for getting the xdomain wrapper,
5340 and also added a method for getting the adequate wrapper for a given
5343 * object-internals.h, object.c: Added a couple of methods for capying and
5345 Modified mono_install_remoting_trampoline, which takes the new remoting
5346 trampoline that has a remoting target as parameter.
5347 mono_class_proxy_vtable now also takes a remoting target as parameter, and
5348 will return the most suitable vtable for the target.
5349 Added mono_remote_class_vtable, which returns the vtable of a remote class
5350 (which can be the normal remoting vtable or the xdomain vtable).
5352 * threads.c: the xdomain invoke and dispatch wrappers must also be
5353 protected against interruptions.
5355 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5357 * icall.c: use memmove in BlockCopyInternal when the source and
5358 destination arrays are the same.
5360 2004-11-09 Martin Baulig <martin@ximian.com>
5362 * class-internals.h (MonoGenericContainer): Removed `method' and
5363 `signature', replaced them with `is_method' and `is_signature'
5364 flags. Added `context'.
5366 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
5367 instead of a `MonoGenericContainer *'.
5369 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
5370 for dynamic type parameters.
5371 (mono_metadata_load_generic_params): Setup `container->context'.
5373 * reflection.c (mono_reflection_setup_generic_class): Setup
5374 `tb->generic_container->context'.
5375 (do_mono_reflection_bind_generic_parameters): Use
5376 mono_class_inflate_generic_type() to correctly inflate types,
5377 rather than using our own hack just for MONO_TYPE_VAR.
5379 2004-11-09 Martin Baulig <martin@ximian.com>
5381 * class.c (mono_class_inflate_generic_method): Small fix; don't
5385 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
5386 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
5387 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
5388 (ves_icall_Type_BindGenericParameters): Likewise.
5389 (ves_icall_Type_get_IsGenericInstance): Likewise.
5390 (ves_icall_Type_GetGenericParameterPosition): Likewise.
5391 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
5392 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
5393 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
5395 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
5397 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
5398 assembly versions and public key tokens. Fixes #69113.
5400 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
5402 * metadata.c: fix bug introduced with the type cache changes
5405 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
5407 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
5408 the MonoClass pointer instead of the token in exception clauses.
5409 * reflection.c: updates for the above and make the code not depend
5410 on the structure of MonoExceptionClause.
5412 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
5414 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5415 Add support for dynamic assemblies. Fixes #69114.
5417 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
5419 2004-11-07 Ben Maurer <bmaurer@ximian.com>
5421 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
5422 since most only those methods use it. the code member of
5423 MonoMethodPInvoke was dead, so that can be removed too. Also,
5424 remove inline_count (again, not used), and move slot so that it
5425 can share bits with some other flags. This saves 8 bytes in the
5426 structure and gives us about 50 kb back for mcs helloworld.cs
5428 * *.[ch]: Do naming changes for the above.
5430 * loader.c (mono_method_get_header): Lazily init the header
5432 (mono_get_method_from_token): don't init the header here
5433 (mono_free_method): the header may never be allocated
5435 Overall, this saves 150 kb of unmanaged allocations
5436 for mcs helloworld.cs. That accounts for 10% of the unmanaged
5439 * loader.c, loader.h (mono_method_get_header): new accessor.
5441 * *.[ch]: use the above method. Prepares us to lazily load
5444 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
5445 three warnings, which are actual bugs (see 69206).
5447 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
5448 unused. Saves a cool 4 bytes / method.
5450 2004-11-06 Ben Maurer <bmaurer@ximian.com>
5452 * metadata.c (builtin_types): Add types for System.Object here.
5453 (mono_metadata_parse_type_full): Cache MonoType*'s that are
5454 for a class or valuetype from klass->this_arg or klass->byval_arg.
5456 On mcs for a hello world, this gets us down from 21836 MonoType's
5459 (mono_metadata_free_type): Account for the above change.
5461 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
5463 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
5464 exception instead of asserting if name is null.
5465 (ves_icall_System_AppDomain_GetData): Ditto.
5467 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
5469 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
5472 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
5473 Return NULL when the domain does not have entry_assembly set.
5475 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
5476 Add a 'resource_modules' argument.
5477 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
5479 * reflection.c (mono_reflection_create_runtime_class): Move setting
5480 of wastypebuilder here, so mono_get_type_object () returns a MonoType
5483 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
5484 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
5485 Throw an ArgumentNullException if 'ptr' is null.
5487 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
5488 assemblies here. Fixes #69020.
5490 2004-11-05 Geoff Norton <gnorton@customerdna.com>
5492 * reflection.c (build_compressed_metadata): Fix the previous patch for
5493 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
5496 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
5498 * assembly.c (mono_assembly_names_equal): Allow a match if one of
5499 the cultures is false. Fixes #69090.
5501 * reflection.c (build_compressed_metadata): Fix invalid memory read
5502 detected by valgrind.
5504 * reflection.c (mono_reflection_get_type): Avoid triggering a
5505 TypeResolve multiple times for the same type. Fixes #65577.
5507 2004-11-04 Ben Maurer <bmaurer@ximian.com>
5509 * marshal.c: Avoid using ldftn to call managed functions. It is
5510 much slower than just a call.
5512 * reflection.c (mono_module_get_object): free the basename we
5513 allocate here from glib.
5515 * reflection.c (ensure_runtime_vtable): make sure to free
5516 overrides. Also, we were allocating an array of MonoMethod not an
5517 array of MonoMethod*.
5519 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
5521 * image.c (mono_image_close): free image->guid here.
5523 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
5525 * reflection.c: Fix some spec conformance issues with the PE file
5526 structures so mcs compiled apps run on the Net 2.0 beta.
5528 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
5530 * string-icalls.c (ves_icall_System_String_ctor_encoding):
5531 Implement this. Fixes #67264.
5533 * debug-helpers.h debug-helpers.c marshal.c: Move
5534 mono_find_method_by_name to debug-helpers.c.
5536 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
5538 * object.c (mono_release_type_locks): type_initialization_hash is
5541 * reflection.c object.c object-internals.h: Fix warnings.
5543 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
5544 without accessors. Fixes #61561.
5546 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
5547 application base from the root domain if not set. Fixes #65641.
5548 (mono_runtime_init): Fix warning.
5550 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5552 * appdomain.c: call mono_thread_pool_init.
5553 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
5554 of worker threads based on the number of CPUs and the environment
5555 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
5556 for non-windows (windows) systems.
5558 2004-10-27 Chris Toshok <toshok@ximian.com>
5560 * mono-debug-debugger.c (write_class): don't call mono_class_init
5561 here, as even with the check for (!klass->init_pending), we get
5562 into a situation where we're hitting cycles in class
5563 initialization. Fixes #68816.
5565 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
5567 * image.c: Avoid overwriting values in the loaded_images_hash when an
5568 assembly is loaded multiple times. Fixes #61152.
5570 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
5571 so multiple satellite assemblies for the same name can be loaded.
5574 * mono_domain_assembly_preload: Actually return the loaded assembly,
5577 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
5578 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
5580 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
5581 pending finalizers are not invoked after the appdomain has been
5582 unloaded. Fixes #67862.
5584 2004-10-22 Martin Baulig <martin@ximian.com>
5586 * mono-debug-debugger.c
5587 (mono_debugger_runtime_invoke): Don't box valuetypes.
5589 2004-10-22 Chris Toshok <toshok@ximian.com>
5591 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
5592 don't hide private methods.
5594 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
5596 * icall.c: Allows the runtime to "share" (when known) the public key
5597 token of an assembly. This avoid the need to recalculate the token
5598 (from the public key) in managed code.
5600 2004-10-21 Chris Toshok <toshok@ximian.com>
5602 * debug-helpers.c (append_class_name): argh, revert last patch.
5604 2004-10-21 Chris Toshok <toshok@ximian.com>
5606 * debug-helpers.c (append_class_name): use '+' as the delimiter,
5607 not '/', so that it matches what the debugger uses to look up
5610 2004-10-21 Martin Baulig <martin@ximian.com>
5612 * mono-debug-debugger.c (mono_debugger_throw_exception): New
5613 public method; this is called each time an exception is thrown and
5614 allows the debugger to use exception catch points.
5616 2004-10-21 Martin Baulig <martin@ximian.com>
5618 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
5619 the stack pointer and the exception object in some struct and pass
5620 that to the debugger.
5622 2004-10-21 Chris Toshok <toshok@ximian.com>
5624 * mono-debug-debugger.c (do_write_class): add instance/static
5625 event support. We don't expose "raise" or "other" yet.
5626 (event_is_static): new method.
5628 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
5630 * mono-debug-debugger.c
5631 (mono_debugger_handle_exception): Remove
5632 bogus return value for fussy compilers.
5634 2004-10-20 Martin Baulig <martin@ximian.com>
5636 * mono-debug-debugger.c
5637 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
5638 (mono_debugger_handled_exception): Likewise.
5640 2004-10-20 Martin Baulig <martin@ximian.com>
5642 * mono-debug-debugger.h (MonoDebuggerEvent): Added
5643 MONO_DEBUGGER_EVENT_EXCEPTION.
5645 * mono-debug-debugger.c (mono_debugger_handle_exception): New
5646 public function to send the debugger a notification for an
5647 exception and inform it about a catch/finally clause.
5649 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
5651 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
5652 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
5655 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
5657 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
5659 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
5660 marshalled as [In,Out]. Fixes #58325.
5662 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
5664 * reflection.c (mono_method_body_get_object): Implement some fields.
5666 2004-10-12 Martin Baulig <martin@ximian.com>
5668 * reflection.c (mono_reflection_bind_generic_parameters): Small
5669 fix, correctly retrieve our parent from a generic instance.
5671 2004-10-12 Martin Baulig <martin@ximian.com>
5673 * metadata.c (mono_metadata_generic_param_equal): We always have
5677 (mono_class_from_generic_parameter): We need to have an owner.
5678 (my_mono_class_from_generic_parameter): Likewise.
5680 * reflection.c (mono_reflection_setup_generic_class): Renamed to
5681 mono_reflection_create_generic_class() and added a new
5682 mono_reflection_setup_generic_class().
5683 (mono_reflection_initialize_generic_param): If we're a nested
5684 generic type and inherited from the containing class, set our
5685 owner to the outer class.
5687 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
5689 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
5691 * reflection.c (mono_method_body_get_object): New function to create
5692 a MethodBody object.
5694 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
5696 2004-10-11 Martin Baulig <martin@ximian.com>
5698 * metadata.c (_mono_metadata_type_equal): Renamed to
5699 do_mono_metadata_type_equal() and made static.
5701 2004-10-11 Martin Baulig <martin@ximian.com>
5703 * appdomain.c: Bump corlib version number to 28.
5705 2004-10-10 Martin Baulig <martin@ximian.com>
5708 (MonoGenericInst): Added `MonoGenericContainer *container'.
5709 (MonoGenericMethod): Likewise.
5710 (MonoGenericContext): Likewise.
5711 (MonoGenericParam): Added `MonoGenericContainer *owner'.
5714 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
5715 (do_mono_metadata_parse_generic_inst): Likewise.
5716 (mono_metadata_parse_type_full): New public method. This is the actual
5717 mono_metadata_parse_type() implementation - with an additional
5718 `MonoGenericContainer *' argument.
5719 (mono_metadata_parse_array_full): Likewise.
5720 (mono_metadata_parse_signature_full): Likewise.
5721 (mono_metadata_parse_method_signature_full): Likewise.
5722 (mono_metadata_parse_mh_full): Likewise.
5723 (mono_type_create_from_typespec): Likewise.
5724 (mono_metadata_interfaces_from_typedef_full): New public method;
5725 this is similar to the other _full() methods, but we take a
5726 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
5727 (mono_metadata_parse_generic_param): Take an additional
5728 `MonoGenericContainer *' argument and lookup the MonoGenericParam
5729 from that container.
5730 (mono_metadata_generic_param_equal): New static method to compare
5731 two type parameters.
5732 (_mono_metadata_type_equal): New static method; takes an
5733 additional `gboolean signature_only' argument - if true, we don't
5734 compare the owners of generic parameters.
5735 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
5736 with a TRUE argument - do a signature-only comparision.
5738 * loader.c: Use the new _full() methods and pass the
5739 MonoGenericContainer to them.
5741 * object-internals.h (MonoReflectionTypeBuilder): Added
5742 `MonoGenericContainer *generic_container' field.
5743 (MonoReflectionMethodBuilder): Likewise.
5745 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
5747 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
5748 case initial images of dynamic assemblies.
5750 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
5752 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
5754 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
5755 length of event->other array.
5756 (typebuilder_setup_events): Ditto.
5758 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
5759 'assembly_by_name' and add an 'assemblies' list.
5761 * assembly.h assembly.c: Add a new search hook for determining whenever
5762 an assembly is already loaded. Use this instead of searching in the
5763 loaded_assemblies list.
5765 * domain.c appdomain.c: Implement the new search hook so loaded
5766 assemblies are now scoped by appdomain. Fixes #67727.
5768 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
5770 * threads.c (mono_thread_attach): Initialize synch_lock field so
5771 mono_thread_detach works again.
5773 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
5774 'lib' too. Fixes #63130.
5776 2004-10-06 Jackson Harper <jackson@ximian.com>
5778 * culture-info-tables.h: regenerated.
5780 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
5782 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
5783 implemented by other interfaces in the result. Fixes #65764.
5785 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5786 Handle unloadable modules without crashing.
5788 * image.c (load_modules): Revert the previous patch since modules must
5789 have a fixed index inside the array.
5791 * image.c (load_modules): Don't include native modules in the modules
5794 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
5796 * reflection.h: Add param_defaults field.
5798 * reflection.c: Add support for parameter defaults in dynamic methods.
5801 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
5802 an empty string when a type has no namespace. Fixes #64230.
5804 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
5806 * tabledefs.h: Added "internal" security actions to support non-CAS
5807 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
5808 Note: they do not seems to be used anymore in 2.0 (new metadata format)
5810 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
5812 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
5813 constructor of abstract class. Fixes #61689.
5815 2004-10-04 Martin Baulig <martin@ximian.com>
5817 * class-internals.h (MonoGenericContainer): New type.
5818 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
5819 `MonoGenericContainer *generic_container'.
5820 (MonoClass): Replaced `gen_params' and `num_gen_params' with
5821 `MonoGenericContainer *generic_container'.
5823 * metadata.c (mono_metadata_load_generic_params): Return a
5824 `MonoGenericContainer *' instead of a `MonoGenericParam *';
5825 removed the `num' argument.
5827 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
5829 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
5832 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
5835 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
5837 * reflection.c: Save pe_kind and machine values into the generated
5840 * appdomain.c: Bump corlib version number.
5842 * object-internals.h: Reorganize layout of LocalBuilder.
5844 * class-internals.h class.c (mono_class_get_implemented_interfaces):
5845 New helper function.
5847 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
5848 created MonoType for dynamic types. Fixes #66180.
5850 2004-10-02 Ben Maurer <bmaurer@ximian.com>
5852 * threadpool.c: the ares hashtable needs a critical section around it.
5853 this prevents some nasty segfaults
5855 2004-10-02 Massimiliano Mantione <massi@ximian.com>
5857 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
5858 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
5861 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
5863 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
5865 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
5867 * image.c: Always canonicalize image file names, to avoid loading
5868 the same assembly twice when referenced using a relative path.
5870 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
5872 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
5874 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
5876 * marshal.c: Fix warnings.
5878 2004-09-29 Geoff Norton <gnorton@customerdna.com>
5880 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
5881 attempting to marshal the delegate_trampoline as the method_addr.
5882 This patch has a static hashtable of marshalled delegates so that
5883 we can map delegate_trampoline addresses back to delegates. This
5884 allows a delegate passed to managed code to be passed back into native
5887 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
5889 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
5891 * reflection.c (method_encode_code): Align method headers properly.
5894 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
5896 * marshal.c: In the runtime invoke wrapper, reset the abort
5897 exception if it is cached. This avoids the automatic rethrowal of
5898 the exception after the catch of the wrapper. Also check for pending
5899 interruptions before calling the managed method. This is done using
5900 the new method emit_thread_force_interrupt_checkpoint, since the
5901 normal checkpoint method is ignored when running the invoke wrapper.
5902 * object.c: If the abort exception is rethrown, set the abort_exc
5903 field of the thread, so it will be rethrown aftere every catch.
5904 * threadpool.c: Only run an interruption checkpoint if what has been
5905 requested is a stop of the thread (aborts will be ignored).
5906 * threads.c: By default, a thread will now never be interrumped while
5907 running the runtime invoke wrapper (this ensures that runtime_invoke
5908 will always return to the caller if an exception pointer is provided).
5909 There is a new special method mono_thread_force_interruption_checkpoint()
5910 to force an interruption checkpoint even if running a protected
5911 wrapper, which is used by the same runtime invoke wrapper to do a check
5914 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
5916 * object.c, object-internals.h: Implemented mono_release_type_locks,
5917 which releases the cctor locks held by a thread.
5918 * threads.c, threads.h: In thread_cleanup, release cctor locks held
5919 by a thread. Added mono_thread_exit() method to be used to safely stop
5922 2004-09-28 Raja R Harinath <rharinath@novell.com>
5924 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5925 Move null check before dereference. Avoid indexing beyond the end
5926 of the 'modules' array.
5928 2004-09-28 Raja R Harinath <rharinath@novell.com>
5930 * metadata-internals.h (MonoImage): Add module_count field.
5931 * image.c (load_modules): Set image->module_count.
5932 (mono_image_load_file_for_image): Use image->module_count.
5933 * reflection.c (mono_image_load_module): Append to image->modules array
5934 of dynamic assembly.
5935 (mono_module_get_object): Fix loop to actually increment index.
5936 Use image->module_count.
5937 * assembly.c (mono_assembly_load_references): Use image->module_count.
5938 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5941 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
5943 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
5944 Avoid assert on generic types.
5946 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
5948 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
5950 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
5952 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
5953 function to convert a MarshalSpec structure to its managed counterpart.
5955 * reflection.c: Fix warnings.
5957 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
5960 * icall.c (mono_create_icall_signature): Fix build.
5962 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
5964 * icall.c: Add MakePointType icall.
5966 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
5969 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5971 * threadpool.c: reuse allocated slots in the queue.
5973 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
5975 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
5977 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
5979 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
5982 * tabledefs.h: Add constants for pinvoke attributes BestFit and
5983 ThrowOnUnmappableChar.
5985 * icall.c (ves_icall_Type_GetPacking): New icall.
5987 2004-09-24 Martin Baulig <martin@ximian.com>
5989 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
5991 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5994 (mono_domain_set): allow setting a domain that is being unloaded.
5995 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
5998 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
6000 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
6001 the GetCustomAttributes icall.
6003 2004-09-23 Martin Baulig <martin@ximian.com>
6005 * object-internals.h (MonoReflectionGenericParam): Replaced
6006 'has_ctor_constraint', `has_reference_type' and `has_value_type'
6007 with `guint32 attrs'.
6009 2004-09-23 Martin Baulig <martin@ximian.com>
6011 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
6013 2004-09-23 Martin Baulig <martin@ximian.com>
6015 * object-internals.h (GenericParameterAttributes): New enum.
6017 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
6019 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
6021 * class.c (init_events): Fill out event->other field.
6023 * class.c: Fix warnings.
6025 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
6027 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
6029 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
6030 walk which doesn't supply the IL offset.
6032 2004-09-22 Martin Baulig <martin@ximian.com>
6034 * reflection.c (mono_reflection_setup_internal_class): If we're
6035 System.ValueType, System.Object or System.Enum, set
6036 `klass->instance_size' and create the vtable.
6037 (mono_reflection_create_internal_class): If we're an enum type,
6038 get the base class from our current corlib.
6040 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
6042 * reflection.h (MonoResolveTokenError): New type.
6044 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
6047 * icall.c: Add an 'error' argument to the ResolveToken icalls.
6049 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
6051 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
6052 Support also calling constructors, but only for already allocated objects.
6054 2004-09-17 Geoff Norton <gnorton@customerdna.com>
6056 * reflection.c (type_get_qualified_name): If the klass is null
6057 return the typename to avoid a NullRefEx.
6058 (encode_cattr_value): Get the qualified name of the boxed type,
6059 not the underlying enumtype. Fixes #62984.
6061 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
6063 * marshal.c: Fix problems with previous checkin.
6065 2004-09-21 <vargaz@freemail.hu>
6067 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
6068 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
6070 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
6072 2004-09-21 Geoff Norton <gnorton@customerdna.com>
6074 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
6075 should only return a type for pointers, arrays, and passbyref types.
6078 2004-09-21 Martin Baulig <martin@ximian.com>
6080 * domain.c (mono_debugger_check_runtime_version): New public
6083 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
6085 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
6087 * reflection.c: Added missing sort to the declarative security
6088 attributes table. MS implementation stops seeing the attributes if the
6089 token number regress in the table (as shown by ildasm and permview).
6091 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
6093 * object-internals.h (MonoReflectionModule): Add 'token' field.
6095 * reflection.c (mono_reflection_get_token): Add support for Module
6097 (mono_module_get_object): Set 'token' field.
6098 (mono_module_file_get_object): Set 'token' field.
6100 * icall.c: Add new Assembly and Module icalls.
6102 * appdomain.c: Bump corlib version.
6104 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
6106 * loader.h loader.c class.h class.c: Add helper functions for obtaining
6107 tokens of metadata objects.
6109 * reflection.h reflection.c (mono_reflection_get_token): New function
6110 to obtain the token of a metadata object.
6112 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
6114 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
6116 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
6118 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
6120 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
6122 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
6123 * object-internals.h: Added 3 MonoArray* members to MonoReflection
6124 AssemblyBuilder to access the permissions set in the class lib.
6125 * reflection.c: Added security attributes encoding step in
6126 mono_image_build_metadata.
6127 * tabledefs.h: Added new security actions defined in 2.0:
6128 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
6130 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
6132 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
6135 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
6137 * locales.c: nullify the ICU_collator member of CompareInfo when it is
6138 finalized. There where random SIGSEVs at program termination, when
6139 an object being finalized was trying to do a string comparison and
6140 the current culture was already finalized.
6142 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6144 * threads.c: call thread_cleanup before finishing the thread if we get
6147 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
6149 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
6150 assemblies from the parent. Fixes #65665.
6152 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
6154 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
6157 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
6159 * reflection.h: add prototype for mono_get_dbnull_object
6160 * reflection.c: add prototypes for get_default_param_value_blobs
6161 and mono_get_object_from_blob for fussier compilers
6163 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
6165 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
6166 false deadlock checks in class initialization.
6168 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
6170 * image.c (mono_image_addref): Fix comment.
6172 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
6175 2004-09-12 Jambunathan K <kjambunathan@novell.com>
6177 * reflection.c (mono_param_get_objects): Modified to return
6178 ParameterInfo.DefaultValue object.
6180 (get_default_param_value_blobs):
6181 (mono_get_object_from_blob):
6182 (mono_get_dbnull_object): New helper routines.
6184 * object.c (mono_get_constant_value_from_blob): New helper routine
6185 carved out from get_default_field_value ()
6187 * object-internals.h (mono_get_constant_value_from_blob): Added
6188 function declaration.
6190 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
6192 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
6193 referenced assemblies. Fixes #62135.
6195 * exception.h exception.c (mono_get_exception_file_not_found2): New
6198 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
6200 * class.h class.c: Add mono_type_get_underlying_type ().
6202 2004-09-09 Geoff Norton <gnorton@customerndna.com>
6204 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
6205 Fix GetTypes() to support dynamically created assemblies.
6207 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
6209 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
6211 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
6214 * reflection.h reflection.c loader.c: Allow dynamic construction of
6215 pinvoke methods. Fixes #65571.
6217 * reflection.c (mono_reflection_get_type): Revert previous change since
6218 it causes regressions.
6220 2004-09-08 Martin Baulig <martin@ximian.com>
6222 * class.c (class_compute_field_layout): Don't call
6223 mono_class_layout_fields() for open generic instances.
6225 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
6226 * threads.c appdomain.c: fix typo in GC macro
6228 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6230 * threads.c: don't call mono_thread_detach() in start_wrapper(),
6231 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
6233 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
6235 * image.c (mono_image_close): Applied patch from
6236 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
6237 assembly is loaded multiple times from data.
6239 * image.c (mono_image_open): Fix warning.
6241 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
6243 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
6246 * reflection.c (mono_reflection_create_runtime_class): Initialize
6247 klass->nested_classes. Fixes #61224.
6249 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
6251 * threads.c: sched_yield() on exit, to allow threads to quit.
6253 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
6255 * object.c (mono_unhandled_exception): Remove leftover debug code.
6257 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
6259 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
6261 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
6263 * marshal.c (emit_marshal_array): Really null terminate string arrays.
6265 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
6267 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
6269 * marshal.c (emit_marshal_array): Null terminate string arrays.
6271 * marshal.c (raise_auto_layout_exception): Fix warning.
6273 * reflection.c (mono_param_get_objects): Initialize the default value
6274 with DBNull.Value, not null. Fixes #62123.
6276 2004-09-01 Miguel de Icaza <miguel@ximian.com>
6278 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
6279 throw an exception with a cute explanation.
6281 2004-09-06 Dick Porter <dick@ximian.com>
6283 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
6284 Close the new process's thread handle, as we don't use it. The
6285 handle stays around forever otherwise.
6287 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
6289 * object.c (arith_overflow): Fix warning.
6291 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
6292 calling conventions in method refs. Fixes #65352.
6294 * reflection.c: Fix warnings.
6296 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
6298 * icall.c: Add a new icall for Array.Clear
6300 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
6302 * object.c: When allocating an array, we have to throw
6303 an overflow exception if any of the lengths are < 0.
6305 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
6307 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
6308 properly. Also move implementation of string array marshalling to
6309 managed code. Fixes #42316.
6311 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6313 * assembly.c: provide more information when loading an assembly fails.
6315 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6317 * filewatcher.c: don't expect the development fam package to be
6320 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
6322 * marshal.c: Make a copy of the signature cookie since it will be
6323 freed by the caller.
6325 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
6327 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
6329 * metadata.c (mono_metadata_free_marshal_spec): New function to free
6332 * marshal.c: More refactoring.
6334 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
6337 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
6339 * object.c: In mono_message_invoke, fill the output parameter array after
6340 calling the managed method (it was done before the call). This fixes
6343 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
6345 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
6348 2004-09-02 Martin Baulig <martin@ximian.com>
6350 * class.c (mono_class_instance_size): Don't allow generic type
6351 definitions or open generic instances.
6352 (mono_class_array_element_size): If we're a value type, call
6353 mono_class_instance_size() on the original class.
6355 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
6356 handle generic instances.
6358 * mono-debug-debugger.c (write_type): Handle generic instances
6361 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
6363 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
6364 the allocation request fails. Fixes #65089.
6366 * object.c (mono_runtime_free_method): Do not call mono_free_method.
6368 * object.c (mono_runtime_free_method): New function to free a dynamic
6371 * marshal.c (mono_delegate_free_ftnptr): New function to free the
6372 delegate trampoline.
6374 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
6375 with hasthis as dynamic,
6377 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
6379 * domain.c (mono_jit_info_table_remove): New function to remove an
6380 entry from the jit info table.
6382 * class-internals.h (MonoMethod): Add 'dynamic' field.
6384 * loader.c: Fix warnings.
6386 2004-09-01 Martin Baulig <martin@ximian.com>
6388 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
6389 instead of mono_debugger_lock() because the latter one is a no-op
6390 unless running in the debugger.
6392 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
6394 * class.c (class_compute_field_layout): Classes with auto-layout or
6395 reference fields are not blittable.
6397 2004-09-01 Dick Porter <dick@ximian.com>
6399 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
6400 mono_image_get_filename() to get the assembly location.
6403 * metadata.h: Fix compile warnings
6405 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
6407 * class.c (class_compute_field_layout): System.Object is blittable.
6409 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
6410 as in/out. Fixes #59909.
6412 2004-09-01 Martin Baulig <martin@ximian.com>
6414 * metadata.h (MONO_TYPE_ISREFERENCE): Call
6415 mono_metadata_generic_inst_is_valuetype() if we're a generic
6416 instance to check whether our underlying type is a reference type.
6418 2004-09-01 Martin Baulig <martin@ximian.com>
6420 * metadata.c (mono_type_size): If we're a generic instance, call
6421 mono_class_value_size() for value types.
6423 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
6425 * marshal.c: Implement more custom marshalling functionality. Fixes
6428 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
6430 * mono-debug.c, debug-mono-symfile.c: add some locking love.
6432 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
6434 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
6436 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
6438 * icall.c: Fix some warnings.
6440 * threads.c (abort_appdomain_thread): Fix unref errors.
6441 (mono_thread_current): Fix THREAD_DEBUG define.
6443 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
6445 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
6447 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
6449 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
6451 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
6454 2004-08-28 Martin Baulig <martin@ximian.com>
6457 (mono_metadata_generic_inst_is_valuetype): New public function.
6459 * metadata.h (MONO_TYPE_ISSTRUCT): Call
6460 mono_metadata_generic_inst_is_valuetype() if we're a generic
6461 instance to check whether our underlying type is a valuetype.
6463 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
6465 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
6468 2004-08-25 Martin Baulig <martin@ximian.com>
6470 * loader.c (mono_get_method_from_token): Abstract methods can also
6471 be generic and thus have type parameters.
6473 * metadata-internals.h
6474 (MonoDynamicImage): Added `GPtrArray *gen_params'.
6476 * reflection.c (mono_image_get_generic_param_info): Don't create a
6477 metadata row, just add an entry to the `gen_params' array.
6478 (build_compressed_metadata): Sort the `gen_params' array and then
6479 actually create the metadata.
6481 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6483 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
6485 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
6487 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
6489 2004-08-24 Martin Baulig <martin@ximian.com>
6491 * class.cs (mono_class_is_subclass_of): Like an interface, a
6492 generic instance also derives from System.Object.
6494 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
6496 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
6497 custom modifiers to be in any order. Fixes #61990.
6499 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
6501 * object.c: Register mono_object_new_fast icall.
6503 * object.c (mono_class_get_allocation_ftn): Return to calling
6504 mono_object_new_fast, since it seems faster to compute the object
6505 size in unmanaged code than passing it as a parameter.
6507 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
6509 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
6510 this function with Boehm as the oom handler, so we don't have to check
6511 the result of GC_malloc.
6513 * object.c: Remove checks for oom.
6515 * object.h object.c (mono_class_get_allocation_ftn): New function to
6516 return the icall which can be used to allocate an instance of a given
6519 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
6521 * class-internals.h: Add 'enabled' field.
6523 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
6525 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
6527 2004-08-18 Jambunathan K <kjambunathan@novell.com>
6528 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
6531 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
6533 * appdomain.c: use the Tls function for appdomain too,
6534 at Zoltan's request. Actually return in mono_context_get
6536 * appdomain.c, profiler.c, threads.c: use __thread
6538 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
6540 * appdomain.c threads.c: Call GC_CreateThread on windows.
6542 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
6543 multiple libraries since this don't work on windows.
6545 2004-08-18 Martin Baulig <martin@ximian.com>
6548 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
6551 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
6552 MonoMethodNormal since we also need it for abstract and interface
6556 (build_compressed_metadata): Sort the GenericParam table.
6557 (mono_image_create_token): Added `gboolean create_methodspec'
6558 argument; this is false when generating a MethodImpl token.
6559 (reflection_methodbuilder_to_mono_method): Abstract and interface
6560 methods may also have generic parameters.
6562 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
6564 * appdomain.c: thread local alloc
6566 2004-08-17 Martin Baulig <martin@ximian.com>
6568 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
6571 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
6574 * class.c (mono_type_get_full_name): New public function.
6575 (mono_type_get_name): Don't include the type arguments.
6577 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
6579 * Makefile.am: Build static versions of libmetadata and libmonoruntime
6580 for inclusion into the mono executable.
6582 2004-08-16 Martin Baulig <martin@ximian.com>
6584 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
6585 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
6587 2004-08-14 Martin Baulig <martin@ximian.com>
6589 * class.c (dup_type): Also copy the `byref' field.
6591 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
6593 * reflection.c (create_dynamic_mono_image): Revert the last change
6594 since it breaks bootstrap.
6596 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
6598 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
6600 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
6601 not free them with g_free.
6603 2004-08-11 Martin Baulig <martin@ximian.com>
6605 * reflection.c (mono_reflection_setup_internal_class): Also call
6606 mono_class_setup_mono_type() if we already have a `tb->type.type'.
6608 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
6610 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
6611 called during default (first) AppDomain creation. Keep track of
6612 Evidence when loading assemblies.
6614 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
6616 * opcodes.c, opcodes.h: reduce runtime relocations.
6618 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
6620 * culture-info.h, locales.c: fixes and chages to sue the new
6621 optimized format of the locale data.
6622 * culture-info-tables.h: regenerated.
6624 2004-08-06 Geoff Norton <gnorton@customerdna.com>
6626 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
6628 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
6630 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
6631 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
6632 * domain-internals.h: icall declaration.
6633 * icall.c: icall registration.
6634 * object-internals.h: New fields in MonoAssembly for CAS.
6636 2004-08-05 Duncan Mak <duncan@ximian.com>
6638 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
6641 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
6643 * reflection.c: fix to deal with object[] arrays in custom ctors
6646 2004-08-05 Martin Baulig <martin@ximian.com>
6648 * class.c (mono_class_array_element_size): Added support for
6649 generic instances and correctly handle "recursive" types.
6651 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
6653 * assembly.c: Fix warnings.
6655 2004-08-04 Martin Baulig <martin@ximian.com>
6658 (mono_type_get_name_recurse): Added `gboolean include_arity'
6659 argument specifying whether or not we should include the generic
6660 arity in the type name.
6661 (_mono_type_get_name): New static function.
6662 (mono_class_setup_vtable): If we're a generic instance, don't
6663 include the generic arity in the names of explicit method
6666 2004-08-03 Martin Baulig <martin@ximian.com>
6668 * class.c (mono_type_get_name_recurse): Enclose the generic type
6669 arguments in `<', '>'.
6671 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6673 * gc.c: make GC warning messages use the trace API, they are just
6674 noise to most of the users.
6676 2004-08-03 Martin Baulig <martin@ximian.com>
6678 * debug-mono-symfile.c (read_string): Correctly read the string.
6680 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
6682 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
6684 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
6686 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
6688 2004-07-30 Martin Baulig <martin@ximian.com>
6690 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
6691 Reflect latest symbol writer changes.
6693 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
6695 * object.c: always create an object if null is passed
6696 to Invoke() where a valuetype is expected.
6698 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
6700 * marshal.c (mono_marshal_init): make managed
6701 signatures match native ones better for 64bits.
6703 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6705 * appdomain.c: hack to build correctly the private bin path on windows.
6708 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
6710 * assembly.c: Load mscorlib from the correct framework directory
6711 (mono/<version>/mscorlib.dll).
6712 * appdomain.h: Added prototypes for new functions.
6713 * internals.h: Added some prototypes.
6714 * domain.c: When initializing the runtime, get from the executable and
6715 the configuration files the runtime version that the app supports.
6716 Added support methods for reading app.exe.config. Added list of versions
6717 supported by the JIT. Added two new methods: mono_init_from_assembly,
6718 which initializes the runtime and determines the required version from
6719 the provided exe file, and mono_init_version, which initializes
6720 the runtime using the provided version.
6721 * icall.c: Get machine.config from version-specific directory.
6722 * reflection.c: When generating an image, embed the version number
6723 of the current runtime.
6725 2004-07-28 Dick Porter <dick@ximian.com>
6728 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
6729 returned sockaddr size before creating the remote address object.
6730 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
6733 2004-07-28 Dick Porter <dick@ximian.com>
6735 * locales.c (string_invariant_compare_char): Fix invariant char
6736 compares between upper and lower cases. Fixes bug 61458.
6738 2004-07-27 Ben Maurer <bmaurer@ximain.com>
6740 * marshal.c: actually cache stelem.ref wrappers.
6742 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
6744 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
6745 sections and remove the mono_cli_rva_map () function.
6747 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
6749 * debug-mono-symfile.c: fix one more endianess issue, from a patch
6750 by Geoff Norton (<gnorton@customerdna.com>).
6752 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6754 * class.c: fix class loads for pointer types (typeof(int) !=
6757 2004-07-27 Martin Baulig <martin@ximian.com>
6759 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
6760 reading the debugging information from an external ".mdb" file.
6762 2004-07-24 Martin Baulig <martin@ximian.com>
6764 * reflection.c (mono_image_get_type_info): Only write a class
6765 layout entry if we actually have a size or a packing size.
6767 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
6769 * reflection.c (type_get_fully_qualified_name):
6770 insert cast to get type checking of ?: with non-gcc compilers
6772 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
6774 * rand.c: use g_getenv for both lookups of
6777 2004-07-17 Martin Baulig <martin@ximian.com>
6779 * reflection.c (mono_reflection_bind_generic_method_parameters):
6780 Set `gmethod->reflection_info'.
6782 2004-07-17 Martin Baulig <martin@ximian.com>
6784 * class.c (mono_class_create_from_typedef): Insert the newly
6785 created class into the hash table before computing the interfaces
6786 since we could be called recursively.
6788 2004-07-16 Ben Maurer <bmaurer@ximain.com>
6790 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
6791 function to implement stelem.ref in managed code
6792 * class-internals.h, debug-helpers.c: a new wrapper type
6795 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
6797 * gc.c: allow GC handles to work even when no GC is compiled in.
6798 Fix part of bug #61134 (GetAddrOfPinnedObject).
6800 2004-07-13 Peter Williams <peter@newton.cx>
6802 * process.c (complete_path): Make sure we don't attempt to execute
6805 2004-07-12 Geoff Norton <gnorton@customerdna.com>
6807 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
6808 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
6809 and will add/subtract the hour if needed
6811 2004-07-12 Martin Baulig <martin@ximian.com>
6813 * reflection.c (mono_field_get_object): If we have
6814 `field->generic_info', take the attributes from
6815 `field->generic_info->generic_type'.
6817 2004-07-12 Martin Baulig <martin@ximian.com>
6819 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
6820 This function must be called before initializing the runtime.
6821 (mono_debug_init_1): New function; call this after initializing
6822 the runtime, but before loading the assembly. It tells the
6823 debugger to load corlib and the builtin types.
6825 * mono-debug-debugger.c: Did some larger changes in the debugging
6826 code; support recursive class declarations, make sure we actually
6829 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6831 * debug-helpers.c: undo my previous patch and fixed the real issue in
6832 ../mini/exceptions-x86.c
6834 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6836 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
6837 when no HOME env. variable was set and a NullRef was thrown in a .cctor
6838 called from other .cctors.
6840 2004-07-09 Miguel de Icaza <miguel@ximian.com>
6842 * loader.c: Removed the mono_loader_wine_init hack now that we are
6843 doing a managed version of Windows.Forms.
6845 2004-07-09 Ben Maurer <bmaurer@ximian.com>
6847 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
6848 threadpool.c, threads.c: remove static data from rootset.
6850 2004-07-09 Dick Porter <dick@ximian.com>
6852 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
6853 Don't do any more processing if the matched length was 0. It was
6854 increasing the size of the string before. Fixes bug 61167.
6856 2004-07-09 Dick Porter <dick@ximian.com>
6860 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
6861 Add support for SO_PEERCRED if its available.
6863 2004-07-09 Peter Bartok <pbartok@novell.com>
6864 * loader.c: winelib.exe.so error message is now only displayed if
6865 MONO_DEBUG is set. To help us avoid questions when people are trying
6866 out the new Managed.Windows.Forms.
6868 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
6870 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
6871 for isinst and castclass wrappers.
6873 * class-internals.h icall.c: Move registration and lookup of JIT icalls
6874 to libmetadata from the JIT, so they could be used by the marshalling
6875 code and the interpreter.
6877 * marshal.c: Register marshalling related JIT icalls here instead of
6878 in mini.c. Use CEE_MONO_ICALL instead of the family of
6879 CEE_MONO_PROC<x> opcodes to call marshalling functions.
6881 * metadata.h: Remove unneeded marshalling conversions.
6883 * opcodes.c: Update for new opcodes.
6885 2004-07-08 Martin Baulig <martin@ximian.com>
6887 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
6888 (mono_debug_get_domain_data): Make this function static.
6890 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
6892 * gc.c, object.h: add nice GC handle API for embedders.
6894 2004-07-06 Ben Maurer <bmaurer@ximian.com>
6896 * reflection.c: more changes for the new api
6898 * object.c: When we reflect on a field w/ a constant value, it
6899 will not have a memory location, so we must access metadata. Also,
6900 allow easier reading of strings so that we can read them from
6903 * class.c (mono_class_layout_fields): no need for literal fields here.
6905 * class-internals.h: api changes for const fields
6907 * icall.c (ves_icall_get_enum_info): use new apis for const fields
6909 2004-07-06 Martin Baulig <martin@ximian.com>
6911 * mono-debug.h: Increment version number to 44.
6913 * mono-debug.c (mono_debug_add_wrapper): The second argument is
6914 now a gpointer, rewrote this whole method.
6916 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
6917 function. Add information about the wrapper in a new "misc table".
6919 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
6920 for the new misc table.
6922 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
6924 * metadata-internals.h image.c: Add a cache for helper signatures.
6926 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
6928 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
6930 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
6931 delegates from a delegate. Fixes #61033.
6933 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
6934 marshalling of stringbuilder arrays. Fixes #59900.
6936 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
6938 * icall.c: Add EnumBuilder:setup_enum_type icall.
6940 2004-06-30 Ben Maurer <bmaurer@ximian.com>
6942 * icall.c: Added a new icall for the property version of
6945 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
6947 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
6948 it has a constant size across platforms.
6950 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
6953 2004-06-29 Martin Baulig <martin@ximian.com>
6955 * mono-debug.c (mono_debug_add_method): Protect the whole function
6956 in mono_debugger_lock(), not just parts of it.
6958 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
6960 * reflection.c: make sure padding bytes in heaps are zeroed.
6962 2004-06-24 David Waite <mass@akuma.org>
6964 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
6965 image.c, loader.c, locales.c, marshal.c, metadata.c,
6966 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
6967 string-icalls.c, threads.c: change to C90-style comments from C99 /
6970 2004-06-24 Dick Porter <dick@ximian.com>
6973 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
6974 return createdNew. Fixes bug 60412.
6977 * icall.c: Add createdNew parameter to CreateMutex icall
6979 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
6981 * reflection.c, object-internals.h: save default value in params.
6983 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6985 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
6986 no need to build a new path combining that with the application base.
6989 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
6991 * reflection.c: fixed minor standard compliance issues.
6993 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
6995 * reflection.c: fixed issue with encoding some custom attributes
6996 (arrays in properties and fields, bug #60411).
6998 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7000 * reflection.c: fix start address when copying the public key token.
7002 2004-06-23 Martin Baulig <martin@ximian.com>
7004 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
7005 the `exc' object in a static object to put it into the GC's root set.
7007 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
7009 * reflection.c: make mono_reflection_setup_internal_class ()
7010 callable a second time to setup a new parent class.
7012 2004-06-23 Dick Porter <dick@ximian.com>
7014 * threads.c: Check for WAIT_IO_COMPLETION return values.
7016 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
7018 * appdomain.c: Removed the g_free on the public key token. Now copy
7019 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
7020 * assembly.c: Added public key token string value when loading
7021 assemblies. Fix bug #60439.
7022 * icall.c: Added missing informations (like public key) in
7023 GetReferencedAssemblies. Fix #60519.
7024 * image.h: Changed definition for public key token from const char*
7025 public_tok_value to guchar public_key_token [17];
7026 * reflection.c: Updated for changes to public key token.
7028 2004-06-22 Lluis Sanchez Gual
7030 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
7031 for the field in base classes.
7033 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
7035 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
7036 mark headers as not supported, they are installed only for use by the
7039 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
7041 * *.c, *.h: avoid namespace pollution in public headers.
7043 2004-06-21 Martin Baulig <martin@ximian.com>
7045 * exception.c (mono_get_exception_security): It's in
7046 "System.Security", not in "System".
7048 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
7049 the exception classes.
7051 2004-06-21 Martin Baulig <martin@ximian.com>
7053 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
7054 Protect the exception object from being finalized.
7056 2004-06-21 Martin Baulig <martin@ximian.com>
7058 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
7061 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
7063 * reflection.c: Load the assembly in mono_reflection_type_from_name,
7064 if it was not loaded before. Fix parts of #60439.
7066 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
7068 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
7069 code that was broken since Ben's change: wrappers are now
7070 dependent on the method signature only again.
7072 2004-06-21 Martin Baulig <martin@ximian.com>
7074 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
7075 added interface support.
7077 2004-06-21 Martin Baulig <martin@ximian.com>
7079 * class.c (mono_vtable_get_static_field_data): New public method.
7081 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
7083 * filewatcher.c : Windows build fix to be compliant with API changes.
7085 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7087 * class.h, class.c: more accessors.
7088 * metadata.h, metadata.c: prepare for hiding MonoType and
7089 MonoMethodSignature: people should use the accessors from now on
7090 outside of the tree.
7092 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7094 * *.c, *.h: more API cleanups.
7096 2004-06-18 Jackson Harper <jackson@ximian.com>
7098 * assembly.c: Trace loading assemblies.
7099 * loader.c: Trace loading native libraries.
7100 * mono-config.c: Trace loading config files.
7102 2004-06-18 Dick Porter <dick@ximian.com>
7104 * locales.c: Tell ICU the lengths of strings, it can cope with
7105 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
7107 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
7109 * image.c: swapped name/filename;
7111 2004-06-18 Martin Baulig <martin@ximian.com>
7113 * mono-debug-debugger.c (write_class): Write the parent class at
7114 the end of the header.
7116 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7118 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
7120 2004-06-17 Raja R Harinath <rharinath@novell.com>
7122 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
7123 (bundle_obj): New conditional define.
7124 (BUILT_SOURCES): Remove.
7125 ($(bundle_srcs)): Make parallel-make safe.
7126 (libmonoruntime_la_LIBADD): Make unconditional.
7127 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
7128 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
7130 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
7132 * culture-info-tables.h: It was inconsistent with the latest
7135 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
7137 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
7140 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
7143 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7145 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
7146 cleaned up public header threads.h.
7148 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
7150 * Makefile.am, *.c, *.h: more API cleanups.
7152 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
7154 * Makefile.am: removed monosn from compilation.
7155 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
7156 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
7157 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
7158 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
7159 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
7160 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
7162 2004-06-15 Jackson Harper <jackson@ximian.com>
7164 * assembly.c: Make locales lower case when searching the GAC for
7165 assemblies. gacutil will always make locales lowercase when
7166 installing so this effectively makes them case insensitive.
7168 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
7170 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
7171 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
7172 parameter which allows to choose whether the wait can be interrupted or
7173 not. Also added the method mono_monitor_enter(), which locks the monitor
7174 using an infinite wait and without allowing interruption.
7175 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
7177 * object.h: Added new fields in MonoThread. suspend_event holds the event
7178 used to susped/resume the thread. synch_lock is the lock object to use for
7179 modifying the thread state.
7180 * threads.c: Use the new synch_lock object for locking, instead of "this",
7181 which can generate deadlocks.
7182 Moved thread state change in Thread.Sleep and Thread.Join from managed
7183 to unmanaged code. This avoids a deadlock when the thread was suspended
7184 just after acquiring the thread lock.
7185 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
7186 Implemented Thread.Suspend using an event instead of ThreadSuspend,
7187 which is not fully implemented in the io-layer.
7188 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
7190 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
7192 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
7193 threads-types.h: more API cleanups.
7195 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7197 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
7198 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
7199 threadpool.c, threads.c: first pass at the exported API cleanup.
7201 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
7203 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
7205 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7207 * icall.c: added internalGetHome.
7209 2004-06-14 Dick Porter <dick@ximian.com>
7211 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
7212 possible to return successfully when '.' or '..' were the only
7213 entries in a directory, but were skipped. The MonoIOStat was not
7214 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
7217 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7219 * reflection.c: make binaries run on .Net 1.1 by default.
7221 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
7223 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
7225 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
7227 * marshal.c: keep track of struct size with explicit layout
7230 2004-06-12 Martin Baulig <martin@ximian.com>
7232 * mono-debug-debugger.c: Comment out a debugging g_message().
7234 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
7236 * reflection.c, reflection.h: do not free custom attrs that are cached.
7237 * icall.c: use braces to make code clearer.
7239 2004-06-11 Martin Baulig <martin@ximian.com>
7241 * class.h (MonoInflatedField): New type.
7242 (MonoClassField): Replaced `MonoType *generic_type' with
7243 `MonoInflatedField *generic_info'.
7246 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
7248 2004-06-11 Martin Baulig <martin@ximian.com>
7250 * reflection.c (mono_image_create_method_token): Correctly encode
7253 2004-06-11 Martin Baulig <martin@ximian.com>
7255 * metadata.c (mono_metadata_parse_method_signature): When parsing
7256 a MethodDef which has VarArgs, also set sentinelpos if we don't
7257 have any parameters.
7259 2004-06-11 Martin Baulig <martin@ximian.com>
7261 * verify.c (mono_method_verify): In CEE_CALL, use
7262 mono_method_get_signature() to get the method's signature, unless
7263 we're a PInvoke method.
7265 2004-06-10 Jackson Harper <jackson@ximian.com>
7267 * assembly.c: Use <path>/lib/mono/gac for the extra paths
7268 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
7269 logical name as the supplied path is just a prefix to the gac not
7270 the direct path to it.
7272 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
7274 * reflection.c: make the token for a created method match
7275 the token of the MethodBuilder it was created from
7276 (IKVM requires this behaviour now).
7278 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
7280 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
7281 reflection.c, socket-io.c: leak fixes.
7283 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
7285 * icall.c: handle sentinel pos in vararg methods in position different
7288 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7290 * culture-info-tables.h: freshly generated.
7292 2004-06-09 Martin Baulig <martin@ximian.com>
7294 * loader.c (mono_get_method_constrained): Call `mono_class_init
7295 (constrained_class)'.
7297 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
7299 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
7300 any methods. Fixes #59629.
7302 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
7304 * culture-info-tables.h: reflecting locale-builder updates.
7306 2004-06-08 Dick Porter <dick@ximian.com>
7309 * locales.c: Fixed compile warnings, including a real bug in
7310 CompareInfo_internal_compare.
7312 2004-06-08 Dick Porter <dick@ximian.com>
7315 (ves_icall_System_Globalization_CompareInfo_internal_index):
7316 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
7317 Double-check the resuls of usearches, because ICU currently
7318 ignores most of the collator settings here. Fixes bug 59720.
7320 2004-06-08 Dick Porter <dick@ximian.com>
7323 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
7324 Fix memory leak and segfault-causing typo. No idea how this one
7325 lasted so long without being noticed.
7327 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
7329 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
7330 any methods. Fixes #59629.
7332 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7335 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
7336 own the critical section before). Removed dead code (that's done
7337 in the preload hook).
7339 (mono_assembly_load_with_partial_name): call the preload hook.
7341 2004-06-08 Martin Baulig <martin@ximian.com>
7343 * metadata.c (mono_metadata_signature_alloc): Default
7344 `sentinelpos' to -1.
7346 * reflection.c (mono_image_get_array_token): Likewise.
7348 2004-06-08 Martin Baulig <martin@ximian.com>
7350 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
7352 * metadata.c (mono_metadata_parse_method_signature): When parsing
7353 a MethodDef which has VarArgs, set sentinelpos.
7355 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
7356 `gint16' since we're using -1 for non-varargs methods.
7359 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
7360 (method_encode_signature): Added varargs support.
7361 (method_builder_encode_signature): Likewise.
7362 (mono_image_get_varargs_method_token): New static method.
7363 (mono_image_create_method_token): New public method; this is
7364 called via an icall instead of mono_image_create_token() when
7365 calling a varargs method.
7367 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
7369 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
7371 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
7373 * culture-info-tables.h : Reflecting the latest locale-builder that
7374 fixed empty array representation ({} to {0}).
7376 2004-06-07 Jackson Harper <jackson@ximian.com>
7378 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
7379 looking up extra gac paths. This allows MONO_GAC_PATH to act
7380 exactly like a prefix.
7382 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
7384 * reflection.c (mono_reflection_type_from_name): Make a copy of the
7385 type name before modifying it. Fixes #59405.
7387 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
7389 * culture-info.h: added fields for "all datetime patterns".
7390 * locales.c: ( ves_icall_System_Globalization_CultureInfo
7391 _construct_datetime_format ()): fill xxx_patterns fields.
7392 * object.h: added fields for "all datetime patterns" to
7393 MonoDateTimeFormatInfo.
7394 * culture-info-tables.h: reflecting locale-builder updates.
7396 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
7398 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
7399 the event has no add and remove methods. Fixes #59629.
7401 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
7403 * object.c: Fixed possible integer overflow when allocating large
7406 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
7408 * culture-info-tables.h: reflecting locale-builder updates.
7410 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
7412 * culture-info-tables.h: reflecting locale-builder updates.
7414 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
7416 * culture-info-tables.h: reflecting locale-builder updates.
7418 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
7420 * threads.c: Made Thread.Sleep abortable.
7422 2004-06-02 Martin Baulig <martin@ximian.com>
7424 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
7426 * debug-mono-symfile.h: Bumped symbol file version number to 37.
7428 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
7430 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
7432 2004-05-30 Jackson Harper <jackson@ximian.com>
7434 * reflection.c: Do not hardcode assembly versions or public key
7435 tokens anymore. All of this except the corlib section was dead
7438 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
7440 * object.c (mono_runtime_invoke_array): Automatically create boxed
7441 objects for byref valuetypes if needed. Fixes #59300.
7443 * object.c (mono_method_return_message_restore): Handle
7444 MONO_TYPE_OBJECT as well.
7446 2004-05-28 Jackson Harper <jackson@ximian.com>
7448 * reflection.c: The modified type encoding was causing build
7449 problems. Reverted for now.
7451 2004-05-28 Jackson Harper <jackson@ximian.com>
7453 * reflection.c/h: Take an assembly ref so that we dont create
7454 fully qualified names when encoding types in the same assembly as
7455 the custom attribute being emitted.
7456 * appdomain.c: Increment version number.
7458 2004-05-26 Duncan Mak <duncan@ximian.com>
7461 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
7462 Set the full version number (major, minor, build, revision).
7464 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
7466 * marshal.c (emit_struct_conv): increment src/dst after blit
7467 (mono_marshal_get_managed_wrapper,
7468 mono_marshal_get_native_wrapper): make sure we have marshalling
7469 info before marshalling params (info computation affects
7472 * class.c (class_compute_field_layout): correctly deal with
7474 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
7475 value types (as per what windows dows by default)
7476 (mono_class_setup_mono_type): System.ValueType is blittable
7477 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
7480 * marshal.c (mono_marshal_load_type_info): flag types as
7481 non-blittable if the native layout doesn't match the managed
7484 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7486 * appdomain.c: don't add stuff in the private search path that is
7487 above the application base. If application base is not set, there's
7488 no private search path.
7490 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
7492 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
7493 byref struct arguments in native->managed marshalling.
7495 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
7497 * marshal.c (mono_marshal_get_runtime_invoke): correctly
7498 cache methods using signature (special case for methods
7499 that are value type or string class)
7501 * image.c (mono_image_close): clean up allocated GSList's
7502 in runtime_invoke_cache.
7504 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7506 * mono-config.c: set the correct path for mono_cfg_dir on windows when
7507 there's no MONO_CFG_DIR environment variable defined.
7509 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7511 * threads.c: windows version must be >= 0x0500 to include OpenThread.
7513 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
7515 * threadpool.c: Really wait for 500ms after the async call, even if the wait
7517 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
7518 before waiting for it, and call CloseHandle after the wait to unref it.
7519 This will make sure that handles are not disposed too early.
7521 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7526 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
7529 * object.c: se the application_base only for the domain that runs
7530 Main. Fixes bug #59216,
7532 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7535 * object.c: only the domain in which Main is run have
7536 SetupInformation.ConfigurationFile set, so moved a few lines from
7537 appdomain.c to object.c.
7539 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7541 * appdomain.c: we tried to load [name].(dll|exe), but according
7542 to bug #57710, we must also try [culture]/[name].(dll|exe) and
7543 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
7544 There's a test case attached to bug #58922.
7546 2004-05-27 Dick Porter <dick@ximian.com>
7549 * file-io.c: Implemented icalls for locking and unlocking regions
7551 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
7552 FALSE on error (fixes both compiler warning and real bug.)
7554 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
7556 * culture-info-tables.h: reflecting locale-builder updates.
7558 (Added missing ChangeLog entry for 05/26)
7560 2004-05-27 Jackson Harper <jackson@ximian.com>
7562 * locales.c: Fix some cut and paste errors.
7564 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7566 * mono-config.c: set the correct path for config. directory on windows.
7568 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
7570 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
7573 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
7575 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
7576 from pinvoke functions.
7578 * marshal.c (mono_ftnptr_to_delegate): Implement this.
7580 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
7582 * culture-info-tables.h: reflecting locale-builder updates.
7584 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
7586 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
7589 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
7591 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
7592 * icall.c: Modified icalls for RNG.
7593 * rand.c|h: Changed RNG interface to allow thread-safe usage under
7594 Windows (CryptoAPI).
7596 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
7598 * locales.c: Fix build.
7600 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
7602 * culture-info-tables.h: reflecting locale-builder updates.
7604 2004-05-25 Jackson Harper <jackson@ximian.com>
7606 * locales.c: When creating the current culture use the $LANGs
7607 specific culture. So DateTimeFormat and NumberFormat entries are created.
7609 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
7611 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
7612 a char array as parameter.
7614 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
7616 * image.c: In mono_image_open(), always use an absolute path name to
7617 look for already loaded images.
7619 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
7621 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
7622 missing in the windows build (like older cygwin include files).
7624 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
7626 * icall.c: Fixed check for possible integer overflow in Buffer_
7627 BlockCopy icall. Replaced comments style // by /* */.
7629 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
7631 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
7633 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
7634 check after MONO_VTADDR. Fixes pinvoke2.exe.
7636 * marshal.h marshal.c metadata.h: Add beginnings of support for
7637 ftnptr -> delegate marshalling.
7639 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
7641 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
7642 * threads.c: Fix warnings.
7644 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
7646 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
7647 * icall.c: Registered icalls for Suspend and Resume.
7648 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
7650 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
7651 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
7652 * process.c: Use WaitForSingleObjectEx.
7653 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
7655 * threads.c, threads.h: Make use of new Ex wait methods. Improved
7656 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
7657 for Suspend and Resume. Added new mono_thread_stop, used for stoping
7658 background threads. Added basic support for Abort in Windows.
7659 Start new threads using a managed delegate invoke wrapper. This wrapper
7660 has an interruption checkpoint that is needed since an interruption
7661 can be requested before the thread leaves the unmanaged code that starts
7663 * marshal.c: Added interruption checkpoint after every native call, and
7664 also before managed calls for wrappers called from unmanaged code to
7665 go into managed code.
7666 * object.h: Added new field in MonoThread to keep track of interruption
7669 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
7671 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
7674 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7681 * rand.c: getenv -> g_getenv (windows!)
7683 * process.c: complete_path is also used on non-windows platforms.
7685 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7687 * icall.c: new signature for Process_Start.
7689 * process.[ch]: new signature for Process_Start. If we're on windows
7690 and UseShellExecute is false, we have to search for the program by
7691 ourselves if we don't get a full path.
7693 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
7695 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
7696 marshalling and call CleanUpNativeData if needed. Fixes #58646.
7698 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7700 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
7703 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7705 * process.c: use double quotes to quote program name and arguments on
7706 windows. Fixes bug #58575.
7708 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7710 * file-io.c: don't return "." and ".." when using windows Find*File.
7712 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
7714 * marshal.c: Don't pass wrappers to message init because method
7715 addressed used to lookup metadata. part of remoting[2|3] fix.
7717 2004-05-15 Jackson Harper <jackson@ximian.com>
7719 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
7720 path is essentially the same as MONO_PATH except that it points to
7721 GACs instead of lib directories.
7722 * loader.h: The user gac is gone so we dont need function to
7724 * mono-config.c: user gac option is now gone.
7726 2004-05-15 Jackson Harper <jackson@ximian.com>
7728 * culture-info.h: Make defines more consistent, add calendar data
7729 to the culture info table.
7730 * culture-info-tables.h: Add basic calendar data. Basically
7731 everyone gets default gregorian until all the data is
7733 * locales.c: Use the new consistent defines. Set calendar data for
7734 culture info objects.
7735 * object.h: add a field for calendar data to CultureInfo
7737 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
7739 * image.c: image->runtime_invoke_cache is keyed on signatures now.
7740 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
7742 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
7743 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
7744 an extra param that is the pointer of the method to invoke. The IL for
7745 the invoke method is no longer specific to the method, but to the
7746 signature of the method. Thus, we can share the same code for multiple
7747 methods. This reduces the number of methods that have to be compiled.
7749 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
7751 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
7753 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7755 * icall.c: Optimize Buffer.BlockCopy.
7757 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7759 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
7760 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
7761 quote). Changed them to "MMMM yyyy".
7763 2004-05-12 Miguel de Icaza <miguel@ximian.com>
7766 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
7768 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
7770 * reflection.h: Updated after changes to managed structures.
7772 * appdomain.c: Bump corlib version.
7774 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7776 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
7779 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7781 * Makefile.am: link to ../os/libmonoos.la on windows.
7784 -If MONO_DEBUG, warn about non-existing directories in
7786 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
7787 compile time variable.
7788 -Removed init_default_path and call mono_set_rootdir from
7789 libmonoos.a instead (windows only).
7791 * assembly.h: declare mono_assembly_getrootdir().
7794 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
7796 * loader.c: s/getenv/g_getenv/
7798 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
7800 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
7802 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
7804 * metadata.h: Add new marshalling conversions.
7806 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
7809 * reflection.c (mono_reflection_get_type): Lookup the type in all
7810 modules of a multi-module assembly. Fixes #58291.
7812 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
7814 * threads.c: Before aborting a background, set the StopRequested
7815 state. This avoids throwing the Abort exception.
7816 In mono_thread_manage, don't continue with the shutdown until all
7817 aborted threads have actually stopped.
7819 2004-05-10 Jackson Harper <jackson@ximian.com>
7821 * locales.c: Remove the modifier from culture names.
7823 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7825 * Makefile.am: monosn is not installed any more. It has been deprecated
7828 2004-05-07 Jackson Harper <jackson@ximian.com>
7831 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
7832 Fix array construction, add bailout if the length is 0.
7834 2004-05-07 Dick Porter <dick@ximian.com>
7836 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
7837 machine doesn't have a DNS entry. Patch by Urs Muff
7838 (umuff@quark.com), fixes bug 57928.
7840 2004-05-06 Jackson Harper <jackson@ximian.com>
7842 * reflection.c: Handle null PublicTokens properly. alloc mem for
7843 assembly names culture so we dont crash when freeing it.
7845 2004-05-06 Jackson Harper <jackson@ximian.com>
7847 * assembly.c: Check the usergac when loading with partial names.
7849 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
7851 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
7852 does nothing for now (not required for Linux/Windows) but the class
7853 library can call it (and a newer or modified runtime could need it).
7854 * icall.c: Registred icall.
7856 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7858 * loader.c: prints a message on module loading error we set MONO_DEBUG
7859 environment variable.
7861 2004-05-05 Jackson Harper <jackson@ximian.com>
7863 * appdomain.c: Handle PublicKeyToken=null properly.
7865 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
7867 * environment.c|h: Added icall ves_icall_System_Environment_
7868 GetOSVersionString to get the current OS version as a string.
7869 * icall.c: Registred icall.
7871 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
7873 * object.c: in mono_object_get_virtual_method(), take into account that
7874 non-virtual methods don't have a slot in the vtable. Check needed when
7875 the object is a proxy.
7877 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
7879 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
7880 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
7882 * object.c (mono_class_compute_gc_descriptor): Fix warning.
7884 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
7885 passed when a valuetype is expected.
7887 * object.c (mono_unhandled_exception): Only set the exit code if the
7888 exception happens in the main thread. Fixes thread5.exe.
7890 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
7891 invalid names. Fixes #58047.
7893 2004-05-03 Jackson Harper <jackson@ximian.com>
7895 * assembly.c: This line was committed accidently and is unneeded.
7897 2004-05-03 Jackson Harper <jackson@ximian.com>
7899 * icall.c: Add new icall for Assembly::LoadWithPartialName
7900 * assembly.c/.h: new function that probes the GAC to load partial
7901 assembly names by Paolo Molaro.
7903 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7905 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
7906 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
7907 (type_get_fully_qualified_name): Added PublicKeyToken when building a
7910 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7912 * appdomain.c: fixed check for 'neutral' culture and removed warning.
7913 * reflection.c: fix bug when parsing a full type name and Version is not
7914 the last thing in the string.
7916 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
7918 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
7919 crashes when it is freed.
7921 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7923 * assembly.c: print the compat warning to stderr.
7925 2004-05-01 Miguel de Icaza <miguel@ximian.com>
7927 * assembly.c (mono_assembly_load_references): Add a compatibility
7928 hack to run old applications that might be still referencing the
7929 3300-based assemblies, only do this for System.xxx.
7931 2004-05-01 Jackson Harper <jackson@ximian.com>
7933 * appdomain.c: If the culture is neutral we set it to "".
7935 2004-04-29 Jackson Harper <jackson@ximian.com>
7937 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
7939 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
7941 * string-icalls.c: added low overhead function for copying chars
7942 * icall.c: added needed icall for the above function
7944 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7946 * icall.c: fix return value of get_global_assembly_cache. Implemented
7947 Environment.GetLogicalDrives.
7949 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
7951 * rand.c: try and talk to egd or prngd
7952 for random bytes if opening devices fail.
7954 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
7956 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
7957 alignment for the type using the native alignment of its members
7958 instead of using klass->min_align.
7960 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
7962 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7965 * socket-io.c: added check for sys/aio.h.
7967 2004-04-28 Dick Porter <dick@ximian.com>
7969 * threads.c: Don't abort a thread thats already aborting, when
7970 terminating everything.
7972 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7974 * icall.c: added 2 new async calls for Socket.
7976 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
7979 * threadpool.c: removed unused variable.
7981 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
7983 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
7985 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7987 * locales.c: put back string_invariant_tolower () and
7988 string_invariant_toupper ().
7990 2004-04-26 David Waite <mass@akuma.org>
7995 * unicode.h: remove comma from end of enumeration declarations
7997 2004-04-26 David Waite <mass@akuma.org>
7999 * debug-mono-symfile.h:
8002 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
8005 2004-04-26 Jackson Harper <jackson@ximian.com>
8007 * appdomain.c: Increment version number.
8009 2004-04-26 Jackson Harper <jackson@ximian.com>
8011 * appdomain.c: Set assembly references public token value when
8012 PublicKeyToken is specified, not the hash_value. Free public token
8013 values when free assembly name data. Previously the public key
8014 token was hex decoded, however we are using hex encoded public key
8015 tokens, so this is not neccasary.
8016 * assembly.c: Lookup assemblies in the gac if their public token
8017 value is set. Add function to allow enabling user gac
8018 lookups. Specify whether or not the assembly was loaded from the
8019 GAC. Compare full assembly names when checking the cache for
8020 assemblies (Temporarily disabled see comment in code). Remove
8021 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
8022 specifies trace-loader they get extra info to stdout on the
8023 loading of assemblies.
8024 * image.h: Add a field for an assembly references public token
8025 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
8026 whether an assembly has been loaded from the GAC.
8027 * image.c: Remove a corlib -> mscorlib name mapping.
8028 * loader.h: Add function to enable/disable the user gac.
8029 * mono-config.c: Check if the usergac is enabled in the config
8031 * icall.c: New icall to determine whether or not an assembly has
8032 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
8033 * tabldefs.h: Add constant for assemblyref flag that specifies a
8034 full public key is used instead of a public token.
8035 * reflection.c: Remove mscorlib -> corlib mappings. Set
8036 PublicTokenValue instead of hash value. This value is a hex
8037 string so it does not need to be expanded.
8039 2004-04-26 Martin Baulig <martin@ximian.com>
8041 * mono-debug-debugger.c (mono_debugger_initialize): Set
8042 `mono_debugger_initialized' before calling mono_debug_lock().
8044 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
8046 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
8047 InternalToUpper/InternalToLower.
8048 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
8049 removed invariant culture shortcut. This is now done in managed code.
8050 * locales.c: (string_invariant_toupper/tolower) removed.
8052 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8054 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
8055 Added Poll internal call.
8057 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
8058 call for Poll. Select was too heavy for polling a single socket.
8060 * threadpool.[ch]: added mono_threadpool_cleanup.
8061 * threads.c: use it. Don't use Thread_Abort on windows.
8063 2004-04-23 Martin Baulig <martin@ximian.com>
8065 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
8067 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
8069 * icall.c: Registred new icalls for key pair protection and added an
8070 icall for Environment.GetFolderPath on Windows.
8071 * security.c|h: Added new icalls for key pair protection.
8073 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8075 * socket-io.c: don't display the non-supported family warning for known
8076 families. Now this is not displayed on windows when checking support
8079 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8081 * class.c: don't display the layout warning for static fields.
8083 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
8085 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
8086 * locales.c, locales.h: Added new icalls for culture-specific
8087 Char.ToLower and Char.ToUpper.
8089 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8091 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
8094 2004-04-20 Martin Baulig <martin@ximian.com>
8096 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
8097 of the type name before passing it to mono_reflection_type_from_name().
8099 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
8101 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
8102 encodings here. Fixes #56965.
8104 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
8106 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
8107 fix test on strstr result not that I can see anything that
8108 relies on the result.
8110 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
8112 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
8115 * marshal.c (mono_marshal_get_string_encoding): New helper function.
8117 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
8118 function to determine which marshalling to use for strings. Fixes
8121 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
8123 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
8125 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
8127 * icall.c: #include mono-config.h
8129 2004-04-15 Jackson Harper <jackson@ximian.com>
8131 * culture-info-tables.h: Fix date formats for en-US culture.
8133 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
8135 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
8136 ThreadPool.SetMinThreads.
8137 * threadpool.c: Implemented ThreadPool.GetMinThreads and
8138 ThreadPool.SetMinThreads.
8140 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8142 * mono-config.c: also load the .config file in the directory
8143 where the assembly was found.
8145 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
8147 * assembly.c: load per-assembly config files.
8148 * icall.c: decrapified code to get the config dir and moved to
8150 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
8151 per-assembly config files. When doing a dll map lookup give precedence
8152 to the per-assembly data.
8154 2004-04-14 Martin Baulig <martin@ximian.com>
8156 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
8157 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
8158 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
8160 * mono-debugger-debugger.c: While the debugger is locked, remember
8161 whether the symbol tables have changes and send one single
8162 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
8164 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
8166 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
8168 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
8171 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
8172 account when marshalling string arrays. Fixes #56965.
8174 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
8176 * icall.c: Add new icalls mapping for security.
8177 * security.c|h: Add internal calls for WindowsIdentity,
8178 WindowsImpersonationContext and WindowsPrincipal.
8180 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
8182 * class.c: Added comment to ensure the System.MonoDummy class
8183 is removed when no longer necessary
8185 2004-04-13 Miguel de Icaza <miguel@ximian.com>
8187 * appdomain.c: Pass arguments to the bootstraping exceptions to
8188 minimize JITed methods at boot
8190 * metadata.c (mono_exception_from_name_two_strings): Allow for the
8191 second string to be null.
8193 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
8194 Change the protocol to minimize the JIT methods at startup. Now
8195 it Returns the internal codepage, if the value of "int_code_page"
8196 is 1 at entry, and we can not compute a suitable code page
8197 number, returns the code page as a string.
8199 2004-04-13 Jackson Harper <jackson@ximian.com>
8201 * culture-info-tables.h: Fix number of decimal digits for all
8204 2004-04-13 Jackson Harper <jackson@ximian.com>
8206 * icall.c: Clairfy out of sync error message. It is not always
8207 your corlib that is out of sync.
8209 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
8211 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
8212 properties when only the set accessor is overriden. Fixes #55874.
8214 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
8216 * assembly.c (mono_assembly_load_references): Make this thread safe.
8219 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
8221 * monosn.c: Add missing initialization calls.
8223 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
8226 ves_icall_System_Globalization_CultureInfo_construct_number_format
8227 Fix g_assert so it compiles on fussier compilers re int/ptr
8230 2004-04-08 Dick Porter <dick@ximian.com>
8233 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
8234 53992. Also rearrange the code so that the internal calls return
8235 an error value and exceptions are thrown from managed code.
8237 * icall.c: Add type info to the socket icalls.
8239 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8241 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
8244 2004-04-07 Martin Baulig <martin@ximian.com>
8246 * class.c (mono_class_from_generic_parameter): Don't default
8247 `klass->parent' to `mono_defaults.object_type'.
8249 2004-04-07 Martin Baulig <martin@ximian.com>
8251 * reflection.c (mono_reflection_initialize_generic_parameter): Set
8252 `param->pklass->reflection_info'.
8254 2004-04-07 Jackson Harper <jackson@ximian.com>
8256 * culture-info-tables.h: Fix date separator symbol.
8258 2004-04-07 Martin Baulig <martin@ximian.com>
8260 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
8261 from System.Type to System.MonoType.
8263 2004-04-07 Martin Baulig <martin@ximian.com>
8266 (MonoReflectionGenericParam): Added `has_reference_type' and
8267 `has_value_type' fields.
8269 * reflection.c (mono_image_get_generic_param_info): Encode the
8270 correct flags if we have the `class' or `struct' constraint.
8272 2004-04-07 Martin Baulig <martin@ximian.com>
8275 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
8277 2004-04-07 Jackson Harper <jackson@ximian.com>
8279 * appdomain.c: Revert extra patches, just wanted to bump the
8282 2004-04-07 Jackson Harper <jackson@ximian.com>
8284 * Makefile.am: Add culture-info private headers.
8285 * icall.c: Add new icalls for contructing locales.
8286 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
8287 * locales.h: Declare new culture info construction methods.
8288 * object.h: Add new fields used to avoid the CultureMap to
8290 * culture-info.h: Definition of structs used in the culture info
8292 * culture-info-tables.h: Autogenerated tables that contain culture
8293 info data. This file was generated with the locale-builder tool.
8294 * appdomain.c: Incement corlib version number.
8296 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
8298 * appdomain.c: (mono_runtime_init) move mono_thread_init
8299 to before mono_object_new calls so critical sections
8300 are initialized before use.
8302 2004-04-07 Martin Baulig <martin@ximian.com>
8305 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
8306 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
8307 (ves_icall_MonoGenericParam_initialize): Removed.
8308 (monogenericparam_icalls): Removed.
8309 (generictypeparambuilder_icalls): Added new table for
8310 System.Reflection.Emit.GenericTypeParameterBuilder.
8313 (mono_reflection_define_generic_parameter): Removed.
8314 (mono_reflection_initialize_generic_parameter): This is now called
8315 from GenericTypeParameterBuilder's .ctor.
8317 2004-04-06 Martin Baulig <martin@ximian.com>
8319 * class.c (mono_class_init): Don't inflate nested classes in a
8321 (mono_type_get_name_recurse): Include the generic arguments for
8322 generic instances and generic type declarations.
8323 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
8324 (_mono_class_get_instantiation_name): Removed.
8325 (mono_class_create_generic): Always use `gklass->name' as our name.
8327 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
8329 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
8330 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
8331 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
8332 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
8333 closed generic methods here.
8336 (mono_reflection_generic_inst_get_nested_types): Removed.
8337 (inflate_mono_method): Copy the generic parameters from the
8338 MonoMethodHeader into out MonoGenericMethod.
8340 2004-04-06 Martin Baulig <martin@ximian.com>
8343 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
8345 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
8347 * reflection.c (build_compressed_metadata): If we have any entries
8348 in the GenericParam, MethodSpec or GenericParamConstraint tables,
8349 set the header version to 1.1.
8351 2004-04-06 Martin Baulig <martin@ximian.com>
8353 * class.c (mono_class_init): If we're a generic instance,
8354 initialize our nested classes, too.
8355 (_mono_class_get_instantiation_name): Deal with the new `!%d'
8358 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8360 * process.c: quote the argument passed to the shell on windows.
8362 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
8364 * threads.c (mono_alloc_special_static_data): Allow this to be
8365 called during startup.
8367 2004-04-02 Martin Baulig <martin@ximian.com>
8370 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
8372 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
8374 * icall.c: Fix build.
8376 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
8378 * Makefile.am: Added security.c|h.
8379 * icall.c: Added icall for get_UserName;
8380 * security.c: New file for security related icalls. Added function
8381 get_UserName for System.Environment (fix #56144).
8382 * security.h: New. Header file for security.c
8384 2004-04-02 Dick Porter <dick@ximian.com>
8386 * icall.c: Deleted the icalls that were obsoleted some time ago
8387 by the ICU string code, and which were mixed into the icall
8388 rearranging. Fixes bug 55969.
8391 * string-icalls.c: Deleted the code that those icalls reference.
8393 2004-04-01 Martin Baulig <martin@ximian.com>
8395 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
8397 * class.c (mono_class_from_generic_parameter): Don't set
8398 TYPE_ATTRIBUTE_INTERFACE.
8399 (my_mono_class_from_generic_parameter): Likewise.
8401 2004-04-01 Martin Baulig <martin@ximian.com>
8403 * loader.c (find_method): Added an optional `MonoClass *ic'
8404 argument to search in a specific interface.
8405 (mono_get_method_constrained): New public function.
8407 2004-04-01 Martin Baulig <martin@ximian.com>
8409 * reflection.c (mono_image_get_generic_field_token): Use the
8410 `handleref' cache here.
8412 2004-04-01 Martin Baulig <martin@ximian.com>
8414 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
8416 * reflection.c (create_generic_typespec): Use the `typespec' hash
8417 here, not the `typeref' one.
8419 2004-04-01 Martin Baulig <martin@ximian.com>
8421 * class.c (mono_class_inflate_generic_type): Moved the
8422 functionality into a new static inflate_generic_type() which
8423 returns NULL if it didn't do anything. Only increment the
8424 `mono_stats.inflated_type_count' if we actually inflated
8426 (mono_class_get_full): Check the classes type to see whether we
8427 need to inflate it; also inflate MONO_TYPE_(M)VAR.
8429 2004-04-01 Jackson Harper <jackson@ximian.com>
8431 * reflection.c: Set culture for assembly references.
8433 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
8435 * reflection.[ch], icall.[ch], Fix support for pinning variables.
8437 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8440 (do_mono_assembly_open): the critical section also covers
8441 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
8443 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8446 (mono_manage_threads): abort the background threads when finishing.
8449 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8451 * gc.c: only close the done_event handle if there was no timeout.
8454 2004-03-30 Martin Baulig <martin@ximian.com>
8456 * icall.c (icall_entries): It's called "System.Activator", not
8457 "System.Activation".
8459 2004-03-30 Martin Baulig <martin@ximian.com>
8461 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
8462 (mono_class_create_from_typespec): Likewise.
8464 2004-03-30 Martin Baulig <martin@ximian.com>
8466 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
8467 `has_ctor_constraint' and `initialized'.
8469 2004-03-30 Martin Baulig <martin@ximian.com>
8471 * reflection.c (encode_new_constraint): New static function to add
8472 the constructor constraint attribute to a type parameter.
8473 (encode_constraints): Call encode_new_constraint() if necessary.
8476 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
8478 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
8480 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
8482 * reflection.c, icall.c: add support for pinning variables.
8484 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
8486 * marshal.c (mono_marshal_get_managed_wrapper):
8487 init bool local with zero rather than null.
8489 2004-03-29 Martin Baulig <martin@ximian.com>
8491 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
8492 the "official" behavior here.
8493 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
8495 2004-03-29 Martin Baulig <martin@ximian.com>
8497 * icall.c: Reflect latest API changes.
8499 2004-03-29 Martin Baulig <martin@ximian.com>
8501 * loader.c (mono_get_method_from_token): Also call
8502 mono_metadata_load_generic_params () for abstract and interface
8503 methods; replace the type arguments in the method signature with
8504 the ones which are loaded from the metadata.
8506 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
8508 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
8509 of the lock is not the current thread. MS.NET don't do it, in spite of
8510 what the documentation says. See bug #56157.
8512 2004-03-28 Martin Baulig <martin@ximian.com>
8514 * class.c (mono_class_init): Don't call init_properties() and
8515 init_events() for generic instances; set `prop->parent' when
8516 inflating properties.
8518 * reflection.c (mono_generic_inst_get_object): Call
8519 `mono_class_init (ginst->klass)'.
8520 (mono_type_get_object): Only create a MonoGenericInst if your
8521 generic type is a TypeBuilder.
8522 (do_mono_reflection_bind_generic_parameters): Only set
8523 `ginst->is_dynamic' if our generic type is a TypeBuilder.
8525 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
8527 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
8530 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8532 * icall.c: added Kill_internal icall.
8533 * process.[ch]: added Kill_internal icall.
8535 2004-03-25 Martin Baulig <martin@ximian.com>
8537 * class.h (MonoStats): Added `generic_instance_count',
8538 `inflated_method_count', `inflated_type_count' and
8539 `generics_metadata_size'.
8541 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8543 * reflection.c: no warnings now.
8545 2004-03-25 Martin Baulig <martin@ximian.com>
8547 * class.c (mono_class_get_full): New public function; does a
8548 mono_class_get(), but also takes a `MonoGenericContext *'.
8550 * loader.c (mono_field_from_memberref): Renamed to
8551 `field_from_memberref', made static and added `MonoGenericContext *'
8553 (mono_field_from_token): Added `MonoGenericInst *' argument.
8554 (method_from_memberef): Likewise.
8555 (mono_get_method_from_token): Likewise.
8556 (mono_get_method_full): New public function; does a
8557 mono_get_method(), but also takes a `MonoGenericContext *'.
8559 * verify.c (mono_method_verify): Get the method's generic context
8560 and pass it to mono_field_from_token(), mono_get_method_full() and
8561 mono_class_get_full().
8563 2004-03-25 Martin Baulig <martin@ximian.com>
8565 * class.c (mono_class_inflate_generic_type): Take a
8566 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
8567 `MonoGenericMethod *'.
8569 2004-03-25 Martin Baulig <martin@ximian.com>
8571 * loader.h (MonoMethodInflated): Store the MonoGenericContext
8572 instead of the MonoGenericMethod here.
8574 2004-03-25 Martin Baulig <martin@ximian.com>
8576 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
8577 each time we create a new MonoGenericInst, we also create a new
8578 context which points back to us.
8580 * class.c (inflate_method): Use `ginst->context' instead of
8581 creating a new context.
8583 * loader.c (method_from_memberref): Use
8584 `klass->generic_inst->context' instead of creating a new context.
8586 2004-03-25 Martin Baulig <martin@ximian.com>
8588 * class.h (MonoGenericContext): New struct.
8589 (MonoGenericMethod): Removed `generic_inst'.
8591 * class.c (mono_class_inflate_generic_method): Take a
8592 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
8594 2004-03-25 Martin Baulig <martin@ximian.com>
8596 * loader.h (MonoMethodInflated): New typedef.
8598 * metadata.h (MonoMethodSignature): Removed `gen_method', make
8599 `generic_param_count' consume just 30 bits, added `is_inflated'
8600 and `has_type_parameters' flags (one bit each).
8602 * class.c (mono_class_inflate_generic_method): Create a
8603 MonoMethodInflated instead of a MonoMethodNormal and set
8604 `is_inflated' in the method signature.
8606 * class.h (MonoGenericMethod): Removed `generic_method'.
8608 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
8610 * image.c: Make sure the name of a MonoImage is always an absolute path.
8611 This fixes bug #54415.
8613 2004-03-24 Martin Baulig <martin@ximian.com>
8615 * class.c (mono_class_setup_vtable): If we're a generic instance,
8616 use our generic type's vtable size.
8618 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
8620 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
8621 MONO_NO_UNLOAD env var as a temporary workaround for unloading
8624 2004-03-23 Martin Baulig <martin@ximian.com>
8626 * class.h (MonoDynamicGenericInst): Added `int count_events' and
8627 `MonoEvent *events'.
8629 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
8630 (typebuilder_icalls): Added "get_event_info"; calls
8631 mono_reflection_event_builder_get_event_info().
8633 * reflection.c (mono_reflection_generic_inst_initialize): Added
8634 `MonoArray *events'.
8635 (mono_reflection_event_builder_get_event_info): New function.
8637 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
8639 * object.h: add mono_type_initialization_init
8641 * object.c (mono_runtime_class_init):
8642 implement class constructor synchronization rules
8643 to cope with threading issues.
8644 add mono_type_initialization_init
8646 * appdomain.c (mono_runtime_init): call
8647 mono_type_initialization_init
8649 * class.h: removing initializing field from MonoVTable
8651 2004-03-23 Martin Baulig <martin@ximian.com>
8653 * class.c (my_mono_class_from_generic_parameter): Use
8654 `param->name' if it's not NULL.
8656 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
8658 * class.c: do not insert non-virtual methods in the vtable.
8659 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
8660 that means the method is non-virtual. This never would have
8663 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
8665 * profiler.c: Added lock for accessing coverage_hash.
8667 2004-03-22 Martin Baulig <martin@ximian.com>
8669 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
8670 `method->method->signature->generic_param_count != 0' to make it
8671 work for interface methods.
8673 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8675 * process.c: quote the string passed to the shell using g_shell_quote.
8677 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8680 (mono_threads_manage): don't remove the finalizer thread and self
8681 from the threads hash table so that mono_thread_manage can be called
8684 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8686 * process.c: quote the arguments when UseShellExecute is true. Fixes
8689 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8691 * threads.c: set mono_thread_detach as a cleanup routine for every
8692 thread. This way it's always executed upon thread termination, either
8693 aborted or finished normally. No more xsp hangs!
8695 2004-03-17 Martin Baulig <martin@ximian.com>
8697 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
8698 `int count_nested' and a `MonoType **nested'.
8700 * reflection.c (mono_reflection_bind_generic_parameters): Moved
8701 most of the functionality into a new static
8702 do_mono_reflection_bind_generic_parameters() and don't take a
8703 `MonoType *nested_in' argument any more. Don't compute nested
8705 (mono_reflection_generic_inst_get_nested_types): New public method
8706 to get nested types.
8708 * class.c (mono_class_create_generic): Set `klass->nested_in' if
8709 we're a nested class.
8711 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
8712 mono_reflection_generic_inst_get_nested_types() to compute the
8715 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
8717 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
8718 descriptive error message under windows.
8720 2004-03-17 Martin Baulig <martin@ximian.com>
8722 * class.c (dup_type): Added `const MonoType *original' argument;
8723 copy the attrs from the original type.
8725 2004-03-17 Martin Baulig <martin@ximian.com>
8727 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
8728 `m->generic_inst_cache' here.
8730 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
8732 * exception.h exception.c: Add stack_overflow_exception.
8734 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8737 (overlapped_callback): call SetEvent *after* invoking the callback.
8738 No need to call CloseHandle.
8740 2004-03-16 Martin Baulig <martin@ximian.com>
8742 * reflection.c (mono_image_get_fieldref_token): Take a
8743 `MonoReflectionField *' instead of a `MonoClassField *' and a
8744 `MonoClass *'; store the `MonoReflectionField *' in the hash.
8746 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8748 * appdomain.c: don't add the culture to the filename we're looking for
8749 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
8751 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8753 * locales.c: don't ignore symbols when doing case insensitive compares.
8754 Thanks Dick! Fixes bug #54046.
8756 * threads.c: surround 'threads' usage with enter/leave in
8759 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
8761 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
8762 implicitly marshalled as [Out]. Fixes #55450.
8764 (mono_marshal_get_runtime_invoke): Zero out the result if there is
8767 2004-03-16 Martin Baulig <martin@ximian.com>
8769 * class.c (mono_class_from_generic_parameter): Use the actual
8772 2004-03-16 Martin Baulig <martin@ximian.com>
8774 * reflection.c (type_get_signature_size): New static function.
8775 Compues the size of the type in a method signature.
8776 (method_get_signature_size): New static function; calls
8777 type_get_signature_size() to compute the actual size of the
8779 (method_encode_signature): Use method_get_signature_size() to get
8780 the signature's size rather than using `nparams * 10'.
8782 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8784 * file-io.h: define here WapiOverlapped on windows. I don't want the
8785 regular OVERLAPPED one.
8788 * threadpool.c: somehow, BindIoCompletionCallback is not found.
8789 Disabling AIO on windows.
8791 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8793 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
8796 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8798 * appdomain.c: upgraded corlib version.
8800 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
8801 and BeginWrite. Allow opening files for asynchrnous operations.
8803 * file-io.h: new struct that maps FileStreamAsyncResult.
8804 * icall.c: added new icalls.
8805 * process.[ch]: support setting child process environment variables
8806 and use the SHELL or COMSPEC when UseShellExecute is true.
8808 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
8809 callback for async. IO is here and also BindHandle.
8811 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
8814 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
8816 * reflection.c (create_custom_attr): Allow len == 0.
8818 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
8819 computation on big-endian machines.
8821 2004-03-13 Martin Baulig <martin@ximian.com>
8823 * class.h (MonoGenericInst): Added `int count_ifaces'.
8825 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
8826 `ginst->count_ifaces' instead `klass->interface_count' since we
8827 may get called before the vtable is created.
8829 * loader.c (mono_method_get_param_names): If we're a generic
8830 instance, return and don't initialize the class.
8832 * reflection.c (mono_reflection_setup_generic_class): Don't call
8833 ensure_runtime_vtable().
8834 (mono_reflection_bind_generic_parameters): Set
8835 `ginst->count_ifaces'.
8837 2004-03-11 Jackson Harper <jackson@ximian.com>
8841 * unicode.h: Remove unused System.Char icalls.
8843 2004-03-11 Miguel de Icaza <miguel@ximian.com>
8845 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
8846 code when we P/Invoke the first library in Windows.Forms, instead
8847 of when we first open the assembly.
8849 * assembly.c: Drop the lookup from here.
8851 2004-03-10 Martin Baulig <martin@ximian.com>
8853 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
8854 class for properties, fields and events. Finally fixes #54945.
8856 2004-03-10 Martin Baulig <martin@ximian.com>
8858 * metadata.c (mono_metadata_class_equal): New static function;
8859 checks whether two generic instances or two generic parameters are
8861 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
8864 2004-03-10 Martin Baulig <martin@ximian.com>
8866 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
8868 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
8869 argument and write it into the `reflection_info' field.
8872 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
8873 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
8875 2004-03-09 Jackson Harper <jackson@ximian.com>
8877 * char-conversions.h: use 8 bits for numeric data its all we need
8878 * icall.c: numeric data is only 8 bits now.
8880 2004-03-09 Martin Baulig <martin@ximian.com>
8882 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
8884 * class.c (init_properties, init_events): Initialize the new
8887 * reflection.c (typebuilder_setup_properties): Likewise.
8888 (typebuilder_setup_events): Likewise.
8890 * reflection.h (MonoEventInfo): Replaced `parent with
8891 `declaring_type' and `reflected_type'.
8893 * icall.c (ves_icall_get_property_info): Distinguish between
8894 declaring and reflected type.
8895 (ves_icall_get_event_info): Likewise.
8897 2004-03-09 Martin Baulig <martin@ximian.com>
8899 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
8900 (ves_icall_Type_GetField): Correctly set field->klass.
8902 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
8904 * loader.h: Fix warning.
8906 2004-03-08 Miguel de Icaza <miguel@ximian.com>
8908 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
8909 library routine if present. Notice that it will still continue
8910 executing even if its missing, for those working on the Gtk#
8911 edition of Windows.Forms.
8913 * assembly.c (do_mono_assembly_open): If loading the
8914 System.Windows.Forms call mono_loader_wini_init.
8916 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
8918 * class.h: Added MonoRemoteClass struct.
8919 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
8920 function for MonoStrings.
8921 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
8922 Added internal call for getting the proxy type.
8923 * marshal.c: Get the type of transparent proxies from its remote_class.
8924 Added methods that generate the IL for type checks and casts:
8925 mono_marshal_get_isinst, mono_marshal_get_castclass,
8926 mono_marshal_get_proxy_cancast.
8927 * marshal.h: Declaration of the previous new methods.
8928 * object.c: Added new moethods for creating and updating MonoRemoteClass
8929 instances: mono_remote_class, mono_upgrade_remote_class,
8930 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
8931 * verify.c: FIx transparent_proxy_fields layout.
8932 * appdomain.c: Bump corlib version.
8934 2004-03-04 Jackson Harper <jackson@ximian.com>
8936 * icall.c: Add icall to access char conversion tables.
8937 * char-conversions.h: Character conversion tables.
8938 * Makefile.am: Add char-conversions.h private header file.
8940 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
8942 * appdomain.c (unload_thread_main): Increase unloading timeout to
8943 10 sec as a temporary workaround for Nant problems.
8945 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
8947 * gc.c: Add checks for GC_enable and GC_disable.
8949 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
8950 (jaak@zd.com.pl). Fix memory corruption in String.Replace
8953 2004-02-27 Martin Baulig <martin@ximian.com>
8955 * reflection.c (mono_reflection_bind_generic_parameters): Take a
8956 `MonoReflectionType *' instead of a `MonoType *'.
8958 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
8960 * gc.c (run_finalize): Avoid finalizing the object representing the
8962 (finalizer_thread): Fix warning.
8964 2004-02-25 Martin Baulig <martin@ximian.com>
8966 * class.c (_mono_class_get_instantiation_name): Added `int offset'
8967 argument for nested types.
8968 (mono_class_create_generic): Added support for nested generictypes.
8970 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
8973 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
8975 * reflection.c (method_encode_signature): Increase the minimum
8976 value of `size' from 10 to 11.
8977 (mono_reflection_bind_generic_parameters): Take `int type_argc'
8978 and `MonoType **types' arguments instead of the `MonoArray
8979 *types'; added `MonoType *nested_in'. Recursively instantiate
8982 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
8984 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
8985 stack_overflow_ex members which are used by exception handling.
8987 * appdomain.c (mono_runtime_init): Initialize the new members.
8989 * gc.c (mono_gc_enable): New helper function.
8990 * gc.c (mono_gc_disable): New helper function.
8992 2004-02-23 Martin Baulig <martin@ximian.com>
8994 * icall.c: I must have been really stupid - make it actually work
8997 2004-02-23 Martin Baulig <martin@ximian.com>
8999 * loader.c (method_from_memberref): Only inflate the method if
9000 it's in another klass.
9002 2004-02-23 Martin Baulig <martin@ximian.com>
9004 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
9005 (mono_class_init): If we're a generic instance and an interface,
9006 compute `class->interface_id'; also create `class->interfaces'
9007 here and inflate them.
9009 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
9011 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
9013 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
9015 2004-02-15 Miguel de Icaza <miguel@ximian.com>
9017 * reflection.c (method_encode_code): Improved the error message
9018 generated by the exception.
9020 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9022 * icall.c: Martin did not do what he said in the ChangeLog for
9023 2004-02-18, but put back the changes for properties and events.
9024 Commenting those changes out again and adding comment to bug #54518.
9026 * process.c: removed warning.
9028 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
9030 * marshal.c (emit_struct_conv): Print an error message instead of
9031 asserting when a type does not have the StructLayout attribute.
9033 2004-02-20 Martin Baulig <martin@ximian.com>
9035 * reflection.c (mono_type_get_object): Also use the cache for
9037 (mono_reflection_bind_generic_parameters): Always compute
9040 2004-02-20 Martin Baulig <martin@ximian.com>
9042 * class.h (MonoGenericMethod): Removed `klass'.
9044 * class.c (mono_class_inflate_generic_method): Added `MonoClass
9047 2004-02-20 Martin Baulig <martin@ximian.com>
9049 * reflection.c (method_encode_methodspec): Actually use the
9050 uninflated signature for the memberref.
9052 2004-02-20 Martin Baulig <martin@ximian.com>
9054 * class.h (MonoGenericMethod): Removed `declaring'.
9056 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
9057 is NULL, compute it here.
9059 2004-02-20 Martin Baulig <martin@ximian.com>
9061 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
9063 * metadata.c (mono_metadata_generic_inst_hash): New method.
9064 (mono_metadata_generic_inst_equal): New method.
9066 * reflection.c (mono_reflection_bind_generic_parameters): Use the
9067 `klass->image->generic_inst_cache' cache to avoid creating
9068 duplicate MonoGenericInst's.
9070 * class.c (mono_class_inflate_generic_type): Use the cache.
9072 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
9074 * object.c: fixed gc descriptor calculation for embedded valuetypes.
9076 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9078 * icall.c: added Socket.WSAIoctl icall.
9080 * socket-io.[ch]: implemented
9081 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
9083 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
9085 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
9087 2004-02-18 Urs C Muff <umuff@quark.com>
9089 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
9090 this work on PPC and other big-endian architectures.
9092 * debug-mono-symfile.h: Prepended the names of all the `guint32'
9093 fields with an underscore to make sure they're only accessed by
9096 2004-02-18 Martin Baulig <martin@ximian.com>
9098 * icall.c: Put the klass->refclass changes back for methods and
9099 fields, but not for properties and events. We're currently not
9100 distinguishing between DeclaringType and ReflectedType for
9101 properties and events, that's what caused the regressions.
9103 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9106 (mono_async_result_new): the handle can be NULL.
9108 * threadpool.c: Use an event instead of a semaphore, don't initialize
9109 it until needed. This saves quite a few semaphores from being created
9110 when using the threadpool.
9112 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
9114 * object.c (mono_string_is_interned_lookup): Fix interning of long
9115 strings. Fixes #54473.
9117 * domain.c (ldstr_equal): Optimize if the two strings are equal.
9119 * icall.c: Revert the klass->refclass changes since they introduce
9120 regressions (bug #54518).
9122 2004-02-18 Martin Baulig <martin@ximian.com>
9124 * class.c (mono_class_init): If we're a generic instance and don't
9125 come from a TypeBuilder, inflate our members here.
9126 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
9127 (mono_class_create_generic): New public method.
9128 (mono_class_initialize_generic): Removed.
9129 (get_instantiation_name): Renamed to
9130 _mono_class_get_instantiation_name() and made it public.
9132 2004-02-18 Martin Baulig <martin@ximian.com>
9134 * class.c (mono_class_inflate_generic_type): Clear the new
9135 instance's `nginst->klass' when inflating a generic instance.
9136 (mono_class_is_subclass_of): Added (basic) support for generic
9139 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
9141 * appdomain.h, domain.c: use a MonoCodeManager instead of a
9142 MonoMempool to hold compiled native code.
9144 2004-02-17 Martin Baulig <martin@ximian.com>
9146 * class.h (MonoDynamicGenericInst): Added `count_properties' and
9149 * reflection.c (mono_reflection_generic_inst_initialize): Added
9150 `MonoArray *properties' argument.
9152 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
9154 2004-02-17 Martin Baulig <martin@ximian.com>
9156 * icall.c (ves_icall_Type_GetFields): Renamed to
9157 ves_icall_Type_GetFields_internal() and added a
9158 `MonoReflectionType *rtype' argument; pass it to
9159 mono_field_get_object() to set the field's "reflected" type.
9160 (ves_icall_Type_GetConstructors): Likewise.
9161 (ves_icall_Type_GetEvents): Likewise.
9162 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
9163 argument; pass it to mono_method_get_object() to set the method's
9166 2004-02-17 Martin Baulig <martin@ximian.com>
9168 * class.h (MonoDynamicGenericInst): New type.
9169 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
9171 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
9172 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
9173 (ves_icall_MonoGenericInst_GetFields): New interncall.
9175 * class.c (mono_class_from_generic): Don't call
9176 mono_class_initialize_generic() if this is a dynamic instance;
9177 ie. it's being created from a TypeBuilder.
9178 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
9179 `class->byval_arg.type'.
9181 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
9182 to `inflate_method' and made static.
9183 (mono_reflection_inflate_field): Removed.
9184 (mono_reflection_generic_inst_initialize): New public method.
9186 * reflection.h (MonoReflectionGenericInst): Removed `methods',
9187 `ctors' and `fields'; added `initialized'.
9189 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
9191 * debug-helpers.c (mono_method_full_name): Fix output for empty
9194 2004-02-12 Martin Baulig <martin@ximian.com>
9196 * class.h (MonoClassField): Added `MonoType *generic_type'.
9198 * reflection.c (mono_image_get_fieldref_token): Added support for
9199 instantiated generic types.
9200 (field_encode_inflated_field): Removed.
9201 (mono_image_get_inflated_field_token): Removed.
9202 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
9204 * reflection.h (MonoReflectionInflatedField): Removed.
9206 2004-02-12 Martin Baulig <martin@ximian.com>
9208 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
9209 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
9211 * reflection.c (mono_image_get_methodspec_token): Take a
9212 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
9213 (mono_image_create_token): Check whether we have a
9214 `method->signature->gen_method' and call
9215 mono_image_get_methodspec_token() if appropriate.
9216 (inflated_method_get_object): Removed.
9217 (mono_reflection_bind_generic_method_parameters): Return a
9218 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
9219 (mono_reflection_inflate_method_or_ctor): Likewise.
9221 * reflection.h (MonoReflectionInflatedMethod): Removed.
9223 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
9225 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
9226 for custom valuetype marshalling.
9228 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
9230 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9232 * icall.c: fixed WSAGetLastError_internal name.
9234 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
9236 * threads.c (mono_thread_attach): Allow this to be called multiple
9239 * threads.c (build_wait_tids): Do not wait for ourselves.
9241 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
9242 appdomain list is empty.
9244 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
9245 memory returned by mono_string_builder_to_utf16, since it points into
9246 managed memory. Thanks to Bernie Solomon for noticing this.
9248 * icall.c: Add AppDomainSetup icalls.
9250 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
9252 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
9255 * reflection.c (reflection_methodbuilder_to_mono_method): Save
9256 custom attributes to the method_aux struct. Also fix array indexes etc.
9258 * loader.c (mono_method_get_param_names): Make dynamic case work again.
9260 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
9262 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
9263 (both static and runtime) and reduce startup time.
9265 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
9267 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
9268 AsAny marshalling conversion instead of crashing.
9270 * marshal.c: Fix warnings.
9272 2004-02-09 Martin Baulig <martin@ximian.com>
9274 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
9276 * reflection.h (MonoReflectionInflatedMethod): Removed the
9277 `declaring' field, it's now in the unmanaged MonoGenericMethod.
9279 * reflection.c (method_encode_methodspec): Removed the `method'
9280 argument; we get it from `gmethod->declaring'.
9281 (inflated_method_get_object): Removed the `declaring' argument.
9283 2004-02-09 Martin Baulig <martin@ximian.com>
9285 * class.h (MonoGenericMethod): New type.
9286 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
9289 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
9290 a `MonoGenericMethod *gen_method' one.
9292 * class.c (mono_class_inflate_generic_type): Take an additional
9293 `MonoGenericMethod * argument. This is only non-NULL if we're
9294 inflating types for a generic method.
9295 (mono_class_inflate_generic_signature): Renamed to
9296 inflate_generic_signature() and made static; take a
9297 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
9298 (inflate_generic_header): Take a `MonoGenericMethod *' argument
9299 instead of a `MonoGenericInst *' one.
9300 (mono_class_inflate_generic_method): Likewise.
9302 * reflection.c (encode_generic_method_sig): Take a
9303 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
9304 (method_encode_methodspec): Likewise.
9305 (inflated_method_get_object): Likewise.
9307 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
9308 field with a `MonoGenericMethod *gmethod' one.
9310 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
9312 * class.h (mono_class_has_parent): add parens to expansion
9315 2004-02-08 Martin Baulig <martin@ximian.com>
9317 * image.h (MonoImage): Removed `generics_cache'.
9319 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
9320 instead of a `MonoType *' argument; removed the `inflate_methods'
9321 argument. Don't inflate methods here.
9323 * loader.c (find_method): If it's a generic instance, call
9324 mono_class_init() on the `sclass->generic_inst->generic_type'.
9326 * metadata.c (mono_type_size): Make this work on uninitialized
9327 generic instances; call it on the `ginst->generic_type's class.
9329 * reflection.c (mono_reflection_bind_generic_parameters): Call
9330 mono_class_from_generic() to create the `ginst->klass'.
9332 2004-02-08 Martin Baulig <martin@ximian.com>
9334 * class.h (MonoClass): Changed type of `generic_inst' from
9335 `MonoType *' to `MonoGenericInst *'.
9337 2004-02-08 Martin Baulig <martin@ximian.com>
9339 * icall.c (ves_icall_Type_BindGenericParameters): Just call
9340 mono_type_get_object(), this is now creating a `MonoGenericInst'
9341 for MONO_TYPE_GENERICINST.
9342 (ves_icall_MonoGenericInst_GetParentType): Likewise.
9343 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
9345 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
9346 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
9347 (inflated_method_get_object): Added `MonoClass *refclass' argument.
9348 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
9351 * reflection.h (MonoReflectionInflatedMethod): Removed
9352 `declaring_type' and `reflected_type'.
9354 2004-02-08 Martin Baulig <martin@ximian.com>
9356 * class.h (MonoGenericInst): Added `MonoType *parent' and
9357 `MonoType **ifaces'.
9359 * reflection.h (MonoReflectionGenericInst): Removed `klass',
9360 `parent' and `interfaces'.
9362 * reflection.c (mono_reflection_bind_generic_parameters): Take a
9363 `MonoType *' argument and return a `MonoType *'.
9366 (ves_icall_MonoGenericInst_GetParentType): New interncall.
9367 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
9369 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
9371 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
9372 valuetype marshalling.
9374 2004-02-06 Martin Baulig <martin@ximian.com>
9377 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
9378 (my_mono_class_from_generic_parameter): Likewise.
9380 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
9382 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
9383 contents of the symbol files lazily.
9385 * object.h (MonoThread): Add 'name' and 'name_len' fields.
9387 * threads.h threads.c icall.c: New icalls for getting and setting the
9390 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
9392 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
9393 Raise an exception when the domain is not found.
9395 2004-02-03 Martin Baulig <martin@ximian.com>
9397 * reflection.c (mono_image_get_methodspec_token): Use the
9398 uninflated signature; fixes gen-33.
9400 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
9402 * gc.c threads.c: Make the finalizer thread a normal managed thread so
9403 the finalizer code can use thread functionality.
9405 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
9406 the finalizer thread.
9408 * threads.c: Make some functions more robust.
9410 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
9412 * metadata.h: Add new marshalling conventions.
9414 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
9415 stringbuilder marshalling. Fixes #53700.
9417 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
9419 * reflection.c (mono_image_get_type_info): Save declarative security
9422 * reflection.c (mono_image_get_field_info): Handle uninitialized
9423 unmanaged fields as well.
9425 * appdomain.c: Bump corlib version.
9427 2004-02-01 Martin Baulig <martin@ximian.com>
9429 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
9430 method type arguments.
9432 2004-01-30 Duncan Mak <duncan@ximian.com>
9434 * marshal.h: Add prototype for
9435 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
9437 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
9440 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
9442 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
9443 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
9445 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
9447 * marshal.c (mono_marshal_get_native_wrapper): Add support for
9448 custom marshalling of valuetypes.
9450 * marshal.c: Fix some warnings.
9452 2004-01-29 Martin Baulig <martin@ximian.com>
9454 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
9455 for generic method parameters.
9457 * reflection.c (method_encode_methodspec): Write the uninflated
9458 signature into the methodspec table.
9459 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
9460 is always the uninflated method.
9461 (reflection_methodbuilder_to_mono_method): Copy the generic
9462 parameters from the MethodBuilder into `header->gen_params'.
9464 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
9466 * class.c (mono_class_from_generic_parameter): Fix warning.
9468 2004-01-27 Martin Baulig <martin@ximian.com>
9470 * class.c (mono_class_from_generic_parameter): Don't create
9471 `klass->methods' here.
9473 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
9475 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
9476 extension since it does not work with libraries named lib<FOO>.dll.so.
9478 2004-01-25 Martin Baulig <martin@ximian.com>
9480 * class.c (mono_class_inflate_generic_type): Added support for
9481 MONO_TYPE_GENERICINST.
9483 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
9484 inflate methods on open constructed types.
9486 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9488 * object.c: fire ProcessExit event in the root AppDomain after running
9489 Main. Fixes bug #53299.
9491 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
9493 * socket-io.c: include the new socket-wrappers.h header.
9494 Use the wrappers instead of the unix socket functions to make the code
9497 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
9499 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
9501 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
9504 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
9506 * reflection.c (mono_image_create_pefile): Handle the case when the
9507 entry point is not a MethodBuilder.
9509 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
9510 field to ReflectionMethod since it is not allways a builder.
9512 * reflection.c (type_get_fully_qualified_name): New helper function to
9513 return the fully qualified name of a type.
9515 * reflection.c (encode_marshal_blob): Always emit the fully qualified
9516 type name for custom marshallers.
9518 * reflection.c (mono_marshal_spec_from_builder): Ditto.
9520 * class.c (mono_class_setup_vtable): If a parent class already
9521 implements an interface, use the implementing methods from that class.
9524 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9526 * threadpool.c: just return instead of ExitThread to allow for thread
9529 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
9531 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
9532 when closing resource modules.
9534 * reflection.c (mono_image_create_pefile): Handle the case when the
9535 entry point is not a MethodBuilder.
9537 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
9538 field to ReflectionMethod since it is not allways a builder.
9540 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
9542 * marshal.c (mono_marshal_get_managed_wrapper):
9543 mono_marshal_alloc takes native int so CONV_I
9546 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
9548 * reflection.c (fixup_cattrs): New function to fixup the methoddef
9549 tokens in the cattr table. Fixes #53108.
9551 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9553 * loader.c: don't trim ".dll" before looking up in the config file.
9554 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
9556 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
9558 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
9559 Return the module which contains the resource as well.
9560 (ves_icall_System_Reflection_Module_Close): New icall.
9562 * appdomain.c: Bump corlib version number.
9564 * image.c (mono_image_addref): New public function.
9566 * assembly.c: Call mono_image_addref.
9568 * reflection.c (mono_module_get_object): Increase reference count of
9571 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
9574 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
9575 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
9576 proper exceptions on DllImport problems.
9578 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
9580 * class.c, metadata.c: eliminate CSIZE macro.
9582 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
9584 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
9585 * object.h: Added async_callback field in MonoAsyncResult.
9586 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
9587 * verify.c: Added async_callback in MonoAsyncResult layout.
9589 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
9591 * reflection.c (mono_reflection_get_custom_attrs): Add support
9594 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
9596 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
9598 (mono_marshal_method_from_wrapper): Add null pointer check.
9600 2004-01-16 Martin Baulig <martin@ximian.com>
9602 * debug-mono-symfile.h: Set version number to 36 and reflect
9603 latest symbol writer changes.
9605 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
9607 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
9608 multi-dimensional arrays.
9609 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
9610 (mono_class_from_mono_type): Use bounded_array_class_get.
9612 * class.c (mono_bounded_array_class_get): New function which takes
9613 a 'bounded' bool argument to distinguish vectors from one dimensional
9616 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
9617 bounded_array_class_get if the array has bounds.
9619 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
9620 Search modules loaded using AssemblyBuilder:AddModule as well.
9622 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9624 * appdomain.c: increased corlib version.
9625 * filewatcher.c: removed g_print.
9627 (get_property_info): only allocate what is actually requested.
9628 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
9630 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9632 * Makefile.am: added filewatcher.[ch]
9633 * filewatcher.[ch]: FileSystemWatcher runtime support.
9634 * icall.c: added new FSW icalls.
9636 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9638 * string-icalls.c: fix stringbuilder regression as suggested by
9639 Iain McCoy <iain@mccoy.id.au>.
9641 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
9643 * process.c (process_read_stringtable_block): Recognize '007f' as
9644 a language neutral stringtable block.
9646 2004-01-12 Patrik Torstensson
9648 * object.h (MonoStringBuilder) : Changed layout to support our
9649 new stringbuilder class.
9650 * marshal.c: Change marshalling to support the new layout of
9652 * appdomain.c: increased version number because new layout of
9655 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
9657 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
9658 assembly name as an string instead of an AssemblyName, since it is
9659 easier to extract info from it.
9661 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
9662 the culture subdirectories too. Fixes #52231.
9664 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9666 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
9667 It takes 2 new parameters with an optional name for the method to look
9668 for and case ignoring info.
9670 * threadpool.c: removed unused variable.
9672 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9674 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
9675 It takes 2 new parameters with an optional name for the property to look
9676 for and case ignoring info.
9679 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
9681 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
9684 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9687 * assembly.c: escape the uri before passing it to g_filename_from_uri.
9690 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
9692 * reflection.c: Add support for more than one unmanaged resource.
9694 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
9695 in field->def_value, as done in all other cases.
9697 * reflection.c (mono_reflection_get_custom_attrs): Add support for
9700 * reflection.c (mono_reflection_create_runtime_class): Remove
9701 errorneous assignment to klass->element_class, since it is already
9702 done in mono_reflection_setup_internal_class.
9704 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9706 * gc.c: added missing LeaveCriticalSection.
9707 * icall.c: indented a couple of lines.
9708 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
9709 if we call EndInvoke inside a callback. Fixes bug #52601.
9711 2004-01-07 Martin Baulig <martin@ximian.com>
9713 * mono-debug-debugger.h
9714 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
9716 2004-01-06 Miguel de Icaza <miguel@ximian.com>
9718 * appdomain.c: Use messages in NotImplementedException.
9720 * exception.c (mono_get_exception_not_implemented): Now this takes
9723 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
9724 exception instead of g_asserting an aborting when something is not
9727 Add some inline docs.
9729 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
9731 * reflection.h: Update after changes to object layout.
9733 * reflection.c: Implement saving of unmanaged aka win32 resources.
9735 * appdomain.c: Bump version number.
9737 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
9738 Handle missing domains gracefully.
9740 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
9742 * file-io.c : On Windows, there are much more invalid_path_chars.
9744 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
9746 * class.h, object.c: prepare for GetType () speedup.
9748 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
9750 * profiler.c: workaround for --profile null reference exception on
9751 cygwin. Patch by Patrik Torstensson.
9753 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
9755 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
9756 make work for unaligned access.
9758 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
9760 * class.c: small cleanup (class->fields [i] -> field).
9761 * image.c: check address of metadata is valid.
9763 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
9765 * assembly.h assembly.c (mono_assembly_loaded): New public function to
9766 search the list of loaded assemblies.
9768 * reflection.c (mono_reflection_type_from_name): Use
9769 mono_assembly_loaded instead of mono_image_loaded.
9771 * reflection.c: Fix warnings.
9773 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
9775 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
9776 is dynamic. This is needed since an assembly can contain both dynamic and
9779 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
9782 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
9784 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
9785 to store modules loaded using AddModule.
9787 * reflection.c (mono_image_fill_file_table): Generalize this so it works
9790 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
9792 * reflection.c (mono_image_fill_export_table_from_module): New function to
9793 fill out the EXPORTEDTYPES table from a module.
9795 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
9796 into a separate function. Also handle loaded non-dynamic modules.
9798 * reflection.c (mono_image_basic_init): Fix memory allocation.
9800 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9802 * assembly.c (mono_assembly_load_references): Make this public.
9804 2003-12-19 Martin Baulig <martin@ximian.com>
9806 * class.c (mono_class_initialize_generic): Made this static, take
9807 a `MonoGenericInst *' instead of a `MonoClass *'.
9808 (mono_class_from_generic): Call mono_class_initialize_generic()
9809 unless we're already initialized or being called from
9810 do_mono_metadata_parse_generic_inst().
9812 * class.h (MonoGenericInst): Added `initialized' and
9813 `init_pending' flags.
9815 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
9816 `mono_class_init (gklass)' or mono_class_initialize_generic()
9817 here; set `generic_inst->init_pending' while parsing the
9820 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
9822 * locales.c: include string.h for memxxx prototypes
9824 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
9826 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
9827 constructor when accessing literal fields.
9829 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
9831 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9833 * reflection.c (assembly_add_resource_manifest): New function to fill
9834 the MANIFESTRESOURCE table.
9836 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
9838 * reflection.h: Update to changes in class layout.
9840 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
9841 Reenable call to mono_runtime_is_shutting_down ().
9843 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
9844 determine if the runtime is shutting down.
9846 2003-12-16 Jackson Harper <jackson@ximian.com>
9848 * icall.c: comment out call to mono_runtime_is_shutting_down to
9851 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
9853 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
9854 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
9856 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
9858 * reflection.c: move definition of swap_with_size
9859 to before its first call
9861 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
9863 * appdomain.c (mono_runtime_is_shutting_down): New public function.
9865 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
9868 * object.c: Fix warnings.
9870 * icall.c (ves_icall_Type_Get...): Only consider inherited static
9871 members if FlattenHierarchy is set.
9873 * reflection.c (mono_image_add_decl_security): New function to emit
9874 declarative security.
9876 * reflection.h reflection.c: Add support for declarative security.
9878 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
9880 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
9882 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
9884 * appdomain.c verify.c: Moved corlib version checking into its own
9885 function in appdomain.c since it needs to create vtables etc.
9887 2003-12-13 Patrik Torstensson <p@rxc.se>
9889 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
9890 instead of unwrapped server.
9892 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
9894 * verify.c (check_corlib): Fix field index.
9896 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
9898 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
9901 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
9903 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
9904 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
9905 cope with sizeof(size_t) != sizeof(guint32).
9907 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9909 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
9912 2003-12-10 Mark Crichton <crichton@gimp.org>
9914 * icall.c: removed the GetNonZeroBytes. We now handle this case
9917 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
9919 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
9921 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
9924 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
9926 * verify.c (check_corlib): Handle the case when the version field is
9927 initialized by a static constructor.
9929 2003-12-08 Patrik Torstensson <p@rxc.se>
9931 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
9933 2003-12-08 Martin Baulig <martin@ximian.com>
9935 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
9936 a MonoReflectionGenericParameter, also take the parameter index
9937 and name as arguments.
9938 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
9939 (ves_icall_MonoGenericParam_initialize): New interncall.
9940 (ves_icall_Type_make_byref_type): New interncall.
9942 * reflection.h (MonoReflectionGenericParam): Derive from
9943 MonoReflectionType, not just from MonoObject. Added `refobj' and
9946 * reflection.c (mono_reflection_define_generic_parameter): Create
9947 and return a new MonoReflectionGenericParam; don't initialize the
9949 (mono_reflection_initialize_generic_parameter): New public method;
9950 initializes the constraints and creates the `param->pklass'.
9952 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
9954 * reflection.h reflection.c: Use the new fields 'num_types',
9955 'num_fields' and 'num_methods' to track the number of types etc.
9957 * verify.c (check_corlib): Check corlib version number.
9959 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
9961 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
9962 function works on all methods.
9964 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
9966 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
9967 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
9968 the custom_type_info flag of the transparent proxy.
9969 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
9970 objects that supports IRemotingTypeInfo.
9971 * object.h: Added custom_type_info field in transparent proxy.
9973 2003-12-06 Martin Baulig <martin@ximian.com>
9975 * class.c (mono_class_create_from_generic): Removed.
9976 (mono_class_from_generic): Check `ginst->klass' before doing
9977 anything else. This is important to fully support "recursive"
9980 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
9981 empty `generic_inst->klass' before doing anything else.
9983 2003-12-06 Dick Porter <dick@ximian.com>
9988 * locales.c: Use C structs to access class fields. Don't do a
9989 conversion between MonoString and UChar because both are
9990 platform-endian UTF-16. Compare now takes startindex and count
9991 parameters. Add a char overload for IndexOf. Speed up the
9992 invariant string IndexOf.
9994 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
9996 * Makefile.am (monosn_LDADD): Fix parallel build.
9998 2003-12-04 Martin Baulig <martin@ximian.com>
10001 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10002 (ves_icall_Type_make_array_type): New interncall.
10004 2003-12-04 Martin Baulig <martin@ximian.com>
10006 * locales.c: also change it in the !HAVE_ICU case.
10008 2003-12-04 Dick Porter <dick@ximian.com>
10011 * locales.c: construct_compareinfo is now in CompareInfo, not
10014 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
10016 * image.c (mono_image_load_file_for_image): Cache loaded images in the
10017 image->files array.
10019 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
10022 * assembly.c (mono_assembly_load_references): Only load references
10025 * class.c (mono_class_from_name): Avoid linear search of the
10026 EXPORTEDTYPE table.
10028 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
10030 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
10032 * image.h (MonoImage): Add 'field_cache' field.
10034 * loader.c (mono_field_from_token): Cache field lookups.
10036 * reflection.c (mono_module_get_object): Fix name property.
10038 * icall.c (ves_icall_get_enum_info): Update after changes to
10039 mono_metadata_get_constant_index ().
10041 * icall.c: Get rid of get_type_info icall, use a separate icall for
10042 each type property to avoid needless memory allocations. Fixes #51514.
10044 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
10045 to avoid needless binary searches.
10047 * class.c (class_compute_field_layout): Move the initialization of
10048 field->def_value to mono_class_vtable ().
10050 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
10053 * object.c (mono_object_allocate): Make it inline.
10055 * object.c (mono_object_allocate_spec): Make it inline.
10057 2003-12-02 Dick Porter <dick@ximian.com>
10059 * locales.c (create_NumberFormat): NumberFormatInfo construction.
10060 Patch by Mohammad DAMT (mdamt@cdl2000.com).
10062 2003-12-01 Dick Porter <dick@ximian.com>
10064 * threads.c: Fix signature and call in CreateMutex and
10067 2003-12-01 Dick Porter <dick@ximian.com>
10070 * locales.c: Implement string compares and searching
10072 * object.h: Add extra Thread field
10074 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
10076 * reflection.c (fixup_method): Add support for MonoCMethod.
10078 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
10080 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
10082 * reflection.c (assembly_name_to_aname): Allow extra characters in
10083 assembly names. Fixes #51468.
10085 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
10087 * exception.c (mono_exception_from_name_domain): New helper function.
10089 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
10090 exception object in the correct domain.
10092 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
10093 formatting + make a copy a the input data.
10095 * loader.c (mono_get_method_from_token): Methods which contain
10096 native code do not have entries in the ImplMap.
10098 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
10099 Thanks to Gonzalo for spotting this.
10101 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
10102 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
10104 * assembly.h (mono_assembly_load_from): Split the second part of
10105 assembly loading into a new public function.
10107 * exception.h (mono_get_exception_bad_image_format): New function.
10109 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
10111 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10112 Enumerate all modules inside a dynamic assembly. Fixes #51293.
10114 * icall.c: Add new icall for creating dynamic methods.
10116 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
10118 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
10120 * reflection.c (mono_reflection_create_dynamic_method): New icall to
10121 create a dynamic method.
10123 * reflection.c (resolve_object): New helper function.
10125 * reflection.c: Generalize ReflectionMethodBuilder and the functions
10126 which manipulate it so they can also work on dynamic methods.
10128 * reflection.c (reflection_method_builder_to_mono_method): Avoid
10129 creating the MonoReflectionMethodAux structure if it is not needed.
10131 * reflection.h verify.c: Update after changes to object layout.
10133 * reflection.c (method_builder_encode_signature): Fix compilation on
10136 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
10138 * appdomain.h: Added support for context static fields. Added static_data
10139 field to MonoAppContext and renamed thread_static_fields to a more
10140 generic special_static_fields in MonoAppDomain, since it can now contain
10141 context static fields.
10142 * domain.c: Updated hashtable name.
10143 * object.c: Replaced field_is_thread_static() for a more generic
10144 field_is_special_static() which also checks for context static attribute.
10145 In mono_class_vtable(), added support for static context fields.
10146 * threads.c: Changed methods that manage thread static fields to more
10147 generic methods so they can be reused both for thread and context static
10149 * threads.h: Declared some new methods.
10151 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
10153 * reflection.h: Update after changes to the managed types.
10155 * reflection.c (encode_custom_modifiers): New helper function.
10157 * reflection.c (method_encode_signature): Emit custom modifiers.
10159 * reflection.c (field_encode_signature): Emit custom modifiers.
10161 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
10163 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
10165 * icall.c (ves_icall_System_ValueType_Equals): New optimized
10168 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
10171 * object.c (mono_field_get_value_object): New function.
10173 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
10176 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
10178 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
10179 return a preallocated out-of-memory exception instance.
10181 * object.c (out_of_memory): Use the new function.
10183 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
10184 flag is before the custom modifiers. Fixes #49802.
10186 2003-11-16 Martin Baulig <martin@ximian.com>
10188 * class.c (mono_class_is_open_constructed_type): Implemented the
10189 MONO_TYPE_GENERICINST case.
10191 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
10193 * assembly.c (mono_assembly_fill_assembly_name): New function to
10194 fill out the MonoAssemblyName structure.
10195 (mono_assembly_open): Use the new function.
10197 * icall.c (fill_reflection_assembly_name): New helper function.
10199 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
10202 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
10204 2003-11-15 Martin Baulig <martin@ximian.com>
10206 * class.c (mono_class_is_open_constructed_type): New public
10207 function; checks whether a type is an open constructed type,
10208 ie. whether it still contains type parameters.
10209 (mono_class_inflate_generic_type): If we're a type parameter and
10210 the inflated type is also a MONO_TYPE_(M)VAR, return the original
10213 * class.h (MonoGenericInst): Added `guint32 is_open'.
10215 * loader.c (method_from_methodspec): Check whether we're an open
10216 or closed constructed type and set `ginst->is_open'.
10218 * reflection.c (mono_reflection_bind_generic_parameters): Check
10219 whether we're an open or closed constructed type and set
10221 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
10222 from open constructed types.
10224 2003-11-15 Martin Baulig <martin@ximian.com>
10226 * reflection.c (mono_reflection_bind_generic_parameters): If we're
10227 a generic instance (instead of a generic type declaration) with
10228 unbound generic parameters, bind them to our actual types.
10230 2003-11-14 Martin Baulig <martin@ximian.com>
10232 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
10234 * reflection.c (mono_reflection_bind_generic_parameters): If we're
10235 an interface type, populate `res->interfaces' with instantiated
10236 versions of all the interfaces we inherit.
10238 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
10240 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
10241 when MONO_PATH is set but doesn't contain the install dir.
10243 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10246 (ves_icall_Type_GetInterfaces): don't return an interface twice when
10247 it's also implemented in base classes. Fixes bug #50927.
10249 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
10251 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
10252 if this method is called from a finalizer. Fixes #50913.
10254 2003-11-12 Miguel de Icaza <miguel@ximian.com>
10256 * threads.c: Implement VolatileRead/VolatileWrite
10258 * icall.c: Add new icalls for VolatileRead/VolatileWrite
10260 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
10262 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
10263 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
10266 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
10267 from Peter Ross (pro@missioncriticalit.com).
10269 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
10271 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
10273 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
10275 * assembly.c (mono_assembly_load_references): Disable check because it
10276 triggers on older corlibs which lots of people have.
10278 2003-11-12 Jackson Harper <jackson@ximian.com>
10280 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
10281 load corlib.dll if mscorlib.dll is not found.
10282 * assembly.h: Remove corlib name define.
10285 * image.c: Change corlib name to mscorlib.
10287 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
10289 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
10291 2003-11-11 Miguel de Icaza <miguel@ximian.com>
10293 * appdomain.h: Added loader_optimization here to sync with the C#
10294 code, and add disallow_binding_redirects field.
10296 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
10298 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
10300 * reflection.c (mono_image_build_metadata): Fix crash on modules
10303 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
10305 * icall.c (ves_icall_get_method_info): Return callingConvention as
10308 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
10309 namespaces from the EXPORTEDTYPE table as well.
10311 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
10312 from all modules inside the assembly.
10314 2003-11-11 Martin Baulig <martin@ximian.com>
10316 * reflection.c (mono_reflection_bind_generic_parameters): Make
10317 this work for interfaces.
10319 2003-11-11 Martin Baulig <martin@ximian.com>
10321 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
10323 2003-11-11 Martin Baulig <martin@ximian.com>
10325 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
10326 "MonoInflatedMethod" and "MonoInflatedCtor".
10328 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
10330 * reflection.c (resolution_scope_from_image): Use the assembly table
10331 from the manifest module, since other modules don't have it.
10333 * debug-helpers.c (mono_type_full_name): New helper function.
10335 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
10337 * image.c (mono_image_load_file_for_image): New public function which
10338 is a replacement for the load_file_for_image in class.c.
10340 * assembly.c (mono_assembly_load_module): A wrapper for the function
10341 above which does assembly association and reference loading too.
10343 * class.c (mono_class_from_name): Call mono_assembly_load_module.
10345 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10347 * appdomain.c: not all of the attributes for the full assembly name
10348 are required and the order doesn't matter. Fixes bug #50787.
10350 2003-11-10 Dick Porter <dick@ximian.com>
10352 * locales.c: Use platform-endian UTF16
10354 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
10356 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
10358 2003-11-10 Martin Baulig <martin@ximian.com>
10361 (mono_metadata_load_generic_params): Make this actually work.
10363 * reflection.c (mono_reflection_bind_generic_parameters): If our
10364 parent is a generic instance, pass all the `types' to it, no
10365 matter whether it has the same number of type parameters or not.
10367 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
10369 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
10371 * assembly.c (mono_assembly_load_references): Move the image<->assembly
10372 assignment code to this function so it gets called recursively for all
10375 * image.c (load_modules): Remove the assembly assignment since it is
10376 now done by mono_assembly_load_references.
10378 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10379 Add 'module' argument.
10380 (mono_module_get_types): New helper function.
10381 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
10383 2003-11-08 Martin Baulig <martin@ximian.com>
10385 * class.c (mono_class_inflate_generic_method): Interface method
10386 don't have a header.
10388 * reflection.c (mono_image_get_methodspec_token): Take an
10389 additional `MonoGenericInst *' argument instead of reading it from
10390 the header; this is necessary to support interfaces.
10391 (mono_image_create_token): Pass the `MonoGenericInst *' from the
10392 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
10393 (inflated_method_get_object): Take an additional `MonoGenericInst *'
10396 * reflection.h (MonoReflectionInflatedMethod): Added
10397 `MonoGenericInst *ginst'.
10399 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
10401 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
10403 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
10405 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
10407 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
10410 (reflection_methodbuilder_from_method_builder):
10411 (reflection_methodbuilder_from_ctor_builder): New helper functions to
10412 initialize a ReflectionMethodBuilder structure.
10413 (mono_image_get_methodbuilder_token):
10414 (mono_image_get_ctorbuilder_token): New functions to emit memberref
10415 tokens which point to types in another module inside the same assembly.
10417 * reflection.c: Use the new helper functions.
10419 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
10421 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
10422 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
10424 * reflection.c (resolution_scope_from_image): Emit a moduleref if
10427 * reflection.c (mono_image_build_metadata): Emit metadata only for the
10428 current module. Emit the manifest only for the main module.
10430 * reflection.c (mono_image_create_token): Add assertion when a
10431 memberref needs to be created.
10433 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
10435 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
10436 larger buffer for the custom attribute blob. Fixes #50637.
10438 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10440 * threadpool.c: notify listener on async processing handles after
10441 invoking the async callback. Thanks to Zoltan.
10443 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
10445 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
10446 avoid code duplication.
10448 * reflection.h (MonoDynamicImage): New type which is currently unused,
10449 but will be used through the ref.emit code in place of
10450 MonoDynamicAssembly.
10452 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
10455 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
10456 a MonoDynamicImage instead of just a MonoImage.
10458 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
10459 icalls to ModuleBuilder but keep their semantics, so they will work
10460 with moduleb->assemblyb. This will change later.
10462 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
10464 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
10467 * reflection.c (mono_image_build_metadata): Avoid creation of a default
10468 main module, since it is now done by the managed code.
10470 2003-11-03 Martin Baulig <martin@ximian.com>
10472 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
10473 `ginst->klass' here.
10474 (method_encode_methodspec): Don't use the `ginst->generic_method's
10475 klass if it's a generic instance, use `ginst->klass' in this case.
10477 2003-11-03 Martin Baulig <martin@ximian.com>
10479 * reflection.c (mono_image_get_generic_method_param_info):
10480 Removed, use mono_image_get_generic_param_info() instead.
10481 (mono_image_get_type_info): Write the GenericParam table before
10482 the Method table. This is neccessary because in the GenericParam
10483 table, type parameters of the class (ie. '!0' etc.) must come
10484 before the ones from its generic methods (ie. '!!0' etc).
10486 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
10488 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
10490 2003-11-02 Martin Baulig <martin@ximian.com>
10492 * reflection.c (create_generic_typespec): Take a
10493 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
10494 the generic parameters from it.
10496 2003-11-02 Martin Baulig <martin@ximian.com>
10498 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
10499 instead of a `MonoClassField *' since we just need the type.
10500 (create_generic_typespec): New static function. Creates a
10501 TypeSpec token for a generic type declaration.
10502 (mono_image_get_generic_field_token): New static function.
10503 (mono_image_create_token): If we're a FieldBuilder in a generic
10504 type declaration, call mono_image_get_generic_field_token() to get
10507 2003-11-02 Martin Baulig <martin@ximian.com>
10510 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
10511 `MonoReflectionGenericInst *declaring_type' and
10512 `MonoReflectionGenericInst *reflected_type' fields.
10514 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
10515 `MonoReflectionGenericInst *declaring_type' and a
10516 `MonoReflectionGenericInst *reflected_type' argument instead of a
10517 single `MonoReflectionGenericInst *type' one. Set
10518 `res->declaring_type' and `res->reflected_type' from them.
10519 (mono_reflection_inflate_field): Likewise.
10521 2003-11-02 Martin Baulig <martin@ximian.com>
10523 * class.c (mono_class_setup_vtable): Don't store generic methods
10526 2003-11-02 Martin Baulig <martin@ximian.com>
10528 * reflection.h (MonoReflectionGenericInst): Added
10529 `MonoReflectionType *declaring_type'.
10531 * reflection.c (mono_reflection_bind_generic_parameters): Use
10532 `if (tb->parent)' instead of `klass->parent'.
10534 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
10536 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
10537 with an empty ASSEMBLY table.
10539 * reflection.c (mono_image_build_metadata): Avoid using the same loop
10540 variable in the inner and outer loops.
10542 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
10544 * metadata.h (mono_metadata_make_token): Put parentheses around macro
10547 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
10549 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
10550 icalls. Instead, do everything in managed code. This is needed since
10551 it is hard to restore the original domain etc. in unmanaged code in the
10552 presence of undeniable exceptions.
10554 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
10555 New icalls to push and pop appdomain refs.
10557 2003-10-31 Martin Baulig <martin@ximian.com>
10559 * class.c (inflate_generic_type): Renamed to
10560 mono_class_inflate_generic_type() and made it public.
10562 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
10565 * loader.c (mono_field_from_memberref): Also set the retklass for
10568 * fielder.c (mono_image_get_inflated_field_token): New static
10569 method; creates a metadata token for an inflated field.
10570 (mono_image_create_token, fixup_method): Added support for
10571 "MonoInflatedField".
10572 (fieldbuilder_to_mono_class_field): New static function.
10573 (mono_reflection_inflate_field): New public function.
10576 (MonoReflectionGenericInst): Added `MonoArray *fields'.
10577 (MonoReflectionInflatedField): New typedef.
10579 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
10581 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
10582 for Solaris and other platforms without s6_addr16
10584 2003-10-30 Martin Baulig <martin@ximian.com>
10586 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
10587 argument instead of two.
10588 (mono_class_inflate_generic_signature): Likewise.
10589 (inflate_generic_header): Likewise.
10590 (mono_class_inflate_generic_method): Likewise. In addition, if
10591 `ginst->klass' is set, it becomes the new `method->klass'.
10593 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
10596 * reflection.c (encode_generic_method_sig): Write a 0xa as the
10597 first byte. [FIXME]
10598 (method_encode_methodspec): If we have generic parameters, create
10599 a MethodSpec instead of a MethodRef.
10600 (fixup_method): Added support for "MonoInflatedMethod" and
10601 "MonoInflatedCtor".
10602 (mono_image_create_token): Added support for "MonoInflatedMethod"
10603 and "MonoInflatedCtor".
10604 (inflated_method_get_object): New static function; returns a
10605 managed "System.Reflection.MonoInflatedMethod" object.
10606 (mono_reflection_bind_generic_method_parameters): Return a
10607 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
10608 (mono_reflection_inflate_method_or_ctor): Likewise.
10609 (mono_image_get_generic_method_param_info): Initialize unused
10611 (mono_image_get_generic_param_info): Likewise.
10613 * reflection.h (MonoReflectionInflatedMethod): New public
10614 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
10615 "S.R.MonoInflatedCtor" classes.
10617 * loader.c (method_from_memberref): If we're a TypeSpec and it
10618 resolves to a generic instance, inflate the method.
10620 2003-10-28 Dick Porter <dick@ximian.com>
10622 * object.c (mono_runtime_run_main): Convert command-line arguments
10623 into utf8, falling back to the user's locale encoding to do so.
10625 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
10627 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
10630 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
10632 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
10633 up icalls at method definition time. Partially fixes #33569.
10635 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
10637 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
10638 marshalling of arrays. Fixes #50116.
10640 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
10642 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
10643 points to a vtable in the dying appdomain.
10645 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
10646 listeners into unmanaged code inside the lock.
10648 * object.c (mono_class_vtable): Turn off typed allocation in non-root
10649 domains and add some comments.
10651 2003-10-25 Martin Baulig <martin@ximian.com>
10653 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
10655 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
10657 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
10658 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
10659 currently parsing. Create the generic class and store it in
10660 `generic_inst->klass' before parsing the type arguments. This is
10661 required to support "recursive" definitions; see mcs/tests/gen-23.cs
10663 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
10664 to support recursive typespec entries.
10666 * class.c (mono_class_setup_parent): If our parent is a generic
10667 instance, we may get called before it has its name set.
10668 (mono_class_from_generic): Splitted into
10669 mono_class_create_from_generic() and mono_class_initialize_generic().
10671 2003-10-25 Martin Baulig <martin@ximian.com>
10673 * icall.c (ves_icall_Type_BindGenericParameters): Return a
10674 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
10675 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
10676 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
10678 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
10679 (create_typespec): Likewise.
10680 (mono_reflection_bind_generic_parameters): Return a
10681 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
10682 (mono_reflection_inflate_method_or_ctor): New public function.
10684 * reflection.h (MonoReflectionGenericInst): New typedef.
10686 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
10688 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
10689 inside the domain lock. Fixes #49993.
10691 * object.c (mono_class_vtable): When typed allocation is used,
10692 allocate vtables in the GC heap instead of in the mempool, since the
10693 vtables contain GC descriptors which are used by the collector even
10694 after the domain owning the mempool is unloaded.
10696 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
10698 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
10699 reflect what it does. Also invalidate mempools instead of freeing
10700 them if a define is set.
10702 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
10705 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
10706 hold the finalizable objects in this domain.
10708 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
10711 * appdomain.c (mono_domain_set): New function to set the current
10712 appdomain, but only if it is not being unloaded.
10714 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
10715 appdomain which is being unloaded.
10717 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
10718 unloading of the root appdomain.
10720 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
10721 icall to execute a method in another appdomain. Intended as a
10722 replacement for InternalSetDomain, which can confuse the code
10723 generation in the JIT.
10725 * appdomain.c (mono_domain_is_unloading): New function to determine
10726 whenever an appdomain is unloading.
10728 * appdomain.c (mono_domain_unload): New function to correctly unload
10731 * assembly.c (mono_assembly_load_references): Check that an assembly
10732 does not references itself.
10734 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
10735 domain manually, it asks the finalizer thread to do it, then waits for
10736 the result. Also added a timeout.
10738 * icall.c: Register the new icalls.
10740 * threads.h threads.c: Export the mono_gc_stop_world and
10741 mono_gc_start_world functions.
10743 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
10744 function to fill out the mempool with 0x2a.
10746 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
10748 * reflection.h (MonoReflectionMethodAux): New structure to store
10749 information which is rarely used, thus is not in the MonoMethod
10752 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
10753 store the aux info.
10755 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
10756 and marshalling info into the aux structure.
10758 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
10759 from the aux structure.
10761 * loader.c (mono_method_get_param_names): Retrieve the param names from
10764 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
10766 * exception.h exception.c: Add AppDomainUnloadedException && fix
10769 2003-10-21 Dick Porter <dick@ximian.com>
10772 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
10773 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
10775 2003-10-21 Martin Baulig <martin@ximian.com>
10777 * reflection.c (mono_reflection_bind_generic_parameters):
10778 `klass->parent' is NULL for interfaces.
10780 2003-10-21 Martin Baulig <martin@ximian.com>
10782 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10784 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
10786 * exception.c (mono_exception_from_name_msg): New helper function for
10787 creating exceptions and initializing their message field.
10789 * exception.c: Simplify functions using the new helper.
10791 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
10794 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
10795 mono_raise_exception, since otherwise gcc doesn't generate the function
10796 epilog for raise_exception, confusing the stack unwinding in the JIT.
10799 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
10800 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
10803 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10805 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
10808 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
10810 * icall.c: Removed GetUninitializedObject method because
10811 AllocateUninitializedClassInstance does the same.
10813 2003-10-18 Martin Baulig <martin@ximian.com>
10815 * class.c (inflate_generic_signature): Renamed to
10816 mono_class_inflate_generic_signature() and made it public.
10817 (my_mono_class_from_generic_parameter): New static function; if we
10818 don't already have the generic parameter's MonoClass, create a
10819 very simple one which is just used internally in the runtime and
10820 not passed back to managed code.
10822 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
10824 * metadata.h (MonoMethodSignature): Moved the
10825 `MonoGenericParam *gen_params' to the MonoMethodHeader.
10826 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
10828 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
10829 ves_icall_MonoMethod_GetGenericArguments(); this is now an
10830 interncall on the MonoMethod class, not on MethodInfo.
10831 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
10832 calling mono_reflection_bind_generic_method_parameters() directly.
10834 * loader.c (mono_method_get_signature): If this is a MethodSpec;
10835 return the already computed `method->signature'.
10836 (method_from_methodspec): New static function to load a method
10837 from a MethodSpec entry.
10838 (mono_get_method_from_token): Call the new method_from_methodspec()
10839 for MethodSpec tokens.
10840 (mono_get_method_from_token): If we're a generic method, load the
10843 * reflection.c (mono_image_get_memberref_token): Allow
10844 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
10846 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
10847 (mono_image_create_token): First check whether it's a generic
10848 method (so we'd need to create a MethodSpec), then do the other
10850 (mono_reflection_bind_generic_method_parameters): Return a
10851 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
10852 called directly from the interncall.
10854 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
10856 * reflection.c (load_public_key): Move loading of the public key
10859 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
10861 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
10864 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
10865 culture, hash_alg and public_key. Fixes #49555.
10867 2003-10-17 Martin Baulig <martin@ximian.com>
10869 * class.h (MonoGenericInst): Moved this declaration here and added
10870 `MonoMethod *generic_method'.
10873 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
10874 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
10876 * metadata.c (mono_metadata_type_equal): Two types of
10877 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
10878 index; ie. don't compare the address of the `MonoGenericParam'
10880 (mono_metadata_load_generic_params): Removed the `MonoMethod
10883 * metadata.h (MonoGenericInst): Moved declaration to class.h.
10884 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
10886 * reflection.c (method_encode_signature): Encode the number of
10887 generic parameters.
10888 (encode_generic_method_sig): New static function.
10889 (method_encode_methodspec): New static function; creates an entry
10890 in the MethodSpec table for a generic method.
10891 (mono_image_get_methodspec_token): New static function.
10892 (mono_image_create_token): Call mono_image_get_methodspec_token()
10893 for generic methods.
10894 (mono_reflection_bind_generic_method_parameters): New public
10895 function. Instantiates a generic method.
10897 2003-10-16 Martin Baulig <martin@ximian.com>
10899 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
10900 *gen_params' here from MonoMethodHeader.
10902 * metadata.c (mono_metadata_parse_method_signature): If we have
10903 generic parameters, initialize `method->gen_params' and then set
10904 the correct `type->data.generic_param' in all the parameters.
10906 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
10908 * threads.c (mono_threads_get_default_stacksize): New function to
10909 return the default stacksize.
10911 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
10912 termination of the finalizer thread, since the previous method had
10913 race conditions. Fixes #49628.
10915 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
10916 as for the other managed threads.
10918 2003-10-16 Martin Baulig <martin@ximian.com>
10920 * class.c (inflate_generic_signature): Copy `generic_param_count'
10923 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
10926 * metadata.c (mono_metadata_parse_method_signature): Actually set
10927 the `method->generic_param_count' here.
10928 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
10930 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
10932 * object.h: Add a new field to TypedRef to simplify the implementation
10933 of the REFANY opcodes in the JIT.
10935 * icall.c: Make use of the new field.
10937 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
10940 2003-10-15 Martin Baulig <martin@ximian.com>
10942 * class.c (mono_class_from_gen_param): Renamed to
10943 mono_class_from_generic_parameter() and moved most of the
10944 functionality from mono_reflection_define_generic_parameter()
10945 here; ie. we create a "real" class here.
10946 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
10947 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
10948 previously been called.
10950 * class.h (MonoGenericParam): Moved the declaration of this struct
10951 here from metadata.h and added `MonoMethod *method'.
10953 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
10956 * loader.c (mono_get_method_from_token): If we have any generic
10957 parameters, call mono_metadata_load_generic_params() to read them
10958 from the MONO_TABLE_GENERICPAR.
10960 * metadata.c (mono_metadata_load_generic_params): Added
10961 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
10963 * metadata.h (MonoMethodSignature): Replaced
10964 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
10965 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
10967 * reflection.c (mono_reflection_define_generic_parameter): Moved
10968 most of the functionality into the new
10969 mono_class_from_generic_parameter(); set the `method' field if
10970 we're a method parameter.
10972 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
10974 * marshal.c (emit_struct_conv): if native size is 0
10977 2003-10-14 Martin Baulig <martin@ximian.com>
10979 * icall.c: The generics API has changed in the spec since it was
10980 added to System.Type; these modifications make it match the spec
10982 (ves_icall_Type_GetGenericParameters): Renamed to
10983 `ves_icall_Type_GetGenericArguments'.
10984 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
10985 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
10986 `ves_icall_MonoType_get_HasGenericArguments'.
10987 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
10988 `ves_icall_MonoType_get_IsGenericParameter'.
10989 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
10990 this is no interncall anymore.
10991 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
10992 `ves_icall_TypeBuilder_get_IsGenericParameter'.
10994 2003-10-14 Martin Baulig <martin@ximian.com>
10996 * reflection.c (mono_reflection_bind_generic_parameters): Also
10997 inflate generic methods if we're reading the class from IL.
10999 2003-10-13 Martin Baulig <martin@ximian.com>
11001 * reflection.c (mono_reflection_define_generic_parameter): This
11002 method isn't called directly from the icall anymore; take a
11003 `MonoReflectionAssemblyBuilder *' so we can use this for type and
11004 method generic parameters.
11005 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
11006 (method_builder_encode_signature): Encode generic parameters.
11007 (mono_image_get_method_info): Write generic params to the
11008 MONO_TABLE_GENERICPARAM table.
11010 * reflection.h (MonoReflectionMethodBuilder): Added
11011 `MonoArray *generic_params'.
11013 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
11015 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
11016 wrapper for mono_reflection_define_generic_parameter().
11017 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11019 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
11021 * marshal.h: Add missing function to fix build.
11023 * marshal.c (mono_marshal_get_native_wrapper): Add support for
11024 the SetLastError pinvoke attribute.
11026 * marshal.c (mono_marshal_set_last_error): New helper function called
11027 by the generated code.
11029 * marshal.c (mono_mb_emit_branch): New helper function.
11031 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
11033 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
11034 classes as parameters and return values of delegates. Fixes #29256.
11036 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
11038 * locales.c: use gint32 in non HAVE_ICU case
11040 2003-10-11 Martin Baulig <martin@ximian.com>
11042 * mono-debug.c (mono_debug_add_method): Added a workaround for
11045 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
11047 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
11048 delegates passed to native code must use the STDCALL calling
11049 convention. Fixes #35987.
11051 2003-10-10 Martin Baulig <martin@ximian.com>
11053 * class.c (inflate_generic_type): If we're inflating for a generic
11054 type instance (and not for a generic method), return
11055 MONO_TYPE_MVAR unchanged.
11057 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11059 * string-icalls.c: Join ignores null strings in the source array.
11060 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
11061 * threads.c: GetAvailableTheads is slightly more accurate.
11063 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
11065 * threads.h threads.c : add mono_threads_set_default_stacksize
11066 and pass default to CreateThread calls.
11068 2003-10-09 Dick Porter <dick@ximian.com>
11072 * locales.c: Internal calls for constructing CultureInfo and
11073 related objects from libicu (if its available.)
11075 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
11077 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
11079 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11081 * threadpool.c: added an argument to async_invoke_thread that is the
11082 item to process, pass the MonoAsyncResult to the thread start function
11083 when creating a new thread. This way we don't need to acquire any lock
11084 when we're creating a new thread. Readded a semaphore for faster
11085 response times (instead of that Sleep i added).
11087 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
11089 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
11090 get daylight change dates better on Windows, fix handling
11091 of platforms without tm_gmtoff.
11093 2003-10-06 Martin Baulig <martin@ximian.com>
11095 * class.c (inflate_generic_method): Renamed to
11096 mono_class_inflate_generic_method() and made public.
11097 (mono_class_init): Don't inflate the generic methods here.
11098 (mono_class_from_generic): Added `gboolean inflate_methods'
11099 argument. Inflate the methods here.
11101 * loader.c (mono_method_get_param_names): Ignore instances of
11102 generic types for the moment.
11104 * reflection.c (fixup_method): Added support for inflated methods.
11105 (mono_image_create_token): Use mono_image_get_methodref_token()
11106 for inflated methods.
11107 (mono_custom_attrs_from_param): Ignore instances of generic types
11109 (mono_reflection_bind_generic_parameters): New public function.
11110 Moved all the functionality from
11111 ves_icall_Type_BindGenericParameters() here and added support for
11113 (mono_reflection_define_generic_parameter): Initialize
11114 `klass->methods' here.
11116 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
11117 functionality into mono_reflection_define_generic_parameter().
11118 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
11119 TypeBuilder, return that TypeBuilder.
11121 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11123 * appdomain.c: removed mono_delegate_semaphore.
11126 (mono_thread_pool_add): moved hash table creation inside and the thread
11127 creation outside of the critical region.
11128 (mono_thread_pool_finish): removed obsolete code.
11129 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
11130 continue or exit the thread depending on the queue.
11132 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
11134 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
11135 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
11136 handle more bool marshalling options
11138 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
11140 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
11141 arrays of structs. Also add a more descriptive error message when
11142 a structure member is marshalled as LPArray.
11144 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
11146 * marshal.c (mono_marshal_get_native_wrapper): Add support for
11147 marshalling arrays of complex types. Fixes #29098. Also remove an
11148 usused and incomplete function.
11150 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
11152 * gc.c: report heap_size - free_bytes as total memory allocated
11155 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
11157 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
11158 fix timezone handling problems on Windows.
11160 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
11161 asserts when the year is outside the range handled by ms the functions.
11163 * class.c (setup_interface_offsets): If the class is an interface,
11164 fill out its interface_offsets slot.
11166 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11168 * threadpool.c: mark threadpool threads as background.
11170 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
11172 * decimal.c - define DECINLINE to nothing if not using GCC
11174 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
11176 * assembly.c: More refcount fixes.
11178 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11180 * string-icalls.c: if we're not trimming, return the same string.
11181 When not splitting, don't create a new string.
11183 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11186 (mono_image_open): increment the ref_count inside the critical section.
11188 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
11190 * image.c (mono_image_open): Fix reference counting bug.
11192 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
11194 * marshal.c (mono_marshal_type_size) struct alignment changed for
11195 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
11196 64bits. Avoid leak in mono_marshal_get_native_wrapper when
11197 mono_lookup_pinvoke_call throws.
11199 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
11201 * reflection.c (mono_reflection_parse_type): Fix #49114.
11203 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
11204 temporary workaround for cygwin header problem.
11206 * object.c (mono_object_isinst): Synchronize this with the code
11207 generated by the JIT for casts.
11209 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
11211 * reflection.c (encode_type): Fix #38332.
11213 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
11215 * marshal.c (mono_marshal_method_from_wrapper): New function to return
11216 the original method from the wrapper method.
11218 2003-09-25 Martin Baulig <martin@ximian.com>
11220 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
11221 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
11222 (ves_icall_Type_get_IsGenericInstance): New interncall.
11224 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
11226 * object.c: fix cast warning in big endian code.
11228 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
11230 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
11232 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11234 * assembly.c: don't call check_env from mono_assembly_load. It's
11235 already done once in mono_assemblies_init and may cause headaches when
11236 multiple threads are loading assemblies.
11238 2003-09-19 Martin Baulig <martin@ximian.com>
11240 * reflection.c (mono_reflection_define_generic_parameter): Don't
11241 allocate `klass->methods', set `klass->flags' to
11242 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
11244 2003-09-18 Martin Baulig <martin@ximian.com>
11246 * class.c (mono_class_init): Don't create `class->methods' if it's
11247 already initialized.
11249 * metadata.c (mono_metadata_load_generic_params): Make this
11252 * reflection.c (mono_reflection_define_generic_parameter): Set
11253 parent class and interfaces from the constraints.
11255 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
11256 to keep this struct in sync with the declaration in TypeBuilder.cs.
11258 2003-09-17 Martin Baulig <martin@ximian.com>
11260 * metadata.h (MonoType): Replaced the data's `int type_param'
11261 field with `MonoGenericParam *generic_param'.
11262 (MonoGenericParam): Added `MonoClass *klass'.
11264 * class.c (mono_class_from_gen_param): Removed the
11265 `MonoImage *image' and `int type_num' arguments.
11267 * metadata.c (mono_metadata_parse_generic_param): New static
11268 method; creates a MonoGenericParam which just contains the index.
11269 (do_mono_metadata_parse_type): Call
11270 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
11273 * reflection.c (mono_image_typedef_or_ref): Generic type
11274 parameters may be in the same assembly, but never use a typedef
11276 (mono_reflection_define_generic_parameter): We're now creating a
11277 "real" class for the type parameter; it's now safe to call
11278 mono_class_from_mono_type() on the class'es type, it'll do the
11281 2003-09-16 Martin Baulig <martin@ximian.com>
11283 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
11284 `symfile->range_entry_size' and `symfile->class_entry_size' here;
11285 the `symfile' data structure must be fully initialized before it
11286 gets added to the table.
11288 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
11290 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
11292 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
11293 class init trampolines.
11295 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
11297 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
11298 to the built-in profiler to turn off time and allocation profiling
11301 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
11303 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
11306 * debug-helpers.c (mono_method_full_name): Print the wrapper type
11307 in human readable form.
11309 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
11311 * reflection.c icall.c: Fixed warnings.
11313 * image.c (load_class_names): Use a temporary hash table to hold the
11314 namespaces in order to avoid doing many string comparisons.
11316 * image.h: Fix typo.
11318 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
11319 Pass NULL instead of g_direct_equal to the GHashTable constructor
11320 since the NULL case is short-circuited inside g_hash_table_lookup,
11321 leading to better performance.
11323 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
11324 obtain the first custom attribute for a given index. Depends on the
11325 CustomAttribute table being sorted by the parent field.
11327 * reflection.c (mono_custom_attrs_from_index): Use the new function
11328 for better performance.
11330 2003-09-07 Martin Baulig <martin@ximian.com>
11332 * class.c (mono_class_init): If we're a generic instance, inflate
11333 all our methods instead of loading them from the image.
11334 (mono_class_from_generic): Set `class->methods = gklass->methods'.
11336 2003-09-07 Martin Baulig <martin@ximian.com>
11338 * mono-debug-debugger.c: Added support for constructors.
11340 2003-09-06 Martin Baulig <martin@ximian.com>
11342 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
11345 * reflection.c (mono_reflection_setup_generic_class): Call
11346 ensure_runtime_vtable() to create the vtable.
11348 2003-09-05 Martin Baulig <martin@ximian.com>
11350 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
11353 2003-09-04 Martin Baulig <martin@ximian.com>
11355 * reflection.c (mono_reflection_define_generic_parameter): Generic
11356 parameters start with zero.
11358 2003-09-04 Martin Baulig <martin@ximian.com>
11360 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11362 * reflection.h (MonoReflectionGenericParam): New typedef.
11363 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
11364 the generic parameters from the managed TypeBuilder.
11366 * reflection.c (mono_reflection_define_generic_parameter): New function.
11367 (mono_reflection_create_runtime_class): Encode generic parameters.
11368 (mono_reflection_setup_generic_class): New function; this is
11369 called after adding adding all generic params to the TypeBuilder.
11370 (encode_type): Added MONO_TYPE_VAR.
11372 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
11374 * class.h class.c (mono_class_needs_cctor_run): Moved this method
11377 * assembly.h assembly.c: Moved the AOT loading code into an assembly
11380 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
11382 * reflection.h reflection.c class.h class.c: Delete duplicate
11383 definition of mono_type_get_name () from reflection.c and export the
11386 * class.c: Class loading fixes from Bernie Solomon
11387 (bernard@ugsolutions.com).
11389 * reflection.c: Endianness fixes from Bernie Solomon
11390 (bernard@ugsolutions.com).
11392 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
11394 * assembly.h assembly.c: Define a file format version for AOT
11397 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
11399 * appdomain.h (MonoJitInfo): New field to determine whenever the
11400 code is domain neutral.
11402 2003-08-31 Miguel de Icaza <miguel@ximian.com>
11404 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
11406 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
11408 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
11409 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
11410 Avoid caching the result since strings must be domain specific. Fixes
11413 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
11415 * marshal.c (mono_marshal_init): Make this callable multiple times
11416 since it is hard to find a correct place to call it.
11418 * object.c (mono_runtime_class_init): Execute static constructors in
11419 the correct appdomain.
11421 * image.c (build_guid_table): Handle the case when multiple images have
11424 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11426 * icall.c: added a couple of icalls for System.Web.
11428 2003-08-28 Martin Baulig <martin@ximian.com>
11430 * icall.c (ves_icall_Type_BindGenericParameters): Use
11431 `klass->generic_inst' instead of `&klass->byval_arg' in the
11432 mono_type_get_object() call. The returned type must be
11433 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
11435 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
11439 * object.c (mono_class_proxy_vtable): Make it thread safe.
11441 * pedump.c: Fix warning.
11443 * object.c appdomain.h: Get rid of metadata_section.
11444 It is no longer needed and it was causing deadlocks with domain->lock.
11446 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
11448 2003-08-26 Martin Baulig <martin@ximian.com>
11450 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
11452 2003-08-26 Martin Baulig <martin@ximian.com>
11454 * pedump.c (main): Call mono_metadata_init(),
11455 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
11456 and mono_loader_init().
11458 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
11460 * loader.h: Add missing include to fix build.
11462 * image.h: mono_image_load_references is no more.
11464 * assembly.c: Reworked assembly loading to make it really thread safe.
11465 After these changes, the assembly returned by mono_assembly_open is
11466 fully initialized, i.e. all its references assemblies are loaded.
11468 * assembly.c (mono_image_load_references): Renamed to
11469 mono_assembly_load_references, and made private, since clients no
11470 longer need to call it.
11472 * class.c: Removed calls to mono_assembly_load_references, since it was
11473 a source of deadlocks.
11475 * loader.h loader.c class.h class.c: Protect data structures using a
11476 new lock, the loader lock.
11478 * class.c (mono_class_setup_vtable): Create temporary hash tables and
11479 GPtrArrays only when needed.
11481 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
11482 into empty structures by mcs. Fixes pinvoke7.cs.
11484 * domain.c (mono_init): Call a new initialization function.
11486 * appdomain.c (mono_runtime_init): Call the new initializer function
11487 of the marshal module.
11489 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
11490 inserted into empty structures by mcs. Fixes pinvoke7.cs.
11492 * marshal.h marshal.c: Added locks around the wrapper caches to make
11493 this module thread safe.
11495 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
11496 this argument. Fixes pinvoke1.exe.
11498 2003-08-25 Lluis Sanchez <lluis@ximian.com>
11500 * object.h: Added call_type field to MonoMethodMessage and the corresponding
11501 enumeration of values. Removed fields to store remote call output values in
11502 MonoAsyncResult. Not needed any more.
11503 * object.c: Initialize call_type and async_result fields in mono_message_init.
11504 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
11505 dispatching the message.
11506 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
11507 async call to finish. To do it use a message with EndInvoke call type.
11509 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
11511 * loader.h loader.c (mono_method_hash_marhal_info): New function which
11512 determines whenever a method has marshalling info.
11514 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11516 * assembly.c: fix the build on windows.
11518 2003-08-22 Lluis Sanchez <lluis@ximian.com>
11520 * object.cs: Fixed bug #47785.
11522 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
11524 * string-icalls.c (StringReplace): If their are no occurances of
11525 the old string found return a reference to the supplied
11526 string. This saves some memory and matches MS behavoir.
11528 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11530 * socket-io.c: fixed compilation for systems that define AF_INET6
11531 and don't define SOL_IP/SOL_IPV6.
11533 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
11535 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
11536 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
11538 * rawbuffer.c rawbuffer.h: Make this module thread safe.
11540 * domain.c: Make this module thread safe.
11542 * domain.c (mono_init): Call new initialization function.
11544 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
11545 reference types too. Fixes #38812.
11547 * image.c (mono_image_init): Fixed warnings.
11549 * class.c (mono_class_from_typeref): Handle assembly load failure
11552 * appdomain.c (add_assemblies_to_domain): Handle the case when
11553 the references of an assembly are not yet loaded.
11555 * metadata.c image.c assembly.c: Moved initialization of global
11556 variables to a separate function called at startup since lazy
11557 initialization of these variables is not thread safe.
11559 * image.c assembly.c: Made this module thread safe by adding locks in
11560 the appropriate places.
11562 * domain.c (mono_init): Call the new initialization functions of the
11565 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
11567 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
11568 make a direct call. It is proxy's work to make the call asynchronous.
11569 mono_delegate_end_invoke(): If the targe is a proxy, just collect
11571 * object.cs: mono_method_call_message_new(): read AsyncResult and
11572 state object from parameters list, if this info is requested.
11573 * object.h: Added fields to store remote call output values in
11574 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
11576 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11578 * object.h: add needed fields to MonoThread.
11579 * threads.c, threads.h: allow registering a function to cleanup data
11580 allocated per thread by the JIT.
11582 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11584 * loader.h: portability fix by Bernie Solomon
11585 * <bernard@ugsolutions.com>.
11587 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
11589 * reflection.h reflection.c (mono_param_get_objects): Changed this to
11590 return a MonoArray. This simplifies the code and also ensures that
11591 the cache allways contains an object reference as a value.
11593 * icall.c (ves_icall_get_parameter_info): Simplified using the new
11596 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11598 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
11599 fixes a problem with byte ordering when getting the address family for
11602 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
11604 * .cvsignore: Added monosn.
11606 * reflection.h reflection.c loader.c: Added support for parameter
11607 marshalling to dynamically created types. Fixes #47295.
11609 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
11611 * rand.c: remove useless warnings.
11613 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11615 * class.c: implemented ldtoken for methods and fieldrefs.
11617 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11619 * threadpool.c: when mono_async_invoke was called, no one took care of
11620 monitoring the queue. So if the method invoked took some time and we
11621 got new async invoke requests after 500 ms (the thread created waited
11622 that long in WaitForSingleObject), the new async invoke was not called
11623 until the previous one finished.
11625 This is fixed now. Thanks to Totte for helping with it.
11627 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11629 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
11631 2003-08-11 Martin Baulig <martin@ximian.com>
11633 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
11635 2003-08-06 Martin Baulig <martin@ximian.com>
11637 * mono-debug-debugger.c: Added support for static fields,
11638 properties and methods.
11640 2003-08-06 Martin Baulig <martin@ximian.com>
11642 * mono-debug-debugger.c: Don't store the MonoString's vtable to
11643 make this work for applications with multiple application domains.
11645 2003-08-04 Martin Baulig <martin@ximian.com>
11647 * mono-debug-debugger.c: Completely reworked the type support; the
11648 most important thing is that we're now just using one single
11649 `MonoType' instance per type.
11651 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
11653 * mono-endian.h, mono-endian.c, icall.c: Added icall
11654 ves_icall_System_Double_AssertEndianity to assert double word endianity
11655 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
11657 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11659 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
11660 support, icalls and fixes.
11662 2003-07-31 Miguel de Icaza <miguel@ximian.com>
11664 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
11665 classes that are a punctuation character in .NET is not the same a
11668 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11670 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
11672 2003-07-29 Miguel de Icaza <miguel@ximian.com>
11674 * icall.c: Add new MemCopy internalcall.
11675 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
11676 Simplified code; It is not necessary to handle all the cases here,
11677 as the C# code takes care of it. Only handle the case of the name
11678 resource embedded into the assembly.
11680 Changed signature to return the data pointer and the size of the
11683 2003-07-26 Miguel de Icaza <miguel@ximian.com>
11685 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
11686 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
11688 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
11690 * socket-io.c: ignore EINTR error in select.
11692 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
11694 * class.h, class.c: removed unused subclasses field in MonoClass.
11696 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
11698 * icall.c: improve fix of get_base_definition(). If the parent class
11699 doesn't have the mehod, look at the parent of the parent.
11700 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
11701 to check if a parameter is an in or out parameter
11702 (PARAM_ATTRIBUTE_IN is not set by default).
11703 mono_method_return_message_restore(): Use mono_class_value_size to
11704 get the size of a value type. mono_type_stack_size (parameterType)
11705 does not return the correct value if parameterType is byRef.
11706 mono_load_remote_field(), mono_load_remote_field_new(),
11707 mono_store_remote_field(), mono_store_remote_field_new():
11708 raise exception if the remote call returns an exception.
11710 2003-07-28 Martin Baulig <martin@ximian.com>
11712 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
11713 method. This is a wrapper around mono_runtime_invoke() which
11714 boxes the instance object if neccessary.
11716 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11718 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
11719 metadata.h, row-indexes.h, verify.c: first cut of generics support.
11721 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11723 * icall.c: disable mcs bug workaround.
11725 2003-07-21 Miguel de Icaza <miguel@ximian.com>
11727 * object.c (mono_runtime_class_init): Take the metadata_section
11728 mutex before obtaining the domain mutex.
11730 * appdomain.h: Added definition of metadata_section mutex here.
11732 * object.c: define metadata_mutex here.
11734 2003-07-24 Ravi Pratap <ravi@ximian.com>
11736 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
11739 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
11741 * reflection.c: Fix bug #46669
11743 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11748 * object.h: fill in the type name for TypeLoadException.
11750 2003-07-23 Ravi Pratap <ravi@ximian.com>
11752 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
11753 relationship between TypeBuilders while compiling corlib) and bug
11754 45993 (Array types returned from the runtime while compiling
11755 corlib were from the loaded corlib).
11757 2003-07-22 Martin Baulig <martin@ximian.com>
11759 * mono-debug-debugger.c: Reworked the type support a bit more;
11760 distinguish between types and classes.
11762 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
11764 * icall.c: add IsArrayImpl icall.
11766 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
11768 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
11769 initializing real_size only once. Also fix bug #46602.
11771 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
11773 * object.c: Renamed mono_metadata_section to metadata_section.
11775 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
11777 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
11778 empty array if the type is an array. Fixed.
11779 ves_icall_MonoMethod_get_base_definition: if the base method
11780 is abstract, get the MethodInfo from the list of methods of
11782 * reflection.c: ParameterInfo.PositionImpl should be zero-based
11783 and it was 1-based. Fixed in mono_param_get_objects.
11785 2003-07-20 Martin Baulig <martin@ximian.com>
11787 * mono-debug.h: Set version number to 31.
11788 (mono_debug_init): Added `MonoDomain *' argument.
11790 * mono-debug-debugger.c: Reworked the type support; explicitly
11791 tell the debugger about builtin types; pass the `klass' address to
11794 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
11796 * image.c: Allow new metadata tables to be loaded without a
11797 warning. Also update the warning message to give the new constant value.
11799 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
11801 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
11802 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
11803 array type representation changes.
11805 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
11807 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
11808 on Environment.Exit () call.
11810 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11812 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
11813 requires a matching corlib.
11815 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
11817 * Changelog: My editor decided to add a CR to each line. Sorry about that.
11818 Committed again without the CRs.
11820 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
11822 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
11823 getting it from the "this" socket instance. Did not work
11824 if the socket is a subclass of Socket.
11825 Also fixed bug #35371.
11827 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
11829 * metadata.c: fixed size for TypedByRef.
11830 * loader.c: when searching for a method, consider the vararg amrker.
11831 * unicode.c, decimal.c: constify some arrays.
11833 2003-07-15 Dick Porter <dick@ximian.com>
11835 * socket-io.c: Fixed compilation for gcc < 3.2.
11837 Fixed compilation for machines that don't have AF_INET6 (thanks to
11838 Bernie Solomon <bernard@ugsolutions.com> for that part.)
11840 Fixed compile warnings.
11842 Fixed formatting and line endings.
11844 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
11847 * socket-io.c: Added IPv6 support.
11849 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
11851 * class.c (mono_class_is_assignable_from): New function to implement
11852 the is_assignable_from logic. Used by mono_object_isinst,
11853 Type::IsAssignableFrom () and the interpreter.
11855 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
11856 Object, even interfaces.
11858 * object.c (mono_object_isinst): Implement in terms of
11859 is_assignable_from.
11861 * icall.c (ves_icall_type_is_assignable_from): New icall.
11863 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
11865 * domain.c (foreach_domain): fix compiler warning.
11867 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
11869 * image.c (load_metadata_ptrs): use g_strndup because strndup is
11870 not available on all plattforms
11872 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
11874 * image.h image.c: Store the metadata version string in MonoImage.
11875 * icall.c: New icall to retrieve the image version.
11876 * reflection.c (create_dynamic_image): Fill in the image version field
11877 * reflection.c (build_compressed_metadata): Use the image version
11878 from the image structure.
11880 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11882 * appdomain.c: modified comment.
11883 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
11884 That will be its last iteration when mono_gc_cleanup is called from
11885 mono_runtime_cleanup and before the domain is unloaded.
11889 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
11891 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
11894 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11896 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
11897 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
11898 Bernie Solomon <bernard@ugsolutions.com>.
11900 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
11902 * object.c, object.h: provide mono_object_new_fast() for faster
11903 allocation in some special cases.
11905 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
11907 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
11908 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
11910 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
11912 * threadpool.c: fix leaks.
11914 2003-07-01 Dick Porter <dick@ximian.com>
11916 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
11917 using MonoGHashTables. Fixes threadpool bug posted to list.
11919 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
11921 * image.h, image.c: added support to load an assembly from a byte array.
11922 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
11923 assembly bundle support.
11925 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
11927 * threadpool.c (mono_thread_pool_add): keep a reference to the
11928 AsyncResult to prevent GC
11930 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
11932 * class.c: leak fix.
11934 2003-06-25 Dick Porter <dick@ximian.com>
11936 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
11937 for the async object, the WaitHandle object will close the handle.
11940 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
11942 * class.c: in mono_array_class_get (), lookup from the hash with the
11943 same type we insert: this works around a bug in
11944 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
11945 lluis. The real fix will have to wait for after the release.
11947 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11949 * icall.c: fix memory leak when getting type members.
11951 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
11953 * reflection.c: added more pubtoken special cases.
11955 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
11957 * class.c: handle field offset correctly when class size
11958 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
11960 2003-06-20 Martin Baulig <martin@ximian.com>
11962 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
11965 2003-06-20 Martin Baulig <martin@ximian.com>
11967 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
11969 2003-06-20 Martin Baulig <martin@ximian.com>
11971 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
11972 just distinguish between variables in registers and variables at
11973 an offset relative to a register.
11975 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11977 * icall.c: #ifdef out latest changes until mcs is fixed.
11979 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11981 * icall.c: return members in metadata order.
11983 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
11985 * icall.c: avoid infinite loop in GetTimeZoneData.
11987 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
11989 * icall.c: added Marshal.Prelink/All icalls.
11991 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
11993 * object.c, object.h: fix warnings and do some overflow checking
11994 when creating arrays.
11996 2003-06-17 Dick Porter <dick@ximian.com>
11999 * file-io.c: File attributes need to be tweaked slightly when
12000 passed from the managed to the w32 world.
12002 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
12003 * profiler.h profiler-private.h profiler.c: Rework last patch
12004 based on suggestion by Paolo.
12006 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
12008 * profiler.h profiler-private.h profiler.c: Added infrastructure for
12009 instruction level coverage data collection.
12010 * profiler.h profiler.c (: Added new callback function which can be
12011 used by the profiler to limit which functions should have coverage
12013 * profiler.c (mono_profiler_load): Call g_module_build_path to
12014 generate the file name of the profiler library.
12016 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12018 * profiler.c, profiler.h, profiler-private.h: added basic block
12019 coverage profiling API.
12021 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
12023 * reflection.c (mono_reflection_create_runtime_class): Add support
12024 for events in dynamically generated code.
12026 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
12029 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12031 * icall.c: when getting timezone info, return reasonable values if we
12032 can't get the actual data.
12034 2003-06-14 Dick Porter <dick@ximian.com>
12036 * threads.c (start_wrapper): Remove the reference to the thread
12037 object in the TLS data, so the thread object can be finalized.
12038 This won't be reached if the thread threw an uncaught exception,
12039 so those thread handles will stay referenced :-( (This is due to
12040 missing support for scanning thread-specific data in the Boehm GC
12041 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
12043 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
12045 * reflection.c: ensure streams and tables are first allocated with
12046 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
12048 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12050 * icall.c: fixed GetElementType for byrefs (bug# 44792).
12052 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
12054 * reflection.c (mono_reflection_create_runtime_class): Add support for
12055 properties to dynamically created classes.
12056 * reflection.c: Fix a few places where non-MonoObjects were inserted
12057 into the tokens hashtable.
12059 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12061 * object.c: some support to handle out of memory exceptions.
12063 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
12065 * marshal.c (mono_marshal_get_native_wrapper): support reference
12068 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12070 * object.h, object.c: more portability stuff from Bernie Solomon.
12071 Unexport mono_object_allocate(). Added mono_object_unbox ().
12072 Set exitcode when an unhandled exception is thrown.
12074 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
12076 * marshal.c (mono_marshal_get_native_wrapper): use custom
12077 marshaler for return types.
12079 2003-06-10 Dick Porter <dick@ximian.com>
12081 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
12082 ip_mreq is available
12084 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
12086 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
12087 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
12088 by Bernie Solomon <bernard@ugsolutions.com>.
12090 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
12092 * gc.c (mono_gc_init): Avoid error message on shutdown when
12093 GC_DONT_GC=1 is used.
12095 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
12096 New icall to return the GUID of a module.
12098 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12100 * class.c: ensure instance size always includes the parent's size
12101 even whem class size is set explicitly (fixes bug#44294).
12103 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12105 * profiler.h, profiler.c: made the simple profiler thread-safe,
12106 get more accurate timing info. Allow the loading of an
12107 externally-developed profiler module.
12109 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
12111 * marshal.c (mono_marshal_get_native_wrapper): improved
12112 class/byref arguments.
12113 (mono_marshal_get_native_wrapper): better string marshaling support.
12115 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12117 * class.c: ensure .pack and .size are handled correctly and
12118 simplified layout of static fields.
12120 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
12123 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
12125 * loader.c (mono_lookup_pinvoke_call): look for modules in the
12126 current directory (fix bug 44008)
12128 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
12130 * marshal.c (mono_marshal_get_native_wrapper): started support for
12132 (mono_delegate_to_ftnptr): consider marshalling specifications
12134 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12136 * reflection.c, reflection.h: emit custom marshal info.
12138 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12140 * object.c: free the GError.
12141 * icall.c: added CloseEvent_internal.
12143 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
12146 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
12148 * loader.c (mono_method_get_signature): Add support for dynamic
12151 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12153 * reflection.c: fixed bug #43905.
12155 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12157 * class.c, domain.c, icall.c, metadata.h, object.h: support for
12158 handling TypedReference and ArgIterator.
12159 * loader.c, loader.h: added function to get signature at call site.
12161 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12163 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
12164 data readonly. Buglets and warning fixes. Some MethodSpec support.
12166 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12168 * class.h, class.c, object.c: remove relative numbering support.
12170 2003-05-26 Miguel de Icaza <miguel@ximian.com>
12172 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
12173 free the string, until we get a chance to fix Gtk#
12175 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12177 * marshal.c: revert last patch.
12179 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12181 * icall.c: updates for new mono_class_vtable() not calling
12182 the type constructor anymore.
12184 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12186 * object.h, object.c: separate vtable creation from type
12187 initialization. Make running the .cctor thread safe.
12189 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
12191 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
12193 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
12195 * loader.c (mono_get_method): consider calling convention
12197 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
12199 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
12200 to return the invisible global type for a module.
12202 * reflection.c (mono_image_build_metadata): Emit global fields too.
12204 2003-05-20 Peter Williams <peterw@ximian.com>
12206 * loader.c (mono_lookup_internal_call): Add a few newlines.
12208 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
12210 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
12213 * appdomain.c (set_domain_search_path): Recalculate search path when
12214 AppDomainSetup.PrivateBinPath changes.
12216 * object.c (mono_class_compute_gc_descriptor): It turns out some
12217 parts of the class libs (like System.Thread) holds pointers to
12218 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
12219 to treat native int a pointer type here.
12221 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
12223 * appdomain.h, domain.c: add hashtable for jump target resolution.
12225 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
12227 * reflection.h reflection.c icall.c: Added new icalls
12228 GetManifestResourceInfoInternal, GetModulesInternal and support
12231 2003-05-16 Dick Porter <dick@ximian.com>
12235 * file-io.c: Implement System.IO.MonoIO::GetTempPath
12237 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
12239 * object.c: mono_store_remote_field: little fix to previous patch.
12241 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12243 * class.c: add constructors to array classes.
12244 * icall.c: special case array construction for InternalInvoke (),
12246 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
12248 * class.h class.c reflection.c object.c: Added support for field
12249 defaults in dynamically generated classes.
12251 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12253 * reflection.c: properly encode charset for ddlimport.
12255 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
12257 * threads.c: allow compiling without GC.
12259 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12261 * appdomain.h, object.c, object.h, threads.c, threads.h: added
12262 handling of thread static data.
12264 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12266 * reflection.h, reflection.c: added mono_custom_attrs_free ().
12268 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
12270 * class.c (mono_array_class_get): always set the serializable flags
12271 (mono_array_class_get): always set the SEALED attribute for array types
12273 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
12275 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
12276 attributes (fix for bug 42021).
12278 2003-05-12 Dick Porter <dick@ximian.com>
12280 * gc.c: Don't run finalizers when the finalizer thread is
12281 finishing up, because the default domain has already been
12284 2003-05-11 Miguel de Icaza <miguel@ximian.com>
12286 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
12287 value is null, we should throw an exception. This is slightly
12288 different than the other conventions used for the constructor.
12290 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12292 * socket-io.c: fixed windows build.
12294 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12296 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
12298 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
12300 * object.c (mono_string_new_wrapper): Compatibility fix for MS
12303 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
12305 * class.c (mono_class_layout_fields): Add experimental GC aware
12306 auto layout facility. Requires class library changes to work correctly.
12308 (mono_class_setup_vtable): Avoid overriding explicit interface
12309 method implementations. Fixes iface3.exe test.
12311 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
12313 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
12314 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
12316 * metadata.h: Add new type classification macro which determines
12317 whenever the type holds an object reference.
12319 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
12321 * marshal.c (mono_marshal_get_native_wrapper): cleanups
12323 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
12325 * gc.c (finalizer_thread): Work around a GC bug.
12327 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
12329 * marshal.c (emit_struct_conv): allow unions
12331 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
12333 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
12335 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
12337 2003-05-06 Martin Baulig <martin@ximian.com>
12339 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
12341 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12344 (Select_internal): allow NULLs, don't create arrays if not needed.
12345 Coupled with Socket.cs changes.
12348 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
12349 register a finalizer for it that will close the semaphore handle. This
12350 fixes the leak and make Lupus' test run with > 4080 loops.
12352 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
12354 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
12355 Jerome Laban (bug #42287)
12357 2003-05-02 Martin Baulig <martin@ximian.com>
12359 * debug-mono-symfile.h
12360 (MonoSymbolFile): Moved declaration into mono-debug.h.
12361 (MonoDebugMethodJitInfo): Likewise.
12362 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
12364 (_mono_debug_address_from_il_offset): Take a
12365 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
12368 (MonoDebugDomainData): New struct.
12369 (mono_debug_get_domain_data): New function.
12370 (mono_debug_add_method): Take an additional `MonoDomain *'
12372 (mono_debug_source_location_from_address): Likewise.
12373 (mono_debug_il_offset_from_address): Likewise.
12374 (mono_debug_address_from_il_offset): Likewise.
12376 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
12378 * reflection.c: one more check for null type in custom attrs.
12380 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12382 * reflection.c: avoid warning (comparison is always false due to limited
12383 range of data type).
12385 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12387 * icall.c: throw an exception in Type.GetField if the argument 'name'
12390 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
12392 * reflection.c: fixed handling of enums in named arguments to custom
12393 attributes (bug #42123).
12395 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12397 * reflection.c: use the right array element type and handle
12398 a null for a Type argument, too.
12400 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
12402 * reflection.c: handle arrays as arguments to custom attributes.
12404 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12406 * reflection.c: handle a string value in a custom attr
12407 ctor that takes an object.
12409 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
12411 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
12414 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
12416 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
12418 2003-04-27 Martin Baulig <martin@ximian.com>
12420 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
12421 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
12422 MONO_DEBUGGER_EVENT_BREAKPOINT.
12423 (mono_breakpoint_trampoline_code): Removed.
12424 (mono_debugger_event_handler): The last argument is now a
12426 (mono_debugger_insert_breakpoint_full): Removed the
12427 `use_trampoline' argument.
12428 (mono_debugger_method_has_breakpoint): Likewise.
12429 (mono_debugger_trampoline_breakpoint_callback): Renamed to
12430 mono_debugger_breakpoint_callback(); take the method and
12431 breakpoint number as arguments.
12433 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12435 * metadata.c: fix off by one when loading parameters attributes.
12437 2003-04-24 Martin Baulig <martin@ximian.com>
12439 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
12441 2003-04-24 Martin Baulig <martin@ximian.com>
12443 * mono-debug-debugger.c: Moved all code which interacts with the
12444 Mono Debugger here.
12446 * debug-mono-symfile.c: This code now just deals with the symbol
12447 file itself, the debugger code is now in mono-debug-debugger.c.
12449 2003-04-23 Martin Baulig <martin@ximian.com>
12451 * mono-debug.c (mono_debug_source_location_from_il_offset):
12452 New method; like mono_debug_source_location_from_address(), but
12453 takes an IL offset instead of a machine address.
12455 2003-04-23 Martin Baulig <martin@ximian.com>
12457 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
12458 `line' field; this is now computed by the debugger.
12460 2003-04-23 Martin Baulig <martin@ximian.com>
12462 * mono-debug.[ch]: New files. This is the new debugging interface.
12464 * mono-debug-debugger.[ch]: New files. Moved all code which
12465 interacts with the Mono Debugger here.
12467 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
12469 * domain.c (mono_init): initialize mono_defaults.monitor_class
12471 2003-04-21 Miguel de Icaza <miguel@ximian.com>
12473 * reflection.c (method_encode_code): Add a spicy exception to help
12474 future compiler authors.
12476 2003-04-21 Martin Baulig <martin@ximian.com>
12479 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
12480 Make this work with relative pathnames; g_filename_to_uri() needs
12481 an absolute filename.
12483 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
12485 * icall.c: Track name changes in Object and ValueType.
12487 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
12489 * metadata.c (mono_type_stack_size): size should be a multiple of
12492 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12495 (internal_domain_finalize): moved into mono_domain_finalize. No need
12496 to create another thread because the finalizers will be run in the
12499 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
12500 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
12501 to be run (MS does this too).
12503 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
12505 * object.c (mono_class_compute_gc_descriptor): Update comment.
12507 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
12509 * image.h: Add synchronized wrapper cache.
12511 * image.c (do_mono_image_open): Initialize cache.
12513 * reflection.c (create_dynamic_mono_image): Initialize cache.
12515 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12517 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
12518 ves_icall_System_Buffer_ByteLengthInternal.
12520 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12522 * reflection.c: setup klass->nested_in earlier. Allow
12523 a dash in the assembly name.
12525 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
12527 * metadata.c (mono_type_to_unmanaged): dont access
12528 type->data.klass for MONO_TYPE_OBJECT
12529 (mono_type_to_unmanaged): consider System.Delegate class
12531 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
12533 * class.c: just setup supertypes in the proper place instead of
12534 initializing the full element class for arrays.
12536 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12538 * class.c: ensure the element class of arrays is initialized.
12539 Setup the supertype info for array classes, too.
12541 2003-04-14 Miguel de Icaza <miguel@ximian.com>
12543 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
12545 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12547 * Makefile.am: re-added -m option when running cygpath. This way,
12548 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
12550 * mono-config.c: same codepath for locating mono config file for WIN32
12552 * assembly.c: if mono_assembly_setrootdir is called, don't override
12555 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12557 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
12558 MONO_ASSEMBLIES variable.
12560 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
12562 * icall.c: added Assembly::GetNamespaces() icall.
12564 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12566 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
12568 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
12570 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
12571 * object.c: fixed bug in the construction of vtable for proxies
12573 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
12575 * object.c (mono_array_new): Mark mono_array_new as an icall.
12577 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12579 * class.c: fixed test for public method when overriding interfaces.
12582 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12584 * appdomain.h, domain.c: added mono_domain_foreach() to
12585 be able to access the currently loaded appdomains.
12586 * object.c: make string interning work across sppdomains.
12587 Mark some functions for use as icalls.
12589 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
12591 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
12593 * reflection.h reflection.c: Allocate long living data using
12594 GC_MALLOC_ATOMIC so the collector does not need to scan it.
12596 * reflection.c: Double the allocation size in streams instead of
12597 increasing it, to prevent unneccesary copying on large assemblies.
12599 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
12600 creation if the assembly does not have the Run flag set.
12602 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12604 * class.h: avoid the C++ keywords in header files (Jerome Laban
12605 spotted and fixed this).
12607 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12610 (mono_unhandled_exception): fill in the arguments for the
12611 UnhandledException event. Only trigger that event for the default
12612 domain (as MS does).
12614 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
12616 * object.c: Improve typed allocation stuff based on suggestions from
12617 Paolo. Also turn it on if the GC library supports it.
12619 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
12621 * object.c object.h class.h: Added experimental typed allocation
12622 facility using the interfaces in gc_gcj.h.
12624 * os/gc_wrapper.h: Added new include files.
12626 2003-04-03 Martin Baulig <martin@ximian.com>
12628 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
12629 which is not yet enabled by default.
12631 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
12633 (mono_gc_lock, mono_gc_unlock): New static functions.
12635 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
12636 functions; stop/start the world for the garbage collector. This
12637 is using the windows API; we need to complete the SuspendThread()/
12638 ResumeThread() implementation in the io-layer to make this work on Unix.
12639 (mono_gc_push_all_stacks): New public function; tells the garbage
12640 collector about the stack pointers from all managed threads.
12642 2003-04-03 Martin Baulig <martin@ximian.com>
12644 * object.h (MonoThread): Added `gpointer stack_ptr'.
12646 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
12648 2003-04-03 Martin Baulig <martin@ximian.com>
12650 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
12652 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
12654 * reflection.c (typebuilder_setup_fields): Initialize field.first and
12657 2003-04-02 Miguel de Icaza <miguel@ximian.com>
12659 * loader.c (mono_lookup_internal_call): Report the corlib that is
12662 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
12664 * icall.c (ves_icall_type_GetTypeCode): fixed check for
12665 System.DBNull (it's class not valuetype).
12667 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12669 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
12670 if the array method was already assigned a token (fixes bug#40646).
12672 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
12674 * reflection.c (mono_reflection_get_type): Attempt type resolve even
12675 if no assembly is given.
12677 2003-04-01 Miguel de Icaza <miguel@ximian.com>
12679 * metadata.h: Added the new tables.
12681 * row-indexes.h: Added definitions for new tables.
12683 * metadata.c: Add schemas for new tables, and add support for
12684 computing the sizes of them.
12686 * class.c: Update for handling the new type cases.
12688 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
12690 * metadata.h (MONO_TYPE_IS_VOID): new macro
12692 2003-03-31 Martin Baulig <martin@ximian.com>
12694 * threads.h (MonoThreadCallbacks): Added `thread_created'.
12696 * threads.c (mono_thread_new_init): Call `thread_created' in the
12697 mono_thread_callbacks.
12699 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
12701 * loader.h: added marshalbyrefobject_class to mono_defaults
12702 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
12703 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
12704 generation of output parameters.
12705 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
12706 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
12707 contextbound and the target object belongs to the context of the caller.
12708 * object.h: added context and unwrapped_server variables in MonoRealProxy.
12709 * object.c: Implemented support for interfaces and abstract classes
12710 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
12711 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
12713 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
12715 * class.h class.c (mono_class_is_subclass_of): New function.
12717 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
12718 routines for most common case (calls from ArrayList::ToArray).
12720 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
12721 routine so programs which call Environment::Exit() can be profiled.
12723 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
12724 Added MONO_ARCH_SAVE_REGS.
12726 * icall.c (ves_icall_type_is_subtype_of): Use new function.
12728 2003-03-29 Miguel de Icaza <miguel@ximian.com>
12730 * blob.h: Add a couple of new MonoType types definitions.
12732 * tabledefs.h: Add a couple of new call convs.
12734 2003-03-27 Zoltan Varga <vargaz@freemail.h>
12736 * reflection.h (MonoReflectionDynamicAssembly): track changes in
12737 the layout of the class.
12739 * reflection.c (alloc_table): double the size on overflow to avoid
12740 unnecessary copying.
12742 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
12743 avoid filling out metadata tables and blobs. Also set mb->ilgen to
12744 null so it can be garbage collected.
12746 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
12748 * reflection.c (mono_reflection_get_type): Return the resolved type
12749 only if it is in the assembly we searched.
12751 * reflection.c (ensure_runtime_vtable): Initialize method slots.
12753 * class.c (mono_class_setup_vtable): Set the slot of the overriding
12756 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12759 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
12760 the right one is 'file:///blah', but MS allows it.
12762 (mono_assembly_open): allow 'file://blah'
12764 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
12766 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
12768 * socket-io.c: fixes bug #40310.
12770 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
12772 * reflection.c (mono_reflection_parse_type): handle deeply nested
12775 * reflection.c (mono_image_create_token): Use unique token values
12776 since they will be put into a hash table.
12778 * class.c (mono_class_setup_vtable): If a method occurs in more than
12779 one place in the vtable, and it gets overriden, then change the
12780 other occurances too.
12782 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12783 object as return type.
12785 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
12787 * icall.c: Deleted "ToString" implementation for double and float
12788 because they are full implemented in managed code.
12790 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12792 * reflection.c, reflection.h: implemented and exported functions
12793 to retrieve info about custom attributes.
12795 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12797 * appdomain.c: moved Uri handling to assembly.c
12798 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
12799 work when using a file Uri in *nix and windows.
12801 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
12802 GetReferencedAssemblies.
12804 2003-03-18 Dick Porter <dick@ximian.com>
12806 * icall.c: Rename a couple of internal calls
12808 * threads.c: Set the thread state to Stopped when a thread exits.
12811 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
12813 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
12816 * object.c (mono_class_vtable): fix warning.
12818 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
12820 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
12822 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
12824 (method_encode_clauses): Create exception info structures in the right
12826 (mono_reflection_setup_internal_class): Initialize supertypes field.
12828 * class.c object.c: Handle interfaces which implement other interfaces
12831 * class.h class.c: Move the supertypes array initialization code into
12832 a separate function so it can be used for dynamic types too. Also call
12833 it earlier, in mono_class_init(), since it can be used before the
12834 type is initialized.
12836 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12840 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
12845 * object.c: remove warnings.
12847 2003-03-13 Martin Baulig <martin@ximian.com>
12849 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
12850 (MonoDebugLexicalBlockEntry): New types.
12852 * debug-mono-symfile.c
12853 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
12855 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12857 * process.c: ret can be any non-zero value accroding to MS doc.
12859 2003-03-07 Miguel de Icaza <miguel@ximian.com>
12861 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
12862 fixing a warning for a miss-used prototype, would have cause
12863 random memory corruption.
12865 2003-03-07 Martin Baulig <martin@ximian.com>
12867 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
12868 getting really annoying ....
12870 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
12872 * reflection.c (fixup_method): added support for array methods.
12874 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12876 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
12877 (pointed out by Michael Adams).
12879 2003-03-04 Dick Porter <dick@ximian.com>
12881 * icall.c: Temporarily reverted the Double and Single ToString()
12882 change, because it broke nunit.
12884 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
12886 * object.h, threads.h: make include files compatible with C++
12887 (patch by Jerome Laban <jlaban@wanadoo.fr>).
12889 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
12891 * icall.c: Erased ToString helper functions for Double and Single.
12892 Now, that implementations ar all in managed code (Double and Single
12895 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
12897 * appdomain.c: Added method for initializing the default context of
12898 a domain. Added internal call for getting the default context.
12899 * appdomain.h: Added context variable in MonoDomain struct.
12900 * domain.c: mono_domain_set also sets the default context of the domain
12901 * icall.c: Mapped internal method InternalGetDefaultContext.
12902 * object.c: mono_object_get_virtual_method returns always a remoting
12903 wrapper if the object is a transparent proxy.
12904 mono_runtime_invoke_array: when creating an object by calling the
12905 constructor, if the created object is a proxy, then the constructor should
12906 be called using the a remoting wrapper.
12908 2003-03-03 Dick Porter <dick@ximian.com>
12910 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
12911 variable so it compiles on solaris. Problem spotted by
12912 Christopher Taylor <ct@cs.clemson.edu>
12914 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12917 (get_info_from_assembly_name): don't leak value.
12920 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
12923 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12925 * assembly.c: export mono_image_load_references ().
12926 * class.c: handle function pointers. mono_class_from_name() now
12927 supports nested type names directly.
12929 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
12931 * reflection.h reflection.c: Encode already created dynamic methods
12932 and fields correctly as a DEF instead of a REF.
12934 * reflection.c: Get rid of the force_ref argument to
12935 mono_image_typedef_or_ref since it was wrong in the first place.
12937 * string-icalls.c: add error checking to string constructors according
12940 * reflection.c: Emit types in the order their TypeBuilders were
12941 created. Previously, a new table index was assigned to each type before
12942 the tables were emitted. This was wrong because the signature blob
12943 might already refer to a type by its original table index.
12945 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
12947 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
12950 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12952 * Makefile.am: make assemblies dir have \ instead of / on windows.
12954 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
12956 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
12957 iterate over the NESTEDCLASS table using a linear search since the
12958 table is not guaranteed to be sorted by the secondary key.
12960 * class.c (mono_class_create_from_typedef): fixed up call to
12961 mono_metadata_nesting_typedef.
12963 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
12965 * marshal.c (mono_string_to_byvalstr): clear the memory as
12966 suggested by Jerome Laban <jlaban@wanadoo.fr>
12968 2003-02-26 Dick Porter <dick@ximian.com>
12970 * process.c: Cope with padding in .rsrc blocks
12972 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
12974 * metadata.h: reverted the filter_len change, it breaks reflection
12976 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
12978 * metadata.h: added a new field to store the filter_len
12981 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12983 * reflection.c: handle custom attributes for types and members
12984 created with Reflection.Emit (bug#38422).
12986 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
12988 * reflection.c: define RTSpecialName automatically for constructors for
12989 compatibility with MS.NET.
12991 * reflection.c (mono_reflection_create_runtime_class): initialize
12992 nested_in field of dynamically created classes.
12994 2003-02-22 Martin Baulig <martin@ximian.com>
12996 * debug-mono-symfile.h: Incremented version number.
12998 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
13000 * object.h icall.c process.c: fix warnings.
13002 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
13004 * appdomain.h appdomain.c:
13005 (mono_domain_try_type_resolve): split the
13006 name_or_tb argument into a name and a tb argument.
13007 (mono_domain_has_type_resolve): new function to check whenever the
13008 application has registered a TypeResolve event handler.
13010 * icall.c reflection.h reflection.c: move the type resolve logic into
13011 mono_reflection_get_type () so it will be invoked when
13012 Assembly::GetType () is called.
13015 (mono_reflection_get_type): renamed to get_type_internal.
13016 (mono_reflection_get_type): fixed type name generation so it works
13017 for nested types too.
13018 (mono_reflection_get_type): call has_type_resolve () to avoid the
13019 costly type name generation if there is no resolve event handler.
13021 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13023 * class.c, image.c: load exported types from file references.
13025 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
13027 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
13028 used to cache the managed methods used to create proxies and make
13029 remote invocation of methods.
13030 * class.h: Added in MonoVTable a flag to indicate that a class needs
13031 to be remotely created.
13032 * object.c: Modified the method mono_class_vtable(). It now initializes
13033 the remote flag of the vtable. Modified mono_object_new_specific(),
13034 so now it checks the remote flag.
13035 * icall.c: Added a couple of internal methods, one for enabling instance
13036 creation interception for a type, and one for creating objects bypassing
13039 2003-02-18 Martin Baulig <martin@ximian.com>
13041 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
13042 New interncall to get a method's metadata token.
13044 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
13045 New interncall for the debugger.
13047 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
13049 * class.c (mono_class_setup_vtable): allocate supertype array
13051 2003-02-18 Martin Baulig <martin@ximian.com>
13053 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
13055 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13058 (assembly_name_to_aname): jump over unknown properties (i've found
13059 something like: 'type, assembly, version=xxx, custom=null, public...',
13060 so now will ignore custom=null and still get the rest of the values).
13062 2003-02-17 Dick Porter <dick@ximian.com>
13064 * threads.c: Have Thread.Start() wait for a semaphore to signal
13065 that the thread has set up all its local data. This fixes bug
13066 34323, where Abort() raced the new thread's TLS data.
13068 Also removes the handle_store() call from start_wrapper, because
13069 threads are now always created suspended and there is no longer a
13070 race between the parent and child threads to store the info.
13072 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
13074 * image.c: explain the #- heap issue in a message, hopefully
13075 avoiding FAQs on mono-list.
13077 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13080 (GetEntryAssembly): if the domain has not invoked
13081 AppDomain.ExecuteAssembly yet, return the assembly of the default
13084 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
13086 * class.c (mono_ldtoken): make it work in dynamic assemblies.
13088 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
13090 * metadata.c, reflection.c: simple speedup to type hash
13093 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
13095 * image.c, image.h, class.c, assembly.c: move module loading
13096 to MonoImage. When loading metadata, consider alignemnet from
13097 the start of metadata, not from the metadata address in memory.
13099 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
13101 * reflection.c (mono_reflection_get_custom_attrs): Added support for
13102 AssemblyBuilder objects. Factored out custom attribute creation into
13103 a separate function.
13104 (create_custom_attr): new function to create custom attributes.
13106 2003-02-12 Miguel de Icaza <miguel@ximian.com>
13108 * Makefile.am: Got tired of typing the full pathname to pedump.
13109 Until there is another option, am installing this.
13111 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
13113 * class.c (class_compute_field_layout): always set field->parent
13114 (mono_ldtoken): use mono_defaults.fieldhandle_class;
13116 2003-02-11 Dick Porter <dick@ximian.com>
13119 * monitor.c: Rewrote Monitor, making lock much faster and
13120 Pulse/Wait work as specified. Also uses much fewer handles, and only
13121 creates them as needed.
13123 * exception.c: Added SynchronizationLockException
13125 * threads.c: Deleted old Monitor implementation. The new one is
13128 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13130 * class.c: handled TypedReference type code. Set the correct size for
13131 class data. Setup interface_offsets for interface classes, too.
13133 2003-02-09 Martin Baulig <martin@ximian.com>
13135 * debug-mono-symfile.h: Reflect latest symbol writer changes.
13137 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
13139 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
13140 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
13141 * object.c: fixed mono_object_get_virtual_method () for interfaces.
13142 * verify.c: check for code that runs after the end of the method.
13144 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
13146 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
13147 "System.Math::Round2".
13148 * sysmath.h: Added Floor, Round and Round2 definitions.
13149 * sysmath.c: Modified certain functions that were not 100% compliant
13150 with MS.NET (math precision) and added the implementation of Floor,
13153 2003-02-07 Martin Baulig <martin@ximian.com>
13155 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
13157 2003-02-07 Martin Baulig <martin@ximian.com>
13159 * debug-mono-symfile.c: Reflected latest symwriter changes.
13160 (mono_debug_create_mono_symbol_file): Removed.
13161 (mono_debug_open_mono_symbol_file): Take an argument which
13162 specifies whether to create a dynamic symbol file.
13164 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
13166 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
13168 2003-02-05 Martin Baulig <martin@ximian.com>
13170 * reflection.c (mono_image_build_metadata): Make this public,
13171 protect it against being called multiple times, don't create
13172 resources and don't build the compressed metadata here.
13173 (mono_image_create_pefile): Do this here.
13176 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
13178 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13180 * socket-io.c: fixed bug #36322.
13182 2003-02-06 Piers Haken <piersh@friskit.com>
13186 * debug-mono-symfile.c:
13192 * socket-io.c: warning cleanups
13194 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
13196 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
13197 function. works like remoting invoke, but does a check for the Proxy first.
13199 2003-02-05 Miguel de Icaza <miguel@ximian.com>
13201 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
13203 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
13205 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
13207 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
13208 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
13210 * object.c (mono_store_remote_field_new): used by the new jit
13211 instead of mono_store_remote_field
13212 (mono_load_remote_field_new): used by the new jit
13213 instead of mono_load_remote_field
13215 2003-02-05 Patrik Torstensson
13217 * appdomain.c: changed unload to take the domain id instead
13220 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
13223 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13225 * appdomain.c: don't look for assemblies in ApplicationBase if
13226 PrivateBinPathProbe is set.
13228 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13230 * object.c: make the first argument in main_args contain the absolute
13231 path to the assembly. Fixes bug #37511.
13233 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13235 * icall.c: get correct UTC offset for countries not using daylight
13236 time saving. Fixes bug #30030.
13238 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13240 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
13241 and 1 are the family).
13243 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
13245 * icall.c (ves_icall_InternalExecute): removed wrong assertion
13247 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
13249 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
13251 * reflection.c: added support for SignatureHelper tokens, which is
13252 needed by the Calli opcode.
13254 * reflection.h: track changes to SignatureHelper class.
13256 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
13258 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13260 * appdomain.c: fixed loading assemblies from PrivateBinPath.
13262 2003-02-03 Patrik Torstensson
13263 * appdomain.[c|h], domain.c :
13264 - Added support for getting a domain via domain id
13265 - Support for setting and getting domain from System.AppDomain
13266 (used in cross appdomain channel)
13267 - Added support for get/set for a MonoAppContext on a thread
13268 (Context class in System.Runtime.Remoting.Contexts),
13269 - Removed hack in Get/SetData and ExecuteAssembly.
13271 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
13272 the managed world to get control when a proxy is created.
13274 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
13276 2003-02-03 Miguel de Icaza <miguel@ximian.com>
13279 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13280 Populate the codebase field as well.
13282 2003-02-02 Martin Baulig <martin@ximian.com>
13284 * debug-mono-symfile.c
13285 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
13286 (mono_debug_symfile_add_method): Allow interncalls.
13288 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13290 * icall.c: throw parse exception if strtod fails or the string is empty.
13292 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
13294 * marshal.c: handle object type separately from defined
13297 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
13299 * marshal.c: handle NATIVE_LPSTR for strings when it's
13300 explicitly specified.
13302 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
13304 * reflection.c, reflection.h, icall.c: setup the reflection
13305 handle cache for ModuleBuilders and AssemblyBuilders.
13307 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
13309 * reflection.c (reflection_methodbuilder_to_mono_method): set
13312 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13314 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
13316 2003-01-29 Dick Porter <dick@ximian.com>
13318 * threads.c: No need for the fake_thread kludge now that Thread
13319 doesn't run a class constructor
13321 2003-01-29 Dick Porter <dick@ximian.com>
13323 * threads.c: Use g_direct_hash instead of the rather bogus
13326 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
13328 * marshal.c (mono_marshal_get_native_wrapper): add check for null
13329 (fix pinvoke12.exe)
13330 (mono_marshal_get_struct_to_ptr): generate valid IL code
13331 (mono_marshal_get_ptr_to_struct): generate valid IL code
13332 (*): correctly set sig->pinvoke, we need to memdup the signature
13335 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13337 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
13338 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
13340 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
13342 * profiler.c: provide more callers information.
13344 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
13346 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
13348 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
13350 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
13352 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13354 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
13355 exception instead of going into an infinite loop on dates which it
13358 * string-icalls.c (ves_icall_System_String_get_Chars): raise
13359 out-of-range exception if needed.
13361 * class.c (mono_class_setup_vtable): allow a virtual method to provide
13362 an implementation for an interface method and to override an inherited
13363 method at the same time.
13364 Imagine a scenario when a virtual method is used to override a
13365 virtual abstract method in a parent class, and this same method
13366 provides an implementation for an method inherited from an interface.
13367 In this case, the interface resolution code will set im->slot, which
13368 means that the virtual method override pass will skip this method
13369 which means a pointer to the abstract method inherited from the parent
13370 will remain in the vtable of this non-abstract class.
13372 * class.c: (mono_class_setup_vtable): continue search for a real
13373 method if only an abstract method is found.
13375 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
13377 * reflection.c: add size to encoding for ByValStr and ByValArray
13378 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
13380 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13382 * class.c (mono_class_setup_vtable): pass the override info as an
13385 * class.c (mono_class_setup_vtable): set the slot of overriding methods
13388 * reflection.c (ensure_runtime_vtable); add support for method
13391 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13393 * reflection.c (resolution_scope_from_image): Hack to work to work with
13394 dynamic assemblies.
13396 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
13397 added a 'force_ref' argument to force this function to allways return
13398 a TypeRef. This is needed by mono_image_get_memberref_token ().
13400 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13402 * reflection.c (mono_image_get_type_info): interfaces really don't have
13405 * reflection.c (mono_image_basic_init): fill out missing fields of
13408 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
13409 dynamic assemblies. This is required so dynamic assemblies show up in
13410 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
13411 Type::GetType() etc. This is consistent with MS behaviour.
13413 * image.c image.h reflection.c: add newly created classes to the name
13414 cache so mono_class_get () will find them.
13416 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13418 First part of changes to get IKVM.NET running under mono.
13420 * appdomain.h, appdomain.c: added new function
13421 mono_domain_try_type_resolve() which will emit TypeResolve events.
13422 This function will call AppDomain::DoTypeResolve to do the actual work.
13424 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
13425 moved existing code dealing with dynamic tokens to a new function
13426 called mono_reflection_lookup_dynamic_token (). This function will
13427 raise TypeResolve events when appropriate. Since reflection.c is not
13428 part of libmetadata, a new hook function called
13429 mono_lookup_dynamic_token() is added to class.c which will call this.
13431 * assembly.h assembly.c: make the invoke_load_hook function public,
13432 so it can be called for dynamic assemblies.
13434 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
13436 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
13439 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
13440 MonoGHashTable, since it contains pointers to objects which the GC
13443 * assembly.c (search_loaded): remove unused variable.
13445 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
13447 * object.c: fixed issue exposed by gcc-generated IL programs
13448 that use RVA data for pointers.
13450 2003-01-25 Martin Baulig <martin@ximian.com>
13452 * threads.c (start_wrapper): Moved the initialization of
13453 `start_func' above the mono_new_thread_init() call to which we
13454 pass it as argument.
13456 2003-01-24 Martin Baulig <martin@ximian.com>
13458 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
13459 the MonoThread pointer.
13461 2003-01-21 Miguel de Icaza <miguel@ximian.com>
13463 * icall.c: Rename `PowImpl' to Pow.
13465 2003-01-23 Dick Porter <dick@ximian.com>
13467 * threads.c (start_wrapper): Create a Thread object if needed, so
13468 the Main() thread can do the class initialisation in a subthread
13469 that has been set up to allow managed code execution.
13471 Pass the thread ID instead of the MonoThread pointer to the thread
13472 start and attach callbacks. This change is required, because the
13473 jit thread start callback must be called _before_ the Thread
13474 object can be created.
13476 (mono_thread_init): Removed much object creation code that is no
13477 longer needed. No managed code is called from here now.
13479 * object.c (mono_runtime_exec_managed_code): Create a subthread
13480 for Main, and call back to the runtime to use it.
13481 Set the exit code when Main exits.
13483 * gc.c: Make sure domain finalisation happens in a subthread.
13484 Re-enable threaded GC, fixing bug 31333 (again).
13486 * environment.c: System.Environment internall calls (so far just
13487 ExitCode is here, the others are still in icall.c)
13489 * appdomain.c (mono_runtime_cleanup): All threads running managed
13490 code should have finished before mono_runtime_cleanup() is
13491 reached, so no need to clean up threads.
13493 2003-01-22 Martin Baulig <martin@ximian.com>
13495 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
13496 `gpointer func' arguments.
13497 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
13498 but added `MonoThread *thread' argument.
13499 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
13501 * threads.c (mono_new_thread_init): Added `gpointer func' argument
13502 and pass it to the mono_thread_start_cb callback.
13503 (mono_install_thread_callbacks): New public function to install a
13504 set of callbacks which are set by the debugger.
13505 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
13507 2003-01-22 Martin Baulig <martin@ximian.com>
13509 * Makefile.am: Install debug-mono-symfile.h.
13511 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
13513 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
13515 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
13517 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
13518 * class.c (mono_ptr_class_get): correctly set access levels of pointers
13519 (mono_array_class_get): correctly set access levels of arrays
13521 2003-01-20 Patrik Torstensson
13522 * image.h (MonoAssemblyName): changed major, minor, build, revision
13523 from signed to unsigned.
13525 2003-01-20 sean kasun <skasun@azstarnet.com>
13527 * reflection.c (load_cattr_value): Now this handles
13528 MONO_TYPE_SZARRAY. Fixes bug #35629
13530 2003-01-20 Miguel de Icaza <miguel@ximian.com>
13532 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
13535 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13537 * decimal.c: fixed bug #26056.
13539 2003-01-17 Martin Baulig <martin@ximian.com>
13541 * gc.c: Raise an ExecutionEngineException instead of using g_error().
13543 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13546 (mono_get_exception_type_initialization): new function.
13548 * object.c: throw a TypeInitializationException when an exception is
13549 thrown invoking the class constructor.
13551 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13553 * reflection.c: fixed attribute reading.
13555 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13558 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
13559 provided, look for the type in the calling assembly and then in
13560 mscorlib; if the assembly name is provided, only try that one.
13562 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
13564 * object.c: register the vtable before there is a chance it's
13565 queried again recursively.
13567 2003-01-13 Duncan Mak <duncan@ximian.com>
13569 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
13572 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
13574 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
13576 2003-01-11 Martin Baulig <martin@ximian.com>
13578 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
13579 this to 20 for the release.
13581 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
13583 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
13585 * loader.c (mono_method_get_marshal_info): bug fix
13587 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
13588 structures with explicit layout
13590 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13592 * profiler.c: made the output more readable (and sorted).
13593 Added caller information for the allocation profiler.
13595 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
13597 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
13599 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13601 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
13602 to get value types.
13604 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
13606 * object.c, profiler.h, profiler.c, profiler-private.h:
13607 Added object allocation profiler.
13609 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
13611 * reflection.h, reflection.c: handle global methods.
13612 Compress blob entries.
13614 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
13616 * marshal.c: fix compilation.
13618 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
13620 * loader.c (mono_method_get_marshal_info): impl.
13622 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
13624 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13626 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
13627 for reference types.
13629 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
13631 * loader.c: fixed off by one error in loaded parameter names.
13633 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
13635 * marshal.c (mono_marshal_get_icall_wrapper): like
13636 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
13637 instead of a MonoMethod.
13639 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13641 * decimal.c: fixed bug #36537.
13643 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
13645 * marshal.c: throw a missing method exception if a
13646 P/Invoke method is not found.
13648 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13650 * icall.c: allow a null this for constructors.
13652 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
13654 * icall.c: raise the proper exceptions if the arguments to the
13655 internal Invoke are incorrect.
13657 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
13659 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
13661 2003-01-03 Martin Baulig <martin@ximian.com>
13663 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
13665 2002-12-31 Martin Baulig <martin@ximian.com>
13667 * debug-mono-symfile.c: Completely rewrote the type section.
13668 Instead of using individual malloc()ed fields, we use one big
13669 continuous memory area and offsets into this area.
13670 See the comments in the source code for details.
13672 2002-12-30 Martin Baulig <martin@ximian.com>
13674 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
13676 2002-12-30 Martin Baulig <martin@ximian.com>
13678 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
13679 line number table in this data blob instead of using an external
13682 2002-12-28 Martin Baulig <martin@ximian.com>
13684 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
13686 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
13688 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
13689 as a boxed return type.
13691 2002-12-21 Miguel de Icaza <miguel@ximian.com>
13694 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
13695 g_build_filename to properly get separators on the filename created.
13697 * object.h: Small change, introduce MonoMarshalByRefObject to
13698 track the layout of that structure in the C# universe as we make
13701 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
13703 * object.c: removed assert to allow static fields on interfaces.
13704 * loader.c: a TypeSpec may be used for any type, not just arrays.
13706 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13708 * class.c, class.h: added mono_class_array_element_size ().
13709 Ignore static methods in interfaces.
13711 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13713 * threads.c: fixed the build under cygwin.
13715 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
13717 * reflection.c: handle nullref constants. Allocate keys for
13718 reflection handles with the GC.
13720 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
13722 * threads.c, threads.h: added mono_thread_get_abort_signal()
13723 to get a suitable signal for thread abort.
13725 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
13727 * metadata.c: fix handling of ExportedType table.
13729 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13731 * icall.c: added WriteWindowsDebugString internal call.
13733 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13735 * reflection.h: added fields to match C# implementation.
13737 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13739 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
13741 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
13743 * gc.h, gc-internal.h: Rename header for GC internal calls to
13744 gc-internal.h from gc.h as to not clash with Boehm GC having its
13745 header installed as <gc.h> in outside include paths.
13746 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
13747 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
13749 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13751 * icall.c: assign minor, build and revision in FillName.
13753 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
13755 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
13756 Added support for running code generated by Reflection.Emit.
13758 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13760 * appdomain.c: check for NULL argument in LoadFrom.
13762 2002-12-10 Dick Porter <dick@ximian.com>
13764 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
13766 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13768 * appdomain.c: fix buglet when building exe file name. Handle full
13769 assembly name (needed after latest changes to AssemblyName).
13771 (mono_image_close): free some hashtables.
13773 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
13775 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
13776 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
13777 on some systems (redhat 7.3)
13779 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
13781 * threads.c: delete the critical section of a sync block,
13782 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
13784 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
13786 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
13788 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13790 * appdomain.[ch]: handle the assembly preload event to try loading the
13791 assemblies using the paths we have in the current domain.
13793 * assembly.[ch]: created an assembly preload hook that is called to try
13794 loading the assembly by other means that the ones provided here.
13796 * domain.c: initialize the domain search path.
13798 From now on, assemblies (TODO: except corlib and System) are loaded
13799 according to these rules when using mono_assembly_load ():
13801 1. It tries to load the assembly from the ApplicationBase
13802 of the current domain appending .dll and .exe (TODO: have to
13803 try loading from name/name.dll and name/name.exe).
13805 2. It tries the search path specified in PrivateBinPath for the
13806 current domain (if any).
13808 3. Previous behavior.
13810 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
13812 * icall.c: implemented GetInterfaceMap() related icall.
13813 * domain.c, loader.h: load MethodInfo in mono_defaults.
13815 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
13817 * gc.c: disable the finalizer thread for now, untill all the issues
13818 with it are resolved.
13820 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13822 * string-icalls.c: handle embedded nulls in string ctor when the
13823 length is specified.
13825 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13827 * class.c: look for explicit interface implementation in parent
13830 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
13832 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
13834 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
13836 * gc.c: protect handles with a critical section.
13838 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13841 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
13842 parameters. If no assembly specified, try getting the type from all
13843 the assemblies in the current domain, else, load the assembly and get
13846 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13848 * marshal.c: applied patch from Aleksey Demakov that fixes
13849 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
13851 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13853 * icall.c: fixed get_location.
13855 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
13857 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
13858 declarations to make it work with older gcc.
13860 * loader.c (mono_get_method): set signature->pinvoke for native calls
13862 2002-11-20 Dick Porter <dick@ximian.com>
13864 * threads.c (mono_thread_init): Set the main thread's handle
13866 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
13868 * gc.c: allow compilation without GC support. Changed to match the
13871 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13873 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
13875 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
13877 * reflection.c: set a public key token on the core assemblies.
13879 2002-11-18 Dick Porter <dick@ximian.com>
13881 * threads.c: Split out some thread initialisation so that other
13882 files can set the start callback function.
13884 * gc.c: Run finalisers in a separate thread, to avoid stack
13885 overflow. Fixes bug 31333.
13887 * appdomain.c: Set up GC finalisation thread.
13891 * domain.c: Use gc.h macros for GC_malloc
13893 2002-11-15 Dick Porter <dick@ximian.com>
13897 * appdomain.c: Removed mono_runtime_init_with_attach(),
13898 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
13899 merging the extra parameter with the existing function. Removed
13900 unneeded code in mono_thread_attach().
13902 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
13904 * image.c (mono_image_loaded_by_guid): a method to get loaded
13906 (load_metadata_ptrs): we store the guid as string.
13908 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
13910 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
13912 * metadata.c (mono_guid_to_string): imported method form Zoltan
13913 Varga (slightly modified)
13915 * assembly.c (mono_assembly_open): load precompiled code
13917 * loader.h (MonoMethod): we store the method token for use in the
13920 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13922 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
13923 the hook function called when an assembly is loaded.
13925 * domain.c: Modified file.
13926 (mono_domain_assembly_load): removed hash table insertion of assemblies.
13930 2002-11-07 Miguel de Icaza <miguel@ximian.com>
13932 * reflection.c: Map PEFileKind to the value expected by the WinNT
13935 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13937 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
13938 Read until the buffer is filled completely.
13940 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13942 * icall.c: implemented MonoType.InternalGetEvent ().
13944 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13946 * appdomain.c: implemented InitAppDomainSetup. Delayed
13947 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
13948 the entry_assembly.
13950 * assembly.c: base_dir is now an absolute path ending with
13953 * icall.c: modified get_location according to the above changes.
13955 * object.c: init AppDomain.SetupInformation for the default domain after
13956 we have the entry assembly.
13958 * domain.c: when unloading a domain, setup = NULL.
13960 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
13962 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
13964 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
13966 * object.h, object.c: introduced mono_object_get_virtual_method ()
13967 to lookup the method invoked on an object when a callvirt is done on
13969 * icall.c: make MethodInfo::Invoke() always do a virtual call.
13971 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13973 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
13974 current domain when loaded an assembly and failed to load it.
13976 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
13978 2002-10-31 Dick Porter <dick@ximian.com>
13982 * file-io.c: Return the error status in a parameter, as the
13983 GetLastError() value has long since been blown away if we try and
13984 look it up in a subsequent internal call invocation. Delete the
13985 GetLastError() internal call, because it's useless.
13987 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
13989 * class.[ch]: added cast_class to fix bug 29517
13991 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
13993 * marshal.c: create valid IL code in the filter clause:
13994 the new JIT is less forgiving:-)
13996 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13998 * icall.c: removed get_property internal call.
14000 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
14002 * appdomain.h domain.c: Added an ID to appdomains.
14004 * threads.c threads.h icall.c: Implement icall
14005 Thread:GetDomainID(), and remove unused icall
14006 CurrentThreadDomain_internal.
14008 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14010 * icall.c: Don't recurse through the base types in GetConstructor.
14013 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
14015 * mempool.h, mempool.c: added mono_mempool_empty() and
14016 mono_mempool_stats().
14018 2002-10-23 Dick Porter <dick@ximian.com>
14022 * icall.c: Added MonoIO.GetFileType internal call
14024 2002-10-17 Dick Porter <dick@ximian.com>
14026 * appdomain.c (mono_runtime_cleanup): Don't signal the async
14027 delegate semaphore before waiting for all threads to finish,
14028 because new threads can also call async delegates. Fixes bug
14031 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
14032 of 3 seconds, in case another async job is queued. (This part is
14033 needed because the bug fix reintroduced the 3s exit lag.) This
14034 makes the mono_runtime_shutdown flag superfluous.
14036 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
14038 * reflection.c: include ehader size in method section headers.
14039 Really check for suplicated modules entries.
14041 2002-10-17 Martin Baulig <martin@gnome.org>
14043 * debug-mono-symfile.c: Added back support for locals.
14045 2002-10-14 Martin Baulig <martin@gnome.org>
14047 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
14050 2002-10-14 Martin Baulig <martin@gnome.org>
14052 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
14053 mono_class_get() instead of looking in the class cache.
14055 2002-10-13 Martin Baulig <martin@gnome.org>
14057 * debug-mono-symfile.c: Set version number to 28, include the
14058 signature in method names.
14060 2002-10-13 Martin Baulig <martin@gnome.org>
14062 * debug-mono-symfile.h: Set version number to 27.
14064 2002-10-11 Martin Baulig <martin@gnome.org>
14066 * gc.c: Don't register/unregister NULL pointers as disappearing links.
14068 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14070 * metadata.c, metadata.h: added helper function to allocate signatures.
14072 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14074 * icall.c: added internal call to get the location of machine.config.
14076 2002-10-08 Martin Baulig <martin@gnome.org>
14078 * debug-mono-symfile.c: Ignore classes with a pending init for the
14081 2002-10-03 Dick Porter <dick@ximian.com>
14083 * threads.c: Freebsd pthread_t is a pointer
14085 2002-10-03 Dick Porter <dick@ximian.com>
14087 * socket-io.c: Implemented GetHostName_internal
14089 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14092 (mono_config_parse_file): don't leak the text.
14094 2002-10-02 Martin Baulig <martin@gnome.org>
14096 * debug-mono-symfile.c: Added support for methods.
14098 2002-10-01 Martin Baulig <martin@gnome.org>
14100 * debug-mono-symfile.c: Don't emit methods and line numbers for
14101 the dynamic symbol file, just write the type table. We can easily
14102 have an external helper program which creates a symbol file for an
14105 2002-10-01 Dick Porter <dick@ximian.com>
14107 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
14108 Only add the handle to the cleanup array when we're about to
14109 launch the thread. Bug 31425 deadlocked when the test was run on
14112 2002-10-01 Martin Baulig <martin@gnome.org>
14114 * debug-mono-symfile.c: Added support for properties.
14116 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14118 * reflection.c: unaligned store fix from Mark Crichton
14119 <crichton@gimp.org>.
14121 2002-09-27 Martin Baulig <martin@gnome.org>
14123 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
14126 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
14128 * assembly.h, assembly.c: use a sane API to hook into the assembly
14129 loading process instead of a useless special-purpouse hack
14130 (ngen needs a hook, too, for example).
14132 2002-09-27 Dick Porter <dick@ximian.com>
14134 * threads.c (mono_thread_init): Call GetCurrentProcess() so
14135 io-layer can set up some process handle info. Not needed on w32,
14136 but doesn't hurt either.
14138 * process.c: Pass the program name in the second parameter to
14139 CreateProcess, so the path is searched. Include the working
14140 directory. Implemented process name, process enumeration, and some
14141 process detail internal calls.
14143 * icall.c: Added internal calls for process lookup, and some
14146 2002-09-26 Martin Baulig <martin@gnome.org>
14148 * assembly.c (mono_install_open_assembly_hook): New global
14149 function to install a function to be invoked each time a new
14150 assembly is loaded.
14151 (mono_assembly_open): Run this callback function if set.
14153 * debug-mono-symfile.c: Put back line numbers for the dynamic
14154 symbol file and also record the .il file as source file. This
14155 allows us to install the temporary symbol file as `file.dbg' just
14156 like a compiler-generated one.
14158 2002-09-26 Nick Zigarovich <nick@chemlab.org>
14160 * Corrected typo in gc.c (BOHEM vs BOEHM).
14162 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14164 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
14165 GetProperties. Also avoid calling g_slist_length in GetProperties and
14168 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14170 * reflection.c: avoid unaligned stores (bug spotted by
14171 Mark Crichton <crichton@gimp.org>).
14173 2002-09-25 Martin Baulig <martin@gnome.org>
14175 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
14176 instead of guint64 for addresses and added prologue/epilogue info.
14178 2002-09-25 Martin Baulig <martin@gnome.org>
14180 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
14181 store line number info. For the dynamic symbol file, we only need
14182 to provide the JIT generated dynamic line number info for the dynamic
14185 2002-09-25 Martin Baulig <martin@gnome.org>
14187 * debug-mono-symfile.h: Incremented version number.
14189 2002-09-24 Martin Baulig <martin@gnome.org>
14191 * class.c (mono_debugger_class_init_func): New global function
14193 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
14196 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
14197 function. This is called via the mono_debugger_class_init_func
14198 hook to add all types to the dynamic type table.
14199 (ves_icall_MonoDebugger_GetType): New interncall to get a class
14200 from its metadata token.
14202 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
14203 New interncall for the debugger.
14205 2002-09-24 Nick Drochak <ndrochak@gol.com>
14207 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
14208 before using it in case it is null.
14210 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14212 * metadata.c: allow custom modifiers in local var signatures
14213 (bug spotted by Zoltan Varga).
14215 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14217 * class.c: deal with the <Module> class that may have a NULL vtable.
14218 Eliminate warnings.
14220 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14222 * image.c, image.h: more strong name helpers.
14223 * monosn.c: more work: convert pem keys to cryptoapi format.
14225 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14227 * string-icalls.c: speedup IndexOf.
14229 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14231 * icall.c: updates from Zoltan.2.Varga@nokia.com.
14233 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14235 * icall.c: cleanup: use mono_object_domain ().
14237 2002-09-23 Martin Baulig <martin@gnome.org>
14239 * debug-mono-symfile.c: Improved type support.
14241 2002-09-22 Martin Baulig <martin@gnome.org>
14243 * debug-mono-symfile.c: Added support for reference types and strings.
14245 2002-09-22 Martin Baulig <martin@gnome.org>
14247 * debug-mono-symfile.c: Started to work on the type table.
14249 2002-09-21 Martin Baulig <martin@gnome.org>
14251 * debug-mono-symfile.c: Largely reworked the symbol table format.
14252 The symbol table is now incrementally updated each time a new
14253 method is added. We're now also using our own magic and version
14254 so that you don't need to recompile all your classes if the
14255 dynamic table changes.
14256 (mono_debug_update_mono_symbol_file): Removed.
14257 (mono_debug_symfile_add_method): New function to add a method.
14259 2002-09-21 Martin Baulig <martin@gnome.org>
14262 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
14265 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
14266 New interncall to get a method from its metadata token.
14268 2002-09-21 Martin Baulig <martin@gnome.org>
14270 * debug-mono-symfile.c: Create type table.
14272 2002-09-20 Martin Baulig <martin@gnome.org>
14274 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
14276 2002-09-20 Martin Baulig <martin@gnome.org>
14278 * debug-mono-symfile.c: Provide information about params and locals.
14280 2002-09-20 Martin Baulig <martin@gnome.org>
14282 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
14285 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
14286 interncall to get a method from its metadata token.
14288 2002-09-20 Martin Baulig <martin@gnome.org>
14290 * debug-mono-symfile.c: Added a few checks for method->header
14291 being non-NULL. This should never happen, but for the moment
14292 let's use a g_warning() rather than a g_assert().
14294 2002-09-19 Mark Crichton <crichton@gimp.org>
14296 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
14297 even if support for it isn't present. Added an #ifdef to fix this.
14299 * socket-io.c: Added checks back for Solaris support.
14301 2002-09-19 Martin Baulig <martin@gnome.org>
14303 * debug-mono-symfile.c (read_string, write_string): Reflect latest
14304 changes in the symbol file format.
14306 2002-09-18 Martin Baulig <martin@gnome.org>
14308 * debug-mono-symfile.c: Set version number to 21.
14310 2002-09-18 Dick Porter <dick@ximian.com>
14312 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
14313 on netbsd. Fixes bug 30051.
14315 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14318 (set_version_from_string): little fix.
14320 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14322 * monosn.c, Makefile.am: added strong name utility.
14323 * reflection.h, reflection.c: implemented delayed signing,
14324 locale, version and hash id assembly attributes.
14326 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
14328 * loader.c, metadata.c: load param attributes in signatures.
14330 2002-09-16 Martin Baulig <martin@gnome.org>
14332 * debug-mono-symfile.c: Added string table with all method names.
14334 2002-09-14 Martin Baulig <martin@gnome.org>
14336 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
14337 fast method lookup.
14339 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14341 * reflection.c: record the public key token of referenced assemblies.
14343 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14345 * image.c, image.h: added functions to get the strong name and the
14346 public key of an assembly.
14347 * pedump.c: use them.
14349 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
14351 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
14353 2002-09-12 Miguel de Icaza <miguel@ximian.com>
14355 * marshal.c (mono_marshal_get_managed_wrapper): Added
14358 2002-09-11 Martin Baulig <martin@gnome.org>
14360 * gc.c: Call GC_unregister_disappearing_link() on all links when
14361 finalizing them, this is necessary to aviod a crash in boehm's
14364 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14366 * gc.c: handle GetTarget for finalized objects spotted and fixed by
14369 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
14371 * icall.c: implemented MonoType::Module.
14372 * reflection.c, reflection.h: mono_module_get_object () from
14373 Tomi Pakarinen <tomi.pakarinen@welho.com>.
14375 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14377 * icall.c: ignore overridden methods in GetMethods ().
14378 Fix for FieldInfo::SetValue().
14379 * object.c: handle float/double in runtime invoke.
14381 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14383 * object.c: allow a constructor to be called again on an object.
14385 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14387 * class.h, class.c: move field layout code to it's own function and
14388 export it. Get an interface id earlier. Move fields in MonoClass
14389 so they are more cache friendly and align the bitfields.
14390 * loader.c: temporary handle get_param_names() for a runtime method.
14391 * reflection.c, reflection.h: more code to handle runtime creation of
14394 2002-09-09 Martin Baulig <martin@gnome.org>
14396 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
14397 signature with the pinvoke field being set for the actual call.
14399 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14401 * icall.c: removed some unused icalls. Start of map of glib charsets
14402 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
14404 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14406 * debug-helpers.c: break infinite loop (found and fixed by
14407 Holger Arnold <harnold@gmx.de>).
14409 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14411 * icall.c: target may be null in create_delegate.
14413 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14415 * marshal.c: handle a boolean return type.
14417 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14419 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
14421 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14423 * gc.c: fix weakreferences.
14425 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
14427 * icall.c: added icall to get default codepage.
14429 2002-09-03 Dick Porter <dick@ximian.com>
14432 * threads.c: Use MonoThread instead of MonoObject where
14435 Store running thread objects in a hash table, so that we have all
14436 the info to hand when waiting for them to finish
14437 (means we don't need OpenThread() any more, so mingw builds should
14438 be fully functional again.)
14441 * object.h: Added thread ID to MonoThread
14443 2002-09-03 Martin Baulig <martin@gnome.org>
14445 * icall.c (System.Reflection.Assembly::get_location): New interncall.
14447 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14449 * icall.c: fixed leak in get_temp_path. Thanks lupus.
14451 2002-09-03 Martin Baulig <martin@gnome.org>
14453 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
14454 argument to store the end address of the disassembled instruction.
14456 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
14457 here from debug-symfile.h.
14458 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
14459 JIT into this struct.
14460 (MonoSymbolFile): Added `char *image_file' field.
14461 (MonoDebugGetMethodFunc): Removed.
14462 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
14463 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
14464 (mono_debug_find_method): New method.
14466 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
14467 create a full symbol file.
14468 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
14469 and static symbol files.
14470 (mono_debug_find_method): The symbol file keeps an internal method hash,
14471 call this to get a MonoDebugMethodInfo from a MonoMethod.
14473 * debug-symfile.[ch]: Removed.
14475 2002-08-29 Miguel de Icaza <miguel@ximian.com>
14477 * image.c (do_mono_image_open): Remove linker version check.
14479 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
14481 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
14482 wrappers for instance methods.
14484 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14486 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
14488 2002-08-28 Dick Porter <dick@ximian.com>
14490 * Makefile.am: Export HOST_CC for w32 builds
14492 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14494 * file-io.c process.c: MonoString are null terminated, no
14495 need for mono_string_to_utf16() anymore.
14497 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14499 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
14501 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
14503 * icall.c, reflection.h: speedup System.MonoType.
14505 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14507 * reflection.c: allow null as the value of a string argument in
14508 custom attributes constructors.
14510 2002-08-27 Martin Baulig <martin@gnome.org>
14512 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
14513 `trampoline_address' field.
14515 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
14517 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
14518 check (fixes bug #29486)
14520 2002-08-27 Martin Baulig <martin@gnome.org>
14522 * debug-mono-symfile.c: Changed the file format in a way that allows us
14523 open it read-only and to use a specially malloced area for all the
14524 dynamic data. We can now also generate a symbol file on-the-fly if we're
14525 debugging IL code and there is no MCS generated symbol file for it.
14527 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14529 * object.c: added a define for a good string and array
14530 creation speedup (not enabled by default because we need to deal with
14533 2002-08-26 Martin Baulig <martin@gnome.org>
14535 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
14536 function to create a dynamic symbol file. This is used by the
14537 debugger to create a symbol file for IL code on-the-fly.
14539 2002-08-26 Martin Baulig <martin@gnome.org>
14541 * loader.c (mono_lookup_pinvoke_call): Include the error message
14542 from g_module_error() in the error message.
14544 2002-08-24 Martin Baulig <martin@gnome.org>
14546 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
14547 function to update the symbol file. The symbol file is mmap()ed
14548 writable, but private. This allows us to install the symbol file
14549 together with the assembly.
14551 2002-08-24 Martin Baulig <martin@gnome.org>
14553 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
14554 but they can read the new symbol file format which mcs is now creating.
14556 * debug-symfile.c (mono_debug_find_source_location): Moved to
14557 debug-mono-symfile.c; this is now operating on the new symbol file.
14559 2002-08-23 Martin Baulig <martin@gnome.org>
14561 * debug-helpers.c (mono_method_desc_from_method): New function to get
14562 a MonoMethodDesc from a MonoMethod.
14564 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14566 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
14567 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
14569 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
14571 * string-icalls.[ch]: make helper methods static.
14573 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14575 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
14576 types to it and to SetValueInternal.
14578 * object.c: Moved handle_enum label to its proper place. This was the
14581 This time i compiled mcs and gtk-sharp and they both work.
14583 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14585 * icall.c: reverted partially my previous patch until
14586 object.c:set_value handles enums correcly.
14588 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14591 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
14592 (ves_icall_System_Environment_get_MachineName): removed warning when
14593 compiling under cygwin.
14595 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14597 * object.c: fixed field_get_value() for reference types.
14599 2002-08-22 Dick Porter <dick@ximian.com>
14601 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
14602 Don't free a buffer while it's still needed. Patch from Jonathan
14603 Liger <Jonathan.liger@wanadoo.fr>
14605 2002-08-21 Miguel de Icaza <miguel@ximian.com>
14607 * icall.c (ves_icall_System_Environment_get_Platform): Add new
14610 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
14612 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
14613 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
14615 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
14616 we call unmanaged code which throws exceptions.
14618 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14620 * appdomain.h: added per-domain entry_assembly.
14621 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
14623 * icall.c: Assembly::GetEntryAssembly icall.
14624 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
14625 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
14627 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14629 * appdomain.h, gc.c: added mono_domain_finalize ().
14631 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14634 (mono_print_unhandled_exception): changed g_warning by g_printerr
14635 because g_log has a 1024 characters limit (yeah, i got a big stack
14636 trace). Don't print exception name, that should be in ToString
14639 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14641 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
14642 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
14644 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14647 (mono_print_unhandled_exception): after previous commit, i realized
14648 that MS calls ToString on the exception. I changed this function to
14649 do that. This way we get stack_trace for free.
14651 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14654 (mono_print_unhandled_exception): invoke Message property instead of
14655 getting 'message' field from Exception. Don't allocate memory for
14656 'trace' and 'message' if not needed.
14658 2002-08-18 Dick Porter <dick@ximian.com>
14660 * unicode.c: Fix asserts to match Encoder.cs checks
14662 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14664 * marshal.c: fix unaligned store issue and a few wrong
14665 opcode argument types.
14667 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14669 * icall.c: added GetUninitializedObjectInternal internal call.
14671 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
14673 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
14674 to the right domain.
14676 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
14678 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
14680 * class.c (class_compute_field_layout): set blittable to false for Strings
14682 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
14684 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14686 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
14687 first chunk of code to create types at runtime. Code to
14688 handle ReflectedType/DeclaringType. Make reflection handles
14691 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
14693 * class.c: set correct name in arrays.
14695 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
14697 * appdomain.c (mono_domain_transfer_object): make it work with
14698 valuetypes. bug fixes.
14700 2002-08-12 Dick Porter <dick@ximian.com>
14702 * object.h: Rename some parameters to avoid c++ keywords (Patch
14703 from Joseph Wenninger <kde@jowenn.at>)
14705 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
14707 * icall.c: added icall to implement Assembly.GetFile*.
14709 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14711 * reflection.h, reflection.c: code to embed managed resources.
14713 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14715 * class.c: move all the type size stuff into
14716 class_compute_field_layout().
14718 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14720 * class.c: ensure enums have always the correct instance size.
14721 * unicode.c: remove wrong assert.
14723 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14725 * assembly.c: fix mem corruption issue.
14726 * image.h, image.c: added mono_image_get_resource () to access
14728 * icall.c: implemented Assembly.EntryPoint property and some
14729 Managed Resources related internalcalls.
14732 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14734 * image.c, image.h: impemented mono_image_get_entry_point ().
14735 * appdomain.c: use mono_image_get_entry_point.
14737 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14739 * reflection.c: support the object type argument when loading
14742 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
14744 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
14745 String as return type.
14747 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
14749 * reflection.c: fix encoding of named args for custom attrs to match
14750 the ms implementation. Read them back when instantiating custom
14753 2002-08-02 Radek Doulik <rodo@ximian.com>
14755 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
14756 by Dietmar as quick fix
14757 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
14758 16 as stack size, used on more places as quick fix before Dietmar
14759 will fix it properly
14761 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14763 * object.h, object.c: added accessors for fields and properties.
14765 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14767 * class.c, class.h: made mono_class_get_field_from_name ()
14768 loop on parent types.
14769 Added mono_class_get_property_from_name ().
14771 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14773 * class.c, class.h: move the code to setup the type vtable in its own
14774 function so that it can be reused also for types created at runtime.
14775 Eliminate the "class" identifier from the header file.
14776 * reflection.c: setup the vtable for enums so that we can create
14777 objects for use in SetConstant ().
14779 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
14781 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
14782 instead of the delegate itself as this pointer (bug #28383)
14784 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
14786 * marshal.c (mono_marshal_get_managed_wrapper): added return type
14789 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14791 * loader.c: don't set the pinvoke bit on icalls.
14793 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
14795 * debug-helpers.c (mono_method_full_name): only print a number to
14796 indicate wrapper type (so that the output is more readable in traces).
14798 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
14800 * class.c (mono_class_init): include method override patch from Paolo
14802 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
14804 * icall.c: fixed GetTypeCode().
14806 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
14808 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
14809 use real delegate invoke function to make it work with multicast
14810 delegates (fix bug# 28291).
14812 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14814 * object.c: load constant strings.
14816 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14818 * reflection.c: no magic numbers.
14819 * tabledefs.h: security action enum.
14821 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14823 * assembly.c: fix possible memory corruption.
14825 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14827 * reflection.h, reflection.c: added support for linking resources.
14828 * verify.c: check we have an updated corlib.
14830 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
14832 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
14834 (mono_marshal_string_array): null terminate unmanaged string arrays.
14835 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
14837 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14839 * icall.c: Type.GetType () can now return also types from the
14842 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
14844 * loader.h, loader.c: stack walking support.
14845 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
14846 GetCallingAssembly.
14848 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
14850 * marshal.c: added optimisations for blittable types
14852 * class.c (mono_array_class_get): do not set blittable attribute on arrays
14853 (mono_class_setup_mono_type): set blittable attribute for single
14856 * marshal.c (mono_string_utf8_to_builder): impl.
14857 (mono_string_builder_to_utf8): impl.
14858 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
14860 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
14862 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
14863 (mono_marshal_get_managed_wrapper): impl. byref types
14865 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14868 (search_method): don't display debug message.
14870 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
14872 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
14874 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
14876 * appdomain.c: set the missing filename when throwing exception.
14878 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
14880 * metadata.c (mono_type_size): code cleanup
14881 (mono_type_stack_size): removed some test code
14883 2002-07-21 Miguel de Icaza <miguel@ximian.com>
14885 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
14886 mono_get_exception_file_not_found now.
14888 * exception.c (mono_exception_from_name_two_strings): New version
14889 that will call a constructor with two string arguments.
14890 (mono_get_exception_file_not_found): New helper routine, used to
14891 report file-not-found errors.
14893 2002-07-20 Dick Porter <dick@ximian.com>
14896 * process.c: Pass file handles to CreateProcess
14900 * file-io.c: Implemented CreatePipe
14902 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
14904 * metadata.c (mono_get_param_info): set alignment for value types
14906 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14908 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
14909 Constify mono_domain_assembly_open().
14910 * loader.c: handle null namespace in icalls.
14912 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
14914 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
14915 (emit_str_to_ptr_conv): marshal object as structs
14917 * metadata.c (mono_type_to_unmanaged): marshal object as structs
14919 * marshal.c (mono_marshal_get_runtime_invoke): support value types
14921 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
14923 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
14924 (mono_marshal_get_native_wrapper): we an now return value types
14926 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14928 * verify.c: more checks implemented.
14930 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
14932 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
14934 (mono_marshal_get_native_wrapper): allow byref arguments
14935 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
14936 impl. PtrToStringXXX methods
14937 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
14938 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
14939 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
14940 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
14941 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
14943 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14945 * reflection.c: fix buglet in parsing an assembly name.
14947 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
14949 * marshal.c (emit_ptr_to_str_conv): first impl.
14951 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14953 * object.c, class.h: cache the vtable in the class as suggested by
14954 vargaz@freemail.hu (Zoltan Varga).
14956 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14958 * class.h, loader.c: added mono_field_from_token().
14959 * verify.c: first cut of type checking code.
14961 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
14963 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
14965 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
14967 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
14969 (mono_marshal_get_remoting_invoke): impl.
14970 (mono_delegate_begin_invoke): impl.
14971 (mono_mb_emit_save_args): impl.
14972 (mono_delegate_end_invoke): impl.
14973 (mono_marshal_get_delegate_begin_invoke):
14974 (mono_marshal_get_delegate_end_invoke):
14975 (mono_marshal_get_delegate_invoke): generate a special name for
14976 those methods (including the signature) and associate them whith
14977 the delegate class.
14979 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
14982 (mono_reflection_type_from_name): now it has a MonoImage parameter
14983 which is used as the default image to search the type in. If the image
14984 is NULL or getting the type from it fails, it defaults to corlib.
14986 * icall.c: changed 1 call to mono_reflection_type_from_name to match
14989 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14991 * reflection.c: update the parameter table index.
14993 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14995 * domain.c: don't include the mark byte in the string hash.
14997 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14999 * icall.cs: icall for Type.GetTypeCode ().
15000 * verify: a couple of fixes and disabled local initialization checks.
15002 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
15004 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
15006 * debug-helpers.c (mono_method_full_name): print the type of the
15009 * metadata.c (mono_signature_hash): a hash function for signatures
15010 (mono_signature_hash): better hash algorithm
15012 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
15014 * debug-helpers.c (mono_method_full_name): this can now generate
15015 method names with signatures
15017 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
15018 method dont have this pointers.
15020 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15022 * reflection.c: fixup typebuilder tokens.
15023 * image.c: fix buglet.
15024 * marshal.h: remove whitespace.
15025 * metadata.h, metadata.c: reinstate code that was removed.
15026 * verify.c: handle catch directives and fix another couple of bugs.
15028 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
15030 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
15031 (mono_marshal_get_native_wrapper): make it comp. with the old code
15032 (mono_marshal_get_native_wrapper): support boolean
15033 (mono_marshal_get_managed_wrapper): support more types
15035 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
15037 * class.c (class_compute_field_layout): compute class->blittable attribute.
15039 2002-07-09 Dick Porter <dick@ximian.com>
15041 * threads.c: Make the thread cleaning up cope with threads that
15044 2002-07-08 Radek Doulik <rodo@ximian.com>
15046 * reflection.c (method_encode_code): use non-translated values to
15047 compute finally_start, this fixes exception handling on ppc, yay!
15049 * decimal.h (struct signscale): fix endianess
15051 2002-07-07 Radek Doulik <rodo@ximian.com>
15053 * reflection.c: swap box_val and not val
15055 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
15057 * reflection.c, reflection.h: handle full assembly info in type name.
15058 Handle Type arguments when loading custom attributes.
15059 * icall.c: updated to use new mono_reflection_type_from_name () method.
15061 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15064 (method_from_memberref): also print assembly name when method not found.
15066 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15069 (ves_icall_TypeGetProperties): fixed bug #27473.
15071 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15073 * reflection.c: display image name and token when cannot find the
15074 .ctor for an attribute.
15076 2002-07-05 Martin Baulig <martin@gnome.org>
15078 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
15080 2002-07-04 Dick Porter <dick@ximian.com>
15082 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
15083 compile on mingw. This will cause mingw builds to not wait for
15084 subthreads to terminate after the main thread does. I've lodged a
15085 bug with the mingw developers for them to wrap OpenThread().
15087 2002-07-03 Dick Porter <dick@ximian.com>
15089 * threads.c: Store thread IDs instead of handles, because
15090 GetCurrentThread() returns a pseudohandle and therefore stores
15091 useless values. mono_thread_cleanup() continues checking the
15092 array of threads until it is empty, to cope with subthreads
15093 spawning new threads after the main thread has finished.
15097 * profiler-private.h: Pass the thread ID to thread profiler
15098 functions, instead of a handle
15100 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15102 * verify.c: fixes to make it more usable.
15103 * pedump.c: added --verify code to verify IL code in an assembly.
15105 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15107 * reflection.c: turn errors into warnings to allow compiling corlib.
15109 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15111 * reflection.c: add special cases to compile corlib.
15113 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15115 * reflection.c: handle properties with only a set method.
15117 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15119 * opcodes.h: add enum with opcodes in opval order.
15121 2002-07-01 Dick Porter <dick@ximian.com>
15124 * object.c (mono_runtime_run_main): Removed unneeded argument
15126 2002-06-28 Martin Baulig <martin@gnome.org>
15128 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
15130 2002-06-27 Dick Porter <dick@ximian.com>
15132 * threads.c: Store the handle in both the parent thread and in the
15133 subthread, to minimise the time between starting a new thread and
15136 2002-06-26 Dick Porter <dick@ximian.com>
15138 * appdomain.c (mono_runtime_cleanup): Close the socket library
15139 after all the threads have finished, not before
15141 2002-06-26 Martin Baulig <martin@gnome.org>
15143 * debug-symfile.c (mono_debug_find_source_location): Added
15144 `guint32 *line_number' argument. If it's not NULL, store the line number
15145 there and return the file name without the line number.
15147 2002-06-25 Dick Porter <dick@ximian.com>
15151 * process.c: Process forking and other support functions
15153 2002-06-25 Dick Porter <dick@ximian.com>
15155 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
15156 things dont happen when the image is closed.
15157 (mono_image_lookup_resource): Walk the resource section looking
15158 for a particular entry
15160 * cil-coff.h: PE resource section decoding
15162 2002-06-25 Dick Porter <dick@ximian.com>
15166 (mono_assembly_foreach): Accessor functions to walk the list of
15168 (mono_assembly_set_main):
15169 (mono_assembly_get_main): Process methods need to know which
15170 assembly is the "main" one
15172 * object.c (mono_runtime_run_main): Record the main assembly
15174 * debug-helpers.c: Fix typo
15176 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
15178 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
15179 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
15181 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15183 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
15185 2002-06-21 Miguel de Icaza <miguel@ximian.com>
15187 * image.c (do_mono_image_open): Initialize reference count,
15188 otherwise we leak the MonoImage.
15190 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15192 * reflection.c: small tweak to handle self-hosting.
15194 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15196 * reflection.c: fix type name parse code.
15198 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15200 * reflection.c: break out of the loop.
15201 * image.c: special case corlib.
15203 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15205 * reflection.c: add all the custom attrs at the end to ensure the
15206 ctors have been properly initialized when the attributes are defined
15207 in the current assembly.
15209 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15211 * reflection.c: handle correctly multiple-nested types.
15213 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15215 * row-indexes.h: fix typos.
15216 * reflection.c: adjust for typos and fix method_def_or_ref
15217 encoding in MethodImpl table.
15219 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15221 * reflection.c: fix entry point patching (thanks Serge!).
15223 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
15225 * verify.c: add check for System.Exception
15227 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
15229 * image.c, class.c: minifix for code just c&p'ed.
15230 * reflection.c: warning fix.
15231 * object.h, loader.h, domain.c: load also StringBuilder.
15233 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15235 * marshal.h, marshal.c: some support code to handle complex marshaling.
15237 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15239 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
15240 Better signatures with vtable error dump.
15242 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
15244 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
15246 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
15248 * icall.c (ves_icall_Type_GetField): impl.
15250 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15252 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
15253 to retrieve a marshal description blob for a field or param.
15255 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15257 * reflection.h, reflection.c: change order of nested type emission
15258 to avoid table corruption. The NestedTypes table is sorted.
15259 * icall.c: change order of GetConstructor results to workaround mcs bug.
15261 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15263 * reflection.h, reflection.c: handle field and param marshal
15266 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15268 * icall.c, marshal.c marshal.h: more Marshal class implementation.
15270 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15272 * reflection.c: fix call convention.
15274 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15276 * reflection.h, reflection.c: mono_image_get_memberref_token()
15277 takes a type instead of a class, now. Added
15278 mono_image_get_array_token() to create tokens for the special
15279 multi-dim array methods.
15281 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15283 * assembly.c: handle modules (no assembly table). Split
15284 loading references in its own function.
15285 * class.c: handle moduleref resolution scope.
15286 * image.c, image.h: cache module name in image.
15288 2002-06-07 Martin Baulig <martin@gnome.org>
15290 * reflection.c (mono_image_get_type_info): Only add a class layout entry
15291 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
15293 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15295 * icall.c: more signature fixes that used uint instead of int.
15297 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15299 * reflection.c: fixed signature of field refs.
15301 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15303 * class.c, reflection.c: handle typerefs of nested types
15304 (both on read and when writing files).
15306 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15308 * icall.c: fix method signatures that tried to workaround the previous
15311 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15313 * debug-helpers.c: fix typo.
15315 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15317 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
15318 rewrote the PE/COFF writing code (our programs are understood by the
15321 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15323 * gc.c, gc.h, icall.c: weakreference support.
15325 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15327 * Makefile.am, mono-config.c: use $(sysconfdir).
15329 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15331 * icall.c: changed default precision of Double.ToString() to 15.
15332 Fixed memory leak. Unified with Single.ToString.
15334 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15336 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
15338 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15340 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
15341 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
15342 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
15345 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15347 * debug-symfile.c, sysmath.c: yet more compilation fixes.
15349 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15351 * reflection.c, socket-io.c: more compilation fixes.
15353 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15355 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
15356 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
15357 unicode.c: warning and compiler compatibility fixes.
15359 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15361 * class.h, metadata.c: fixed warnings/compilation errors.
15363 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15365 * Makefile.am, mono-config.c, mono-config.h: configuration file
15367 * loader.c, loader.h: make Dll mapping configurable at runtime in the
15368 config file. Export methods to insert and lookup mappings.
15370 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15372 * reflection.c: handle types and boxed objects in custom attr
15375 2002-05-30 Martin Baulig <martin@gnome.org>
15378 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
15380 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
15382 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
15383 to lookup the implmap row for a P/Invoke method.
15384 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
15385 P/Invoke method from the runtime on an as needed basis.
15387 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
15389 * metadata.c (mono_metadata_parse_signature): impl.
15391 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15393 * class.c: handle .pack directive.
15395 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15397 * object.c: initialize static fields with RVA data.
15399 2002-05-25 Martin Baulig <martin@gnome.org>
15402 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
15404 2002-05-24 Martin Baulig <martin@gnome.org>
15407 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
15408 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
15409 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
15411 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15413 * object.c: special case string ctros in invoke.
15414 * gc.c: silly whitespace changes.
15416 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
15418 * threadpool.[ch]: impl. a threadpool that can
15419 be used by mint and mono.
15421 2002-05-22 Martin Baulig <martin@gnome.org>
15423 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
15424 The first argument is now a `MonoReflectionModuleBuilder *', the return
15425 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
15426 `methods' field to get the method builder. The `token' argument is the
15429 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
15430 invalid characters instead of g_assert_not_reached()ing. This seems
15431 to be the behaviour of mscorlib.
15433 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
15435 * object.c (mono_runtime_invoke_array): applied patch from Rachel
15436 Hestilow to fix bug #25104
15438 2002-05-21 Martin Baulig <martin@gnome.org>
15440 * debug-symfile.c (mono_debug_find_source_location): New function.
15441 Looks up an IL offset in the line number table and returns the source
15442 location as a string.
15444 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15447 (mono_double_ToStringImpl): changed %f by %g until we have something
15450 2002-05-21 Nick Drochak <ndrochak@gol.com>
15452 * icall.c : Use different name for Math.Pow's icall. Needed to check
15453 parameters first in C#.
15455 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15457 * icall.c, reflection.h: added icall to get info about an event.
15459 2002-05-20 Radek Doulik <rodo@ximian.com>
15461 * object.c (mono_value_box): don't use memcpy for boxing on BIG
15463 (mono_value_box): don't use memcpy for small sizes on
15464 architectures with unaligned access
15466 2002-05-20 Martin Baulig <martin@gnome.org>
15468 * reflection.c (mono_reflection_setup_internal_class): Don't crash
15469 if `tb->parent == NULL'.
15470 (mono_reflection_create_internal_class): New function. This is
15471 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
15474 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
15477 2002-05-19 Martin Baulig <martin@gnome.org>
15479 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
15480 argument to get the length, don't default to the array length.
15482 2002-05-18 Miguel de Icaza <miguel@ximian.com>
15484 * assembly.c (mono_assembly_setrootdir): New function used to
15485 override the MONO_ASSEMBLIES directory.
15487 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15489 * icall.c: ValueType_GetHashCode() initialize local var.
15491 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15493 * reflection.c: sort custom attributes table.
15495 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15497 * reflection.c: support named args in custom attributes (write support).
15499 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
15501 * reflection.c: fix finally position calculation.
15503 2002-05-15 Radek Doulik <rodo@ximian.com>
15505 * reflection.c: fixed endianess at many places
15507 * icall.c (ves_icall_InitializeArray): comment out debug msg
15509 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
15511 * object.c (mono_unhandled_exception): new function to handle
15512 unhandled exceptions.
15513 (mono_unhandled_exception): call the UnhandledException event.
15514 (mono_runtime_delegate_invoke): impl.
15516 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
15518 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
15519 returns the RVA, not the direct pointer to the data. Handle the case
15520 when the class size is fixed.
15522 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15524 * reflection.c: fix some endianess issues.
15526 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
15528 * object.c (mono_runtime_invoke): is now able to catch exceptions.
15530 * threads.c (mono_thread_init): added a callback which is invoked
15533 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
15535 * icall.c: make GetHashCode return non-negative values.
15537 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
15539 * object.c, icall.c, gc.c: revert to address-based hashcode.
15541 2002-05-13 Miguel de Icaza <miguel@ximian.com>
15543 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
15545 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15547 * icall.c, class.c: special case <Module>.
15549 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
15551 * icall.c: fix bug in GetNow().
15553 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
15555 * object.c (mono_runtime_class_init): make sure that we call all
15556 static class constructors.
15558 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15560 * reflection.c: sort methodsemantics table.
15562 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15564 * reflection.h, reflection.c: honour init locals setting.
15566 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
15568 * icall.c: copied Double ToStringImpl for Single ToStringImpl
15570 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15572 * reflection.c: support ContructorBuilders in attribute blob creation.
15574 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15576 * reflection.c: some changes to build a binary that can be run
15577 directly in windows.
15579 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
15581 * loader.c: print a big message when an icall can't be found.
15583 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15585 * string-icalls.c: fix bug 24248.
15587 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15589 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
15590 icall.c, reflection.h: separate assembly loading by pathname and by
15591 assembly name. Use the MONO_PATH env var to search for assemblies.
15593 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15595 * assembly.c, image.h: add some support for assemblies
15596 with multiple modules.
15597 * class.c, class.h: export mono_class_from_typeref().
15598 * loader.c: remove duplicated code and use mono_class_from_typeref(),
15601 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15603 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
15604 documentation says (the ECMA one is correct).
15606 2002-05-02 Dick Porter <dick@ximian.com>
15608 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
15609 Don't name the synchronisation mutex.
15611 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
15614 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
15615 Make the prototypes match.
15616 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
15620 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
15621 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
15622 all systems have tm.tm_zone, so use strftime() with %Z to print
15623 the timezone abreviation into a temp string.
15625 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
15626 rather than mono_array_addr() on a MonoString on Big Endian
15629 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
15631 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
15634 2002-04-30 Dick Porter <dick@ximian.com>
15636 * socket-io.c: Cope with SOCKET being an integer rather than a
15639 * threads.c: Added Thread_free_internal, to deal with thread
15640 handle cleanup. Moved calls to handle_store() and handle_remove()
15641 to start_wrapper(), so each can only be called once. Allocate
15642 synchronisation blocks with GC_malloc(), and use GC finalisation
15643 to close the handles.
15645 * icall.c: added System.Threading.Thread::Thread_free_internal
15647 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15649 * icall.c: support Environment.Exit, CommandLineArgs().
15651 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15653 * object.c, object.h: added mono_runtime_run_main () and
15654 mono_runtime_get_main_args () for use in System.Environment.
15656 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15658 * gc.c: fix thinko, enable actual finalization since the jit is now
15661 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15663 * gc.c, object.c: take into account that an object may be offset wrt the address
15664 returned by GC_malloc().
15666 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15668 * image.c: handle files without entries in the assembly table (modules).
15670 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
15672 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
15673 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
15674 allowed to be null when it's System.Object class setup.
15676 2002-04-27 Martin Baulig <martin@gnome.org>
15678 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
15679 if `tb->parent == NULL' rather than crashing.
15681 2002-04-28 Nick Drochak <ndrochak@gol.com>
15683 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
15684 calling acos() where asin() should have been called.
15686 2002-04-26 Martin Baulig <martin@gnome.org>
15688 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
15689 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
15690 there's a subdirectory called `System', but we don't want to read that
15691 subdirectory as an assembly.
15693 2002-04-25 Martin Baulig <martin@gnome.org>
15695 * debug-symfile.c: Reflect latest MonoString changes.
15697 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15699 * rand.c, rand.h: instance method icalls need to have an explicit
15700 this pointer as first argument in the C implementation.
15702 2002-04-25 Nick Drochak <ndrochak@gol.com>
15704 * icall.c: Fix typo in map for GetNonZeroBytes
15706 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
15708 * string-icalls.c : String does now passes unit tests without any
15709 errors, the following changes has been made:
15711 Implemented replace methods.
15712 Renaming of methods to (try) follow the standard.
15713 Fixed compare ordinal
15714 Made all memory allocated directly to function instead of via icall function.
15715 Small performance fix in is_in_array function
15717 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
15719 c (mono_string_Internal_ctor_charp_int_int):
15720 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
15721 sindex < 0, throw ArgumentOutOfRangeException instead of
15722 ArgumentNullException.
15724 Added new check for length == 0, however
15725 I need to make it return String.Empty from the C code.
15727 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
15728 that calculate the length for us here.
15730 (mono_string_Internal_ctor_sbytep_int_int): Replaced
15731 mono_string_new_utf16 with mono_string_new, since value is utf8.
15733 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15735 * object.c: register the object for finalization if needed.
15736 Allocate one more char in the string for the terminating 0 char.
15738 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15740 * class.c, class.h, image.c: check if a type implemenst a destructor.
15741 Use the proper key for array class lookups.
15742 * icall.c: register the icalls in the System.GC class.
15743 * gc.c, gc.h: GC-related functions and icalls.
15745 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15749 * unicode.c: free some strings gotten from mono_string_to_utf8 and
15750 changed a couple of free () by g_free ().
15752 * decimal.c: one-liner in the comments for decimal2string ().
15754 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
15756 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
15758 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
15760 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
15761 * object.c (mono_runtime_invoke_array) : handle null in params
15763 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
15765 * string-icalls.c: fixed bug in split (one off bug)
15767 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
15769 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
15770 * icalls.c: added String::Equals as internal method
15772 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
15774 * threads.c: fixed bug in the double interlocked functions
15776 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
15778 * threads.c: implemented all of the new interlocked icalls.
15779 * string-icalls.c: fix a bug in insert.
15780 * icalls.c: added the icalls for interlocked, removed old string functions.
15782 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15784 * loader.c: fix off-by-one error when reading argument names.
15786 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15788 * profiler.c: win32 counter implementation (untested).
15789 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
15790 (the latter needs testing and more complete impl. from win32 folks).
15792 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
15794 * object.c: mono_array_new_full workaround mono_array_class_get
15797 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
15799 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
15800 * object.h (mono_string_chars): Changed casting type.
15802 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
15804 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
15805 method signatures to use gunichar2 instead of gint16.
15807 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
15809 * object.h, object.c: domain-specific versions of mono_object_new and
15812 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
15814 * object.c: changed String layout
15816 * string-icalls.c (mono_string_Internal_ctor_chara): added
15817 internal string constructors.
15819 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
15821 * threads.c: pass 'this' to the thread start routine.
15823 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15825 * string-icalls.c: fix IndexOf and LastIndexOf. Now
15826 InternalCompareStr don't call twice mono_string_cmp_char for the last
15827 character. Improved performance in mono_string_cmp_char.
15829 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15831 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
15832 code into its own library: libmonoruntime.
15834 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
15836 * object.h, object.c: changed array format so that szarrays do not
15837 require a bounds structure.
15838 * icall.c, appdomain.c: support for new szarray format.
15840 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
15842 * metadata.c: compare also the retuns type when comparing signatures:
15843 we didn't do this as an optimization since really overloaded methods
15844 must differ also in the arguments, but this doesn't work with
15845 low-level IL code (or when using explicit conversion operators: see
15846 bug#23498 for an example).
15848 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15850 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
15852 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15854 * icall.c: make MonoType::GetElementType its own icall.
15856 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15858 * icall.c: remove MonoMethod_get_Name().
15859 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
15862 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
15864 * string-icalls.c: optimized a few methods.
15866 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
15868 * icall.c: added all new string internal calls
15869 * string-icalls.c: added, new string internal call implementation.
15870 * object.c: added mono_string_new_size for allocating a string a size
15872 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
15874 * object.c (mono_object_isinst): use the same code as in the
15875 optimized x86 version.
15877 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15879 * profiler.c: TSC-based timer code (faster and more accurate).
15880 Not hooked up in configure, yet (set USE_X86TSC to 1).
15882 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
15884 * profiler.c, profiler.h: track time spent compiling methods.
15885 * threads.c: track thread creation/destruction.
15887 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
15889 * profiler.c, profiler.h, profiler-private.h: profiling interface
15890 and sample implementation. Moved here so that it can be used also by
15893 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
15895 * reflection.c, reflection.h: keep types and other handles separate in
15896 the hash tables for referred tokens. Add guid for modules.
15898 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15900 * assembly.c: fix bugs found with valgrind.
15901 * metadata.h, metadata.c: added mono_metadata_guid_heap().
15903 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
15905 * threads: added icall support for getting current domain for
15908 2002-04-13 Martin Baulig <martin@gnome.org>
15910 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
15911 (MonoDebugVarInfo): Added `index' field for register based addresses.
15912 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
15913 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
15914 `MonoDebugVarInfo *params' and `guint32 this_offset' with
15915 `MonoDebugVarInfo *this_var'.
15917 * debug-symfile.c (relocate_variable): New static function to write
15918 a location description for a local variable or method parameter.
15920 2002-04-12 Martin Baulig <martin@gnome.org>
15922 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
15923 stack offset and begin/end scope address of a local variable.
15924 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
15925 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
15926 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
15928 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
15929 Added new relocation types for start/end scope of a local variable.
15931 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15933 * object.h: add mono_object_domain() macro.
15934 * reflection.c: handle typespecs.
15935 * icall.c: MonoMethod::get_Name() implementation.
15937 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15939 * icall.c: String::GetHashCode() icall implementation.
15941 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15943 * icall.c: String::IndexOfAny icall.
15944 * object.c, object.h: make array->max_length more useful.
15945 Intrduced mono_object_class() and mono_string_length() macros.
15947 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15949 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
15950 instead of g_unichar_isdigit.
15952 2002-04-11 Nick Drochak <ndrochak@gol.com>
15954 * icall.c: Implement a simple Double.ToString().
15956 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15958 * appdomain.h: only io-layer.h is supposed to be included.
15959 * icall.c: explicitly import environ. Fix warning.
15961 2002-04-10 Nick Drochak <ndrochak@gol.com>
15963 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
15964 return true even if it's not Daylight Savings time.
15965 Only return false for the case where the function isn't
15966 implemented for a plaform (read Windows).
15968 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15970 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
15973 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
15975 * mempool.c (mono_mempool_alloc): only use g_malloc when
15976 absolutely necessary.
15978 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
15980 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
15982 * class.c (mono_class_vtable): use domain mempool to allocate vtable
15983 (mono_class_proxy_vtable): use domain mempool
15985 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15987 * appdomain.h, appdomain.c: split initialization that requires the
15988 execution engine support into mono_runtime_init().
15990 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
15992 * class.c (mono_class_init): don't include vtable inside MonoClass
15993 to save some memory, gather some statistics.
15994 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
15996 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15998 * icall.c: internalcall implementation for ValueType.Equals().
16000 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
16002 * object.c (mono_message_init): moved
16003 (mono_runtime_exec_main): new arch. independent impl.
16004 (mono_runtime_invoke_array): new method - like
16005 mono_runtime_invoke, but you can pass an array of objects.
16006 (mono_remoting_invoke): new arch. independent impl.
16007 (mono_message_invoke): new arch. independent impl.
16008 (mono_runtime_class_init): new arch. independent impl.
16009 (mono_runtime_object_init): new arch. independent impl.
16011 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16013 * metadata.c, object.c, reflection.c: documented the exported
16016 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16018 * icall.c: simpler code to pass the assembly builder data to corlib.
16019 Implement GetNestedTypes() internalcall.
16021 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16023 * class.c: warn if a type can't be loaded.
16025 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
16027 * image.h: typedef MonoImageOpenStatus
16028 * types.h: removed unused file
16030 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
16032 * icall.c: Enum_ToObject accepts enum value arguments.
16034 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16036 * class.c: move initialization of properties, events and nested
16037 classes, so that they happen for interfaces, too.
16039 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16041 * icall.c: cleanup some ugly casts in Array_SetValue*.
16043 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16045 * icall.c: the values array fro enums is of the correct type, now.
16046 Implement (correctly) getFullName instead of assQualifiedName for
16048 * reflection.h, reflection.c: added mono_type_get_name ().
16050 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16052 * assembly.c, image.h: for each MonoImage, record from wich assembly
16054 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
16055 Make Type.Assembly work.
16057 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
16059 * debug-symfile.h: use char* instead of gpointer to avoid
16062 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
16064 * icall.c (ves_icall_InternalExecute): impl. FielSetter
16065 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
16067 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
16069 * icall.c (mono_message_init): impl. (code cleanup)
16070 (ves_icall_InternalExecute): impl. FieldGetter
16072 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
16073 defined we call all (non-static)methods through the vtable.
16075 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
16077 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
16078 finalizer even though the memory is still referenced (and the chunk of
16079 memory is not freed).
16081 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
16083 * assembly.c: fix brokeness.
16085 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
16087 * class.c: kill some warnings. Check explicit interface method
16088 implementation also without considering the namespace.
16089 Load also literal strings in static class data.
16091 2002-03-29 Miguel de Icaza <miguel@ximian.com>
16093 * assembly.c (default_assembly_name_resolver): Kill memory leak.
16094 (default_assembly_name_resolver): Make the resolver take the
16095 "base" directory where the assembly was originally defined, so we
16096 can load DLLs that are in the same directory as the assembly that
16097 is being referenced.
16099 2002-03-28 Dick Porter <dick@ximian.com>
16105 * unicode.c: Warning cleanups
16107 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
16109 * object.h, reflection.h: use the correct type instead of MonoObject.
16111 2002-03-28 Martin Baulig <martin@gnome.org>
16113 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
16114 (mono_debug_update_symbol_file): Initialize classes if necessary.
16116 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
16118 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
16119 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
16121 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
16123 * assembly.h: fix function prototype.
16124 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
16125 * mono-endian.h: use const cast.
16127 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
16129 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
16131 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
16133 * loader.c: don't assert when a typeref can't be loaded, give
16134 a chance to the runtime to trow an exception instead.
16135 * loader.h: fix warning.
16137 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
16139 * class.c (mono_class_proxy_vtable): added proxy support
16141 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
16143 * icall.c: removed last of PAL calls, added System.Environment
16144 * file-io.h, file-io.c: MonoIO implementation
16145 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
16147 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
16149 * appdomain.c: do not use the byte marker in ldstr table lookup.
16150 * debug-helpers.c: allow two ':' to separate class and method name.
16151 * object.c: allocate arrays bounds with the GC, too.
16152 * verify: add a few more checks.
16154 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
16156 * reflection.c: output also literal strings. Allocate parameter data
16157 with GC_malloc() (thanks, Martin, for catching this!).
16159 2002-03-26 Martin Baulig <martin@gnome.org>
16161 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
16162 include the `this' offset in the `param_offsets'.
16164 2002-03-25 Martin Baulig <martin@gnome.org>
16166 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
16167 mono_debug_get_class() function to get the classes. Added new
16168 relocation types for arrays and strings.
16169 (mono_debug_get_class): New static function to search in all
16170 referenced assemblies for a metadata token.
16172 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
16174 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
16176 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
16177 hold gc-allocated objects. Make the string heap a stream like the
16178 others. Removed duplicated code when writing stream info.
16179 Added asserts to catch possible buffer overflows. Set the sorted map
16180 for tables that need sorting. Added some documentation.
16182 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
16184 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
16185 for interned strings and vtables.
16187 2002-03-24 Martin Baulig <martin@gnome.org>
16189 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
16190 it in the array since it was created with g_slist_prepend().
16192 2002-03-24 Martin Baulig <martin@gnome.org>
16194 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
16195 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
16196 (mono_debug_method_from_token): Renamed to
16197 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
16198 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
16200 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
16203 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
16205 2002-03-24 Martin Baulig <martin@gnome.org>
16207 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
16208 (mono_debug_method_from_token): New func.
16210 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
16211 New interncall, calls mono_debug_local_type_from_signature().
16212 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
16213 calls mono_debug_method_from_token().
16215 2002-03-23 Martin Baulig <martin@gnome.org>
16217 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
16218 specifies the number of bytes to be converted, not the array size.
16219 Return the number of chars, not the number of bytes.
16220 (ves_icall_iconv_get_chars): The `byteCount' argument
16221 specifies the number of bytes to be converted, not the array size.
16223 2002-03-23 Martin Baulig <martin@gnome.org>
16225 * reflection.h (MonoReflectionSigHelper): New type.
16227 * reflection.c (mono_reflection_sighelper_get_signature_local),
16228 (mono_reflection_sighelper_get_signature_local): New functions.
16230 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
16231 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
16234 2002-03-23 Martin Baulig <martin@gnome.org>
16236 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
16237 is_writeable is set.
16238 (mono_raw_buffer_update): New function to write the modified map
16241 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
16243 * debug-symfile.c (mono_debug_update_symbol_file): Call
16244 mono_raw_buffer_update() when done writing.
16246 2002-03-23 Martin Baulig <martin@gnome.org>
16248 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
16250 * debug-symfile.c: Added support for arguments and local variables.
16252 2002-03-23 Dick Porter <dick@ximian.com>
16254 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
16255 protected by ifdefs, hence breaking the w32 build.
16257 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16259 * object.c: implement is_interned() the right way.
16261 2002-03-21 Martin Baulig <martin@gnome.org>
16263 * debug-symfile.[ch]: New files to handle debugging information
16264 files. There's also support to dynamically update these symbol
16265 files to include machine dependent information.
16267 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
16269 * threads.c (mono_thread_create): new function to create thread
16272 2002-03-20 Martin Baulig <martin@gnome.org>
16274 * icall.c (ves_icall_InternalInvoke): Create a new object if the
16275 method is a constructor.
16276 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
16277 points to ves_icall_InternalInvoke().
16279 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
16281 * file-io.c: Flush shouldn't throw exceptions.
16283 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
16285 * file-io.c: FileStream flush support; FileSetLength now
16286 restores file pointer.
16288 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
16290 * class.c: set image for pointer classes.
16292 2002/03/19 Nick Drochak <ndrochak@gol.com>
16294 * sysmath.c: Forgot one.
16296 2002-03-18 Miguel de Icaza <miguel@ximian.com>
16298 * sysmath.c: Avoid redefining existing names.
16300 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
16302 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
16303 handled by runtime as icall rather than dllimport from libm.so
16304 * file-io.c, file-io.h: fixed handle argument type.
16306 2002-03-18 Dick Porter <dick@ximian.com>
16308 * reflection.c (mono_image_get_type_info): rename interface to
16309 iface, because of "#define interface struct" on windows.
16311 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
16313 * class.c, class.h: rename and export mono_ptr_class_get().
16314 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
16315 * reflection.c, reflection.h, icall.c: better/saner type name
16316 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
16319 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
16321 * class.c (mono_class_init): removed hardcoded GHC_SLOT
16323 * icall.c (ves_icall_InternalInvoke): impl.
16325 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16327 * reflection.c: output the interface map table, too.
16329 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
16331 * class.c (class_compute_field_layout): separate computation of
16332 static field layout
16334 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
16336 * icall.c: added System.Buffer support.
16337 * file-io.c: moved file icalls from PAL to FileStream.
16339 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
16341 * icall.c (ves_icall_System_Object_GetHashCode): impl.
16343 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
16345 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
16347 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16349 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
16351 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
16353 * debug-helpers.{c,h}: moved here from monograph some useful functions
16354 to locate a method by name/signature in a class or image. Included
16355 also a small and flexible IL disassembler.
16357 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16359 * reflection.c: fixup tokens in methods with small header size, too.
16361 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
16363 * object.c (mono_string_to_utf8): remove assert(!error), instead
16366 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
16368 * icall.c: update to the new mono_Array_class_get interface.
16370 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
16372 * appdomain.c, object.c: Boehm-GC enable.
16373 * icall.c: make get_data_chunk() support split data requests.
16374 Ensure a class is initialized in more cases. Return only the first
16375 property found in GetProperties() or the compiler gets confused.
16376 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
16377 * reflection.h, reflection.c: add fixup mechanism for field and method
16378 tokens. Initialize assembly->typeref in a single place. Output
16379 properties after events. Support custom attributes for events, too.
16380 Typo fix for paramter custom attrs.
16382 2002-03-07 Martin Baulig <martin@gnome.org>
16384 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
16386 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
16388 * class.c (mono_array_class_get): fix. for multi. dim. arrays
16390 2002-03-06 Martin Baulig <martin@gnome.org>
16392 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
16393 non-zero lower bounds. See testcases #F10-#F13.
16395 2002-03-05 Martin Baulig <martin@gnome.org>
16397 * exception.c (mono_get_exception_argument_out_of_range): New exception.
16399 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
16400 ves_icall_System_Array_GetValue(), only calculate the absolute array position
16402 (ves_icall_System_Array_SetValue): Likewise.
16403 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
16404 as argument and does the actual work. This function is used when copying a
16405 multi-dimensional array.
16406 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
16407 now do all the widening conversions of value types.
16408 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
16410 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16412 * class.c: remove some magic numbers and use the smbolic names,
16413 instead. Added init_events() to load event info at class init time.
16414 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
16415 and mono_metadata_methods_from_event().
16416 * reflection.h, reflection.c: added support for writing out the evnets
16417 related information.
16419 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
16421 * reflection.h, icall.c: use a different method (GetInterfaces)
16422 to gather interface info and add isbyref, isprimitive and
16423 ispointer to the ves_icall_get_type_info() return value.
16425 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
16427 * class.h: stared adding support for events.
16428 * icall.c: split find_members implementation. Added debug icall to get
16429 the address of an object.
16430 * reflection.c: handle TypeBuilders in mono_type_get_object().
16432 2002-03-01 Martin Baulig <martin@gnome.org>
16434 * icall.c (ves_icall_System_Array_GetLength): This must throw an
16435 ArgumentOutOfRangeException(), not an ArgumentException().
16436 (ves_icall_System_Array_GetLowerBound): Likewise.
16437 (ves_icall_System_Array_GetValue): Improved argument checking.
16438 (ves_icall_System_Array_SetValue): Improved argument checking.
16440 2002-03-01 Martin Baulig <martin@gnome.org>
16442 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
16443 called with invalid arguments rather than just dying with g_assert().
16444 (ves_icall_System_Array_SetValue): Likewise.
16445 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
16446 raise a NotImplementedException instead.
16447 (ves_icall_System_Array_GetLength): Added argument checking.
16448 (ves_icall_System_Array_GetLowerBound): Added argument checking.
16450 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
16452 * object.h (mono_assert): new macros mono_assert and
16453 mono_assert_not_reached
16455 2002-02-28 Martin Baulig <martin@gnome.org>
16457 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
16458 and "System::String::IsInterned" to "System::String::_IsInterned".
16460 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
16462 * icall.c: remove hacks for typebuilder. Added icall to create a
16463 modified type from a tybebuilder.
16464 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
16465 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
16466 to create a backing MonoClass for a TypeBuilder.
16468 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16470 * class.c, class.h: more refactoring of class init.
16471 Export mono_class_setup_mono_type() and mono_class_setup_parent().
16473 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
16475 * marshal.c, marshal.h: start of marshaling interface.
16477 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
16479 * icall.c: fix order in assembly qualified name icall.
16481 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
16483 * class.c: do not free str, since we store it in the hash table.
16484 * reflection.h: add label field to MonoILExceptionInfo.
16485 * reflection.c: handle references to more than one assembly. Handle
16486 case when there isn't a module created in the assembly.
16488 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
16490 * class.c: Fix typo. Start refactoring of class init code.
16492 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
16494 * appdomain.c: exit with 1 on error.
16495 * class.c: we already have the name in MonoClassField.
16496 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
16497 MonoStreamHeader instead of an offset of image->raw_metadata.
16499 2002-02-26 Miguel de Icaza <miguel@ximian.com>
16501 * appdomain.c (mono_init): Be even more descriptive about the error.
16503 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
16505 * appdomain.c: give the user an informative message when corlib can't
16508 2002-02-26 Martin Baulig <martin@gnome.org>
16510 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
16511 New icall to get the time zone data.
16513 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16515 * reflection.c: set virtual and raw size of section correctly.
16516 * threads.c: transfer domain information to newly created threads.
16518 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
16520 * class.c: when instancing a class in a domain, load the default
16521 vaules for static fields from the constant table. Fix System.Enum to
16523 * icall.c: implement Object::GetType() internalcall. Implemented
16524 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
16525 Fixed checking of binding flags in find_members().
16526 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
16527 * reflection.c: handle enumerations when writing to the constant
16528 table. Use a different object cache for types.
16531 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
16533 * object.c (mono_object_isinst): fix for arrays
16535 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
16537 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
16539 * object.c: don't use mprotect () and fix intern pool hash table
16540 lookup for big endian systems.
16542 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16544 * icall.c: change type_is_subtype_of () signature.
16546 2002-02-21 Mark Crichton <crichton@gimp.org>
16548 * rand.c, rand.h: Added random number generator for
16549 System.Security.Cryptography classes.
16551 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
16553 * icall.c: Added System.Security.Cryptography calls.
16555 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
16557 * class.c, icall.c, metadata.c: better support for pointer types.
16558 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
16559 * reflection.c: Add support for getting custom attrs for properties
16560 and simplify some code.
16562 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16564 * icall.c: change getToken () and add custom attribute GetBlob()helper
16566 * reflection.h: add custom attrs array to the reflection builder structures.
16567 * reflection.c: encode and emit custom attributes for all the relevant
16568 reflection objects. Cache fieldref and methodref tokens. Change
16569 mono_image_create_token() interface to take a MonoDynamicAssembly.
16570 More complete custom attributes decoder. Load custom attributes for
16571 Assembly, Field, Method and Constructor objects, too. Make the
16572 returned array an Attribute[] one, not object[]. Added
16573 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
16574 custom attribute constructor.
16576 2002-02-20 Dick Porter <dick@ximian.com>
16580 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
16581 problem code out for now).
16583 2002-02-19 Radek Doulik <rodo@ximian.com>
16585 * object.c (mono_ldstr): use hash table to avoid multiple swapping
16587 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
16589 * icall.c: register the GetCustomAttributes method.
16590 * object.c, object.h: add mono_string_new_len ().
16591 * reflection.h, reflection.c: added mono_runtime_invoke(),
16592 mono_install_runtime_invoke(). Added
16593 mono_reflection_get_custom_attrs () to load custom attributes and
16594 create the attribute objects.
16596 2002-02-19 Dick Porter <dick@ximian.com>
16597 * threads-dummy-types.c:
16598 * threads-dummy-types.h:
16601 * threads-pthread-types.c:
16602 * threads-pthread-types.h:
16603 * threads-pthread.c:
16604 * threads-pthread.h: Deleted obsolete files
16606 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
16608 * class.c (mono_class_vtable): runtime init the class when we
16609 allocate static class data.
16611 * icall.c (ves_icall_System_Array_SetValue): check for null values.
16613 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
16614 and String - but we will need generic marshalling support in the
16616 (mono_init): set the domain name in a ms compatible way
16618 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
16621 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
16623 * object.c (mono_array_clone): use alloca() instead of g_malloc
16626 * appdomain.c (mono_domain_unload): impl.
16628 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16630 * appdomain.c, object.c: fix intern pool implementation.
16631 * class.c: fix alignment code.
16633 2002-02-16 Radek Doulik <rodo@ximian.com>
16635 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
16636 and s2 > s1, just copy lower bytes to be compatible with little
16637 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
16638 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
16640 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
16641 force big_endian to be 1 for big endian machines
16642 (ves_icall_iconv_new_decoder): ditto
16644 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
16646 * socket-io.c (convert_sockopt_level_and_name): If the system
16647 doesn't define SOL_IP or SOL_TCP, get them by hand using
16648 getprotobyname() and caching the values (because this could be a
16650 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
16651 Use the appropriate struct when the system does support it. Ie,
16652 not all systems have struct ip_mreqn so use struct ip_mreq when
16655 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
16657 * reflection.c: handle finally clauses.
16659 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
16661 * socket-io.c: use g_snprintf() instead of snprintf.
16663 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
16665 * reflection.c (mono_param_get_objects): Cast second argument to
16666 mono_method_get_param_names to a const char** to silence the
16669 * appdomain.c (mono_domain_assembly_open): Put parens around the
16670 truth statement in the for-loop.
16672 * unicode.c (iconv_convert): Got rid of a compiler warning about
16673 int i being unused when the system has a new iconv.
16674 (iconv_get_length): Same.
16676 * image.c (load_class_names): Cast the second argument to
16677 g_hash_table_insert() to char* to hush compiler warnings about the
16679 (mono_image_open): Same here.
16681 * socket-io.c: Don't conditionally include sys/filio.h or
16682 sys/sockio.h here anymore since we now get them from
16683 io-layer/io-layer.h
16684 (inet_pton): If the system doesn't support inet_aton, implement
16685 using inet_addr and also #define INADDR_NONE if it isn't defined
16688 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
16690 * metadata.c, metadata.h: added function to get packing and size info
16692 * reflection.h, reflection.c: handle field RVA data. Save info about
16693 the table layout if needed. Assign typedef indexes to all the types
16694 before dumping the info about them to avoid forward reference problems.
16696 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
16698 * socket-io.c (convert_sockopt_level_and_name): ifdef
16699 SO_ACCEPTCONN because it is not defined on my system (old debian)
16701 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16703 * opcode.c: use stddef.h to get NULL.
16705 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
16707 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
16708 for FIONBIO, FIONREAD and SIOCATMARK.
16709 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
16710 define INADDR_NONE and besides, inet_addr() is deprecated and
16711 should not be used. Use inet_pton() instead - it also has the
16712 added bonus that it can easily handle IPv6 addresses as well.
16713 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
16715 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
16717 * decimal.c: remove _MSC_VER conditional.
16719 2002-02-13 Dick Porter <dick@ximian.com>
16722 * icall.c: Internal calls for Blocking, Select, Shutdown,
16723 GetSocketOption and SetSocketOption
16725 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16727 * assembly.cs: better resolver: use it instead of some kludgy
16730 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
16732 * reflection.c: the best way to speed-up the compiler is to avoid
16735 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
16737 * class.c (mono_class_vtable): changed the object layout
16738 (obj->vtable->class).
16739 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
16741 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16743 * assembly.c: look for assemblies in the assembly dir, too.
16745 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16747 * class.c: fix thinko in mono_class_from_type().
16749 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16751 * exception.h, exception.c: added TypeLoadException.
16752 * object.h, object.c: added mono_array_clone ().
16753 * icall.c: handle throwOnError in AssemblyGetType().
16754 Added Array.Clone().
16755 * opcode.h, opcode.c: use a single value for the opcode val.
16756 Compile fix for non-gcc compilers.
16758 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
16760 * opcodes.c, opcodes.h: export interesting info about opcodes.
16762 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
16764 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
16767 * class.c (class_compute_field_layout): set element_class for enums
16768 (mono_class_create_from_typedef): set element_class for normal classes
16770 * icall.c (ves_icall_System_Enum_get_value): impl.
16772 * class.c (mono_class_create_from_typedef): do not set valuetype
16773 flag for System.ValueType and System.Enum
16775 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
16777 * unicode.c (iconv_convert): fix big endian problem.
16779 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16781 * class.c: add asserts if we are ever going to scribble over memory.
16782 * socket-io.c: not all systems have AF_IRDA defined.
16784 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
16786 * class.c (class_compute_field_layout): do not consider static
16787 fields to compute alignment
16789 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
16791 * appdomain.c (mono_appdomain_get): impl.
16792 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
16794 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
16796 * icall.c: ignore "file://" prefix when loading an assembly.
16798 2002-01-23 Dick Porter <dick@ximian.com>
16802 * Makefile.am: Added socket support
16804 2002-01-23 Miguel de Icaza <miguel@ximian.com>
16806 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
16807 code back. This should return the assemblies that are loaded by
16808 the runtime on behalf of an application domain.
16810 The current implementation is still broken, it just returns every
16811 assembly loaded, but until we get real applications domain this
16814 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
16816 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
16819 2002-01-23 Miguel de Icaza <miguel@ximian.com>
16821 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
16822 the mono_class_from_name lookup.
16823 (ves_icall_get_parameter_info): ditto.
16824 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
16826 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
16828 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
16830 * class.c: load also nested classes on class init.
16831 System.ValueType instance methods gets passed boxed
16832 values, unless methods in derived classed that get a pointer to the
16834 * icall.c: use better name parsing code in GetType().
16835 * image.c, image.h: add mono_image_loaded ().
16836 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
16837 * reflection.c, reflection.h: added mono_reflection_parse_type().
16839 2002-01-22 Veronica De Santis <veron78@interfree.it>
16841 * icall.c : Added mapping of internal calls for Manual and Auto reset events
16842 * threads.c : Added the implementation of internal calls for events
16843 * threads.h : Added prototypes of internal calls for events
16845 2002-01-21 Radek Doulik <rodo@ximian.com>
16847 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
16849 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
16851 * class.c (mono_class_init): set min_align to 1 (instead of 0)
16852 (mono_class_value_size): use min_align
16854 2002-01-20 Dick Porter <dick@ximian.com>
16857 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
16858 so it compiles on w32.
16860 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
16862 * metadata.c (mono_type_stack_size): impl.
16864 * class.c (mono_class_get_field): impl. memberref token
16866 2002-01-16 Veronica De Santis <veron78@@interfree.it>
16868 * icall.h : Added the internal calls mapping for CreateMutex_internal
16869 and ReleaseMutex_internal.
16870 * threads.h : Added the prototype of mutexes internal calls.
16871 * threads.c : Added the implementations of mutexes internal calls.
16873 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
16875 * metaparse.h: removed unused file.
16876 * reflection.c, reflection.h: added stream_data_align () function
16877 to align data in streams and keep stream aligned. Add support for
16878 exception support in method headers.
16880 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
16882 * unicode.c: make iconv_convert () return the number of bytess written
16883 in the output buffer.
16885 2002-01-15 Dick Porter <dick@ximian.com>
16886 * threads.c: Make the runtime's idea of infinite timeouts coincide
16887 with the class library's
16889 Fix a particularly egregious bug in mono_thread_cleanup(). That
16890 code was so utterly bogus it must have been written on a Monday.
16892 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
16894 * reflection.h: add subtypes field to TypeBuilder.
16895 * reflection.c: encode constants for literal fields.
16896 Handle subtypes. Fix user string token (and add a zero byte)
16899 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
16901 * class.c (mono_class_init): bug fix: assign slot numbers for
16904 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16906 * reflection.c: don't try to output a code RVA for abstract methods.
16907 Small fixes for method header format. Output parameter info to the
16908 ParamDef table. Save method overriding info to MethodImpl table.
16909 Fix property support. Allow typedef.extends to be a type in the
16911 * verify.c: fix off-by-one error.
16913 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
16915 * class.c: fix mono_class_from_mono_type () for szarray types.
16916 Remove unused cache check in mono_class_from_type_spec().
16917 * icall.c: *type_from_name () functions handle simple arrays and byref.
16918 * reflection.c: handle byref and szarray types. Handle methods without
16919 body (gets P/Invoke compilation working). Handle types and fields in
16921 * reflection.h: add rank to MonoTypeInfo.
16923 2002-01-10 Dick Porter <dick@ximian.com>
16925 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
16928 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
16930 * icall.c: initialize class in type_from_handle ().
16931 Loop also in parent classes for get_method ().
16932 * reflection.c: properly encode class and valuetype types.
16933 Start on encoding TypeBuilder types. Handle fieldrefs.
16934 Use correct length when registering a user string.
16935 Handle ConstructorBuilder and MonoMethod in get_token ().
16936 Make mono_type_get_object () aware of cached types.
16937 * object.c: back out change to mono_string_new ().
16939 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
16940 * object.c: mono_string_new should return a NULL when the string
16941 passed in is NULL -- not try to deference it.
16943 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
16945 * icall.c: hack to make IsSubType work for TypeBuilders.
16946 * reflection.c: emit constructors before methods.
16947 Retrieve param names in mono_param_get_objects().
16949 2002/01/05 Nick Drochak <ndrochak@gol.com>
16951 * Makefile.am: fix list of headers and sources so automake 1.5
16952 doesn't complain. Removed \# at end of list.
16954 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
16956 * reflection.c: get token for a method ref. Set return type of
16957 constructor to void.
16958 * loader.c: debug message.
16959 * class.c: typo fix.
16961 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
16963 * icall.c: fix array init with rank > 1. FindMembers
16964 loops in parent class as well.
16965 * image.c: do not insert nested types in name cache.
16966 * reflection.c: warning fix.
16967 * reflection.h: add override method (for interface impl).
16969 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
16971 * metadata.c: fix customattr decoding.
16973 2001-12-21 Miguel de Icaza <miguel@ximian.com>
16975 * rawbuffer.cs: Added native Win32 implementation, avoids using
16976 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
16978 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
16980 * class.c: make the low-level routines handle the cache.
16982 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
16984 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
16986 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
16988 * class.c: fix mono_array_element_size() for objects.
16989 * class.h, class.c: add properties to MonoClass and load them
16991 * icall.c: check with isinst() when assigning a value to an array
16992 instead of requiring the classes to match exactly.
16993 Implemented icall for System.Type::GetType().
16994 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
16995 enums. Handle bindingflags when looking for methods and fields.
16996 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
16997 and mono_metadata_methods_from_property().
16998 * reflection.h, reflection.c: added structures for propreties,
16999 parameters and enums. Implemented mono_property_get_object() and
17000 mono_param_get_objects().
17002 2001-12-18 Dick Porter <dick@ximian.com>
17004 * file-io.c: Use mono_string_to_utf16() instead of
17005 mono_string_chars()
17007 * object.c: Added mono_string_to_utf16(), which copies the non
17008 NULL-terminated MonoString into a new double-null-terminated
17011 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
17013 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
17015 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
17017 * file-io.c: raise exceptions if handle is invalid.
17019 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
17021 * assembly.c: yet another check for mscorlib.
17022 * class.c, class.h: load nesting info for classes.
17023 * icall.c: many new functions to support the Reflection classes.
17024 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
17025 * reflection.h, reflection.c: mono_image_create_token(),
17026 mono_assembly_get_object(), mono_type_get_object(),
17027 mono_method_get_object(), mono_field_get_object(): methods to return
17028 objects that parallel the C representation of assemblies, types,
17031 2001-12-11 Dick Porter <dick@ximian.com>
17034 * file-io.c: Internal calls for file IO.
17036 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
17038 * tabledefs.h: missing FileAttributes.
17039 * verify.h, verify.c: use is_valid_string () to simplify and check for
17040 valid strings more correctly. Fix warnings and speeling.
17041 Check more tables: Filed, File, ModuleRef, StandAloneSig.
17042 Check code: branches, maxstack, method calls.
17044 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
17046 * object.c (mono_object_allocate): removed static, so that the jit
17047 can allocate value types.
17049 * icall.c (ves_icall_System_DateTime_GetNow): impl.
17051 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17053 * class.c: init enum types right away and register the
17054 token->MonoClass map in mono_class_create_from_typedef ().
17055 * verify.h, verify.c: first cut of the verifier.
17056 * pedump.c: add --verify switch to verify metadata tables.
17057 * tabledefs.h: add some missing enums.
17059 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
17061 * class.c (mono_install_runtime_class_init): impl.
17062 (mono_class_init): renamed mono_class_metadata_init to
17063 mono_class_init, also removed the metadata_inited flag
17065 * object.c (mono_object_isinst): use faster algorithm
17067 2001-11-30 Radek Doulik <rodo@ximian.com>
17069 * mono-endian.h: reverted last change
17070 added function prototypes
17072 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
17073 add mono-endian.c back
17075 * mono-endian.c: returned back, as Paolo pointed out, it's needed
17076 for unaligned access, I've mistaked it with endianess. I am
17078 (mono_read16): fix reverted endianess
17079 (mono_read64): ditto
17080 (mono_read32): ditto
17082 2001-11-30 Dick Porter <dick@ximian.com>
17084 * exception.c: Implement mono_exception_from_name()
17086 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
17088 * metadata.h, metadata.c: remove params_size and locals_size and their
17089 calculation from the metadata code: they are only usefult to the
17092 2001-11-29 Radek Doulik <rodo@ximian.com>
17094 * object.c (mono_ldstr): swap bytes here, it's probably not the
17095 best place, but works for me now, I'll redo it once I know mono
17096 better, also note that I add PROT_WRITE and don't reset back, also
17097 note that it's only affects big endians, so x86 should be OK
17099 * mono-endian.h (read16): use just glib macros for both endians
17101 * mono-endian.c: removed as glib macros are used in in
17102 mono-endian.h so we don't need to care about endianess for read
17103 macros as glib does that for us already
17105 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
17107 * class.h, class.h: take minimum alignment into consideration so
17108 that the fields of a class remain aligned also when in an array.
17110 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17112 * loader.h, loader.c: add mono_method_get_param_names().
17113 * class.c: 0-init class fields.
17115 2001-11-26 Dick Porter <dick@ximian.com>
17119 * threads.c: New file that handles System.Threading on all platforms
17122 * object.h: Remove the synchronisation struct from MonoObject,
17123 replace it with a pointer that gets initialised on demand
17125 * Makefile.am: Replace all the system-specific threading code with
17126 a single file that uses the new wrapper library
17128 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
17130 * class.c, class.h: add mono_install_trampoline() so that the runtime
17131 can register a function to create a trampoline: removes the ugly
17132 requirement that a runtime needed to export arch_create_jit_trampoline.
17133 * object.h, object.c: added mono_install_handler() so that the runtime
17134 can install an handler for exceptions generated in C code (with
17135 mono_raise_exception()). Added C struct for System.Delegate.
17136 * pedump.c: removed arch_create_jit_trampoline.
17137 * reflection.c: some cleanups to allow registering user strings and
17138 later getting a token for methodrefs and fieldrefs before the assembly
17140 * row-indexes.h: updates and fixes from the new ECMA specs.
17142 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
17144 * class.h, class.c: add enum_basetype field to MonoClass.
17145 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
17146 to get index in the constant table reated to a field, param or
17148 * reflection.h, reflection.c: handle constructors. Set public-key and
17149 version number of the built assembly to 0.
17150 * row-indexes.h: update from new ECMA spec.
17152 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
17154 * class.h, class.c: add a max_interface_id to MonoClass.
17155 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
17156 since it's used to do that. Added mono_type_type_from_obj().
17157 Make GetType() return NULL instead of segfaulting if the type was not
17158 found. Handle simple arrays in assQualifiedName.
17159 * object.h: add a struct to represent an Exception.
17160 * reflection.c: output call convention in method signature.
17161 Add code to support P/Invoke methods and fixed offsets for fields.
17163 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
17165 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
17167 * icall.c: use mono_array_addr instead of array->vector: fixes the
17168 reflection image writing.
17169 * reflection.c: init call convention byte to 0 in method signature.
17170 Encode the property signature. Don't output property-related methods
17171 twice. Really process the properties for a type (don't cast a field to
17172 a property, my mom always told me that).
17173 Fix 64 bit issues in pointer alignment in a different and more
17176 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
17178 * loader.h: Removed type class from MonoDefaults, added monotype
17180 * loader.c: Loaded MonoType, removed loading of Type
17182 * icall.c (my_mono_new_object): Now returns a System.MonoType,
17183 and fills in System.Type._impl with a RuntimeTypeHandle rather
17184 than the actual MonoClass *
17186 (ves_icall_type_from_handle): change from type_class to
17189 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
17192 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
17195 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
17197 (ves_icall_System_Reflection_Assembly_GetType): implemented
17199 (ves_icall_System_MonoType_assQualifiedName): implemented
17201 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
17203 2001-11-09 Miguel de Icaza <miguel@ximian.com>
17205 * assembly.c (mono_assembly_open): Implement a cache for the
17208 (mono_assembly_close): only destroy the assembly when the last
17211 2001-11-09 Dick Porter <dick@ximian.com>
17213 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
17215 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
17217 * class.c (mono_class_metadata_init): bug fix: compute the right slot
17219 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
17221 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
17222 from Martin Weindel.
17223 * object.h: add mono_string_chars ().
17225 2001-11-07 Miguel de Icaza <miguel@ximian.com>
17227 * reflection.c (build_compressed_metadata): Eliminates warnings
17228 and uses 64-bit clean code.
17230 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
17231 (mono_type_equal): Change signature to eliminate warnings.
17233 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17235 * icall.c, loader.c: remove the internalcall array constructors.
17236 Changes to match the new MonoArray structure.
17237 * object.h, object.c: an array object doesn't allocate an extra
17238 vector. Add mono_array_new_full () to create jagged arrays easily.
17240 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
17242 * metadata.h, metadata.c: add mono_metadata_field_info () to
17243 retreive all the info about a field from vairous tables.
17244 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
17245 * class.h, class.c: augment MonoClassField with more info.
17246 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
17247 policy and load a field's RVA if needed.
17249 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
17251 * class.c (mono_class_metadata_init): create a trampoline for all
17252 virtual functions instead of actually compiling them.
17254 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
17256 * class.h, class.c: include name in MonoClassField.
17257 * class.c: fix fundamental type of System.Object and System.String.
17258 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
17260 * icall.c: remove internalcalls for the Reflection stuff that is now
17262 * loader.c: mono_field_from_memberref () implementation.
17263 * mono-endian.c: thinko (s/struct/union/g).
17264 * object.c, object.h: make the mono_string_* prototypes actually use
17265 MonoString instead of MonoObject.
17266 * reflection.c, reflection.h: updates for changes in the reflection
17267 code in corlib: we use C structures that map to the actual C# classes.
17268 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
17269 fat method header if needed and use the info from the ILGenerator for
17270 methods. Handle fields in types. Misc fixes.
17272 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
17274 * class.c (mono_class_metadata_init): bug fix: always allocate
17275 space for static class data
17277 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
17279 * class.c (mono_compute_relative_numbering): use relative
17280 numbering to support fast runtime type checks.
17282 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
17284 * class.c (mono_class_create_from_typeref): added debugging output
17285 to print class name when MonoDummy is returned instead of real class
17287 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
17289 * class.c (mono_class_metadata_init): interface offset table now
17290 contains pointers into the vtable - this is more efficient for the jit
17292 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
17294 * class.c (mono_class_metadata_init): use a temporary vtable (the
17295 old algorithm only worked for the interpreter, but not for the jit)
17297 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
17299 * loader.c (method_from_memberref): use mono_class_get to get the
17300 class of an array instead of using System.Array directly.
17301 (mono_get_method): also add MEMBERREF methods to the method cache
17302 which usefull for arrays.
17304 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
17306 * pedump.c (arch_compile_method): added to compute vtable entry
17308 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
17309 number of interfaces.
17311 * class.h: merged MonoArrayClass into MonoClass
17313 * class.c (mono_class_create_from_typedef): compute the vtable size and
17314 allocate space to include the vtable inside MonoClass
17315 (mono_class_metadata_init): initialize the vtable
17317 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
17319 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
17320 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
17321 * image.c: endian fixes by Laurent Rioux.
17322 * object.h, object.c: rename MonoStringObject to MonoString and
17323 MonoArrayObject to MonoArray. Change some function names to conform to
17324 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
17325 guint16* as first argument, so don't use char*.
17326 Provide macros to do the interesting things on arrays in a portable way.
17327 * threads-pthread.c: updates for the API changes and #include <sched.h>
17328 (required for sched_yield()).
17329 * icall.c: updates for the API changes above.
17330 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
17331 platforms that need them.
17333 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
17335 * class.c: set the correct type for all the fundamental
17336 type when loading the class.
17338 2001-10-05 Dick Porter <dick@ximian.com>
17340 * threads-pthread.c (pthread_mutex_timedlock): Simple
17341 compatibility version for C libraries that lack this call.
17343 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17345 * class.c: MonoTypes stored in MonoClass are stored as
17346 fundamental MonoTypes when the class represents a
17347 fundamental type (System.Int32, ...).
17348 The TypeHandle return by ldtoken is a MonoType*.
17349 * icall.c: ves_icall_get_data_chunk () write out all the
17350 PE/COFF stuff. Implement ves_icall_define_method (),
17351 ves_icall_set_method_body (), ves_icall_type_from_handle ().
17352 * image.c: properly skip unknown streams.
17353 * loader.h, loader.c: add type_class to mono_defaults.
17354 * metadata.c, metadata.h: export compute_size () as
17355 mono_metadata_compute_size () with a better interface.
17356 Typo and C&P fixes.
17357 * pedump.c: don't try to print the entry point RVA if there is no entry point.
17358 * reflection.c, reflection.h: many cleanups, fixes, output method
17359 signatures and headers, typedef and typeref info, compress the metadata
17360 tables, output all the heap streams, cli header etc.
17361 * row-indexes.h: typo fixes.
17363 2001-10-04 Dick Porter <dick@ximian.com>
17365 * object.h: Add a synchronisation mutex struct to MonoObject
17367 * object.c (mono_new_object): Initialise the object
17368 synchronisation mutexes
17370 * icall.c: System.Threading.Monitor internal calls
17372 * threads-pthread.h:
17373 * threads-pthread.c: System.Threading.Monitor internal calls
17375 * threads-types.h: New file, includes the system-specific thread
17378 * threads-pthread-types.h:
17379 * threads-pthread-types.c: New files, handle pthread-specific
17380 synchronisation types
17382 * threads-dummy-types.h:
17383 * threads-dummy-types.c: New files of dummy support for
17384 thread-specific types
17388 * pedump.c: include mono-endian.h not endian.h
17390 * Makefile.am: More threads files.
17391 Name mono-endian.h not endian.h
17393 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
17395 * Makefile.am, reflection.h, reflection.c: move here the reflection related
17396 stuff and implement a few more bits.
17397 * icall.c: a field needs to be dereferenced twice. Do not use the same
17398 name for two variables in the same scope.
17399 * image.c, image.h: cleanups.
17401 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
17403 * class.c (mono_class_metadata_init): bug fix: compute the right size
17405 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
17407 * icall.c: implemented some of the Reflection internalcalls.
17408 * image.c, image.h: start writing out the PE/COFF image.
17409 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
17410 that does the reverse than decode_blob_size ().
17411 * object.c: use mono_metadata_encode_value (). Move here
17412 temporary implementation of mono_string_to_utf8 ().
17413 * rawbuffer.c: make malloc_map static.
17415 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17417 * metadata.c: fix type comparison for arrays.
17418 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
17419 Added a couple of new classes to monodefaults.
17420 * icall.c: added a couple of Reflection-related internalcalls.
17421 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
17422 Added a byval_arg MonoType to MonoClass.
17424 2001-09-28 Dick Porter <dick@ximian.com>
17427 * threads-pthread.h:
17428 * threads-pthread.c: Implemented internal calls for
17429 LocalDataStoreSlot operations. Applied mutexes around all shared
17430 data. Reworked the thread creation and Start() operations to
17431 avoid a race condition.
17434 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
17436 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
17438 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
17440 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
17442 * class.c, loader.c: warn and return NULL instead of erroring out.
17443 * icall.c: added System.AppDomain::getCurDomain().
17444 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
17446 2001-09-25 Dick Porter <dick@ximian.com>
17448 * threads-pthread.h:
17449 * threads-pthread.c: Implemented timed thread joining and added
17450 System.Threading.Thread::Join_internal internal call
17452 * icall.c: Added System.Threading.Thread::Join_internal internal call
17455 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
17457 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
17459 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
17460 mono_string_intern () to implement the semantics of the ldstr opcode
17461 and the interning of System.Strings.
17462 * icall.c: provide hooks to make String::IsIntern and String::Intern
17465 2001-09-23 Dick Porter <dick@ximian.com>
17468 * threads-dummy.h: New files of dummy threading routines
17470 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
17471 support code based on system specifics
17473 Rename PTHREAD_LIBS to THREAD_LIBS
17475 2001-09-23 Dick Porter <dick@ximian.com>
17477 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
17478 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
17480 (mono_thread_init): Set up a Thread object instance to return when
17481 the main thread calls Thread.CurrentThread
17482 (mono_thread_cleanup): Wait for all subthreads to exit
17484 * icall.c: New internal calls for System.Threading.Thread::Sleep
17485 (including Schedule) and CurrentThread
17487 * threads.h: New file, to insulate thread-specific stuff from the
17490 2001-09-21 Dick Porter <dick@ximian.com>
17492 * threads-pthread.h:
17493 * threads-pthread.c: New file, for handling pthreads-style
17494 threading support. Start() now starts a new thread and executes
17495 the ThreadStart delegate instance.
17497 * icall.c: Added the internalcall for
17498 System.Threading.Thread::Start_internal
17500 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
17502 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
17504 * loader.c: work around the different signatures for delegates
17505 constructors csc generates in compiled code vs the ones compiled in mscorlib.
17507 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
17509 * class.h, class.c: add mono_class_get_field_from_name ().
17510 * *: Fix C comments and other ANSI C issues.
17512 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
17514 * endian.h, assembly.c: fix some endianness issues.
17516 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
17518 * loader.h, load.c: add delegate_class to mono_defaults.
17519 Handle runtime provided methods in mono_get_method ().
17521 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
17523 * loader.c (mono_get_method): use pinvoke for internal call
17525 * icall.c: use pinvoke for internal call
17527 * loader.c (method_from_memberref): set the method name
17529 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
17531 * metadata.c: help the compiler generate better code for
17532 mono_class_from_mono_type ().
17534 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
17536 * class.c (mono_class_metadata_init): delayed computing of the
17537 class size to mono_class_metadata_init ()
17539 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
17541 * class.c, class.h: add an interfaces member to MonoClass.
17542 * image.c, image.h: add assembly_name field to MonoImage
17543 from the assembly table.
17544 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
17546 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
17548 * class.c: Handle Array in mono_class_from_mono_type ().
17549 * metadata.c, pedump.c: some endian fixes.
17551 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
17553 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
17554 * metadata.c: fix small problem introduced with the latest commit.
17556 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
17558 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
17559 We don't need a MonoMetadata pointer anymore to compare signatures in
17560 mono_metadata_signature_equal (), update callers.
17561 Reduced memory usage an number of allocations for MonoMethodHeader and
17562 MonoMethodSignature.
17564 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
17566 * metadata.c: added compare for szarray.
17568 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
17570 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
17571 and add a couple more types to it and mono_defaults. Give an hint on
17572 classes that need implementing in our corlib and are referenced
17575 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
17577 * class.h, class.c: keep track if a class is also an Enum.
17578 * loader.c: Implement a couple more types for use in libffi
17579 marshalling. Gives better diagnostics when failing to dlopen
17580 a library. Set method->klass for P/Invoke methods, too.
17582 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
17584 * class.c, class.h: add a MonoType this_arg to MonoClass that
17585 represents a pointer to an object of the class' type that
17586 can be used by the interpreter and later the type cache.
17587 Add best guess alignment info for valuetype objects.
17589 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
17591 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
17592 into MonoType: one less level of indirection and allocation and
17593 simplifies quite a bit of code. Added cache for MonoTypes that are
17594 used frequently, so that we don't need to allocate them all the time.
17596 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
17598 * class.c (mono_class_create_from_typedef): System.Enum is also a
17599 value type, although it does not derive from System.ValueType
17600 (maybe a bug in the ms compiler?)
17602 * metadata.c (mono_type_size): return the right size for value types
17604 * loader.c (mono_get_method): only initialize method header if not abstract
17606 * class.c (mono_class_from_mono_type): use mono_default values.
17608 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
17610 * *: use MonoClass pointers instead of <type_tokens>
17612 * class.h: new flag: metadata_inited.
17614 * class.c (mono_class_metadata_init): impl.
17615 (mono_class_instance_size): impl.
17616 (mono_class_data_size): impl.
17618 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17620 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
17621 MonoClass now has the name and name_space fields.
17622 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
17623 mono_get_method () takes and optional MonoClass as argument.
17624 Removed mono_typedef_from_name() and added mono_class_token_from_name()
17625 instead that takes advantage of a map from class names to typedef
17626 tokens in MonoImage.
17628 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
17630 * metadata.c: zero is not a valid alignment boundary.
17631 Merge MONO_TYPE_VOID in default decoding code.
17633 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
17635 * image.h: merged MonoMetadata into MonoImage
17637 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
17638 identify the type of elements.
17640 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
17642 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
17643 * cil-coff.h: split MonoMSDOSHeader and add size info.
17644 * image.c: add some consistency checks.
17645 * metadata.c: fix row size computation: one programmer
17646 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
17647 add explanation for the locator routine.
17648 Fix decoding of size in method header.
17650 2001-08-20 Miguel de Icaza <miguel@ximian.com>
17652 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
17653 (g_concat_dir_and_file): Bring g_concat_dir_and_file
17654 function from gnome-libs. This uses the right path separator
17655 based on the OS, and also works around a bug in some systems where
17656 a double slash is not allowed.
17657 (default_assembly_name_resolver): Use g_concat_dir_and_file
17658 (mono_assembly_open): ditto.
17660 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
17662 * metadata.c (mono_metadata_signature_equal): impl.
17664 * *: void is now a realy MonoType (instead of using NULL)
17666 * metadata.c (do_mono_metadata_parse_type): use
17667 mono_metadata_parse_type to parse void value.
17669 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
17671 * metadata.c, metadata.h: in the signature and method header store
17672 only the space required for holding the loca vars and incoming arguments.
17674 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
17676 * metadata.c (do_mono_metadata_parse_type): treat void like any
17677 other type (instead of assigning NULL);
17679 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
17681 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
17683 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
17685 * image.c (do_mono_image_open): added a cache for arrays.
17687 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
17689 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
17690 decode a single column from a row in a metadata table and changes
17691 to take advantage of it in the typedef locator (gives a nice speed up).
17692 Store offset info for function params.
17694 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
17696 * image.h (MONO_IMAGE_IS_CORLIB): removed
17698 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
17700 * assembly.c: how could mono_assembly_close () had ever worked?
17701 * metadata.c, metadata.h: provide offset info for local vars.
17702 Implement mono_type_size () to take care of alignment as well
17703 as size (it was mono_field_type_size in cli/class.c before).
17705 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
17707 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
17709 * assembly.h (CORLIB_NAME): set to corlib.dll
17711 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
17713 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
17715 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
17716 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
17717 tokentype.h: massive namespace cleanup.
17719 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
17721 * metadata.h, metadata.c: decode exception clauses when parsing method header.
17723 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
17725 * metadata.c (mono_metadata_free_type): added check for type !=
17726 NULL (void) before calling mono_metadata_free_type()
17728 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
17730 * metadata.h, row_indexes.h: added header with enumerations to use
17731 to index in the columns from tables in metadata and to decode coded
17732 tokens: we should start using this instead of embedding magic numbers
17735 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
17737 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
17738 Move metadata_t info from cli_image_info_t to MonoImage, where
17739 it's easily accessible. Changed all the uses accordingly.
17740 Added the method and class caches to MonoImage.
17741 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
17742 and mono_metadata_decode_value () signature to be more consistent
17743 with the other parse functions (and simplify code). Taken advantage
17744 of zero-length array allocation with GCC. Removed reduntant (and
17745 wrong) MonoFieldType struct and use MonoParam instead. Changed
17746 mono_metadata_parse_field_type () to use common code for parsing.
17747 Added mono_metadata_typedef_from_field () and
17748 mono_metadata_typedef_from_method () to lookup a typedef index from a
17749 field or method token.
17750 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
17752 2001-07-23 Miguel de Icaza <miguel@ximian.com>
17754 * metadata.c (mono_metadata_parse_field_type): Implement.
17755 (do_mono_metadata_parse_type): Split engine from
17756 mono_metadata_parse_type, so that we can create smaller structures
17757 for things that just have one pointer to the MonoType (look at
17760 2001-07-20 Miguel de Icaza <miguel@ximian.com>
17762 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
17763 as Jan Gray found out, it is incorrect.
17765 2001-07-18 Miguel de Icaza <miguel@ximian.com>
17767 * assembly.c: Implement asssembly loading. This loads an image
17768 and loads all the referenced assemblies. Come to think of it, we
17769 could always do lazy loading of the assemblies.
17771 * image.c (mono_image_open): Keep loaded images in a hashtable.
17773 * image.h (MonoImage): Add reference count.
17775 2001-07-17 Miguel de Icaza <miguel@ximian.com>
17777 * assembly.c (mono_assembly_open): Keep track of the file name in
17778 case the assembly has no ASSEMBLY table.
17780 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
17783 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
17785 * metadata.c, metadata.h: decode local vars in method header
17786 parse function. Change callers accordingly.
17788 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
17790 * metadata.h, cil-coff.h: protect against multiple inclusion.
17791 Added some new structures to hold information decoded from metadata:
17792 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
17793 and relevant decoding/free functions.
17794 * metadata.c: implement decoding functions. Add warning for out of bounds
17795 index in mono_metadata_locate(). Implement mono_get_method () to retreive
17796 all the info about a method signature and invocation. Remove check on
17797 uninitialized local var in parse_mh() and fix memory leak.
17799 2001-07-12 Miguel de Icaza <miguel@ximian.com>
17801 * metadata.h: More macros.
17803 * tokentype.h: New file.
17805 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
17807 * assembly.c: added a consistency check and initialize
17808 some structures with g_new0().
17809 * metadata.c: fixed a couple more bugs in table size computation
17810 and add other checks for out-of bound access to metadata.
17812 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
17814 * metatada.c: fix bugs computing table sizes. Spew a
17815 warning when index in string heap is out of bounds.
17817 2001-07-04 Miguel de Icaza <miguel@ximian.com>
17819 * metadata.h: Add a couple of macros to manipulate tokens.
17821 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
17823 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
17824 cli_section_tables).
17826 2001-07-01 Miguel de Icaza <miguel@ximian.com>
17828 * metadata.c (mono_metadata_user_string): New function, provides
17829 access to the UserString heap.
17831 2001-06-27 Miguel de Icaza <miguel@ximian.com>
17833 * metadata.c: Add inline documentation.
17835 2001-06-26 Miguel de Icaza <miguel@ximian.com>
17837 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
17840 2001-06-22 Miguel de Icaza <miguel@ximian.com>
17842 * typeattr.h: New file, TypeAttribute flags.
17844 2001-06-21 Miguel de Icaza <miguel@ximian.com>
17846 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
17847 mono_assembly_ensure_section): Section loading code.
17848 (load_section_tables): Load the sections.
17850 * mono/metadata/metadata.c (mono_metadata_locate_token,
17851 mono_metadata_locate): Functions to locate the information
17852 definition given a token or a table and an index.
17853 (mono_metadata_compute_table_bases): New.
17854 (compute_size): New function to compute the sizes of the various
17857 * mono/metadata/metadata.h: Finish listing the different index
17860 * mono/metadata/pedump.c: Improve to dump new information.
17862 2001-06-19 Miguel de Icaza <miguel@ximian.com>
17864 * mono/metadata/metadata.c: Entered all the tables matching
17867 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2