1 2006-05-04 Zoltan Varga <vargaz@gmail.com>
3 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
5 * marshal.c (mono_marshal_cleanup): New cleanup function.
7 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
10 * class.c (mono_class_init): Fix leaking class->nested_classes.
12 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
14 * image.c (mono_image_init): Initialize the new cashes.
16 * image.c (mono_image_close): Destroy the new cashes.
18 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
20 * mempool.c (mono_mempool_strdup): New helper function.
22 * class-internals.h: Add prototype for mono_loader_unlock ().
24 * domain.c (mono_jit_info_table_find): Fix a warning.
25 (mono_debugger_check_runtime_version): Ditto.
27 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
28 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
29 functions to these modules.
31 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
34 * marshal.c (mono_free_bstr): Fix a warning.
36 * assembly.c (mono_assembly_open_full): Fix another small leak.
38 * object.c: Fix some unload leaks in the remoting code.
40 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
43 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
45 * reflection.c: Fix some unload leaks in dynamic assemblies.
47 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
49 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
50 * marshal.h: Add BSTR support on Win32
51 * icall.c: Add BSTR icalls
52 * metadata.h: Add BSTR enums
54 2006-04-26 Miguel de Icaza <miguel@novell.com>
56 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
57 boolean parameter and instead pass the information on `options'
58 parameter (FileOptions).
60 * icall.c: Register the new signature for MonoIO.Open.
62 * debug-helpers.c (dis_one): Trying to understand how coverity
63 works. Fix Run 5, item 78.
65 2006-04-26 Dick Porter <dick@ximian.com>
67 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
70 2006-04-25 Martin Baulig <martin@ximian.com>
72 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
74 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
75 debugger_thread_created().
76 (debugger_gc_push_all_stacks): Don't handle the main thread in any
78 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
79 (mono_debugger_finalize_threads): New function; undo the effects
80 of mono_debugger_init_threads().
81 (mono_debugger_create_all_threads): Removed.
83 2006-04-24 Zoltan Varga <vargaz@gmail.com>
85 * image.c (mono_image_close): Tidy up trace messages.
87 * assembly.c (mono_assembly_close): Ditto.
89 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
90 no longer references an already freed assembly. Fixes #78168.
92 2006-04-21 Dick Porter <dick@ximian.com>
94 * threads.c (mono_thread_detach): Fix reference counting when
97 2006-04-21 Zoltan Varga <vargaz@gmail.com>
99 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
102 2006-04-19 Zoltan Varga <vargaz@gmail.com>
104 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
105 (mono_type_to_stind): Ditto.
107 * marshal.c: Use the new helper functions to simplify code.
109 * image.c (mono_image_close): Add some code for help debug assembly unloading
112 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
115 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
116 assembly was already loaded in another appdomain. Fixes #78083.
118 2006-04-13 Zoltan Varga <vargaz@gmail.com>
120 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
121 referenced assemblies.
122 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
124 * domain.c (mono_domain_free): Add a trace message.
126 * appdomain.c (add_assemblies_to_domain): Ditto.
128 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
131 2006-04-12 Zoltan Varga <vargaz@gmail.com>
133 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
135 2006-04-12 Martin Baulig <martin@ximian.com>
137 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
138 `USE_INCLUDED_LIBGC'.
140 2006-04-12 Zoltan Varga <vargaz@gmail.com>
142 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
143 the patch contains ../ and a small directory name later. Hopefully fixes
146 2006-04-10 Martin Baulig <martin@ximian.com>
148 Clean up the debugger's thread-handling code.
150 The debugger's thread-handling code has been moved from
151 ../mini/debug-debugger.c to threads.c. We now iterate directly
152 over the `threads' hash, keep track of exiting threads and also
155 We can now debug XSP and XSP based applications with the debugger.
157 * object-internals.h (MonoThread): Added `gpointer end_stack'.
160 (MonoThreadCallbacks): Removed; this was only used by the debugger.
161 (mono_install_thread_callbacks): Likewise.
163 * threads.c (mono_thread_callbacks): Removed.
164 (debugger_thread_created, debugger_thread_exited): New static functions.
165 (start_wrapper): Call debugger_thread_created().
166 (thread_cleanup): Call debugger_thread_exited().
167 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
168 (mono_debugger_init_threads): New public function.
169 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
170 iterate directly over the `threads' hash and also use proper locking.
172 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
174 * mono-debug-debugger.h
175 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
177 2006-04-10 Zoltan Varga <vargaz@gmail.com>
179 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
180 argument type=array. Fixes #78057.
182 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
184 * culture-info-table.h : regenerated. Fixed bug #69652.
186 2006-04-07 Zoltan Varga <vargaz@gmail.com>
188 * loader.c metadata.c: Reapply a variant r59116.
190 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
192 * class.c (mono_class_setup_interface_offsets): New internal function.
194 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
195 interfaces too. Fixes #77398.
197 * reflection.c (encode_cattr_value): Add support for
198 parameter type=object, argument type=array.
199 (load_cattr_value): Ditto. Fixes #77916.
201 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
202 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
204 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
205 a byval char array and CharSet is Ansi.
207 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
209 2006-04-06 Zoltan Varga <vargaz@gmail.com>
211 * metadata.c: Add some locking comments.
213 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
215 (mono_metadata_free_method_signature): Don't free the signature itself.
217 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
219 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
220 reference the same MonoImage.
221 (mono_assembly_load_from_full): Add an assert.
223 2006-04-05 Zoltan Varga <vargaz@gmail.com>
225 * image.c (mono_image_close): Don't put the image we are about to free into the
226 loaded_images_guid_hash.
228 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
229 to reduce code duplication.
231 * marshal.c: Register the native functions called by this module as icalls, to
232 somewhat centralize the creation of MonoMethodSignature's.
234 * loader.c (mono_method_signature): Add a cache for method signatures.
236 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
237 the parameter attributes of a method.
238 (mono_metadata_parse_method_signature_full): Refactored the computation of
239 parameter attributes into a separate function. Also avoid one allocation in
242 * assembly.c (mono_assembly_close): Ditto.
244 * image.c (mono_image_close): Log trace messages with INFO level.
246 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
248 * image.c reflection.c: Correct reference counting of image modules.
250 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
251 of this function from the image mempool.
253 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
254 to allow more cached types to be used.
256 * mono-debug.c (mono_debug_add_method): Appled patch from
257 David S. Miller <davem@sunset.davemloft.net>: Access
258 minfo->lexical_blocks[] entry elements using read32().
260 2006-04-04 Zoltan Varga <vargaz@gmail.com>
262 * loader.c (mono_free_method): No longer free the method header for non-dynamic
263 methods as it is allocated from the mempool.
265 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
268 * metadata-internals.h: Add comments describing the reference counting scheme
269 used for MonoImage and MonoAssembly.
271 * image.c assembly.c reflection.c: Rework reference counting of images and
272 assemblies so they are freed when the runtime is shut down. Free some
273 additional memory structures when an image is unloaded.
275 2006-04-03 Zoltan Varga <vargaz@gmail.com>
277 * class.c loader.c reflection.c: Allocate more data structures in
280 2006-03-31 Miguel de Icaza <miguel@novell.com>
283 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
284 build on pre glib 2.4 systems.
286 2006-03-31 Zoltan Varga <vargaz@gmail.com>
288 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
290 * icall.c: Fix some warnings.
292 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
294 * culture-info-table.h : regenerated.
296 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
298 * threads.c, object-internals.h, verify.c: changed the culture caching
299 code to use a normal MonoArray for storage so the GC can keep track of
300 them easily. Fixed bits of the cache logic, too and simplified the
303 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
305 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
306 thread for non-Boehm GCs.
308 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
310 * domain.c, object.c, domain-internals.h: reduce the amount of memory
311 needed to keep track of the data for static fields.
313 2006-03-29 Raja R Harinath <rharinath@novell.com>
316 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
317 for interface classes. Use 'num_methods' instead.
318 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
319 before using '->vtable_size' field.
321 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
323 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
324 doesn't contain managed pointers, so use a normal hashtable.
326 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
328 * reflection.c, class-internals.h, domain.c: fixed handling of types
329 used as values for objects in custom attributes (bug #77915):
331 2006-03-24 Martin Baulig <martin@ximian.com>
333 * class.c (mono_class_setup_fields): Added support for generic
334 instances; fixes #77580.
336 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
338 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
340 2006-03-24 Dick Porter <dick@ximian.com>
342 * file-io.c (get_file_attributes): More stat macro breakage.
345 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
347 * profiler.c: added the file=filename option in the default profiler
348 to output the profile data to filename.
350 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
352 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
355 2006-03-22 Martin Baulig <martin@ximian.com>
357 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
358 allocated `MonoClassField *' in `fb->handle'.
360 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
362 * class.c, image.c, metadata-internals.h: implemented new mechanism to
363 allocate interface ID to save memory and allow better ID reuse on
364 appdomain unload. setup_generic_vtable () removal from Martin.
366 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
368 * object.h, appdomain.c, domain.c, exception.c, icall.c,
369 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
370 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
371 write barriers for reference stores with managed objects accessed with
372 C structures in the runtime and in embedding programs.
374 2006-03-20 Raja R Harinath <rharinath@novell.com>
376 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
377 'interface_id' and 'max_interface_id' fields of MonoClasses
378 representing open generic types.
380 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
382 * object.h, object.c, icall.c: added functions to deal with
383 storing valuetypes that contain references in managed objects.
384 * reflection.c, string-icalls.c, threads.c, marshal.c: small
385 fixes and comments around uses of mono_array_addr ().
387 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
389 * object.h, icall.c, monitor.c: object.GetHashCode ()
390 implementation that supports the moving garbage collector.
392 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
394 * icall.c, threads-types.h, threads.c: implemented finalizer for
397 2006-03-15 Zoltan Varga <vargaz@gmail.com>
399 * metadata.c (mono_type_size): Add a fixme.
400 (mono_type_stack_size): Ditto.
402 * object-internals.h (MonoReflectionAssemblyBuilder): Added
403 'type_forwarders' field.
405 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
406 attribute from net 2.0.
408 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
411 * class.c (mono_class_setup_fields): Fix a warning.
413 * class.c (mono_class_from_name): Add support for assemblyref entries
414 in the EXPORTEDTYPE table.
416 * reflection.c: Add support for handling type forwarders under net 2.0.
418 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
420 2006-03-14 Zoltan Varga <vargaz@gmail.com>
422 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
423 overwriting entries in ModuleBuild->types, also clean up the code
424 a little. Fixes #77774.
426 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
428 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
429 load friend assembly info when present.
431 2006-03-14 Raja R Harinath <rharinath@novell.com>
433 Fix crasher on gtest-158.cs.
434 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
435 the return value if the MonoClass we want is yet in an
437 * class.c (mono_class_create_from_typedef): Add an comment
438 explaining an order dependency between mono_class_setup_parent and
439 mono_class_setup_mono_type.
441 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
443 * class.c: documentation updates and events bug fix.
445 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
447 * class.c: some cleanup, locking fixes.
449 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
451 * class.c: fix the generics code to setup nested
452 type info to the instantiated type (bug #77770).
454 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
456 * marshal.c: fixed a few type correctness issues.
458 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
460 * loader.c: the Set/Get/Addrtess array methods should be public.
462 2006-03-11 Zoltan Varga <vargaz@gmail.com>
464 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
466 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
469 2006-03-10 Zoltan Varga <vargaz@gmail.com>
471 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
473 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
475 * mempool.c (mono_mempool_alloc): Speed this up a bit.
476 (mono_mempool_alloc0): Ditto.
478 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
481 (create_object_from_sockaddr): it was allocating 4 extra bytes
482 for the AF_UNIX data. Fixes bug #77747.
484 2006-03-09 Zoltan Varga <vargaz@gmail.com>
486 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
488 2006-03-09 Dick Porter <dick@ximian.com>
490 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
491 Fixes bug 76966 again.
493 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
495 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
497 * appdomain.c: Bumped corlib version to 48 (due to r57532)
499 2006-03-07 Martin Baulig <martin@ximian.com>
502 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
504 2006-03-07 Martin Baulig <martin@ximian.com>
507 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
508 regression introduced in r56970; see gtest-252.cs.
510 * loader.c (mono_get_method_constrained): Correctly handle generic
511 methods; see gtest-253.cs.
513 2006-03-04 Zoltan Varga <vargaz@gmail.com>
515 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
517 2006-03-04 Martin Baulig <martin@ximian.com>
519 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
520 compute the parent type at runtime, just like we're already doing
524 (mono_reflection_bind_generic_parameters): Don't compute the
527 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
529 2006-03-04 Martin Baulig <martin@ximian.com>
531 * mono-debug-debugger.h
532 (mono_debugger_create_notification_function): Allocate memory at
533 runtime and return a pointer to it.
535 2006-03-03 Zoltan Varga <vargaz@gmail.com>
537 * assembly.c: Fix windows build.
539 * assembly.c: Fix build.
541 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
543 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
545 2006-03-03 Dick Porter <dick@ximian.com>
548 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
549 Check parameters before dereferencing them. Fixes Aaron's part of
552 2006-03-03 Raja R Harinath <rharinath@novell.com>
554 Fix performance regression.
555 * loader.c (find_method_in_class): Add 'from_class' argument.
556 Rename 'klass' argument to 'in_class'. The signature is compared
557 against the method in 'in_class', and the corresponding method is
558 returned from 'from_class'.
559 (find_method): Walk both 'in_class' and 'from_class' in parallel.
560 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
561 type definition and generic instantiation in parallel.
562 (mono_get_method_constrained): Update to changes.
564 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
566 * threads.c: make sure the domain is correct, too when doing
567 mono_thread_attach ().
569 2006-03-01 Zoltan Varga <vargaz@gmail.com>
571 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
572 windows. Fixes #77683.
574 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
576 * object.h, *: introduced specific way to set elements of an array
577 of references to be used as write barrier. Still need to audit the
578 uses of mono_array_addr.
580 2006-03-01 Miguel de Icaza <miguel@novell.com>
582 * object-internals.h: New field to cache the assmebly name, patch
583 from Tambet Ingo (tambet@ximian.com)
585 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
587 * decimal.h, class-internals.h, metadata-internals.h,
588 file-io.h: mark a few function declarations as internal, to
589 reduce the number of PLT entries.
591 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
593 * file-io.c: fix typo in warning message.
595 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
597 * loader.c: on unix, lookup the "*A" version of a function
598 if charset is auto as a second option before failing.
600 2006-02-28 Raja R Harinath <rharinath@novell.com>
602 * class.h (mono_class_inflate_generic_method): Revert to two
604 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
605 (mono_class_inflate_generic_method_full): Add.
606 * class.c (mono_class_inflate_generic_method_full): Rename from
607 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
608 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
609 * loader.c, reflection.c: Update to changes.
611 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
613 * icall.c: const fixes and small improvements.
615 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
617 * threadpool.c: for asynchronous connect(), enable the same workaround
618 for BSD 6 as for the Mac. Fixes bug #77637.
620 2006-02-24 Zoltan Varga <vargaz@gmail.com>
622 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
623 formatted classes. Fixes #77524.
625 2006-02-24 Raja R Harinath <rharinath@novell.com>
627 * class.c (inflate_generic_type): Add a couple more
629 (inflate_generic_context): Don't use the 'gmethod' from
631 (mono_class_inflate_generic_method): If the method has generic
632 parameters, but the passed-in context doesn't have a 'gmethod',
633 create one. Use the possibly simplified generic instantiation
634 from the declaring class instead of the one passed in.
636 2006-02-24 Raja R Harinath <harinath@gmail.com>
638 Make generic method signature and method header handling lazy.
639 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
640 (inflate_generic_header): Likewise.
641 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
642 parameter to avoid inflating types.
643 (mono_get_inflated_method): Empty out.
644 * class.h (mono_class_inflate_generic_method): Update to changes.
645 * loader.c (mono_get_method_from_token): Don't parse signature for
646 generic methods, nor methods of generic classes.
647 (mono_method_signature): Rename from 'mono_method_signature'.
648 Inflate signature on demand.
649 (mono_method_get_header): Inflate method header on demand.
650 * reflection.c: Update to changes.
652 2006-02-23 Raja R Harinath <rharinath@novell.com>
654 * metadata.c (mono_metadata_inflate_generic_inst): If the
655 instantiation is closed, don't bother expanding it in the new
657 * class.c (inflate_generic_class): If the generic instantiation
658 doesn't change after inflation, return the argument itself.
659 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
661 (inflate_generic_context): If neither the generic class nor the
662 generic method instantiations change, return the original context.
663 * reflection.c (mono_method_get_object): Do
664 'mono_get_inflated_method' before accessing the ->klass field.
665 (inflate_mono_method): Don't create a MonoGenericMethod unless
667 (inflate_method): Don't pass a constructed type as the declaring
668 type of a methodbuilder.
670 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
672 * object.c: fix memory overwrite.
674 2006-02-22 Dick Porter <dick@ximian.com>
676 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
677 it doesn't work any more.
678 (mono_threads_request_thread_dump): Fix unused variable warnings.
680 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
682 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
683 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
684 the public header file.
686 2006-02-21 Zoltan Varga <vargaz@gmail.com>
688 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
690 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
692 * class-internals.h, object.c: reduce the size of MonoVTable
693 and store the interface_offsets array at negative offsets.
695 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
697 * metadata.c: tweak table descriptors data structures to reduce
698 size and runtime relocations.
700 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
702 * marshal.c: fix some types and opcodes to be type-safe
703 in marshaling wrappers.
705 2006-02-21 Ankit Jain <jankit@novell.com>
707 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
709 2006-02-21 Raja R Harinath <rharinath@novell.com>
711 * metadata.c (get_constraints): Relax debugging checks for monodis.
713 2006-02-21 Ankit Jain <jankit@novell.com>
715 * metadata.c (mono_metadata_load_generic_params): Move the code
716 checking for ambiguous generic params from here to mono/dis/get.c
717 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
719 2006-02-21 Raja R Harinath <harinath@gmail.com>
721 Fix assertion triggered when compiling nemerle.
722 * class.c (mono_get_shared_generic_inst): Rename from
723 get_shared_inst and make non-static.
724 * loader.c (mono_get_shared_generic_method): New. Used to create
725 the MonoGenericContext-equivalent of a MonoGenericContainer.
726 (mono_get_method_from_token): Initialize the 'context' field of
727 the created MonoGenericContainer.
728 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
729 * metadata.c (get_constraints): Add sanity check.
730 * class-internals.h: Add new internal methods.
732 * reflection.c (verify_safe_for_managed_space): New sanity check.
733 Currently checks that owner-less generic parameters aren't allowed
735 (mono_type_get_object): Use it.
736 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
737 that are now in mono_type_get_object.
738 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
740 2006-02-19 Raja R Harinath <harinath@gmail.com>
742 * metadata.c (mono_type_create_from_typespec): Rename from
743 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
744 argument and caching of types in the generic container.
745 (unwrap_arrays, find_generic_param): Remove.
746 * metadata-internals.h: Update.
747 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
749 2006-02-18 Zoltan Varga <vargaz@gmail.com>
751 * class.c (mono_class_get_exception_for_failure): Fix a warning.
753 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
754 return values. Fixes #77581.
756 * class.c (mono_fnptr_class_get): Switch name and name_space.
758 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
759 classes and add support for [In, Out] attributes.
760 (mono_marshal_free_asany): Ditto. Fixes #77524.
762 2006-02-18 Raja R Harinath <harinath@gmail.com>
764 * class.c (mono_class_from_generic_parameter): Make more robust to
765 incomplete MonoGenericContainers from monodis.
767 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
769 * class-internals.h: added some more exception types.
770 * class.c, metadata.c: added a few checks to handle missing
773 2006-02-17 Raja R Harinath <rharinath@novell.com>
775 Use owner-less generic-params some more.
776 * class.c (my_mono_class_from_generic_parameter): Remove.
777 (mono_class_from_generic_parameter): Handle null image,
778 param->name and param->owner.
779 (mono_class_from_mono_type): Update.
780 (mono_class_create_from_typespec): Remove 'container' parameter.
781 If that parameter is non-null, the result is always inflated by
782 'mono_class_get_full' anyway.
783 (mono_class_get): Rename from _mono_class_get. Remove 'container'
785 (mono_class_get_full): Update.
787 * class.c (inflate_generic_type) [GENERICINST]: If the generic
788 instance is not open, don't bother inflating.
789 (mono_class_setup_fields): Hoist some loop-invariants. Don't
790 parse metadata for inflated classes.
791 (_mono_class_get): Change GenericContext* parameter to
793 (mono_class_create_from_typespec): Likewise. Simplify, and
794 implement trivially. All the cases are handled in
795 mono_class_from_mono_type. Don't inflate returned class.
796 (mono_class_get_full): Delegate GENERICINST optimization to
797 inflate_generic_type.
798 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
800 2006-02-16 Dick Porter <dick@ximian.com>
802 * socket-io.c (create_object_from_sockaddr): Fix typo.
803 (create_sockaddr_from_object): Check array lengths before
804 potentially accessing items off the end.
805 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
806 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
807 (ves_icall_System_Net_Sockets_Socket_Send_internal)
808 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
809 length checks to avoid wraparound overflows.
810 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
811 contents of the array of sockets
812 (hostent_to_IPHostEntry2)
813 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
814 Check return value of inet_ntop ().
815 (addrinfo_to_IPHostEntry): Fix typo
817 2006-02-16 Raja R Harinath <rharinath@novell.com>
819 Type metadata parsing doesn't use generic-instantiation information.
820 * metadata.c (mono_metadata_parse_array_full): Change
821 MonoGenericContext* parameter to MonoGenericContainer*.
822 (mono_metadata_parse_type_full): Likewise.
823 (mono_type_create_from_typespec_full): Likewise.
824 (mono_metadata_parse_mh_full): Likewise.
825 (mono_metadata_parse_generic_inst): Likewise.
826 (do_mono_metadata_parse_generic_class): Likewise.
827 (do_mono_metadata_parse_type): Likewise.
828 * metadata-internals.h: Update to changes.
829 * class.c (mono_class_find_enum_basetype): Likewise.
830 (mono_class_setup_fields): Likewise.
831 (mono_class_create_from_typespec): Likewise.
832 * loader.c (method_from_methodspec): Likewise.
833 (mono_get_method_from_token): Likewise.
834 (mono_method_get_header): Likewise.
836 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
838 * marshal.c: handle additional GENERICINST case (patch from
839 Thong Nguyen <tum@veridicus.com>).
840 Fix a few cases where LDIND_I/STIND_I was used for references.
842 2006-02-16 Raja R Harinath <rharinath@novell.com>
844 * reflection.c (mono_reflection_get_token): Remove unused variable.
846 2006-02-16 Martin Baulig <martin@ximian.com>
848 * reflection.c (mono_reflection_get_token): Add support for fields
849 in instantiated generic types.
852 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
854 2006-02-15 Martin Baulig <martin@ximian.com>
857 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
858 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
859 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
860 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
862 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
864 * class.c, metadata.c, metadata.h, object.c, icall.c,
865 marshal.c: changed mono_type_get_underlying_type () to do
866 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
867 Fixed handling of instantiated generic valuetypes (bug #75479).
869 2006-02-15 Raja R Harinath <rharinath@novell.com>
871 * metadata.c (mono_metadata_decode_signed_value): Simplify.
872 Delegate to mono_metadata_decode_value, and work on the returned value.
874 * icall.c (ves_icall_MonoType_GetGenericArguments):
875 Add consistency check here too.
877 2006-02-15 Ankit Jain <jankit@novell.com>
879 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
882 2006-02-15 Ankit Jain <jankit@novell.com>
884 * metadata.c (mono_metadata_decode_signed_value): New function to decode
885 signed values, used only for representing lower bounds of arrays.
886 (mono_metadata_parse_array_full): Use new
887 mono_metadata_decode_signed_value to decode lower bounds.
889 2006-02-14 Martin Baulig <martin@ximian.com>
892 (mono_reflection_get_token): Support "MonoGenericMethod" and
893 "MonoGenericCMethod" and allow generic instances / methods.
895 2006-02-11 Zoltan Varga <vargaz@gmail.com>
897 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
898 to obtain the terminal size using an ioctl.
900 * object.c (mono_nullable_init): Revert this as nullable reference
902 (mono_nullable_box): Ditto.
904 2006-02-09 Dick Porter <dick@ximian.com>
906 * threads.c (mono_thread_detach): Drop a reference to the thread
909 2006-02-09 Zoltan Varga <vargaz@gmail.com>
911 * object.c (mono_nullable_init): Handle nullable reference types.
912 (mono_nullable_box): Ditto. Fixes #77446.
914 2006-02-07 Martin Baulig <martin@ximian.com>
916 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
918 2006-02-07 Ankit Jain <jankit@novell.com>
920 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
921 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
922 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
923 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
924 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
925 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
927 2006-02-02 Zoltan Varga <vargaz@gmail.com>
929 * class.c (mono_class_create_generic): Set type_token as well.
931 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
934 2006-02-02 Martin Baulig <martin@ximian.com>
936 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
937 has never been used so far.
939 2006-02-02 Martin Baulig <martin@ximian.com>
941 * mono-debug-debugger.h: Changed comment at the top of this file;
942 the header is not installed, but it's safe to #include it from
945 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
946 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
948 2006-02-02 Martin Baulig <martin@ximian.com>
951 (MonoSymbolTable): Removed the `metadata_info' field.
954 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
956 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
957 (mono_debugger_add_builtin_types): Removed.
958 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
959 (mono_debugger_create_notification_function): We now operate on a
960 pre-allocated area; take a `gpointer' and return `void'.
962 * mono-debug-debugger.c
963 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
964 (mono_debugger_add_builtin_types): Removed.
966 2006-02-02 Martin Baulig <martin@ximian.com>
968 * threads.c (mono_debugger_create_all_threads): New public method.
970 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
972 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
973 breaks on several platforms.
975 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
977 * assembly.c: the VS.NET build doesn't supply default values for
978 MONO_ASSEMBLIES and MONO_CFG_DIR.
980 2006-02-01 Zoltan Varga <vargaz@gmail.com>
982 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
985 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
987 * loader.c (method_from_memberref): Fix a warning.
989 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
991 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
992 with explicit layout. Fixes #77433.
994 2006-01-31 Zoltan Varga <vargaz@gmail.com>
996 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
997 max_interface_id is initialized before using it. Fixes #77398.
998 (ves_icall_Type_GetInterfaces): Ditto.
1000 2006-01-30 Raja R Harinath <rharinath@novell.com>
1002 * metadata.c (mono_metadata_parse_method_signature_full): Don't
1003 allocate memory for parameter attributes when parsing memberref
1005 * loader.c (mono_loader_set_error_method_load): Don't warn.
1006 (method_from_memberref): Ensure MissingMethodException gets thrown
1007 if method is not found. Make warning more informative.
1009 2006-01-29 Raja R Harinath <harinath@gmail.com>
1012 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
1013 return true if is byref.
1014 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1015 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
1016 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1018 2006-01-27 Raja R Harinath <rharinath@novell.com>
1020 Fix tests/find-method.2.il
1021 * loader.c (find_method, find_method_in_class): Remove is_inflated
1022 argument. Revert 2006-01-18 change.
1023 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
1024 is generic, search for method in its generic definition.
1025 * class.c (mono_class_setup_vtable_general): Print generic
1026 arguments of generic types in debugging printf.
1028 2006-01-26 Zoltan Varga <vargaz@gmail.com>
1030 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
1032 * threads.c (mono_threads_request_thread_dump): New helper function.
1034 2006-01-25 Raja R Harinath <rharinath@novell.com>
1036 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
1038 2006-01-25 Ankit Jain <jankit@novell.com>
1040 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
1041 move definition to ..
1042 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
1044 2006-01-25 Ankit Jain <jankit@novell.com>
1045 Raja R Harinath <rharinath@novell.com>
1047 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
1048 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
1051 2006-01-25 Martin Baulig <martin@ximian.com>
1053 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
1054 `MonoDebuggerThread' into debug-debugger.c.
1056 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
1058 * profiler.c: fix printing of data.
1060 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
1062 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
1063 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
1065 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1067 * object.c: fix deadlock related to string interning.
1069 2006-01-23 Martin Baulig <martin@ximian.com>
1071 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1073 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
1075 2006-01-23 Martin Baulig <martin@ximian.com>
1077 * mono-debug.h: Moved the prototypes of some functions which are
1078 used by the JIT here from mono-debug-debugger.h.
1080 2006-01-21 Martin Baulig <martin@ximian.com>
1082 * Makefile.am: Don't install mono-debug-debugger.h.
1084 2006-01-21 Martin Baulig <martin@ximian.com>
1086 * mono-debug-debugger.h: Enforce the private status of this header
1087 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
1088 Moved some stuff from mono-debugger-jit-wrapper.h here.
1090 2006-01-20 Raja R Harinath <rharinath@novell.com>
1092 * class.c (mono_class_from_typeref): Add a sanity test to help
1093 catch lack of assembly load/search hooks.
1095 2006-01-19 Zoltan Varga <vargaz@gmail.com>
1097 * marshal.c (emit_struct_conv): Relax the fields with same offset
1098 check even more. Fixes #77230.
1100 2006-01-18 Martin Baulig <martin@ximian.com>
1102 * loader.c (find_method_in_class): Added `gboolean is_inflated'
1103 argument; if false, we compare the uninstantiated signatures.
1104 (method_from_memberref): Compare the uninstantiated signatures;
1107 2006-01-18 Robert Jordan <robertj@gmx.net>
1109 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
1110 Clear the weak link. Fixes bug #77170.
1112 * gc.c (mono_gchandle_free):
1113 Reflect *-gc.c changes (tiny optimization).
1115 2006-01-18 Zoltan Varga <vargaz@gmail.com>
1117 * metadata.c (mono_metadata_signature_dup): Applied patch from
1118 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
1121 2006-01-17 Zoltan Varga <vargaz@gmail.com>
1123 * marshal.c (emit_struct_conv): Allow fields with the same offset when
1124 marshalling from native to managed code. Fixes #77230.
1126 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1128 * threadpool.c: fix problem (Mac only) when more than one asynchronous
1129 connect. Fixes bug #77020.
1131 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1133 * class.c: fixed id assignement for nested interfaces (bug #77275).
1134 Added also better info for --print-vtable debugging.
1136 2006-01-12 Martin Baulig <martin@ximian.com>
1138 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
1139 interfaces on-the-fly; fixes #76625.
1142 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
1143 don't need that anymore.
1145 2006-01-12 Miguel de Icaza <miguel@novell.com>
1148 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
1149 To avoid initing the nested_classes when not needed I turned the
1150 PeerCredData as a toplevel internal class, as it has to be shared
1153 Fixes the CASA issue.
1155 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
1157 * domain.c: Accessors for MonoJitInfo
1159 * profiler-private.h: Add jitinfo to the end jit hook
1161 * profiler.[ch]: Define new hooks, called after jitting which give
1162 the MonoJitInfo that was compiled
1164 2006-01-10 Martin Baulig <martin@ximian.com>
1166 * class.c (mono_class_setup_events): Add support for generic
1167 classes; fixes #76440.
1169 2006-01-06 Raja R Harinath <rharinath@novell.com>
1172 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
1173 on passed-in method.
1175 2006-01-03 Zoltan Varga <vargaz@gmail.com>
1177 * object.c (mono_runtime_invoke_array): Add Nullable support.
1179 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
1181 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
1183 * file-io.c: Don't consider sockets as directory and avoid an endless
1184 loop. Fix bug #76966.
1186 2006-01-03 Zoltan Varga <vargaz@gmail.com>
1188 * object.c (mono_nullable_init): New helper function.
1189 (mono_nullable_box): Ditto.
1191 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
1193 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
1195 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
1197 2006-01-02 Zoltan Varga <vargaz@gmail.com>
1199 * class.c (mono_class_is_assignable_from): Make T assignable to
1202 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
1204 * appdomain.c: Bump corlib version to 46.
1205 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
1206 serialization purpose) and changed ves_icall_System_Reflection_
1207 Assembly_get_code_base signature to accept a boolean (to escape, or
1208 not, the assembly code base).
1210 2005-12-23 Dick Porter <dick@ximian.com>
1214 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
1215 CreateEvent icall now returns "created" boolean parameter.
1217 2005-12-22 Zoltan Varga <vargaz@gmail.com>
1219 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
1222 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
1223 when attr_klass is an interface. Fixes #77045.
1225 2005-12-20 Zoltan Varga <vargaz@gmail.com>
1227 * marshal.c (emit_struct_conv): Fix previous patch.
1229 * marshal.c (emit_struct_conv): Add a check for fields with the same
1232 2005-12-20 Raja R Harinath <rharinath@novell.com>
1234 Fix regression in Mono.C5.
1235 * class.c (mono_class_create_generic): If 'klass' is an interface
1236 set up the interface offsets.
1237 (mono_class_is_assignable_from): Don't throw away generic arguments.
1239 2005-12-19 Raja R Harinath <rharinath@novell.com>
1241 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
1244 2005-12-15 Raja R Harinath <rharinath@novell.com>
1246 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
1248 (do_mono_metadata_parse_generic_class): Don't pass the current
1249 generic context when parsing the type being instantiated: it
1250 cannot use it, anyway.
1252 * loader.c (method_from_memberref): Don't inflate a signature if
1253 it doesn't contain any type parameters.
1255 2005-12-15 Zoltan Varga <vargaz@gmail.com>
1257 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
1259 2005-12-14 Martin Baulig <martin@ximian.com>
1262 (mono_type_get_name_recurse): Don't return null for type
1263 parameters and open generic classes.
1264 (mono_class_setup_methods): Don't exclude generic instances.
1265 (mono_get_unique_iid): Use different IDs for different
1266 instantiations of the same generic type.
1267 (mono_class_setup_vtable): Only use setup_generic_vtable() for
1268 open generic instances; create a normal vtable for closed generic
1270 (mono_class_setup_vtable_general): We're now also called for
1271 closed generic instances.
1274 (mono_reflection_bind_generic_parameters): Correctly use
1275 mono_metadata_lookup_generic_inst() everywhere.
1277 2005-12-14 Zoltan Varga <vargaz@gmail.com>
1279 * object.c (mono_class_create_runtime_vtable): Call
1280 mono_class_setup_vtable ().
1282 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
1284 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
1287 * loader.c (mono_loader_set_error_type_load): Print the type load
1288 warnings to the console so they are more visible to the user.
1289 (mono_loader_set_error_method_load): Ditto.
1291 * reflection.c (ensure_runtime_vtable): Revert the last change as it
1294 * reflection.c (ensure_runtime_vtable): Fix build.
1296 * reflection.c (ensure_runtime_vtable): Disable an optimization which
1297 doesn't work in all cases.
1299 2005-12-13 Zoltan Varga <vargaz@gmail.com>
1301 * object.c (mono_array_new_full): Treat a single dimensional array
1302 with 0 lower bounds as an szarray. Fixes #76973.
1304 * reflection.c (custom_attr_visible): Really fix this.
1306 2005-12-12 Zoltan Varga <vargaz@gmail.com>
1308 * reflection.c (custom_attr_visible): Allow nested public attributes
1311 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
1314 2005-12-12 Raja R Harinath <harinath@gmail.com>
1316 * class.c (set_generic_param_owner): Delete.
1317 (mono_class_create_from_typedef): Don't set ->owner field of
1318 generic parameters to "param containers" of enclosing classes.
1319 * reflection.c (mono_reflection_initialize_generic_parameter):
1322 2005-12-11 Zoltan Varga <vargaz@gmail.com>
1324 * reflection.c (custom_attr_visible): Fix build.
1326 2005-12-10 Zoltan Varga <vargaz@gmail.com>
1328 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
1331 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
1332 handling of null parameter defaults.
1334 2005-12-09 Raja R Harinath <rharinath@novell.com>
1336 * class.c (mono_class_from_generic_parameter): Don't set
1337 klass->generic_container.
1338 (my_mono_class_from_generic_parameter): Likewise.
1340 2005-12-07 Zoltan Varga <vargaz@gmail.com>
1342 * reflection.c (load_public_key): Fix a warning.
1343 (method_encode_code): Fix unaligned accesses.
1345 2005-12-07 Martin Baulig <martin@ximian.com>
1347 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
1350 (write_generic_param_entry): Encode our custom attrs.
1352 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
1354 2005-12-07 Martin Baulig <martin@ximian.com>
1356 * reflection.c (encode_new_constraint): Removed; we don't use the
1357 `NewConstraintAttribute' anymore.
1359 2005-12-06 Zoltan Varga <vargaz@gmail.com>
1361 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
1362 not fire a TypeResolve event when Assembly.GetType () is called.
1364 2005-12-05 Ben Maurer <bmaurer@ximian.com>
1366 Beginning of support for nullable types in the runtime. Parts of
1367 this patch are from Martin.
1369 * appdomain.c (MONO_CORLIB_VERSION): Bump
1371 * domain.c (mono_init_internal): get the nullable type
1373 * class.c (mono_class_is_nullable): New method
1374 (mono_class_get_nullable_param): New mehod
1375 (mono_class_create_generic): In types T? set cast_class to T
1377 * class-internals.h (MonoDefaults): new nullable default class
1378 (mono_class_get_nullable_param, mono_class_get_nullable_param):
1381 2005-12-05 Raja R Harinath <rharinath@novell.com>
1383 * metadata.c (select_container): New. Refactor code to select the
1384 appropriate GenericContainer given the type of generic parameter
1386 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
1387 not a MonoGenericContext. Use select_container. Update parameters.
1388 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
1390 (unwrap_arrays): Remove duplicate tests.
1391 (find_generic_param): Rename from 'has_same_context'. Now walks a
1392 generic instantiated class to find any arguments that are generic
1394 (mono_type_create_from_typespec_full): Use find_generic_param to
1395 avoid evicting some generic instantiations from the typespec
1398 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
1400 * reflection.c: fixed writing of doubles on ARM FPA.
1402 2005-12-02 Robert Jordan <robertj@gmx.net>
1404 * icall.c: Fixed EventInfo.ReflectedType (#76829).
1406 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1408 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
1409 least on SUSE 10 they are not the same (on debian, they are just the
1412 2005-12-01 Raja R Harinath <rharinath@novell.com>
1414 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
1415 DeclaringType for VARs and MVARs.
1416 * class.c (set_generic_param_owner): Fix initialization of owner
1419 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
1421 * icall.c: fixed Enum.ToObject() to correctly convert the values.
1423 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1425 * threadpool.c: workaround for a bug that shows up on the Mac:
1426 select()+connect() on a blocking socket is not like it should
1427 be, so we proceed to connect() in that case, wasting the I/O
1428 threadpool thread until connect succeedes. Fixes bug #75436.
1430 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1432 * threadpool.c: fix typo when setting file descriptor states.
1434 2005-11-28 Raja R Harinath <rharinath@novell.com>
1436 * class-internals.h (MonoGenericContainer.is_signature): Remove.
1437 * metadata.c (mono_metadata_parse_method_signature_full): Don't
1438 create a temporary signature container.
1439 (mono_metadata_parse_generic_param): Update to changes.
1440 (mono_type_create_from_typespec_full): Update to changes.
1441 * loader.c (method_from_memberref): Don't use a
1442 MonoGenericContainer while parsing a memberref signature.
1443 (method_from_methodspec): Remove dead-store of the 'container'
1444 variable. It's overwritten before use.
1446 * metadata.c (mono_type_create_from_typespec_full): Make debugging
1448 (mono_metadata_parse_generic_param): Likewise.
1449 * loader.c (find_method_in_class): Does not need a
1450 MonoGenericContainer. Use 'mono_method_signature' rather than
1451 'mono_method_signature_full'.
1452 (find_method, mono_get_method_constrained, method_from_memberref):
1455 * metadata.c (mono_type_create_from_typespec_full): Ensure that
1456 owner-less generic-parameters are never evicted from the typespec
1459 * loader.c (method_from_memberref): Don't use the current context
1460 when parsing signatures.
1461 (method_from_methodspec, mono_get_method_from_token): Update to changes.
1463 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
1464 side-effects in g_assert.
1465 * loader.c (mono_get_method_from_token): Resolve klass earlier so
1466 that we don't potentially lose information.
1468 2005-11-26 Dick Porter <dick@ximian.com>
1471 * threads.c: icalls to implement basic (ie, not named)
1472 System.Threading.Semaphore.
1474 2005-11-24 Dick Porter <dick@ximian.com>
1477 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1478 Use GetProcessId() if it's available.
1480 2005-11-23 Zoltan Varga <vargaz@gmail.com>
1482 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
1484 2005-11-23 Raja R Harinath <rharinath@novell.com>
1485 Ankit Jain <jankit@novell.com>
1487 * loader.c (mono_get_method_from_token): Initialize 'method' field
1488 of all generic parameters before parsing the signature. Remove
1489 code that "fixed"-up MVAR references.
1491 2005-11-23 Ankit Jain <jankit@novell.com>
1493 * metadata.c (mono_metadata_has_generic_params):
1494 (mono_metadata_load_generic_param_constraints):
1495 (mono_metadata_load_generic_params): Move duplicate code ...
1496 (mono_metadata_get_generic_param_row): ... here. Returns the
1497 first row-id in GenericParam table for a given owner (token).
1498 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
1501 2005-11-23 Raja R Harinath <rharinath@novell.com>
1502 Ankit Jain <jankit@novell.com>
1504 * metadata.c (mono_metadata_class_equal): Pass signature_only when
1506 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
1507 type->data.generic_param only if the type is an MVAR.
1508 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
1509 leak owner-less VARs and MVARs into managed space.
1511 2005-11-21 Martin Baulig <martin@ximian.com>
1514 (MonoMethod): Moved the `generic_container' here from
1515 `MonoMethodNormal' since we now also need it for
1516 `MonoMethodPInvoke';
1517 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
1518 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
1519 an union containing both `MonoMethodNormal' and
1520 `MonoMethodPInvoke'.
1523 (mono_get_method_from_token): Allow implementing generic methods
1527 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
1530 2005-11-17 Dick Porter <dick@ximian.com>
1534 * process.c: Split the Process Start_internal icall into
1535 ShellExecuteEx_internal and CreateProcess_internal, which are
1536 called depending on whether UseShellExecute is true. Fixes bug
1539 * appdomain.c (MONO_CORLIB_VERSION): Incremented
1541 2005-11-17 Zoltan Varga <vargaz@gmail.com>
1543 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
1544 'msize' parameters, use the information in 'mspec' instead.
1545 (emit_object_to_ptr_conv): Ditto.
1547 * marshal.c (emit_struct_conv): Handle explicit layout structs with
1548 fields out of order. Fixes #76733.
1550 2005-11-17 Ankit Jain <jankit@novell.com>
1552 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
1554 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
1556 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
1559 2005-11-16 Zoltan Varga <vargaz@gmail.com>
1561 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
1562 for types with non-auto layout. Fixes #76717.
1564 2005-11-16 Ankit Jain <jankit@novell.com>
1566 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
1567 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
1568 if generic_context is null.
1569 (mono_metadata_generic_param_equal): param->owner can be null.
1570 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
1573 2005-11-16 Zoltan Varga <vargaz@gmail.com>
1575 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
1578 2005-11-15 Martin Baulig <martin@ximian.com>
1580 * object.c (set_value): Use mono_class_from_mono_type() instead of
1581 the hack for generic instances; fixes #76136.
1583 2005-11-15 Zoltan Varga <vargaz@gmail.com>
1585 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
1588 * image.c (load_metadata_ptrs): Initialize the new fields.
1590 * reflection.c (create_dynamic_mono_image): Ditto.
1592 * reflection.c (build_compressed_metadata): Use the new fields.
1594 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
1597 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
1600 2005-11-15 Ankit Jain <jankit@novell.com>
1601 Raja R Harinath <harinath@gmail.com>
1603 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
1604 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
1605 new per-generic_container cache if the cached MonoType's context matches
1606 the current context.
1607 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
1608 to the expected context.
1609 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
1611 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1613 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
1614 we changed the signature of an icall.
1615 * icall.c: Modify to mono_double_ParseImpl return true/false
1616 depending on the success, instead of throwing the exception. This will
1617 help us in Double.TryParse methods.
1619 2005-11-14 Zoltan Varga <vargaz@gmail.com>
1621 * marshal.c (emit_marshal_object): Throw an exception when
1622 marshalling 'object' instead of crashing. Fixes #76696.
1624 2005-11-11 Zoltan Varga <vargaz@gmail.com>
1626 * class-internals.h: Add prototype for mono_type_get_full_name ().
1628 2005-11-11 Dick Porter <dick@ximian.com>
1630 * threads.c (mono_thread_manage): Make sure the main thread has
1631 abandoned all its mutexes when cleaning up. Fixes bug 74680.
1633 2005-11-11 Zoltan Varga <vargaz@gmail.com>
1635 * loader.c (mono_loader_set_error_type_load): Log a warning to the
1636 console about the missing type.
1637 (mono_loader_set_error_method_load): Ditto.
1639 2005-11-09 Miguel de Icaza <miguel@novell.com>
1641 * mono-config.c (mono_get_config_dir): Set the system defaults if
1644 * assembly.c (mono_set_dirs): New API entry point to set the
1645 assembly and the config directory in one call
1647 2005-11-09 Zoltan Varga <vargaz@gmail.com>
1649 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
1650 the ftnptr was created from a delegate in a domain other than the
1651 current domain. Fixes #75377.
1653 * exception.h exception.c: Add mono_get_exception_not_supported ().
1655 2005-11-08 Martin Baulig <martin@ximian.com>
1657 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
1659 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
1661 * security-manager.h: Added definitions to deal with strongname key
1662 pairs bigger (and smaller) than 1024 bits.
1663 * reflection.c: Remove hardcoded strongname size (128 bytes) and
1664 adjust wrt the public key length being used.
1666 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
1668 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
1669 Windows build (r51396-51397).
1671 2005-11-03 Martin Baulig <martin@ximian.com>
1673 * class.c (mono_class_setup_vtable_general): Also add generic
1674 methods to the vtable; fixes #76581.
1676 2005-11-01 Miguel de Icaza <miguel@novell.com>
1678 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
1679 sure that we lookup GetString method from the System.Text.Encoding
1680 class, not the derived class or we get an empty method.
1684 2005-10-25 Miguel de Icaza <miguel@novell.com>
1686 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
1687 if it has been previously set (embedders).
1689 Make mono_set_rootdir available also on Unix.
1691 005-10-24 Robert Jordan <robertj@gmx.net>
1693 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
1695 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
1697 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
1698 only calls which are made to native code use this flag.
1700 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
1702 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
1704 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
1705 Add support for FieldBuilders.
1707 2005-10-29 Martin Baulig <martin@ximian.com>
1710 (mono_debug_using_mono_debugger): New public method; returns
1711 whether we're running inside the debugger.
1713 2005-10-27 Zoltan Varga <vargaz@gmail.com>
1715 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
1716 for Method/Constructor/FieldBuilders.
1718 2005-10-26 Zoltan Varga <vargaz@gmail.com>
1720 * reflection.c (module_add_cattrs): Save custom attributes for global methods
1723 2005-10-26 Martin Baulig <martin@ximian.com>
1725 * mono-debug-debugger.c
1726 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
1728 2005-10-24 Raja R Harinath <harinath@gmail.com>
1730 * icall.c (base64_to_byte_array): Don't pass an out-of-range
1733 2005-10-21 Zoltan Varga <vargaz@gmail.com>
1735 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
1736 when passing valuetypes byref. Fixes #76502.
1738 2005-10-19 Jackson Harper <jackson@ximian.com>
1740 * profiler.c: Don't put a . in front of types that are not in a
1743 2005-10-18 Zoltan Varga <vargaz@gmail.com>
1745 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
1747 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
1749 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
1751 (mono_marshal_get_ldflda_wrapper): Fix a warning.
1753 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1755 * assembly.c metadata-internals.h icall.c: Define an additional
1756 parameter for mono_assembly_name_parse_full, so we can avoid creating
1757 S.R.AssemblyName.Version when no version info wasn't passed.
1759 2005-10-09 Miguel de Icaza <miguel@novell.com>
1761 * class.c (mono_type_get_full_name): Reimplement method that was
1764 * image.c: Some docs
1766 2005-10-10 Zoltan Varga <vargaz@gmail.com>
1768 * profiler.c (output_newobj_profile): Fix printing of Total memory
1771 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
1773 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
1775 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
1777 * threads.c: remove debug output.
1779 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
1781 * threads.c (mono_thread_manage): Fix crashes if more than 64
1782 threads need to be aborted. Hopefully fixes #75899.
1784 * assembly.c (mono_stringify_assembly_name): New helper function.
1786 * class.c: Use mono_stringify_assembly_name instead of the similar
1789 * assembly.h assembly.c: Add support for calling a postload search
1790 hook if an assembly cannot be loaded.
1792 * appdomain.c: Register new search hooks which call the AssemblyResolve
1793 events in AppDomain. Fixes #75231
1795 2005-10-07 Martin Baulig <martin@ximian.com>
1797 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
1798 methods without debug info.
1800 2005-10-07 Zoltan Varga <vargaz@gmail.com>
1802 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
1805 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1807 * file-io.c: now that we return symlinks, use lstat and, when the file
1808 is a symbolic link, stat, to get the file attributes. Also avoid the
1809 conversion to/from utf16/external.
1811 2005-10-06 Zoltan Varga <vargaz@gmail.com>
1813 * class.c (mono_class_layout_fields): Compute klass->has_references
1814 correctly if an embedded valuetype is not yet initialized. Fixes
1817 2005-10-04 Martin Baulig <martin@ximian.com>
1820 (mono_metadata_load_generic_param_constraints): New public
1821 function; splitted the constraints loading out from
1822 mono_metadata_load_generic_params().
1824 * class.c (mono_class_create_from_typedef): Call
1825 mono_metadata_load_generic_param_constraints() after setting up
1826 the type and creating our parent; fixes #75329.
1828 2005-10-04 Martin Baulig <martin@ximian.com>
1830 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
1831 non-dynamic parent classes.
1833 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
1835 * file-io.c : win32 build fix (ETXTBSY seems not found).
1837 2005-10-04 Martin Baulig <martin@ximian.com>
1840 (mono_image_get_methodspec_token): Make the cache actually work;
1843 2005-10-04 Martin Baulig <martin@ximian.com>
1845 * class.c (mono_class_name_from_token): Removed the unneccessary
1846 `MonoGenericContext *' argument.
1848 2005-10-04 Martin Baulig <martin@ximian.com>
1851 (method_from_methodspec): Make the caching work again; fixes the
1852 performance regression from #76262.
1854 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1858 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
1859 GetFileSystemEntries that performs the same work but without going
1860 into io-layer, locking, etc.
1862 2005-09-30 Zoltan Varga <vargaz@gmail.com>
1864 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
1865 ThreadState_Stopped as well. Fixes #76047.
1867 2005-09-29 Martin Baulig <martin@ximian.com>
1870 (inflate_generic_context): If the new context has a `gmethod', set
1871 its `container' that that gmethod's `container'.
1874 (mono_metadata_parse_generic_param): Simplify things;
1875 `generic_container = generic_context->container;' is just fine.
1877 * loader.c (method_from_methodspec): Code cleanups.
1879 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
1881 * decimal.c: fix warning (and let gcc generate correct
1882 code on ARM with optimizations).
1884 2005-09-28 Martin Baulig <martin@ximian.com>
1887 (method_from_memberref): Added `MonoGenericContext *class_context'
1888 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
1889 (method_from_methodspec): If we're a memberref, use the enclosing
1890 context when parsing its parent. Fixes #76262; see gtest-206.cs.
1892 2005-09-28 Martin Baulig <martin@ximian.com>
1894 * object.c (mono_runtime_invoke_array): Added support for
1895 MONO_TYPE_GENERICINST; fixes #75917.
1897 2005-09-27 Martin Baulig <martin@ximian.com>
1899 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
1900 `k->byval_arg.type' to determine the actual type.
1902 * loader.c (method_from_methodspec): Removed some hacks.
1904 2005-09-27 Ben Maurer <bmaurer@ximian.com>
1906 * class-internals.h (mono_field_is_deleted): Do the test for
1907 rtspecialname before we check the actual name of the field. This
1908 prevents us from dereferencing a pointer into the string table,
1909 saving us from accessing a few pages
1911 * *.c: Replace the use of {Enter,Leave}CriticalSection with
1912 macros. This will allow a deadlock debugger to easily be plugged
1915 2005-09-27 Martin Baulig <martin@ximian.com>
1917 * loader.c (method_from_methodspec): Create a "signature"
1918 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
1920 2005-09-27 Martin Baulig <martin@ximian.com>
1923 (inflate_generic_class): Correctly set the new context's
1927 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
1928 instead of a `MonoGenericContext *'.
1929 (mono_method_signature_full): Take a `MonoGenericContainer *'
1930 instead of a `MonoGenericContext *'.
1933 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
1934 instead of a `MonoGenericContext *'.
1935 (mono_metadata_parse_method_signature_full): Likewise.
1937 2005-09-26 Martin Baulig <martin@ximian.com>
1940 (mono_class_from_generic_parameter): Set `klass->generic_container'
1941 (mono_class_from_generic_parameter): Likewise.
1942 (mono_bounded_array_class_get): We inherit the generic container
1943 from the element class.
1946 (find_method, find_method_in_class): Take a `MonoGenericContext *'
1947 argument rather than computing it here.
1948 (method_from_memberref): Correctly set the generic context before
1949 parsing the signature. Fixes #75681.
1951 2005-09-26 Zoltan Varga <vargaz@gmail.com>
1953 * object.c (mono_class_has_special_static_fields): Fix warnings.
1955 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1957 * assembly.c: Add parse_public_key function, to
1958 par the public keys. Also added mono_assembly_name_parse_full,
1959 to define it the parsed key should be freed or not.
1960 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
1961 to parse a long format assembly name.
1962 * metadata-internals.h: Keep mono_assembly_name_parse_full as
1963 private, since calling it to preserve the key requires
1964 freeing it manually.
1966 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
1968 * locales.c : removed HAVE_ICU part.
1970 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
1972 * object.c (mono_class_create_runtime_vtable): Avoid calling
1973 field_is_special_static if the klass has no special static fields.
1975 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
1976 (MonoCachedClassInfo): Likewise.
1978 * object.c (mono_class_has_special_static_fields): New helper function.
1980 2005-09-23 Zoltan Varga <vargaz@gmail.com>
1982 * class.c (mono_class_create_from_typedef): Don't call
1983 interfaces_from_typedef_full for enums.
1984 (mono_class_create_from_typedef): Compute the base types of enums directly
1985 without calling mono_class_setup_fields ().
1986 (mono_class_find_enum_basetype): New helper function.
1988 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
1989 one place inside the string heap.
1991 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
1993 * class.c: locking fixes, code cleanups, some docs added.
1994 Allocate some data structures in the image mempool.
1996 2005-09-23 Zoltan Varga <vargaz@gmail.com>
1998 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2001 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
2003 * class-internals.h, class.c, reflection.c: reduce memory taken by
2006 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
2008 * metadata.c, metadata.h, loader.h: documentation updates, code and
2011 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2013 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2016 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
2017 page faults caused by the runtime while reading metadata.
2019 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2021 * socket-io.c: the field names were changed 3 months ago and no one
2022 realized until bug #76077 got filed!
2024 2005-09-20 Martin Baulig <martin@ximian.com>
2026 * icall.c (assembly_icalls): Removed some unused debugger icalls.
2028 2005-09-20 Martin Baulig <martin@ximian.com>
2030 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
2031 write the rank into the class entry.
2033 2005-09-20 Martin Baulig <martin@ximian.com>
2035 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
2037 2005-09-19 Zoltan Varga <vargaz@gmail.com>
2039 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2041 * icall.c (custom_attrs_defined_internal): New icall.
2043 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
2045 (mono_custom_attrs_construct_by_type): New helper function.
2047 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
2049 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
2050 terminate the resulting string. Fixes #76123.
2052 2005-09-16 Martin Baulig <martin@ximian.com>
2055 (mono_debug_add_method): Ignore inflated methods for the moment.
2057 2005-09-14 Martin Baulig <martin@ximian.com>
2059 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
2061 2005-09-13 Zoltan Varga <vargaz@gmail.com>
2063 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
2064 return a success/failure indication.
2065 (mono_metadata_interfaces_from_typedef_full): Ditto.
2066 (get_constraints): Ditto.
2068 2005-09-12 Zoltan Varga <vargaz@gmail.com>
2070 * marshal.c (emit_marshal_array): Fix handling of null arrays.
2072 * marshal.c (emit_marshal_array): Add support for returning string
2073 arrays from delegates. Fixes #76063.
2075 * marshal.c: Use the emit_ldloc/stloc macros where possible.
2077 2005-09-11 Zoltan Varga <vargaz@gmail.com>
2079 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
2082 2005-09-09 Zoltan Varga <vargaz@gmail.com>
2084 * reflection.c icall.c: Fix after mono_get_exception_type_load
2087 * assembly.c (mono_assembly_get_assemblyref): New helper function.
2088 (mono_assembly_load_reference): Use the new helper.
2090 * class-internals.h (MonoLoaderError): New structure containing
2091 information about type loading errors.
2093 * class-internals.h loader.c: Add APIs to store per-thread loader
2096 * loader.c class.c: Set the loader error if needed.
2098 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
2100 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
2102 * decimal.c: fixed to handle the broken ARM fp format.
2104 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
2106 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
2109 2005-09-06 Martin Baulig <martin@ximian.com>
2111 * domain.c (supported_runtimes): Added v2.0.50727.
2113 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
2115 * culture-info.h: reduce the size of some structures.
2117 2005-09-05 Martin Baulig <martin@ximian.com>
2119 Reflect latest API changes in the August CTP.
2122 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
2123 ("MonoType.HasGenericArguments"): Removed.
2124 ("MonoMethod.BindGenericParameters"): Renamed to
2125 "MakeGenericMethod".
2126 ("MethodBuilder.BindGenericParameters"): Renamed to
2127 "MakeGenericMethod".
2129 2005-09-05 Martin Baulig <martin@ximian.com>
2131 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
2133 2005-09-05 Martin Baulig <martin@ximian.com>
2135 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2137 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
2138 generic_container is non-NULL.
2140 2005-09-05 Martin Baulig <martin@ximian.com>
2142 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2144 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
2146 2005-08-29 Michal Moskal <malekith@nemerle.org>
2148 * reflection.c (encode_locals,
2149 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
2150 for large generic types.
2152 2005-09-05 Martin Baulig <martin@ximian.com>
2154 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2156 * class.c (mono_dup_array_type): New public method.
2157 (mono_metadata_signature_deep_dup): New public method.
2158 (dup_type): Correctly duplicate array and function types.
2160 2005-09-05 Martin Baulig <martin@ximian.com>
2162 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2164 * reflection.c (get_default_param_value_blobs): Handle generic types
2165 and generic methods.
2167 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
2169 * class.c: Fixed error reporting (method/class were inversed) for
2170 inheritance demands.
2171 * security-manager.c|h: Added the AppDomain when calling the managed
2172 System.Security.SecurityManager.InheritanceDemand method.
2174 2005-09-01 Raja R Harinath <rharinath@novell.com>
2176 * reflection.c (encode_marshal_blob): 'marshaltype' and
2177 'marshaltyperef' are alternate sources for the custom marshaler
2180 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
2182 * class.c: fix creation of array classes with rank == 1
2183 (patch by Ankit Jain <jankit@novell.com>).
2185 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
2187 * object.c: fix check for creating the bound data for arrays vs
2190 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2192 * object.c: configuration file name is now based on the executable name,
2193 not the image name. Fixes bug #75931.
2195 2005-08-29 Zoltan Varga <vargaz@gmail.com>
2197 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
2198 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
2200 2005-08-25 Zoltan Varga <vargaz@gmail.com>
2202 * rand.c: Use wincrypt.h instead of WinCrypt.h.
2204 2005-08-24 Ankit Jain <jankit@novell.com>
2205 Raja R Harinath <rharinath@novell.com>
2207 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
2208 called by it recursively.
2209 (mono_class_init): Remove special case in pending_init handling, since it's
2210 superseded by the fix to mono_class_from_typeref.
2212 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
2214 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
2215 BROKEN_THREAD_START stuff.
2217 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
2219 * class-internals.h object.c: Add a new kind of trampoline called a delegate
2222 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
2224 * object.c (mono_delegate_ctor): Replace the original function address with
2225 a delegate trampoline.
2227 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
2229 * icall.c: add boolean argument to base64_to_byte_array and
2230 InternalFromBase64String to control whether a whitespace-only string
2231 is allowed (or should casue a FormatException to be thrown). We need
2232 this as the behavior has changed between MS.NET 1.x and 2.0, and we
2233 to match the MS behaviour in both profiles.
2234 * appdomain.c: Bump corlib version.
2236 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2238 This patch implements a big portion of publisher policy
2239 support, used to bind assembly versions and redirect
2240 one assembly from version A to version B.
2243 New GSList loaded_assembly_bindings, for storing the cached
2245 (assembly_binding_maps_name): New static function for checking if a
2246 assembly binding information maps an assembly name.
2247 (mono_assembly_binding_info_free): New function for freeing
2248 assembly binding information resources.
2249 (get_publisher_policy_info): New static function for retrieving
2250 assembly binding information from a MonoImage.
2251 (compare_versions): New static function for comparing an assembly
2252 binding information data and the version of an assembly name.
2253 (check_policy_versions): New static function for checking if an
2254 assembly binding info mapping an assembly name is valid for it.
2255 (mono_assembly_load_publisher_policy): New static function for
2256 loading the 'policy.major.minor.MyAssembly' image for an assembly
2257 with an assembly name 'aname'.
2258 (mono_assembly_bind_version): New static function for updating
2259 assembly redirection.
2260 (mono_assembly_apply_binding): New static function for applying
2262 (search_binding_loaded): New static function for searching
2263 loaded assembly binding infos in the cache domain.
2264 (mono_assembly_load_full): Don't apply assembly binding for
2265 reflection only assemblies.
2267 * metadata-internals.h: Add MonoAssemblyBindingInfo,
2268 which contains information about assembly binding. Also
2269 declare signature for mono_config_parse_publisher_policy ()
2270 function, used to retrieve pub policy info.
2273 (publisher_policy_start): New static function used to parse publisher
2274 policy config files.
2275 (publisher_policy_parser): New static MonoParseHandler containing
2276 the functions used when parsing config files.
2277 (mono_config_parse_publisher_policy): New function for parsing
2278 publisher policy files.
2280 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
2282 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
2284 * marshal.c (mono_delegate_free_ftnptr): Ditto.
2286 * object.c (mono_get_addr_from_ftnptr): New helper function.
2288 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
2290 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2292 2005-08-19 Dick Porter <dick@ximian.com>
2294 * threads.c, threads.h, appdomain.c, appdomain.h,
2295 profiler-private.h, monitor.c, object.c, object-internals.h,
2296 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
2297 store the thread ID, so it can hold a 64 bit value if needed.
2299 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
2301 * reflection.c (mono_reflection_create_dynamic_method): Store the
2302 handle class into the method references as well so ldtoken works in
2305 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
2308 2005-08-19 Ankit Jain <jankit@novell.com>
2311 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
2312 here rather than using the method signature of a arbitrary function
2313 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
2315 Hack done with Harinath.
2317 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2319 * threadpool.c: disable printing stack traces when we get a exception
2320 in a threadpool thread. I need to do more testing to figure out which
2321 cases actually print this. Fixes bug #75828.
2323 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2325 * icall.c: there might be ignored whitespace after the last '='. This
2326 fixes length computation and bug #75840.
2328 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
2330 * assembly.c (mono_assembly_load_full): Consider .exe extension as
2333 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
2336 * reflection.c (create_custom_attr_data): Ditto.
2338 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
2340 * locales.c, culture-info.h : removed RegionLCIDMap.
2341 * culture-info-tables.h : regenerated.
2343 2005-08-16 Martin Baulig <martin@ximian.com>
2345 * class.c (mono_type_get_name_recurse): Small fix.
2347 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
2349 * locales.c : indentation fixie.
2351 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
2353 * object-internals.h,
2357 icall.c : added RegionInfo table support.
2358 * culture-info-table.h : regenerated for region support.
2360 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
2362 * reflection.c (resolve_object): handle all kinds of MonoMethod
2363 including generic ones
2365 2005-08-12 Ankit Jain <jankit@novell.com>
2367 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
2368 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
2370 2005-09-12 Lluis Sanchez <lluis@ximian.com>
2372 * process.c: Don't close a thread handle when it's NULL. This is a
2373 workaround for bug #75733.
2375 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
2377 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
2379 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
2381 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
2383 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2385 * threadpool.c: if a work item in the thread pool has a callback that
2386 catches a exception, don't propagate it after invoking the callback.
2389 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
2391 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
2393 * class-internals.h (MonoCachedClassInfo): Add some new fields.
2395 * class.c (mono_class_init): Load field info lazily in the AOT case.
2397 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
2399 2005-08-03 Ankit Jain <jankit@novell.com>
2402 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
2403 PInvoke calling convention is 0.
2405 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
2407 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
2408 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
2410 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
2412 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
2413 to handle threads not started by the GC (patch by Michael Meeks
2414 <michael.meeks@novell.com>).
2416 2005-07-31 Kamil Skalski <nazgul@omega.pl>
2418 * reflection.c: Make buffer used in emitting types larger for some
2419 big generic types (patch by Michal Moskal).
2421 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
2423 * mono-debug.c: Fix some (not all) alignment problems.
2425 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2427 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
2428 Invoke mono_image_load_from_data_full passing the refonly
2432 (mono_assembly_open_from_bundle): Add the refonly argument,
2433 in order to pass it to other methods it calls to.
2434 (do_mono_assembly_open): Add the refonly argument, in order
2435 to pass it to other methods it calls to.
2436 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
2437 the refonly parameter to it.
2439 * image.c: Add loaded_images_refonly_hash and
2440 loaded_images_refonly_guid_hash to cache the reflection
2442 (mono_images_init): Initialize the hash tables used for
2443 caching the reflection only images.
2444 (load_modules): Invoke mono_image_open_full passing the refonly
2445 parameter to load the modules the correct way.
2446 (build_guid_table): Add the refonly argument, to re-build the
2448 (do_mono_image_open): Added the refonly argument, in order to
2449 define it for the loaded image.
2450 (mono_image_loaded_full): New function, which receives an
2451 additional parameter to look for the image in the refonly or
2452 non-refonly section.
2453 (mono_image_loaded): Updated, using mono_image_loaded_full.
2454 (mono_image_loaded_by_guid_full): The same case that happens
2455 with mono_image_loaded_full.
2456 (mono_image_loaded_by_guid): Likewise.
2457 (register_image): Use the ref_only variable inside MonoImage
2458 to decide in which hash table store the current image.
2459 (mono_image_open_from_data_full): Rename
2460 mono_image_open_from_data to mono_image_open_from_data_full,
2461 adding the refonly argument, to define the ref_only variable
2463 (mono_image_open_from_data): Return
2464 mono_image_open_from_data_full.
2465 (mono_image_open_full): Rename mono_image_open to
2466 mono_image_open_full, receiving the new refonly argument,
2467 to pass it to inner methods.
2468 (mono_pe_file_open): Update this function, to open
2469 a MonoImage as a non-refonly image.
2470 (mono_image_close): Use the refonly variable inside
2471 MonoImage to remove the image from the correct caches.
2473 * image.h: Add the signatures of mono_image_open_full,
2474 mono_image_open_from_data_full, mono_image_loaded_full,
2475 mono_image_loaded_by_guid_full.
2477 * metadata-internals.h: Add the ref_only field to
2480 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2482 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
2483 Fix the last behavior, which used to load the assemblies and
2484 extract MonoReflectionAssemblyName information, instead of
2485 extract it from the metadata tables. Needed for Reflection
2488 2005-07-29 Martin Baulig <martin@ximian.com>
2490 * mono-debug-debugger.c
2491 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
2495 (mono_debug_address_from_il_offset): Check whether we have
2496 debugging support before attempting to take the lock.
2497 (mono_debug_source_location_from_address): Likewise.
2498 (mono_debug_source_location_from_il_offset): Likewise.
2499 (mono_debug_il_offset_from_address): Likewise.
2500 (mono_debug_address_from_il_offset): Likewise.
2502 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
2504 * class.c (mono_class_from_name_case): Add support for dynamic images.
2507 * object.c (mono_class_compute_gc_descriptor): Add a workaround
2510 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
2512 * reflection.c (mono_method_get_object): Fix warning.
2514 2005-07-28 Martin Baulig <martin@ximian.com>
2517 (mono_debug_add_wrapper): Also write the wrapper type.
2519 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
2521 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
2523 * class.c (mono_class_init): Avoid reading nested classes if the AOT
2524 data indicates the class has none.
2526 2005-07-26 Ben Maurer <bmaurer@ximian.com>
2528 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
2529 loader lock with the debugger lock. Prevents deadlocks for beagle.
2531 Beagle can now run on an smp box for a weekend without any
2534 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
2536 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
2537 in a module. Fixes #75629.
2539 2005-07-26 Martin Baulig <martin@ximian.com>
2541 * mono-debug.c (mono_debug_add_wrapper): New static method.
2542 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
2543 interncall or a wrapper.
2545 * mono-debug.h (MonoDebugWrapperData): New public typedef.
2546 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
2547 (MONO_DEBUGGER_VERSION): Bump to 51.
2549 * mono-debug-debugger.c
2550 (mono_debugger_add_type): Removed this empty function.
2551 (mono_debugger_add_method): Likewise.
2553 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
2555 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
2556 before accessing method->slot.
2558 2005-07-21 Jb Evain <jbevain@gmail.com>
2560 * reflection.c (method_encode_clauses/class): Handle filters clauses.
2563 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
2565 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
2568 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
2570 * image.h image.c: Add mono_image_get_guid () API function.
2572 2005-07-19 Ben Maurer <bmaurer@ximian.com>
2574 There were issues when multiple threads tried to load
2575 assemblies. A deadlock was created between assemblies_mutex and
2576 mono_domain_assemblies_lock. This fixes the issue by making the
2577 assembly ref counting be lock free. See bug 75586.
2579 * image.c (mono_image_close): The add ref function here was using
2580 Interlocked operations while the unref was using a mutex and a
2581 --. I don't think this was ever a bug that would be exposed in a
2582 non-pendantic way (ie, by an embedder doing a ref on one thread
2583 and an unref on another), but for the sake of correctness, this is
2586 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
2587 (mono_assembly_load_reference): Call mono_assembly_addref rather
2588 than touching the refcount ourselves.
2589 (mono_assembly_close): Use InterlockedDecrement to unref the
2590 assembly. Don't acquire the lock unless it is actually needed.
2592 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
2594 * class.c (mono_class_layout_fields): Fix calculation of has_references
2597 2005-07-12 Martin Baulig <martin@ximian.com>
2599 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2602 (mono_type_hash): Provide better hashing for generic instances.
2603 (mono_generic_inst_hash): Improve hashing.
2604 (mono_generic_class_hash): Likewise.
2606 * reflection.c (mymono_metadata_type_hash): Improve hashing for
2609 2005-07-12 Martin Baulig <martin@ximian.com>
2611 * reflection.c (mono_reflection_create_runtime_class): Remove the
2612 hack for generic type definitions and non-`Run' assemblies.
2613 (mono_reflection_bind_generic_parameters): Also use
2614 `klass->wastypebuilder' to check for TypeBuilders.
2616 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
2618 * class.c (mono_class_layout_fields): Fix calculation of has_references
2621 * class.c (inflate_generic_class): Fix a leak.
2622 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
2625 2005-07-11 Martin Baulig <martin@ximian.com>
2627 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
2630 2005-07-11 Martin Baulig <martin@ximian.com>
2632 * loader.c (find_method): Also lookup in
2633 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
2635 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
2637 * appdomain.c (mono_domain_unload): Don't free the error message
2638 before passing it to mono_get_exception_...
2640 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
2642 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
2644 * threads.c: try to better guess an available RT signal (bug #75387).
2646 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
2648 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
2651 2005-07-07 Martin Baulig <martin@ximian.com>
2653 * class.c (mono_type_get_name_full): Return NULL for
2654 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
2657 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
2659 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
2660 exit the appdomain as well being aborted.
2662 * threadpool.c: Create all threadpool threads inside the root appdomain, and
2663 change back to the root domain after calling managed code. This enables
2664 appdomains using threadpools to be unloaded.
2666 2005-07-07 Martin Baulig <martin@ximian.com>
2669 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
2670 into `MonoDynamicGenericClass' since we only need it for dynamic
2673 * reflection.c (mono_class_bind_generic_parameters): We don't need
2674 to compute the `parent' here.
2676 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
2678 * culture-info-table.h : regenerated.
2680 2005-07-06 Martin Baulig <martin@ximian.com>
2683 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
2685 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
2687 2005-07-06 Martin Baulig <martin@ximian.com>
2689 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
2690 we're doing a signature-only comparision; fixes #74945.
2692 2005-07-06 Martin Baulig <martin@ximian.com>
2694 * class-internals.h (MonoGenericClass): Moved some things out into
2695 a new `MonoInflatedGenericClass' type.
2696 (MonoInflatedGenericClass): New type; the `klass' of a
2697 `MonoGenericClass' is now computed lazyly in
2698 mono_get_inflated_generic_class().
2700 * class.c (mono_get_inflated_generic_class): New public function.
2701 (mono_class_inflate_generic_method): Removed the unused
2702 `MonoClass *' argument.
2703 (setup_generic_vtable): Don't call mono_get_inflated_method() on
2705 (mono_class_create_generic): Make this static and merge it with
2706 mono_class_create_generic_2(); we're now called automatically from
2707 mono_get_inflated_generic_class().
2709 * loader.c (mono_method_signature): Call
2710 mono_get_inflated_method() here.
2712 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
2714 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
2715 type of fields with RVA.
2717 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
2718 for this pseudo class.
2719 (my_mono_class_from_generic_parameter): Likewise.
2720 (mono_class_init): Allow interfaces to have cctors.
2722 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
2724 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
2725 lazily for AOT methods.
2727 2005-07-05 Martin Baulig <martin@ximian.com>
2729 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
2730 returns FALSE for a successful match, not TRUE.
2732 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
2734 * loader.c (mono_method_get_index): Optimize this a bit.
2736 2005-07-04 Martin Baulig <martin@ximian.com>
2739 (class_compute_field_layout): Move the check for generic type
2740 definitions into mono_class_layout_fields(). Fixes #74684.
2741 (mono_class_from_generic_parameter): Correctly compute
2742 `klass->parent'; fixes #75457.
2744 * reflection.c (register_assembly, register_module): Make sure
2745 `domain->rejobject_hash' is already created.
2747 2005-07-02 Martin Baulig <martin@ximian.com>
2750 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
2751 `MonoDynamicGenericClass'.
2753 2005-07-01 Lluis Sanchez <lluis@ximian.com>
2755 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
2756 returned by a field getter is null, since null is a valid value.
2758 2005-07-01 Martin Baulig <martin@ximian.com>
2760 * reflection.c (mono_reflection_generic_class_initialize): Update
2761 the `dgclass->fields [i].parent' to the correct class.
2762 (mono_image_get_fieldref_token): Use the declaring type, not the
2765 2005-07-01 Martin Baulig <martin@ximian.com>
2767 * loader.c (find_method): Also look in the interfaces; fixes #75429.
2769 2005-06-30 Ben Maurer <bmaurer@ximian.com>
2771 * threads.c (thread_cleanup): assert that thread != NULL
2772 (wait_for_tids_or_state_change): We were using the wrong variable
2773 when accessing wait->threads. `i' was always out of the bounds of
2776 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2778 * loader.c: map user32 and kernel32 to libMonoSupportW
2780 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
2782 * appdomain.c (unload_thread_main): Mark this as WINAPI.
2784 2005-06-28 Martin Baulig <martin@ximian.com>
2786 * loader.c (method_from_methodspec): Fix #75334.
2788 2005-06-28 Martin Baulig <martin@ximian.com>
2790 Fix #74953 - Arrays now implement the generic IList<T> interface
2791 on the 2.0 platform.
2793 * class-internals.h (MonoDefaults): Added `generic_array_class'.
2795 * reflection.c (mono_class_bind_generic_parameters): New public
2796 function; similar to mono_reflection_bind_generic_parameters(),
2797 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
2799 * domain.c (mono_init_internal): Try to initialize.
2800 `mono_defaults.generic_array_class' here; this'll only succeed if
2801 we're using the 2.0 corlib.
2804 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
2805 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
2806 (mono_lookup_internal_call): Added support for nested classes.
2809 (mono_get_method_from_token): Set `result->signature->pinvoke' if
2810 we're an interncall and have generic arguments.
2813 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
2814 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
2815 instance of System.Array.InternalArray<T> for arrays, so they
2816 implement the generic IList<T> interface.
2818 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
2820 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
2821 (chastamar@yahoo.com). Fixes #75374.
2823 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
2825 * culture-info-table.h: regenerated.
2827 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2829 * icall.c: handle spaces correctly for base64 strings.
2831 2005-06-26 Ben Maurer <bmaurer@ximian.com>
2833 * *.c: Kill some warnings.
2835 2005-06-23 Duncan Mak <duncan@novell.com>
2837 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
2838 that this builds on Solaris 10 (x86).
2840 2005-06-23 Martin Baulig <martin@ximian.com>
2843 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
2844 generic type definitions.
2846 2005-06-23 Martin Baulig <martin@ximian.com>
2850 * metadata.c (mono_class_get_overrides): Renamed to
2851 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
2852 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
2853 pass it to mono_get_method_full().
2855 2005-06-22 Ben Maurer <bmaurer@ximian.com>
2857 * reflection.c (mono_reflection_create_runtime_class): take the
2858 mono_domain_lock in this method. Prevents deadlocks
2860 2005-06-22 Martin Baulig <martin@ximian.com>
2862 * loader.c (method_from_methodspec): Fix #75330.
2864 2005-06-22 Martin Baulig <martin@ximian.com>
2866 * reflection.c (type_get_qualified_name): Use
2867 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
2868 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
2869 argument; use it if we don't have an assembly name.
2871 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
2873 * object.c: In mono_message_init, set "copy out" flag for in
2874 parameters with the [Out] flag.
2876 2005-06-21 Martin Baulig <martin@ximian.com>
2879 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
2882 2005-06-21 Martin Baulig <martin@ximian.com>
2884 * class.c (mono_class_init): Don't initialize `class->fields' for
2885 generic instances since they're initialized again in
2886 compute_field_layout().
2887 (compute_field_layout): Set the field's `generic_info' here; fix
2890 2005-06-21 Martin Baulig <martin@ximian.com>
2893 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
2895 * metadata.c (mono_metadata_generic_method_equal): Also
2896 distinguish the `generic_class'; fixes #75334.
2898 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2902 * domain-internals.h:
2903 * reflection.c: 'domain_assemblies' field is now protected by its own
2904 lock. Don't call into managed code to run the AssemblyLoad event if we
2905 now there are no registered delegates for it.
2907 2005-06-20 Martin Baulig <martin@ximian.com>
2909 * class.c (mono_class_is_assignable_from): Use a custom version of
2910 mono_class_has_parent() to make things work for generic instances;
2913 2005-06-20 Martin Baulig <martin@ximian.com>
2915 * loader.c (method_from_methodspec): Apply a patch from
2916 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
2918 2005-06-20 Martin Baulig <martin@ximian.com>
2920 * class.c (mono_class_init): Reverted Zoltan's last change; it
2923 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
2925 * threads.c (wait_for_tids_or_state_change): Add missing locking.
2927 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2929 * socket-io.c: fix the index in the socket array for writable/error
2930 sockets. Fixes bug #75306.
2932 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
2934 * class.c (mono_class_init): Allow interfaces to have static ctors.
2936 2005-06-17 Martin Baulig <martin@ximian.com>
2938 * loader.c (method_from_methodspec): Use `context->container' when
2939 parsing the `gmethod->inst'.
2941 2005-06-17 Martin Baulig <martin@ximian.com>
2943 * class.c (mono_type_get_name_recurse): Don't add the assembly
2944 name for type arguments.
2946 2005-06-15 Martin Baulig <martin@ximian.com>
2948 * reflection.c (mono_image_get_inflated_method_token): Encode
2949 correct klass; fixes #75260.
2951 2005-06-13 Michal Moskal <malekith@nemerle.org>
2953 * icall.c: Make GetCorrespondingMethod/Constructor take
2954 MonoReflectionMethod method not MonoMethod. Removed
2955 MonoType.GetCorrespondingField, and make
2956 MonoGenericType.GetCorrespondingField take name not
2959 2005-06-13 Michal Moskal <malekith@nemerle.org>
2961 * reflection.c (field_encode_signature, encode_locals):
2962 Make sizes of buffers for types larger (for big generic types).
2963 (create_generic_typespec,
2964 mono_reflection_sighelper_get_signature_local,
2965 mono_reflection_sighelper_get_signature_field):
2966 Add asserts for too small buffers.
2968 2005-06-15 Martin Baulig <martin@ximian.com>
2970 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
2971 if our parent is not a dynamic type.
2973 2005-06-15 Martin Baulig <martin@ximian.com>
2975 * class-internals.h (MonoTypeNameFormat): New enum.
2978 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
2979 (mono_type_get_full_name): Removed.
2980 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
2981 argument instead of the boolean's.
2983 * icall.c (ves_icall_System_MonoType_getFullName):
2984 Added `gboolean assembly_qualified'.
2987 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
2989 * reflection.c (mono_reflection_parse_type): Parse the new type
2992 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2994 * icall.c: no need to convert from utf16 to utf8 and then back again
2995 after the call to GetLogicalDrives.
2997 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2999 * icall.c: frombase64. Fix problems exposed by new tests.
3001 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3003 * icall.c: added internal calls for converting char [] and strings in
3004 base64 into byte [].
3006 2005-06-10 Martin Baulig <martin@ximian.com>
3008 * class.c (mono_class_create_generic_2): Read the nested classes
3009 from the metadata rather than from `gklass->nested_classes' since
3010 `gklass' might not be initialized yet.
3012 2005-06-09 Duncan Mak <duncan@novell.com>
3014 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
3015 all public headers. Fixes #74919.
3017 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
3019 * domain.c: The key for proxy_vtable_hash is now a pointer
3020 array. Added new GHashFunc and GCompareFunc functions for this.
3022 * class.h: The list of interfaces in MonoRemoteClass is known in
3023 advance and can't grow (we create a new MonoRemoteClass if needed),
3024 so now the interface array can be allocated together with
3027 * object.c: Added a new method create_remote_class_key.
3028 Fixed mono_remote_class so it does not depend on
3029 mono_upgrade_remote_class.
3030 Removed extend_interface_array.
3031 Added new method clone_remote_class(), which makes a copy of a remote
3032 class and adds a new interface or class to it.
3033 mono_upgrade_remote_class() now creates a new remote class (or gets
3034 it from the cache) if an vtable upgrade is needed. In this way
3035 we make sure that other objects sharing the same remote class
3036 don't get the new vtable with unwanted interfaces.
3038 * object-internals.h:
3039 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
3041 * marshal.c: Track changes in mono_upgrade_remote_class().
3043 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
3044 * icall.c: Add runtime methods for obtaining members of inflated
3045 class, which were created from supplied non-inflated members. It
3046 is used in internal Get{Method,Constructor,Field} methods in
3049 2005-06-09 Martin Baulig <martin@ximian.com>
3052 (mono_reflection_bind_generic_method_parameters): Fix #75169.
3054 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3055 * reflection.c (mono_image_basic_init): Define
3056 Version in MonoDynamicAssembly.
3058 2005-06-08 Martin Baulig <martin@ximian.com>
3063 (mono_method_signature_full): New public method; takes a
3064 `MonoGenericContext *'.
3065 (find_method): Use mono_method_signature_full() and pass the
3066 klass'es context to it.
3068 * class.c (mono_class_is_inflated_method): Use
3069 mono_method_signature_full() and pass the context to it.
3071 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
3073 * object.c: add proper locking in mono_remote_class_vtable(),
3074 fixes possible memory corruption.
3076 2005-06-08 Michael Meeks <michael.meeks@novell.com>
3078 * marshal.c (mono_remoting_marshal_init): set
3079 initialized after initialization.
3081 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
3085 2005-06-06 Michael Meeks <michael.meeks@novell.com>
3087 * object.c (extend_interface_array): fix really silly
3088 memory corrupting / comparison bug.
3090 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3092 * reflection.c: Functions added to support the creation
3093 of CustomAttributeData, which includes Attribute data
3094 used by ReflectionOnly methods.
3096 * reflection.h: mono_reflection_get_custom_attrs_data and
3097 mono_custom_attrs_data_construct added (functions exposed).
3099 * icall.c: Added mono_reflection_get_custom_attrs_data
3102 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
3104 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
3107 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
3109 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
3111 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
3112 dynamic DllImportAttribute.
3114 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
3115 dynamic DllImportAttribute.
3117 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
3120 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3122 * threads.c: avoid segfault when an unstarted thread is aborted.
3124 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
3126 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
3127 Returns the name and version of the runtime for reporting.
3129 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3131 * appdomain.c: bump corlib version.
3132 * object-internals.h: new field in MonoReflectionAssembly.
3134 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3136 * object-internals.h: Carlos forgot to add this field.
3138 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3140 * icall.c: Added create_version to create instances
3141 of Version of MonoReflectionAssemblyName. This change helps
3142 the AssemblyName tests to keep running fine.
3144 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
3146 * object.c (mono_method_return_message_restore): A somehow less
3147 intrusive fix for #75138.
3149 2005-06-03 Raja R Harinath <rharinath@novell.com>
3151 * object.c (mono_method_return_message_restore): Fix computation
3152 of expected number of out args.
3154 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
3156 * reflection.c (mono_image_get_method_info): Fix the case when the
3159 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
3161 * object.c: Added missing null check in
3162 mono_method_return_message_restore.
3164 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
3166 * reflection.c (mono_image_get_method_info): Handle the case when
3169 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
3171 * object.c: When creating the vtable for a proxy, take into account
3172 all inherited interfaces, not only the ones registered in
3173 iclass->interfaces. This fixs bug #74996.
3174 Also, in mono_method_return_message_restore, verify that the array
3175 of out args has the expected lengh.
3177 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3179 * socket-io.c: update the timeout in Poll when the call is interrupte.
3181 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3183 * socket-io.c: support abort/suspend in Select_internal after last
3186 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3188 * threadpool.c: remove warning.
3190 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3193 * socket-io.[ch]: Select_internal uses poll() now when available, thus
3194 removing the 1024 limit from select(). Runtime part of the fix for
3197 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3199 * socket-io.c: when resolving the addresses for the same
3200 host returned by gethostname(), get the local IPs from the interface
3201 list. Loopback addresses are discarded if the are interfaces up with
3202 non-loopback ones. Fixes bug #63265.
3204 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
3206 * appdomain.c, verify.c, object-internals.h, reflection.c:
3207 bumped corlib number to 36, and added new extra_flags field
3208 to ReflectionMethodBuilder and friends. Fixes #75060.
3210 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
3212 * gc.c: register a new weak link only if the object is non-null
3215 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
3217 * culture-info.h : short time pattern too.
3219 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
3221 * culture-info.h : expand long time pattern string length.
3223 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
3225 * culture-info-table.h : update (more French date format; #72788).
3227 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
3229 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
3230 the method is static. Fixes #75029.
3232 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
3234 * reflection.c: Update the table_idx field of method builders after
3235 saving the module, since it can change. This is a workaround for
3238 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
3240 * culture-info-table.h : update (additional French date format).
3242 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
3244 * icall.c (ves_icall_type_Equals): Revert last change.
3246 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
3248 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
3250 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
3252 * class-internals.h: Added executioncontext_class field to
3253 MonoDefaults structure.
3254 * domain.c: Cache System.Threading.ExecutionContext class in
3256 * object.c: Capture the ExecutionContext for asynchroneous calls in
3257 mono_async_result_new.
3258 * object-internals.h: Added execution_context and original_context
3259 fields to MonoAsyncResult. Added execution_context to MonoThread.
3260 * security-manager.c|.h: Added mono_get_context_capture_method to
3261 return the capture method (if required by the security manager or by
3262 the framework version used).
3263 * threadpool.c: Apply capture (if present) ExecutionContext in
3264 mono_async_invoke and revert to original context after it completes.
3266 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
3268 * culture-info-table.h : updated (real hacky solution for zh-CHT).
3270 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
3272 * culture-info-table.h : zh-CHT related workaround.
3274 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
3276 * marshal.c (emit_marshal_custom): Add some error checking and call the
3277 methods in the ICustomMarshaler interface. Fixes #74875.
3279 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
3280 native->managed wrappers.
3282 2005-05-12 Martin Baulig <martin@ximian.com>
3284 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
3285 here and use the loader lock.
3287 * mono-debug.c: Properly lock when the debugger is not attached.
3288 (mono_debug_init): Release the initial lock if we're not running
3291 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
3293 * marshal.c (emit_marshal_custom): Pass through NULL values without
3294 calling the custom marshalling routines.
3296 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
3297 conversion in structures. Fixes #74882.
3299 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
3301 * culture-info-table.h : zh-* cultures were missing.
3303 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
3305 * threads.c: Added a new event background_change_event which is signaled
3306 when a thread changes its background mode.
3307 Moved here several checks previously done in managed code. The checks
3308 require the thread lock, and using the thread lock in managed code
3309 can result in deadlocks.
3310 Merged Start_internal and Thread_internal into a single method. Now
3311 Thread_internal does all work of creating and starting a thread.
3312 Added icalls for setting and getting the state of the object. Moved from
3313 managed code to avoid locking there.
3314 Added wait_for_tids_or_state_change() which is called instad of
3315 wait_for_tids when waiting for non-backround threads to end. This method
3316 will return if one of the threads ends or the background_change_event
3318 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
3319 the background mode. This method signals the background_change_event
3322 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
3323 removed Start_internal.
3325 2005-05-11 Martin Baulig <martin@ximian.com>
3327 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
3328 to order of some fields to get proper alignment on 64-bit machines.
3330 2005-05-11 Martin Baulig <martin@ximian.com>
3332 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
3333 changes as they're broken and completely fuck up the debugger.
3335 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
3337 2005-05-10 Martin Baulig <martin@ximian.com>
3339 * reflection.c (mono_reflection_generic_class_initialize): Don't
3340 call mono_class_setup_parent() here.
3342 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3344 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
3345 send/receive timeout use an integer in milliseconds. We were using a
3348 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3351 (internal_get_cultures): reserve the first slot of the array for the
3352 InvariantCulture, which will be filled in managed code.
3354 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
3356 * reflection.c (mono_image_fill_module_table): Initialize the
3357 GENERATION field as well.
3359 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3361 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
3362 Monitor.Enter on the object.
3364 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
3366 * threads.c: Enable the wait for running threads when exiting.
3367 * icall.c: Suspend all threads before exiting.
3369 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
3371 * assembly.c (mono_assembly_load_reference): Fix warning.
3373 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3375 * threadpool.c: changed the default number of threads per cpu. From now
3376 on, the default will be 20 + (5 * number of cpus) instead of 50.
3378 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
3380 * loader.c (mono_method_get_signature_full): Add locking here.
3382 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
3384 * appdomain.c: Moved methods for parsing and freeing assembly
3385 names to assembly.c.
3386 * assembly.c, domain-internals.h: Created public methods for parsing
3387 assembly names. Fixed mono_assembly_load_with_partial_name:
3388 it now finds the best match, taking into account the version,
3389 token and culture specified in the partial name. Also return
3390 the latest version if no version information is specified.
3392 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
3394 * threadpool.c: replace check for SocketAsyncCall class.
3396 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3398 * threadpool-internals.h:
3399 * Makefile.am: added threadpool-internals.h
3401 * threadpool.c: call mono_unhandled_exception on exceptions not handled
3402 that happen in threadpool threads (tested on MS).
3403 (mono_thread_pool_remove_socket): new function that dispatch any pending
3404 AIO call on a socket that is closing. By now only epoll really needs it,
3405 as select/poll wake up when the socket closes.
3408 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
3410 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
3412 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
3414 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
3416 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
3418 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
3420 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
3421 has an abort request, convert it into a suspend request.
3423 2005-04-30 Ben Maurer <bmaurer@ximian.com>
3425 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
3426 warning for the usage of `UnmanagedFunctionPointerAttribute' which
3427 is not supported yet.
3429 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3431 * image.c: register assemblies loaded from data (bundles) in the loaded
3432 assemblies hash. Fixes bug #74772.
3434 2005-04-29 Martin Baulig <martin@ximian.com>
3436 * class.c (mono_type_get_name_recurse): Update to the new naming
3437 schema from the latest .NET 2.x beta2.
3438 (mono_class_setup_vtable_general): If we're a generic instance,
3439 copy the vtable from our generic type definition and inflate all
3442 * loader.c (find_method): Update to the new naming schema from the
3443 latest .NET 2.x beta2.
3445 2005-04-29 Raja R Harinath <harinath@gmail.com>
3447 * class.c (mono_class_init): Add a mono_loader_unlock to the
3450 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
3452 * icall.c (ves_icall_System_Environment_Exit): Remove the
3453 suspend_all_other_threads () call for the time being, since it can hang.
3455 * threads.c (mono_thread_manage): Similarly, disable the waiting for
3456 the background threads to exit, since it can also hang.
3458 * class.c (mono_class_init): Applied patch from Ankit Jain
3459 (radical@gmail.com). Avoid pending init errors when a field refers
3460 to a nested class using a typeref. Fixes #74734.
3462 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
3463 this for dynamic modules.
3465 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3467 * threads.c: don't wait for threads that are in the process of aborting
3468 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
3469 and waiting for background threads to finish. This makes xsp and
3470 mod-mono-server exit without random length delays and/or hangs.
3472 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3474 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
3476 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
3478 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
3479 dynamic types to prevent infinite loops. Fixes #74727.
3481 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
3482 ..._is_assignable_to.
3484 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
3486 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
3488 2005-04-25 Martin Baulig <martin@ximian.com>
3490 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
3493 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
3495 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
3497 * reflection.c (build_compressed_metadata): Set metadata header
3500 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
3502 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
3503 number into an integral and a decimal part. Fixes #70473.
3505 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
3507 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
3509 * culture-info-table.h : reflected the latest locale-builder output.
3511 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3513 * threadpool.c: check for SuspendRequested too when deciding if
3514 mono_thread_interruption_checkpoint should be called.
3516 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3518 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
3519 * threads.c: remove interruption_mutex and use Interlocked instead. When
3520 suspending all the threads, wait for all the suspended events at once.
3521 If we're shutting down and get an APC that is going to be queued,
3522 call mono_thread_execute_interruption immediately, as the thread might
3523 be sleeping on a pthread condition or mutex.
3525 * icall.c: call mono_runtime_set_shutting_down before suspending the
3528 Fixes bug #74693. And now xsp is happier when exiting.
3530 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
3532 * loader.c (mono_stack_walk): Fix #74690.
3534 2005-04-22 Martin Baulig <martin@ximian.com>
3536 * mono-debug.h (MonoDebugMethodJitInfo): Added
3537 `MonoDebugMethodJitInfo *jit'.
3539 * mono-debug.c (mono_debug_read_method): Cache the
3540 MonoDebugMethodJitInfo in `address->jit'.
3541 (mono_debug_free_method_jit_info): New public method.
3543 2005-04-22 Martin Baulig <martin@ximian.com>
3545 * class.c (mono_class_is_assignable_from): Disallow
3546 type parameter -> interface.
3548 2005-04-21 Dick Porter <dick@ximian.com>
3550 * threads.c (mono_thread_create): Turn an assertion into an error.
3552 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
3554 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
3556 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
3557 Fix some gcc 4.0 warnings.
3559 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
3561 * file-io.c: fix alt dir separator char on unix systems
3562 and cleanup (fixes bug #71214).
3564 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
3566 * marshal.c: Use CALLVIRT instead of CALL when dispatching
3567 a call to a remote domain, since the method may be an
3568 interface method in the client domain. This fixes bug #74192.
3570 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3572 * threadpool.c: recv/send are now performed before going back to managed
3573 code to save one transition.
3575 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3577 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
3579 * metadata/threadpool.c: removed hack to workaround the bug above.
3583 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
3585 * reflection.c reflection.h: Fix handling of parameter defaults in
3586 dynamic methods. Also fixes handling of parameter attributes.
3589 * mono-debug.c (mono_debug_close_image): Fix warning.
3591 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3593 * socket-io.h: replaced old unused field with new 'blocking'.
3594 * threadpool.c: restore socket blocking state on windows(tm).
3596 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
3598 * icall.c: don't return the codebase in the AssemblyName[] returned by
3599 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
3600 * object-internals.h: Removed FIXME (fields were presents) and fixed
3601 versioncompat declaration.
3603 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3605 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
3606 not closed, so don't cleanup when it happens.
3608 2005-04-13 Chris Toshok <toshok@ximian.com>
3610 * mono-debug-debugger.h: change prototype for
3611 mono_debugger_lookup_type.
3613 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
3614 this function, although it should probably be named
3615 mono_debugger_init_type.
3617 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3619 * threadpool.c: fix non-AIO case.
3621 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
3623 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
3624 the built-in profiler to measure just JIT compilation times.
3626 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3628 * threadpool.c: the epollfd might be closed by another thread at
3629 any time, so ignore EBADF at treat it as a "we're closing" sign.
3631 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3633 * threadpool.c: release the semaphores with a count equals to the number
3634 of working threads in both IO and regular pools. Fixed typo that messed
3635 up the count of IO pool threads. Don't initialize the pipe handles if
3638 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3640 * threadpool.c: some systems don't like a NULL when deleting the socket
3643 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3645 * threadpool.c: fix semaphore allocation.
3647 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3649 * threadpool.c: added epoll() based implementation for asynchronous IO
3650 that is used instead of the default poll() when available.
3651 It can be disabled by setting MONO_DISABLE_AIO.
3653 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3655 * threadpool.c: windows needs 'closesocket' and instead of returning
3656 0 when the stream is closed while in select, it returns -1. Fixes bug
3659 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
3661 * class.c (class_compute_field_layout): Fix the regression caused by
3664 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3666 * threadpool.c: separate pool for socket async. IO.
3667 * threadpool.h: mono_max_worker_threads is not a global any more.
3669 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
3671 * class.c (class_compute_field_layout): Fix #74549.
3673 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3675 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
3676 use 2 connected sockets instead.
3678 2005-04-08 Miguel de Icaza <miguel@novell.com>
3680 * mono-config.c: Add new entry point for mkbundle
3681 mono_config_parse_memory.
3683 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3685 * threadpool.c: removed another unused function.
3687 2005-04-08 Ankit Jain <radical@corewars.org>
3689 * reflection.c (get_default_param_value_blobs): Add 'types'
3690 parameter to get the types encoded in the constant table.
3691 (mono_param_get_objects): Use the type from the constant table,
3692 not the type of the parameter, when creating default values.
3693 Handle null default values correctly.
3695 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3702 * socket-io.c: removed dead code for async IO.
3704 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3706 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
3708 * threadpool.c: intercept socket async. calls and pass them to a thread
3709 that is polling and dispatching the job items to the threadpool as
3710 socket become ready. Fixes bugs #71217, #71933.
3712 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
3713 between char and short/ushort arrays.
3715 * socket-io.c: remove dead code.
3717 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
3720 icall.c : removed InternalToUpper_Comp() and
3721 InternalToLower_Comp().
3723 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
3725 * char-conversions.h : The tables were incorrectly generated. Should
3726 be generated against invariant culture.
3728 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
3730 * object.c (mono_runtime_invoke_array): Fix return value when
3731 passing pre-created valuetype objects to ctors.
3733 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
3734 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
3737 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
3739 * domain.c: removed g_assert for runtimesecurityframe_class. This is
3740 only used with --security and hides the wrong corlib version error.
3742 2005-03-30 Joshua Tauberer <tauberer@for.net>
3744 * class.c: Changed mono_class_name_from_token so that types
3745 outside of a namespace don't have an initial period. Improved
3746 the g_warning message used in _mono_class_get when loading
3748 * assembly.c: In mono_assembly_load_reference, when an assembly
3749 can't be found, "No such file or directory" is misleading and
3750 unhelpful because a few paths were checked for the presence of
3751 the assembly. When that happens (ENOENT), display a nicer
3752 message indicating the directories that were searched. In all
3753 cases, the warning is made easier to read for non-hackers.
3755 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
3757 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
3759 * appdomain.h|domain.c: Removed inline from functions.
3760 * appdomain.c: Reduced warnings when compiling on windows.
3761 * icall.c: Fixed output_debug declaration to gunichar2*.
3762 * mono-config.c: Reduced warnings when compiling on windows.
3763 * rand.c: Added missing "windows.h". Added missing return value.
3764 * rawbuffer.c: Added missing winsock2.h for windows.
3765 * sysmath.h: Added mono-compiler.h header to allow/ease
3766 compilation with non-GCC compilers.
3767 * threads.c: Fixed declarations to compile with VS.NET C compiler.
3768 Removed cast warnings.
3770 Adapted from the work of J Lothian (for VC6).
3772 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
3774 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
3777 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
3779 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
3782 2005-03-27 Raja R Harinath <harinath@gmail.com>
3784 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
3785 has to be in $(exec_prefix). $(prefix) is for arch-independent
3786 stuff, and it would probably use $(prefix)/share rather than
3789 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3791 * console-io.c: added 2 includes that might be missing.
3793 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
3795 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
3798 * reflection.c (create_custom_attr): Allocate the params array using
3799 alloca so it gets GC tracking.
3801 2005-03-23 Chris Toshok <toshok@ximian.com>
3803 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
3806 2005-03-24 Raja R Harinath <rharinath@novell.com>
3808 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
3809 changes to pick up any changes in prefix, etc.
3811 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
3813 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
3815 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
3816 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
3818 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
3820 * class-internals.h object-internals.h class.c reflection.c: Extend the
3821 mono_lookup_dynamic_token () function to return the class of the
3824 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
3827 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
3829 * security-manager.c: Skip inheritance checks for intra-corlib
3830 class inheritance and method overrides. This skips a lot of checks
3831 and (anyway) permissions cannot work until corlib is loaded.
3833 2005-03-23 Martin Baulig <martin@ximian.com>
3835 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
3836 MONO_TYPE_GENERICINST.
3838 2005-03-23 Martin Baulig <martin@ximian.com>
3840 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
3842 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3844 * class.c: added locking comments to some functions.
3845 Cache the interface offsets arrays (saves about 20 KB
3846 of runtime memory in a typical app).
3847 Reduce the time overhead in mono_class_setup_supertypes ().
3849 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
3851 * icall.c: speedup and fix leaks in GetMethodsByName and
3852 GetPropertiesByName.
3854 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3856 * reflection.c: some locking fixes.
3858 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
3860 * metadata.c: added missing break in case statement.
3862 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
3864 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
3865 typedbyref return values. Fixes #73941.
3867 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
3869 * security-manager.c|h: Added demandunmanaged method and
3870 suppressunmanagedcodesecurity class to MonoSecurityManager.
3871 Renamed aptc class to allowpartiallytrustedcallers.
3873 2005-03-17 Martin Baulig <martin@ximian.com>
3875 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
3877 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3879 * file-io.c: disabled file async. IO using aio_*. It uses the
3880 threadpool now. Workaround for bug #73718.
3882 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3884 * assembly.h, mono-config.c: added code to deal with bundled configs
3885 for bundled assemblies.
3887 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
3889 * *.c, private.h: cleanup, removing old private.h header file.
3891 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
3893 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
3894 and throw_on_unmappable_char attributes.
3896 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
3898 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
3899 _ProcessName_internal.
3901 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
3903 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
3906 * icall.c threads.c threads-types.h: Remove slothash icalls as they
3909 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
3911 * object.c (compute_class_bitmap): Add support for generics. Fixes
3914 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
3916 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
3918 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3920 * filewatcher.c: commented out the code for windows watcher, as we don't
3921 use it (we use the managed implementation instead).
3923 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
3925 * object-internals.h (MonoThread): Remove 'unused1' field.
3927 * appdomain.c: Bump corlib version.
3929 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
3931 * reflection.c (mono_reflection_create_runtime_class): Remove the
3932 AssemblyBuilder.Save optimization since it causes too many problems.
3934 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
3936 * exception.c|h: Added mono_get_exception_reflection_type_load to
3937 create a ReflectionTypeLoadException object.
3938 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
3939 to return NULL is a InheritanceDemand fails during reflection. Updated
3940 ves_icall_System_Reflection_Assembly_GetTypes to throw a
3941 ReflectionTypeLoadException if an InheritanceDemand fails during
3942 reflection. Added icall mapping for GetLinkDemandSecurity.
3943 * security-manager.c|h: Added ves_icall_System_Security_
3944 SecurityManager_GetLinkDemandSecurity internal call to return the
3945 class and methods permissions set for a LinkDemand. Removed unused
3946 fields in MonoSecurityManager.
3948 2005-03-10 Martin Baulig <martin@ximian.com>
3950 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
3951 it's a generic instance.
3953 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
3955 * reflection.c (mono_get_object_from_blob): Applied patch from
3956 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
3958 * class.c (mono_class_is_assignable_from): Another try at fixing
3959 #73469 without breaking anything.
3961 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
3963 * class.c: (mono_class_is_assignable_from): Revert the last changes
3964 since they don't work with generics.
3966 * class.c (mono_class_is_assignable_from): Fix build bustage.
3968 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
3969 the managed IsAssignableFrom method. Fixes #73469.
3971 * reflection.c (mono_reflection_call_is_assignable_from): New helper
3974 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
3976 * object.c (mono_load_remote_field_new): Fix returning uninitialized
3977 memory when the remoting callback does not sets the out arguments.
3980 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
3983 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
3985 * object-internals.h (MonoStackFrame): Sync with managed object layout.
3987 * appdomain.c: Bump corlib version.
3989 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
3991 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
3994 * threads.c (mono_thread_attach): Detect threads which are not started
3995 by the GC pthread wrappers.
3997 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
3999 * icall.c: Added new icall for RNG.
4000 * rand.c|h: Added new icall to open the RNG. This allows to share a
4001 single handle on Linux to access /dev/urandom and fix #73183.
4003 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
4005 * object.c: setting the new vtable in a transparent proxy object must
4006 not change the GC descriptor.
4008 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4010 * object.c: fixed compilation without GCJ support.
4011 * reflection.c: for runtime-created types ensure klass->has_references
4012 is correct (bug #73215).
4014 2005-03-02 Martin Baulig <martin@ximian.com>
4016 * class.c (mono_class_is_assignable_from): Make this work if
4017 `oklass' is a generic instance; fixes #72831.
4019 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
4021 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
4024 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
4026 * marshal.c: Reorganize native->managed marshalling code to also use
4027 the emit_marshal_... functions.
4029 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4031 * object.c: typed allocs have issues with bitmap sizes > 30,
4032 so check for max_set >= 30.
4034 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
4036 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4037 managed code. Fixes #73012.
4039 * metadata.h (MonoMarshalSpec): Add elem_mult field.
4041 * metadata.c reflection.c: Load/Emit elem_mult as well.
4043 * metadata.h (MonoMarshalSpec): Add comment.
4045 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
4047 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
4048 num_elem to -1 if not given.
4050 * object-internals.h (MonoReflectionMarshal): Add has_size field.
4052 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
4055 2005-03-01 Marek Safar <marek.safar@seznam.cz>
4057 * null-gc.c (mono_gc_free_fixed): Was not compilable.
4059 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
4061 * reflection.c (encode_marshal_blob): Encode param_num field as well.
4063 * object-internals.h (MonoReflectionMarshal): Add param_num field.
4065 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4067 * object.c: generalized the reference bitmap creation
4068 and added hooks for the new GC.
4069 * class-internals.c: removed the gc_bitmap field from MonoClass.
4071 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4073 * domain.c: help the compiler to produce better code
4074 in mono_jit_info_table_find ().
4076 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4078 * object.c: make all allocations look typed.
4080 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4082 * socket-io.c: load Mono.Posix if it's not loaded already
4085 2005-02-24 Martin Baulig <martin@ximian.com>
4087 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
4088 * reflection.c (dup_type): Likewise.
4090 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
4092 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
4093 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
4095 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4097 * domain.c, threads.c, object-internals.h: make the critical thread
4098 local vars use the fast access mode (even when we're compiled in
4099 a lib). Provide accessors to be used by the jit during codegen.
4101 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4103 * appdomain.c: Changed hook functios behavior to include
4104 support for the reflection only assemblies. Some icalls were changed
4105 to support the mentioned assemblies too. Signatures of static methods
4106 try_assembly_resolve and real_load now have an additional parameter:
4109 * assembly.c: General changes to mono_assembly_ methods to support
4110 reflection only api. Functions mono_assembly_open, mono_assembly_load,
4111 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
4112 suffix, to support an additional gbool parameter to specify whether
4113 the assembli is reflection only or not. Created some new hook functions
4114 to add support for reflection only assemblies. Signatures of static
4115 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
4116 have now an additional parameter: refonly.
4118 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
4119 indicating whether the assembly is reflection only or not.
4121 * exception.c: Add mono_get_exception_invalid_operation.
4123 * icall.c: Throw an InvalidOperationException when trying to invoke
4124 a property/method/event, or trying to set/get the value of a field.
4125 Also add an icall to retrieve the ref_only flag to the
4126 MonoReflectionAssembly.
4128 2005-02-23 Chris Toshok <toshok@ximian.com>
4130 Part of fix for #72827.
4131 * mono-debug.c (mono_debug_add_method): add lexical block data to
4132 the info we write. Kind of a hack at the moment - we copy the
4133 lexical block info from the MonoDebugMethodInfo to the
4134 MonoDebugMethodJitInfo here, before writing it.
4135 (mono_debug_read_method): read the lexical block info.
4137 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
4139 * debug-mono-symfile.h: add lexical block support.
4141 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
4144 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
4146 * loader.c (mono_lookup_pinvoke_call): Fix warning.
4148 * object.c (mono_runtime_free_method): Call mono_free_method () and
4149 put the TODOs there.
4151 * loader.c (mono_free_method): Free up most memory allocated for
4154 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4156 * reflection.c: properly flag a Type argument to a
4157 named custom attr value (bug #72248).
4159 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4161 * reflection.c: reduce code duplication in named custom
4164 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
4166 * reflection.c: properly encode custom attrs of type object
4169 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
4171 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
4173 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
4175 * socket-io.c: load System.dll if it's not loaded already
4176 (bug #72850 and #70477).
4178 2005-02-21 Martin Baulig <martin@ximian.com>
4180 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4183 2005-02-21 Martin Baulig <martin@ximian.com>
4185 * reflection.c (mono_image_build_metadata): We also need to
4186 "fixup" the MethodImpl table after we computed the final method
4187 indices. Call fixup_methodimpl() to do that.
4188 (fixup_methodimpl): New private method.
4190 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4192 * assembly.c: special case mscorlib.dll (bug#72536),
4193 patch from Carlos Alberto Cortez.
4195 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
4197 * threads-types.h threads.c: Fix build bustage.
4199 * threads.c: Use a union for long<->double conversions.
4201 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
4202 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
4204 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
4205 containing the checkpoint call with NOT_TAKEN.
4207 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
4208 checkpoint before pushing the arguments, so they won't have to be
4211 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4213 * domain.c, assembly.c, domain-internals.h: make some data
4214 const and relocation-free.
4216 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
4218 * object.c, appdomain.c, class-internals.h: introduce the
4219 MonoClassRuntimeInfo structure to hold the info needed to
4220 use a class at runtime. Made mono_class_vtable() lock-free
4221 for all the appdomains.
4223 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
4225 * metadata-internals.h, image.c: introduce a per-image mempool to
4226 be used for memory that has the same lifetime as the image.
4228 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
4230 * domain.c: In mono_init_internal(), instead of selecting the first
4231 runtime version supported by an executable, get a list of all
4232 supported versions and select the one for which an mscorlib exists
4233 (since even if the runtime supports a given version, it doesn't mean
4234 that the framework for that version is installed).
4235 Modified get_runtimes_from_exe to support this behavior.
4236 In supported_runtimes, added information about additional system
4239 * assembly.c: Added support for more than one system assembly version
4240 per runtime version. Updated the assembly list.
4241 In mono_assembly_remap_version, removed the initial version check,
4242 since we don't know to which version we need to compare until we
4243 get the version set on which the assembly is based.
4244 Moved the code for loading corlib into the new method
4245 mono_assembly_load_corlib(), so it can be used by the initialization
4248 * domain-internals.h: Updated data structures and added declaration
4249 for mono_assembly_load_corlib.
4251 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
4253 * reflection.c (resolve_object): Fix the creation of the signature in
4254 the SignatureHelper case.
4256 * assembly.c (mono_assembly_remap_version): Fix binary search.
4258 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
4260 * class.c: Added inheritance check when a method is overloaded (from a
4261 virtual method or when implementing an interface) and when a class is
4262 inherited. Added functions to set a failure for a class and to
4263 retreive the exception from a failure.
4264 * class-internals.h: Added fields to MonoClass to keep the exception
4265 information status for inheritance (or other exceptions) to be thrown
4266 later (i.e. not at load time).
4267 * object.c: Throw the inheritance SecurityException when a type is to
4268 be created with either class or method inheritance violations.
4269 * reflection.c|h: Fix when getting declsec from a class. Removed
4270 unrequired code for class. Improved sanity in parameter naming.
4271 * security-manager.c|h: Added functions to check for class and method
4274 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
4276 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
4277 and has_finalize in dynamic types as well.
4279 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
4281 * culture-info-table.h : fixed currency format for en-GB (and so on).
4283 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
4285 * gc.c: ensure the GC handles never have 0 as a value.
4287 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
4289 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
4290 a pointer to a struct to unmanaged code. Fixes #72625.
4292 2005-02-16 Martin Baulig <martin@ximian.com>
4294 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
4296 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
4298 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
4300 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
4302 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
4304 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
4305 UnmanagedFunctionPointerAttribute, use it for determining calling convention
4308 * reflection.c (mono_custom_attrs_get_attr): New helper function.
4310 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
4312 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
4314 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
4315 changes to make the current context a field in MonoThread.
4317 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
4319 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
4322 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
4323 extracted from mono_marshal_get_native_wrapper.
4325 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
4326 to create wrappers around native functions.
4328 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
4329 delegates for arbitrary function pointers. Fixes #71472.
4331 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4333 * threads.c: cleaned up the code a little.
4335 2005-02-15 Martin Baulig <martin@ximian.com>
4337 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
4340 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
4341 allocate larger chunks if needed.
4343 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
4345 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
4348 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
4350 * domain.c: keep the domains in an array and ensure the domain ids
4351 are kept small, so they can be used as indexes to domain-specific data
4352 with a small memory overhead.
4354 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
4356 * icall.c: Handle byref types in Type icalls. Fixes #72544.
4358 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
4360 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
4362 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
4364 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
4366 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
4369 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
4371 2005-02-12 Ben Maurer <bmaurer@ximian.com>
4373 * domain-internals.h: add the hashtable here.
4375 * class-internals.h: Remove `info' from MonoMethod
4377 * domain.c: Add a new hashtable, jit_trampoline_hash
4379 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4381 * object.c: don't set the value of static fields
4384 2005-02-11 Martin Baulig <martin@ximian.com>
4386 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
4387 (mono_debug_add_method): Silently ignore the method if it's too big.
4388 (mono_debug_add_type): Likewise.
4390 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
4392 * threads.c, appdomain.c: remove #ifdefs from the code.
4394 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
4396 * metadata-internals.h: Added flags to MonoAssembly to cache the most
4397 common security informations. This allows us to stay in unmanaged code
4398 when doing LinkDemand and it's special cases (except for the first
4399 time for initialization). The flags a very much used with --security.
4400 * reflection.c|h: Added code to get declarative security attributes
4401 for LinkDemand and InheritanceDemand. This required to refactor the
4402 existing code for Demand.
4403 * security-manager.c|h: Added new method fields for the special cases
4406 2005-02-10 Martin Baulig <martin@ximian.com>
4408 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
4409 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
4411 2005-02-10 Martin Baulig <martin@ximian.com>
4413 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
4414 debugging code; this is almost a complete rewrite.
4416 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
4418 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4420 * domain.c, object.h: expose mono_string_equal () and
4421 mono_string_hash ().
4422 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
4423 it's implemented in managed code.
4425 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4427 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
4428 lo leak objects between appdomains.
4430 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4432 * assembly.c: old compilers compilation fix from
4433 robertj@gmx.net (Robert Jordan).
4435 2005-02-09 Ben Maurer <bmaurer@ximian.com>
4437 * class-internals.h: Little reminder for the future.
4439 * debug-helpers.c: Fix up wrapper_type_names
4441 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4443 * image.c, metadata-internals.h: when loading an image from a file,
4444 mmap all of it and use the same codepaths as when using a
4445 in-memory image: the code is simpler and we use less memory
4446 (both writable and readonly).
4448 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
4450 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
4451 API to alloc runtime data structures that need to be tracked by the
4452 GC and contain pointers.
4453 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
4454 make the code more readable and eventually use a different GC.
4456 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
4458 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
4461 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
4463 * object.c: In release_type_locks(), don't release the cctor lock
4464 if it has already been released. This fixes a crash in the
4467 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4469 * gc.c, marshal.c, icall.c: register a delegate for finalization
4470 only when the native function pointer has been allocated for it.
4472 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4474 * object.c: cleaned up some code, allocate objects that are
4475 pointer free with the atomic malloc variant. Allocate memory
4476 for static data from the mempool if it's pointer-free.
4477 Allocate the bounds array at the end of the array data, when needed.
4478 * object-internals.h, object.h: move a private function in a private
4480 * class.c: handle missing case in tracking references in fields.
4482 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
4484 * class.c, class-internals.h: keep track if a type has
4485 reference fields in either the instance or static fields.
4487 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
4489 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
4490 and renamed to MonoRuntimeInfo. Added fields to store the expected
4491 framework assembly version. Changed mono_get_framework_version and
4492 mono_get_runtime_version for a single mono_get_runtime_info method.
4494 * assembly.c: Added method to remap system assembly versions to the
4495 current executing runtime version. Removed old mapping code.
4496 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
4498 * icall.c, reflection.c: Track api changes.
4500 2005-02-06 Miguel de Icaza <miguel@novell.com>
4502 * loader.c (method_from_memberref): Improve error reporting,
4503 produce the class name instead of the typeref/typedef index.
4505 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
4507 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
4509 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
4511 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
4512 stdcall and charset name mangling. Reorganize the code and add
4515 2005-02-05 Ben Maurer <bmaurer@ximian.com>
4517 * monodiet.c: More iters!
4519 * marshal.c: Iter usage.
4521 * icall.c: Iter usage.
4523 * object.c: Use iters.
4525 * debug-helpers.c: More iters
4527 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
4529 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
4532 2005-02-05 Ben Maurer <bmaurer@ximian.com>
4534 * mono-debug-debugger.c: use iters
4536 * class.c, class-internals.h: mono_class_setup_events is static
4539 * All callers: use iters
4541 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
4543 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
4544 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
4546 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
4548 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
4550 * marshal.h: Add prototypes for ldfld/stfld_remote.
4552 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
4553 this is called during startup.
4555 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
4557 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
4558 MonoThreadsSync struct private in monitor.c. Changed the way
4559 MonoThreadsSync is allocated so it's faster and there is no
4560 need to keep track of it with a finalizer and it uses less memory.
4561 This also finally allows us to allocate mono objects as ptrfree when
4562 there are no reference fields.
4564 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
4566 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
4567 disappearing link to the GC interface and use them to simplify
4570 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
4572 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
4573 stfld_remote which call mono_load/store_field_new. This allows methods
4574 calling ldfld/stfld wrappers to be AOTed.
4576 * console-io.c: Include sys/filio.h under solaris.
4578 * console-io.c: Include curses.h if needed correctly.
4580 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
4582 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
4583 method->klass as well.
4585 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
4587 * class.c (mono_class_init): Switch on lazy initialization of
4590 * class.c (mono_class_get_finalizer): Handle the case when the
4591 finalizer is inherited.
4593 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4595 * console-io.c: <curses.h> is needed by term.h on solaris.
4597 2005-02-03 Ben Maurer <bmaurer@ximian.com>
4599 * icall.c, class-internals.h, monodiet.c, class.c: Remove
4600 mono_class_setup_properties where possible. Remove this ftn from
4601 the header file, and make it static.
4603 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
4605 * loader.c: Add missing setup_... call.
4607 * class.c: Add missing setup_... calls.
4609 * class.c (mono_class_init): Switch on lazy initialization of
4612 * class.c (mono_class_init): Fix generics broken by the recent changes.
4614 * monodiet.c (handle_type): Add missing setup_... calls.
4616 * class.c: Back out garbage in previous patch.
4618 * class.c: Add missing setup_... calls.
4620 * class.c (mono_class_get_method_from_name_flags): Avoid calling
4621 mono_class_setup_methods () if possible.
4623 * class-internals.h (MonoClass): Add 'has_cctor' flag.
4625 * class-internals.h (MonoCachedClassInfo): New structure.
4627 * class.c: Initialize properties and events fields of MonoClass lazily.
4629 * class.c: Add infrastructure for lazily initializing the methods and
4630 vtable fields of MonoClass. Not yet used.
4632 * class.c (mono_class_get_finalizer): New helper function.
4634 * class.c: Add infrastructure for loading some class related data from
4637 * object.c: Add infrastructure for initializing the vtable from data
4640 * gc.c (run_finalize): Use mono_class_get_finalizer ().
4642 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
4643 appropriate initialization function before accessing parts of the
4644 MonoClass structure.
4646 * marshal.c: Fix warnings.
4648 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
4650 * mono-debug-debugger.c (get_exception_message): Use
4651 mono_class_get_method_from_name_flags ().
4653 2005-02-02 Ben Maurer <bmaurer@ximian.com>
4655 * reflection.c, appdomain.c: Replace a few manual searches that
4656 Zoltan missed. (Paolo approved this part of my initial patch).
4658 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
4660 * profiler.c: disable recording statistical events at report time.
4662 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4664 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
4665 to byteswap arrays of enum values, too (bug #72080).
4667 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
4669 * appdomain.c (set_domain_search_path): Allow this to be called if
4670 domain->setup is not yet set.
4672 * loader.c (mono_method_get_index): New helper function.
4674 * loader.c reflection.c: Use mono_method_get_index ().
4676 * class.c (mono_class_get_method_from_name_flags): New helper method.
4678 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
4681 * class.c (mono_class_get_cctor): New helper method.
4683 * string-icalls.c object.c class.c marshal.c reflection.c: Use
4684 mono_class_get_method () to look up methods.
4686 2005-02-01 Miguel de Icaza <miguel@novell.com>
4688 * console-io.c: Fix the build, this should work on Windows.
4690 2005-01-31 Ben Maurer <bmaurer@ximian.com>
4692 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
4693 be set to null to keep things valid
4695 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4697 * icall.c: added Console 2.0 icalls.
4698 * Makefile.am: added console-io.[ch]
4699 * console-io.[ch]: internal calls for Console 2.0 API.
4701 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4703 * class.c: make sure we consider all the interfaces
4704 when calculating max_interface_id (bug found by
4705 Jeroen Frijters running ikvm).
4707 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
4709 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
4710 valuetype fields to null.
4712 * object.c (set_value): Ditto. Fixes #71669.
4714 2005-01-31 Martin Baulig <martin@ximian.com>
4716 * metadata.c (mono_metadata_has_generic_params): New public
4717 function; checks whether something is a generic method.
4719 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
4721 * appdomain.c: fix infinite recursion when adding assemblies.
4723 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
4725 * object.c: Fix small typo to return all items for Environment.
4728 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4730 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
4731 reflection.c: more domain and assembly-unload related fixes
4732 and memory leaks plugs.
4734 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
4736 * 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.
4738 2005-01-29 Ben Maurer <bmaurer@ximian.com>
4740 * loader.c (mono_method_signature): Make this method lazy
4741 (mono_get_method_from_token): Don't computate the signature here.
4743 Doing this saves quite a bit of memory. I got 90 kb on starting up
4744 monodoc. It should also save some disk reads on startup.
4746 * *: MonoMethod->signature might be NULL now. You *MUST* use
4747 mono_method_signature.
4749 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
4751 * object.c (mono_runtime_get_main_args): Return an array from the
4752 current domain here. Fixes #71938.
4754 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
4756 * monitor.c: formatting changes to comply with the
4757 mono coding style and remove #ifdefs from the code.
4759 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4761 * metadata.c, private.h: remove some unneeded data
4762 and use a more compact representation for table schemas.
4764 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
4766 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
4767 to get a better distribution in hash tables.
4768 * *.c: use mono_aligned_addr_hash() where appropriate.
4769 * assembly.c: make var static.
4771 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
4773 * domain-internals.h: Put MonoJitInfo on a diet.
4775 * domain.c: Fix a warning.
4777 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4779 * gc.c: rework the gc handles code to reuse handles
4782 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4784 * domain.c: fixed long standing bug in mono_string_equal() which
4785 was brought to light with the ldstr changes.
4787 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
4789 * reflection.c: Remove warning by adding missing include for marshal.h
4791 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4793 * domain.c, object.c: change the ldstr_table to hold
4794 MonoString* as keys: makes the runtime isinterned lookup
4795 faster and simplifies memory management.
4797 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
4799 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
4800 possible to add imperative security checks before calling the icall.
4801 * reflection.c: Return security attributes on the original MonoMethod
4802 (and not the wrapped one). This fix permissions on icalls.
4804 2005-01-25 Dick Porter <dick@ximian.com>
4806 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
4807 the check for mktime() support actually test the mktime() return
4808 value. "Fixes" bug 71682, though the output is still different to
4811 2005-01-25 Martin Baulig <martin@ximian.com>
4813 * class.c (mono_class_is_assignable_from): Make this work for
4816 2005-01-24 Ben Maurer <bmaurer@ximian.com>
4818 * marshal.c (mono_string_utf8_to_builder)
4819 (mono_string_builder_to_utf16): We might not have ownership of the
4820 string. In thise case, we need to create a new buffer.
4822 * object-internals.h (mono_stringbuilder_capacity): sb->str might
4823 be null, in which case, use the default capacity.
4825 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4827 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
4828 GC events to the profiler.
4830 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4832 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
4833 if you don't want the GC to run.
4835 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
4837 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
4838 start providing a GC API and keeping different implementations in
4840 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
4842 2005-01-22 Ben Maurer <bmaurer@ximian.com>
4844 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
4845 mmap rather than allocating a huge buffer.
4846 (mono_debug_close_mono_symbol_file): Free the buffer allocated
4849 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
4851 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
4852 and CheckExecutionRights.
4853 * reflection.c|h: Keep the index of the declarative security to be
4854 used, instead of the pointer, when AOT compiler is used. Also add
4855 class initialization when requesting demands.
4856 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
4857 CheckExecutionRights. Both properties are now FALSE by default, and
4858 unmodifiable, unless the --security option is used.
4860 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4862 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
4863 reflection.c: properly refcount images and assemblies, many leaks fixed.
4865 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4867 * threadpool.c: increase the timeout for threads in the thread pool to
4868 10s. Fixes bug #67159.
4870 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
4872 * class-internals.h: Sun's compiler insists on explicit
4873 signed on bit fields to handle then correctly.
4875 2005-01-19 Miguel de Icaza <miguel@ximian.com>
4877 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
4878 Make the size of the array fit only the number of invalid path
4881 * class.c (_mono_class_get): Improve the error reporting when a
4882 class referenced is not found, to assist debugging.
4884 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
4886 * threads.c: fix off-by-one error.
4887 * domain.c: free data allocated in the domain.
4889 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
4891 * reflection.c (mono_method_body_get_object): Fill out exception info
4894 * object-internals.h: Add MonoReflectionExceptionHandlingClause
4897 2005-01-19 Martin Baulig <martin@ximian.com>
4899 * loader.c (mono_get_method_constrained): Make this work again.
4901 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
4903 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
4904 guint16 to match the managed side.
4906 * reflection.c (mono_reflection_body_get_object): Fill out local
4909 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
4912 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
4913 'local_var_sig_token'.
4915 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
4917 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
4920 * reflection.c (mono_method_body_get_object): Handle abstract and
4923 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
4925 * marshal.c, loader.c, class-internals.h, reflection.c:
4926 store the emthod data for a wrapper in an array instead of a list.
4928 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
4930 * marshal.c: change the code to allocate memory more
4931 conservatively for method wrappers.
4933 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
4935 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
4936 fields from MonoClass to the marshal info structure where they belong.
4938 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4940 * class.c, object.c, class-internals.h, marshal.c: rearrange
4941 some fields and tweak some types to lower memory usage.
4943 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
4945 * threads.c (signal_thread_state_change): Handle the case when the
4946 target thread is the current thread.
4948 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
4950 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
4951 emit_ptr_to_object_conv.
4953 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
4954 marshalling. Fixes #71352.
4956 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4958 * metadata.h, blob.h: move table enum to blob.h so it can be included
4960 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
4961 cut the size of MonoImage/MonoDynamicImage.
4963 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
4965 * profiler.c (mono_profiler_install_simple): Fix default arguments.
4967 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
4969 * reflection.c, reflection.h, icall.c: add a function to check
4970 if an attribute type is defined for a metadata object.
4972 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
4974 * object-internals.h: Added some needed fields from StringBuilder class.
4975 * marshal.c: Set the maxCapacity when creating a StringBuilder.
4977 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
4979 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
4980 threads before shutting down the runtime.
4982 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
4984 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4986 * object-internal.h, threads.c: implement stacksize and
4987 parameterized thread start functionality (requires
4988 matching corlib). Marked broken code for later removal.
4990 2005-01-12 Martin Baulig <martin@ximian.com>
4992 * class-internals.h (MonoGenericClass): Moved the `initialized'
4993 flag to MonoDynamicGenericClass, removed `init_pending'.
4994 (MonoGenericInst): Added `is_reference' flag.
4996 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
4998 * reflection.c (mono_image_create_pefile): Only set the pe_offset
4999 inside the MSDOS header. Fixes #71201.
5001 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
5003 (mono_domain_finalize): Ditto.
5005 2005-01-12 Martin Baulig <martin@ximian.com>
5007 * class.c (mono_get_shared_generic_class): Use the cache for
5008 non-dynamic generic classes.
5010 * class-internals.h (mono_class_create_generic_2): Removed
5011 function prototype, this function is now static inside class.c.
5013 * class.c (mono_class_create_generic_2): Made this static, only
5014 call it from mono_class_init() and mono_class_setup_parent().
5015 (collect_implemented_interfaces_aux): Call mono_class_init() on
5016 the interfaces we collect.
5017 (mono_class_setup_vtable): Call mono_class_init (class->parent).
5019 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
5021 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
5022 it a real thread handle.
5024 * domain-internals.h: Move exvar_offset from MonoJitInfo to
5025 MonoJitExceptionInfo, since each catch clause needs its own variable.
5027 2005-01-11 Dick Porter <dick@ximian.com>
5029 * image.c (mono_pe_file_open): New variant on mono_image_open()
5030 that does not set up the CLI metadata; used for FileVersionInfo so
5031 it can get the data for windows binaries too.
5033 * process.c (process_read_string_block): Don't read off the end of
5034 the StringTable block.
5036 These both fix bug 70766.
5038 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
5040 * gc.c: set some fields to NULL at GC cleanup time.
5041 * threads.c: if we quit the main thread, call exit ().
5043 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
5045 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
5047 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
5049 * threads.h, threads.c, object.c: added accessor and settor for
5050 main_thread. Handle it specially when exiting from it: wait
5051 for other foreground threads to exit.
5053 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
5055 * process.c, verify.c: remove some bloat.
5057 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
5059 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
5060 the calling convention to cdecl under win32.
5062 2005-01-08 Ben Maurer <bmaurer@ximian.com>
5064 * object.c (mono_object_get_size): New function to get the size of
5067 * profiler.c (simple_allocation): Use above.
5069 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
5071 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
5072 ves_icall_System_AppDomain_getRootDomain (as it's not required to
5073 get an appdomain by it's id and we can't assume the root's id is 0).
5074 * domain-internals.h: Change the function prototype to match.
5075 * icall.c: Change the icall table for AppDomain.
5077 2005-01-08 Miguel de Icaza <miguel@ximian.com>
5079 * locales.c (string_invariant_compare_char): Only compute
5080 GUnicodeTypes in the case where we need them. Test for ordinality
5081 first and return if so.
5086 * FIXME: here we must use the information from c1type and c2type
5087 * to find out the proper collation, even on the InvariantCulture, the
5088 * sorting is not done by computing the unicode values, but their
5089 * actual sort order.
5092 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5094 * loader.c: for P/Invoke methods, allow the "Internal" shared
5095 library name to refer to the calling process symbol namespace.
5097 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
5099 * Makefile.am: Add the security manager to the build.
5100 * security-manager.c|h: New. Initialization of the security manager.
5102 2005-01-07 Dick Porter <dick@ximian.com>
5105 * monitor.c: Update thread state during Monitor and WaitHandle
5106 waits. Fixes bug 71031.
5108 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
5110 * reflection.c (property_encode_signature): Correctly handle when the
5111 property has no methods.
5113 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
5115 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
5117 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
5118 fields from mb, not rmb. Fixes #71017.
5120 * marshal.c (emit_ptr_to_str_conv): Add support for
5121 ByValTStr -> string conversion. Fixes #71015.
5123 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
5125 * mempool.c (mono_mempool_contains_addr): New helper function.
5127 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
5129 * metadata.c (mono_metadata_compute_size): Fix size calculation of
5130 HasSematics encoded fields.
5132 * metadata.c (mono_type_to_unmanaged): Improve error message for
5133 invalid string marshalling.
5135 * metadata.c: Fix warnings.
5137 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5139 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
5142 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
5144 * domain.c object.c domain-internals.h: Revert part of r38077 since the
5145 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
5148 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
5150 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
5151 so methods containing these can be AOTed.
5153 2005-01-03 Martin Baulig <martin@ximian.com>
5155 * loader.c (find_method): Removed the hack for generic instances.
5156 (method_from_memberref): If our parent is a generic instance, pass
5157 its generic type definition to find_method() and then inflate the
5159 (mono_get_method_constrained): Pass the generic type definition to
5160 find_method() and inflate the method later.
5162 * class-internals.h (MonoStats): Added `generic_class_count'.
5164 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
5165 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
5167 * reflection.c (mono_custom_attrs_from_params): Don't ignore
5168 generic type definitions.
5170 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
5172 * loader.c icall.c: Fix warnings.
5174 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
5176 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
5177 blittable types. Fixes #70864.
5179 2004-12-29 Martin Baulig <martin@ximian.com>
5182 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
5184 * reflection.c (mono_method_get_object): Create a
5185 "System.Reflection.MonoGenericMethod" for inflated methods; don't
5186 call mono_get_inflated_method().
5188 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
5190 2004-12-27 Martin Baulig <martin@ximian.com>
5192 * class-internals.h (MonoMethod): Added `is_inflated' flag.
5193 (MonoMethodInflated): Added `inflated' field.
5195 * class.c (mono_class_inflate_generic_method): Don't really
5196 inflate the method here; just set the `is_inflated' flag in the
5198 (mono_class_get_inflated_method): Actually inflate the method here
5199 if it's not already inflated; we use the MonoMethodInflated's new
5200 `inflated' field as a cache.
5202 2004-12-26 Martin Baulig <martin@ximian.com>
5205 (inflate_generic_class): Moved some code out of inflate_generic_type().
5206 (mono_class_inflate_generic_method): If we're already inflated,
5207 inflate the context and use the declaring method; ie. make sure
5208 the declaring method of an inflated method is always the generic
5210 (mono_class_create_from_typedef): Create
5211 `class->generic_container->context->gclass'.
5213 2004-12-24 Ben Maurer <bmaurer@ximian.com>
5215 * metadata-internals.h, marshal.c, reflection.c: More
5216 MonoGHashTable->GHashTable.
5218 * domain-internals.h, class.c: Change MonoGHashTable's into
5219 GHashTables for some cases where no gc stuff is used
5221 All users: update apis
5223 2004-12-23 Ben Maurer <bmaurer@ximian.com>
5225 * metadata.c (builtin_types): Make this `const'. Makes this get
5226 put into the shareable section.
5227 (mono_metadata_init): Casts to make gcc happy.
5229 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
5231 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
5233 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
5235 * icall.c: Added an internal call to retrieve the position and length
5236 of assembly-level declarative security attributes (RequestMinimum,
5237 RequestOptional and RequestRefuse). This is used by the Assembly class
5238 to re-create the corresponding permission sets.
5240 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
5242 * marshal.c: fix the stelemref wrapper to be type correct
5245 2004-12-20 Ben Maurer <bmaurer@ximian.com>
5247 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
5248 to do key & 0x7fffffff. Hashtable already does this. It just
5249 results in longer code.
5251 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
5253 * appdomain.c: Bump corlib version.
5254 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
5255 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
5256 * reflection.c|h: Add functions to get declarative security infos
5257 (blob position and length) for assemblies, classes and methods.
5259 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
5261 * reflection.c: sort the constant table (bug #70693).
5263 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
5265 * object-internals.h, threads.c, domain.c: add accessors for
5266 the MonoThread and MonoDomain tls keys.
5268 2004-12-18 Martin Baulig <martin@ximian.com>
5270 * class.c (inflate_generic_type): If we're inflating a generic
5271 instance, set `ngclass->context->container = context->container';
5272 ie. the container we inflated into.
5274 * metadata.c (mono_metadata_parse_generic_param): Reflect above
5275 inflate_generic_type() changes.
5277 2004-12-17 Martin Baulig <martin@ximian.com>
5280 (MonoGenericClass): Replaced `MonoType *generic_type' with
5281 `MonoClass *generic_class'. Removed `dynamic_info'; if
5282 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
5283 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
5285 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
5287 * exception.c (mono_exception_from_token): New helper function.
5289 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
5291 * assembly.c (mono_assembly_load_with_partial_name): Call
5292 mono_assembly_loaded before invoking the preload hooks. Fixes
5295 * object-internals.h (MonoThread): Change culture_info and
5296 ui_culture_info into an array.
5298 * threads.c: Cache culture info objects from more than one appdomain.
5300 * threads.c threads-types.h icall.c: Add icalls for manipulating the
5303 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
5305 * threads.h threads.c appdomain.c: Clear the culture_info field of
5306 all threads during unloading if they point to an object in the dying
5309 2004-12-13 Ben Maurer <bmaurer@ximian.com>
5311 * culture-info.h (TextInfoEntry): New struct
5312 * object-internals.h: sync with managed
5313 * locales.c: fill the `text_info_data' field
5314 * culture-info-tables.h: update
5316 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
5318 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
5321 2004-12-12 Ben Maurer <bmaurer@ximian.com>
5323 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
5324 (ves_icall_ModuleBuilder_getMethodToken): Ditto
5326 2004-12-12 Martin Baulig <martin@ximian.com>
5328 * mono-debug-debugger.c (write_type): If we're an enum and the
5329 builtin types have already been initialized, call mono_class_init().
5331 2004-12-11 Martin Baulig <martin@ximian.com>
5333 * metadata.c (mono_metadata_load_generic_params): Added
5334 `MonoGenericContainer *parent_container' argument; automatically
5335 compute `container->is_method'; pass the correct owner to
5338 * reflection.c (compare_genericparam): Sort the GenericParam table
5339 according to increasing owners.
5341 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
5343 * profiler.c: allow disabling the default profiler.
5345 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
5347 * decimal.c, icall.c: allow disabling System.Decimal support.
5349 2004-12-09 Marek Safar <marek.safar@seznam.cz>
5351 * reflection.c: Add support for null attribute arguments.
5353 2004-12-09 Martin Baulig <martin@ximian.com>
5355 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
5356 names to get rid of compiler warnings.
5358 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
5360 * marshal.c (mono_marshal_get_struct_to_ptr): Call
5361 mono_marshal_load_type_info (). Fixes #69625.
5362 (mono_marshal_get_ptr_to_struct): Likewise.
5364 2004-12-08 Martin Baulig <martin@ximian.com>
5366 * mono-debug.h: Bumped version number to 47.
5368 * mono-debug-debugger.c
5369 (mono_debugger_event_handler, mono_debugger_event): Take two
5370 guint64 arguments insteed of a gpointer and a guint32.
5372 2004-12-08 Martin Baulig <martin@ximian.com>
5374 * debug-mono-symfile.h
5375 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
5376 `address' to `native_offset'.
5378 2004-12-08 Martin Baulig <martin@ximian.com>
5380 * class.c (mono_class_create_from_typespec): Only inflate if we
5381 either have `context->gclass' or `context->gmethod'.
5383 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
5385 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
5387 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
5389 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
5391 * reflection.c (mono_assembly_get_object): Remove the workaround put
5394 * appdomain.c: Use the corlib_internal field from MonoAssembly.
5396 * appdomain.c: Bump corlib version.
5398 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
5399 be visible in other appdomains.
5401 2004-12-07 Ben Maurer <bmaurer@ximian.com>
5403 * threads.c: Interlocked inc and dec for longs were messed up,
5404 use a KISS based impl for this. Fixes 70234
5406 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
5408 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
5410 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
5412 * icall.c: fix to follow policy not to allow struct
5413 arguments in icalls.
5415 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5417 * process.c: make the patch that handles spaces in file paths work
5418 on mono/windows too.
5420 2004-12-06 Martin Baulig <martin@ximian.com>
5422 * class.c (mono_class_create_generic): Call
5423 mono_class_setup_supertypes() if we're dynamic.
5424 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
5426 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
5428 * object-internals.h: Add new fields to MonoThread.
5430 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5432 * icall.c threads-types.h threads.c: Add new icalls.
5434 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
5436 * object-internals.h (MonoReflectionAssembly): Sync object layout with
5439 * appdomain.c: Bump corlib version.
5441 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
5442 internal assemblies. Fixes #69181.
5444 2004-12-05 Martin Baulig <martin@ximian.com>
5446 * class.c (mono_class_inflate_generic_signature): Make this a
5447 no-op if `context' is NULL or we don't have any type parameters;
5448 also copy `sentinelpos'.
5450 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
5452 * image.c: Add unbox_wrapper_cache.
5454 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
5456 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
5459 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
5462 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
5464 2004-12-04 Martin Baulig <martin@ximian.com>
5466 * loader.c (mono_method_get_signature_full): New public function;
5467 like mono_method_get_signature(), but with an additional
5468 `MonoGenericContext *' argument.
5470 * class.c (mono_class_inflate_generic_signature): Formerly known
5471 as inflate_generic_signature(); make this public.
5473 2004-12-04 Martin Baulig <martin@ximian.com>
5476 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
5477 instead of a `MonoGenericContainer *'.
5478 (mono_metadata_parse_array_full): Likewise.
5479 (mono_metadata_parse_signature_full): Likewise.
5480 (mono_metadata_parse_method_signature_full): Likewise.
5481 (mono_metadata_parse_generic_inst): Likewise.
5482 (mono_metadata_parse_generic_param): Likewise.
5483 (mono_metadata_parse_mh_full): Likewise.
5484 (mono_type_create_from_typespec_full): Likewise.
5486 2004-12-03 Martin Baulig <martin@ximian.com>
5488 * class-internals.h (MonoGenericContainer): Replaced the
5489 `MonoGenericContext * pointer with a `MonoGenericContext'
5490 structure and made it the first element.
5492 2004-12-03 Martin Baulig <martin@ximian.com>
5495 (inflate_generic_type): Set the `context->container' when creating
5496 a new MonoGenericContext.
5497 (mono_class_inflate_generic_method): Likewise.
5498 (mono_class_create_from_typespec): Just use `context->container'
5499 to get the container.
5501 * loader.c (method_from_methodspec): Set `context->parent' from
5502 `context->container' - and if that's a method container, use its
5503 parent. Also set the `context->container' when creating a new
5505 (mono_get_method_from_token): Use just `context->container' to get
5508 * metadata.c (do_mono_metadata_parse_generic_class): Also set
5509 `gclass->context->container'.
5511 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
5512 the `context->container' when creating a new MonoGenericContext.
5514 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
5516 * reflection.c (compare_genericparam): Sort params with identical
5517 owner by their number. Fixes gen-111 on sparc.
5519 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
5521 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
5522 around the domain changes.
5524 * appdomain.c (mono_domain_unload): Handle the case when the thread
5525 calling Unload is itself being aborted during unloading. Fixes #70022.
5527 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
5529 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
5530 checkpoint_func as an icall so it gets a wrapper.
5531 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
5532 in the cross-appdomain wrappers too.
5534 * threads.c (mono_thread_has_appdomain_ref): Make this public.
5536 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
5538 * reflection.c: Fix some memory leaks.
5540 2004-12-02 Martin Baulig <martin@ximian.com>
5542 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
5544 * metadata.c (generic_class_cache): New static hashtable.
5545 (mono_metadata_lookup_generic_class): New public method.
5547 2004-12-02 Martin Baulig <martin@ximian.com>
5549 * class.c (mono_class_create_from_typedef): Call
5550 mono_class_setup_parent() and mono_class_create_mono_type() before
5551 parsing the interfaces.
5553 2004-12-02 Martin Baulig <martin@ximian.com>
5555 * metadata.c (generic_inst_cache): New static hashtable.
5556 (mono_metadata_lookup_generic_inst): New public function.
5557 (mono_metadata_inflate_generic_inst): New public function.
5558 (mono_metadata_parse_generic_inst): New public function.
5559 (do_mono_metadata_parse_generic_class): Use the new
5560 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
5561 since this'll also use the cache.
5563 * reflection.c (mono_reflection_bind_generic_method_parameters):
5564 Use mono_metadata_lookup_generic_inst() to use the new cache.
5566 * class.c (inflate_mono_type): Use
5567 mono_metadata_inflate_generic_inst() to inflate a generic
5568 instance; this'll also use the new cache.
5570 * loader.c (method_from_methodspec): Use
5571 mono_metadata_parse_generic_inst() and
5572 mono_metadata_inflate_generic_inst() rather than parsing it
5573 manually, so we can use the new cache.
5575 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
5577 * threads.c (wait_for_tids): Do not incorrectly free threads when
5580 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
5582 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
5583 iter->args based on whether parameters are passed in registers (i.e.
5584 MONO_ARCH_REGPARMS is defined)
5586 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
5588 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
5589 the exception message. Fixes #70070.
5590 (method_from_methodspec): Fix warnings.
5592 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5594 * process.c: (complete_path) return the path quoted
5596 2004-12-01 Martin Baulig <martin@ximian.com>
5598 * class-internals.h (MonoGenericInst): New structure.
5599 (MonoGenericClass): Replaced `type_argc', `type_argv' and
5600 `is_open' with `MonoGenericInst *inst'.
5601 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
5602 `is_open' with `MonoGenericInst *inst'.
5604 2004-11-30 Martin Baulig <martin@ximian.com>
5606 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
5608 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
5609 to `generic_class_cache'.
5612 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
5613 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
5614 (mono_generic_inst_is_valuetype): Renamed to
5615 mono_generic_class_is_valuetype().
5618 (MonoGenericInst): Renamed to MonoGenericClass.
5619 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
5620 (MonoClass): Renamed `generic_inst' to `generic_class'.
5621 (MonoGenericContext): Renamed `ginst' to `gclass'.
5623 * object-internals.h
5624 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
5626 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
5627 mono_reflection_generic_class_initialize().
5629 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
5630 now known as "System.Reflection.MonoGenericClass".
5631 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
5633 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
5635 * class-internals.h: Added a flag field to MonoClass to cache the
5636 declarative security attributes actions associated with the class.
5637 * domain-internals.h: Added booleans to MonoJitInfo to cache the
5638 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
5639 applicable to the JITted method.
5640 * reflection.c|h: Added functions to extract (as flags) which security
5641 actions are available (declaratively) for a method, class or assembly.
5642 * metadata.c|h: Added functions to search the declarative security
5643 table in the metadata.
5645 2004-11-29 Ben Maurer <bmaurer@ximian.com>
5647 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
5648 EXPORTEDTYPES are already in the class name cache, so there is no
5649 need to add extra code here to look at them. Just removes a bit of
5652 (ves_icall_System_Environment_get_TickCount): No need for #if
5653 WINDOWS. We already have the code in io-layer.
5655 2004-11-28 Martin Baulig <martin@ximian.com>
5658 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
5661 2004-11-27 Miguel de Icaza <miguel@ximian.com>
5663 * assembly.c (do_mono_assembly_open): Instead of having a
5664 conditional WITH_BUNDLE, incorporate support for bundles here, by
5665 having a global `bundles' variable holding a pointer to the actual
5668 (mono_register_bundled_assemblies): New API call used by the
5671 See mkbundle.1 for details.
5673 2004-11-27 Martin Baulig <martin@ximian.com>
5675 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
5676 the vtable for generic methods.
5678 2004-11-26 Martin Baulig <martin@ximian.com>
5681 (mono_metadata_generic_method_hash): New public function.
5682 (mono_metadata_generic_method_equal): Likewise.
5685 (MonoGenericContainer): Added `GHashTable *method_hash'.
5687 * reflection.c (ReflectionMethodBuilder): Added
5688 `MonoGenericContainer *generic_container'.
5689 (reflection_methodbuilder_to_mono_method): Don't create a new
5690 MonoGenericContainer each time we're called.
5691 (mono_reflection_bind_generic_method_parameters): Use
5692 `container->method_hash' to cache the results so we don't create a
5693 different method if we're called several times with the same
5696 * loader.c (method_from_methodspec): Use the new
5697 `container->method_hash' here, too.
5699 2004-11-26 Martin Baulig <martin@ximian.com>
5701 * class.c (inflate_generic_signature): Correctly compute
5702 `res->has_type_parameters'.
5703 (mono_class_vtable): Use the `has_type_parameters' flag to
5704 determine whether we're a generic method.
5706 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
5708 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
5710 * object.c (mono_runtime_run_main): Fix a small memory leak.
5712 2004-11-25 Martin Baulig <martin@ximian.com>
5714 * class.c (set_generic_param_owner): Fixed the loop.
5716 2004-11-25 Martin Baulig <martin@ximian.com>
5718 * object.c (mono_class_vtable): Don't create any JIT wrappers for
5721 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
5723 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
5724 names. Fixes #69787.
5726 2004-11-24 Martin Baulig <martin@ximian.com>
5728 * class.c (mono_class_create_generic_2): If we don't have a
5729 `ginst->parent', inflate `gklass->parent' to get our parent.
5731 2004-11-24 Martin Baulig <martin@ximian.com>
5733 * reflection.c (compare_genericparam): Correctly sort the
5734 GenericParam table; fixes #69779.
5736 2004-11-23 Ben Maurer <bmaurer@ximian.com>
5738 * reflection.c: When writing a PE file, don't create a huge
5739 buffer in memory. Just write the arrays we have to the file.
5740 This reduces memory usage.
5742 * metadata-internals.h: MonoDynamicStream pefile is no longer used
5745 2004-11-17 Martin Baulig <martin@ximian.com>
5747 * class.c (mono_class_init): Don't setup `class->parent' for
5748 dynamic instances; moved this to mono_class_generic_2().
5749 (mono_class_create_generic): Also set `klass->inited' for dynamic
5751 (mono_class_create_generic_2): Don't do anything for dynamic
5752 generic instances. Set `klass->parent' here and also call
5753 mono_class_setup_parent() here.
5755 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
5756 `MonoType *parent' argument; set `ginst->parent' before calling
5757 mono_class_create_generic_2(), so we set the correct parent.
5759 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
5761 * reflection.c: allow getting attributes from ModuleBuilder
5764 2004-11-17 Martin Baulig <martin@ximian.com>
5766 * class.c (mono_class_create_from_typedef): If a type parameter is
5767 inherited from an outer class, set its owner to that class.
5769 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
5771 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
5772 for (int*) written size. This fixes bug #69592.
5774 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
5776 * icall.c: Added IsAuthenticodePresnet internal call.
5777 * image.c|h: New function that check a MonoImage for an Authenticode
5778 signature in the certificate PE data directory.
5779 * security.c|h: New internal call to ask the runtime if an
5780 Authenticode signature seems referenced in the PE header.
5782 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
5784 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
5786 * reflection.c (mono_image_create_pefile): Free the assembly streams
5787 after writing out the assembly file.
5789 * object.c (mono_runtime_run_main): Fix small memory leak.
5791 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
5792 property access modifiers. Fixes #69389.
5794 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
5796 * domain.c, object.c, object-internals.h, domain-internals.h,
5797 object.h, marshal.c: keep dynamic code info per domain.
5799 2004-11-15 Martin Baulig <martin@ximian.com>
5801 * class.c (mono_type_get_name_recurse): Put type arguments in
5802 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
5805 2004-11-15 Martin Baulig <martin@ximian.com>
5807 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
5808 (mono_class_setup_vtable): When computing `the_cname' for a
5809 generic instance, don't include the namespace since we'd otherwise
5812 2004-11-15 Martin Baulig <martin@ximian.com>
5814 * class.c (mono_class_create_generic): Changed return type to void.
5815 (mono_class_create_generic_2): New public function; setup
5816 `class->method', `class->field' and `class->interfaces' here
5817 instead of in mono_class_init().
5819 * class.h (mono_class_create_generic): Moved to class-internals.h.
5821 2004-11-14 Ben Maurer <bmaurer@ximian.com>
5823 * reflection.c (mono_image_create_pefile): take a file HANDLE.
5824 rather than writing to memory, write to this file. Right now,
5825 we are just writting into a buffer, and copying that. However
5826 we can avoid the buffer later.
5828 (mono_dynamic_stream_reset): new function
5830 * icall.c, object-internals.h: update for the above.
5832 2004-11-13 Ben Maurer <bmaurer@ximian.com>
5834 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
5835 have been using gc'd memory. First it is slower, unlikely
5836 the comment in the source code said, secondly, it increases
5837 our footprint to do it in the gc.
5839 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
5840 the method so that it does not have to copy to managed code.
5842 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
5844 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
5846 2004-11-12 Martin Baulig <martin@localhost>
5848 * reflection.c (mono_image_create_token): Allow generic method
5849 definitions here, since they may appear in an `.override'; see
5850 gen-98/gen-99 for an example.
5852 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
5854 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
5857 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
5860 2004-11-11 Martin Baulig <martin@ximian.com>
5862 * class.c (mono_class_setup_vtable): In an explicit interface
5863 implementation, the method name now includes the arity.
5865 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
5867 * object.c (mono_array_full_copy): Fix warning.
5869 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
5871 * appdomain.c: Removed look_for_method_by_name(). Use the new method
5872 mono_class_get_method_from_name() instead.
5874 * class-internals.h: Added two new types of wrappers.
5875 Added MonoRemotingTarget enum. Added new trampoline function type, which
5876 takes an additional MonoRemotingTarget value as parameter, so it is
5877 possible to request a trampoline for a specific target.
5879 * class.c: Added new mono_class_get_method_from_name() method.
5881 * class.h: In MonoRemoteClass, we can have now to vtables, one for
5882 general remoting sinks and one specific for cross domain calls.
5884 * debug-helpers.c: Added new wrapper names.
5886 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
5889 * image.c: Porperly delete value objects form the remoting invoke hashtable.
5891 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
5892 with several other methods (mono_marshal_get_xappdomain_dispatch,
5893 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
5894 and others) can generate a fast remoting wrapper for cross domain calls.
5895 More information can be found in docs/remoting.
5896 Other changes: Removed mono_find_method_by_name, and used
5897 mono_class_get_method_from_name instead.
5898 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
5899 is stored in the remoting invoke hashtable.
5901 * marshal.h: published the new method for getting the xdomain wrapper,
5902 and also added a method for getting the adequate wrapper for a given
5905 * object-internals.h, object.c: Added a couple of methods for capying and
5907 Modified mono_install_remoting_trampoline, which takes the new remoting
5908 trampoline that has a remoting target as parameter.
5909 mono_class_proxy_vtable now also takes a remoting target as parameter, and
5910 will return the most suitable vtable for the target.
5911 Added mono_remote_class_vtable, which returns the vtable of a remote class
5912 (which can be the normal remoting vtable or the xdomain vtable).
5914 * threads.c: the xdomain invoke and dispatch wrappers must also be
5915 protected against interruptions.
5917 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5919 * icall.c: use memmove in BlockCopyInternal when the source and
5920 destination arrays are the same.
5922 2004-11-09 Martin Baulig <martin@ximian.com>
5924 * class-internals.h (MonoGenericContainer): Removed `method' and
5925 `signature', replaced them with `is_method' and `is_signature'
5926 flags. Added `context'.
5928 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
5929 instead of a `MonoGenericContainer *'.
5931 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
5932 for dynamic type parameters.
5933 (mono_metadata_load_generic_params): Setup `container->context'.
5935 * reflection.c (mono_reflection_setup_generic_class): Setup
5936 `tb->generic_container->context'.
5937 (do_mono_reflection_bind_generic_parameters): Use
5938 mono_class_inflate_generic_type() to correctly inflate types,
5939 rather than using our own hack just for MONO_TYPE_VAR.
5941 2004-11-09 Martin Baulig <martin@ximian.com>
5943 * class.c (mono_class_inflate_generic_method): Small fix; don't
5947 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
5948 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
5949 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
5950 (ves_icall_Type_BindGenericParameters): Likewise.
5951 (ves_icall_Type_get_IsGenericInstance): Likewise.
5952 (ves_icall_Type_GetGenericParameterPosition): Likewise.
5953 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
5954 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
5955 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
5957 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
5959 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
5960 assembly versions and public key tokens. Fixes #69113.
5962 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
5964 * metadata.c: fix bug introduced with the type cache changes
5967 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
5969 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
5970 the MonoClass pointer instead of the token in exception clauses.
5971 * reflection.c: updates for the above and make the code not depend
5972 on the structure of MonoExceptionClause.
5974 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
5976 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5977 Add support for dynamic assemblies. Fixes #69114.
5979 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
5981 2004-11-07 Ben Maurer <bmaurer@ximian.com>
5983 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
5984 since most only those methods use it. the code member of
5985 MonoMethodPInvoke was dead, so that can be removed too. Also,
5986 remove inline_count (again, not used), and move slot so that it
5987 can share bits with some other flags. This saves 8 bytes in the
5988 structure and gives us about 50 kb back for mcs helloworld.cs
5990 * *.[ch]: Do naming changes for the above.
5992 * loader.c (mono_method_get_header): Lazily init the header
5994 (mono_get_method_from_token): don't init the header here
5995 (mono_free_method): the header may never be allocated
5997 Overall, this saves 150 kb of unmanaged allocations
5998 for mcs helloworld.cs. That accounts for 10% of the unmanaged
6001 * loader.c, loader.h (mono_method_get_header): new accessor.
6003 * *.[ch]: use the above method. Prepares us to lazily load
6006 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
6007 three warnings, which are actual bugs (see 69206).
6009 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
6010 unused. Saves a cool 4 bytes / method.
6012 2004-11-06 Ben Maurer <bmaurer@ximian.com>
6014 * metadata.c (builtin_types): Add types for System.Object here.
6015 (mono_metadata_parse_type_full): Cache MonoType*'s that are
6016 for a class or valuetype from klass->this_arg or klass->byval_arg.
6018 On mcs for a hello world, this gets us down from 21836 MonoType's
6021 (mono_metadata_free_type): Account for the above change.
6023 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
6025 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
6026 exception instead of asserting if name is null.
6027 (ves_icall_System_AppDomain_GetData): Ditto.
6029 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
6031 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
6034 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
6035 Return NULL when the domain does not have entry_assembly set.
6037 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
6038 Add a 'resource_modules' argument.
6039 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
6041 * reflection.c (mono_reflection_create_runtime_class): Move setting
6042 of wastypebuilder here, so mono_get_type_object () returns a MonoType
6045 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
6046 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
6047 Throw an ArgumentNullException if 'ptr' is null.
6049 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
6050 assemblies here. Fixes #69020.
6052 2004-11-05 Geoff Norton <gnorton@customerdna.com>
6054 * reflection.c (build_compressed_metadata): Fix the previous patch for
6055 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
6058 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
6060 * assembly.c (mono_assembly_names_equal): Allow a match if one of
6061 the cultures is false. Fixes #69090.
6063 * reflection.c (build_compressed_metadata): Fix invalid memory read
6064 detected by valgrind.
6066 * reflection.c (mono_reflection_get_type): Avoid triggering a
6067 TypeResolve multiple times for the same type. Fixes #65577.
6069 2004-11-04 Ben Maurer <bmaurer@ximian.com>
6071 * marshal.c: Avoid using ldftn to call managed functions. It is
6072 much slower than just a call.
6074 * reflection.c (mono_module_get_object): free the basename we
6075 allocate here from glib.
6077 * reflection.c (ensure_runtime_vtable): make sure to free
6078 overrides. Also, we were allocating an array of MonoMethod not an
6079 array of MonoMethod*.
6081 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
6083 * image.c (mono_image_close): free image->guid here.
6085 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
6087 * reflection.c: Fix some spec conformance issues with the PE file
6088 structures so mcs compiled apps run on the Net 2.0 beta.
6090 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
6092 * string-icalls.c (ves_icall_System_String_ctor_encoding):
6093 Implement this. Fixes #67264.
6095 * debug-helpers.h debug-helpers.c marshal.c: Move
6096 mono_find_method_by_name to debug-helpers.c.
6098 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
6100 * object.c (mono_release_type_locks): type_initialization_hash is
6103 * reflection.c object.c object-internals.h: Fix warnings.
6105 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
6106 without accessors. Fixes #61561.
6108 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
6109 application base from the root domain if not set. Fixes #65641.
6110 (mono_runtime_init): Fix warning.
6112 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6114 * appdomain.c: call mono_thread_pool_init.
6115 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
6116 of worker threads based on the number of CPUs and the environment
6117 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
6118 for non-windows (windows) systems.
6120 2004-10-27 Chris Toshok <toshok@ximian.com>
6122 * mono-debug-debugger.c (write_class): don't call mono_class_init
6123 here, as even with the check for (!klass->init_pending), we get
6124 into a situation where we're hitting cycles in class
6125 initialization. Fixes #68816.
6127 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
6129 * image.c: Avoid overwriting values in the loaded_images_hash when an
6130 assembly is loaded multiple times. Fixes #61152.
6132 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
6133 so multiple satellite assemblies for the same name can be loaded.
6136 * mono_domain_assembly_preload: Actually return the loaded assembly,
6139 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
6140 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
6142 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
6143 pending finalizers are not invoked after the appdomain has been
6144 unloaded. Fixes #67862.
6146 2004-10-22 Martin Baulig <martin@ximian.com>
6148 * mono-debug-debugger.c
6149 (mono_debugger_runtime_invoke): Don't box valuetypes.
6151 2004-10-22 Chris Toshok <toshok@ximian.com>
6153 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
6154 don't hide private methods.
6156 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
6158 * icall.c: Allows the runtime to "share" (when known) the public key
6159 token of an assembly. This avoid the need to recalculate the token
6160 (from the public key) in managed code.
6162 2004-10-21 Chris Toshok <toshok@ximian.com>
6164 * debug-helpers.c (append_class_name): argh, revert last patch.
6166 2004-10-21 Chris Toshok <toshok@ximian.com>
6168 * debug-helpers.c (append_class_name): use '+' as the delimiter,
6169 not '/', so that it matches what the debugger uses to look up
6172 2004-10-21 Martin Baulig <martin@ximian.com>
6174 * mono-debug-debugger.c (mono_debugger_throw_exception): New
6175 public method; this is called each time an exception is thrown and
6176 allows the debugger to use exception catch points.
6178 2004-10-21 Martin Baulig <martin@ximian.com>
6180 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
6181 the stack pointer and the exception object in some struct and pass
6182 that to the debugger.
6184 2004-10-21 Chris Toshok <toshok@ximian.com>
6186 * mono-debug-debugger.c (do_write_class): add instance/static
6187 event support. We don't expose "raise" or "other" yet.
6188 (event_is_static): new method.
6190 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
6192 * mono-debug-debugger.c
6193 (mono_debugger_handle_exception): Remove
6194 bogus return value for fussy compilers.
6196 2004-10-20 Martin Baulig <martin@ximian.com>
6198 * mono-debug-debugger.c
6199 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
6200 (mono_debugger_handled_exception): Likewise.
6202 2004-10-20 Martin Baulig <martin@ximian.com>
6204 * mono-debug-debugger.h (MonoDebuggerEvent): Added
6205 MONO_DEBUGGER_EVENT_EXCEPTION.
6207 * mono-debug-debugger.c (mono_debugger_handle_exception): New
6208 public function to send the debugger a notification for an
6209 exception and inform it about a catch/finally clause.
6211 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
6213 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
6214 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
6217 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
6219 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
6221 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
6222 marshalled as [In,Out]. Fixes #58325.
6224 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
6226 * reflection.c (mono_method_body_get_object): Implement some fields.
6228 2004-10-12 Martin Baulig <martin@ximian.com>
6230 * reflection.c (mono_reflection_bind_generic_parameters): Small
6231 fix, correctly retrieve our parent from a generic instance.
6233 2004-10-12 Martin Baulig <martin@ximian.com>
6235 * metadata.c (mono_metadata_generic_param_equal): We always have
6239 (mono_class_from_generic_parameter): We need to have an owner.
6240 (my_mono_class_from_generic_parameter): Likewise.
6242 * reflection.c (mono_reflection_setup_generic_class): Renamed to
6243 mono_reflection_create_generic_class() and added a new
6244 mono_reflection_setup_generic_class().
6245 (mono_reflection_initialize_generic_param): If we're a nested
6246 generic type and inherited from the containing class, set our
6247 owner to the outer class.
6249 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
6251 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
6253 * reflection.c (mono_method_body_get_object): New function to create
6254 a MethodBody object.
6256 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
6258 2004-10-11 Martin Baulig <martin@ximian.com>
6260 * metadata.c (_mono_metadata_type_equal): Renamed to
6261 do_mono_metadata_type_equal() and made static.
6263 2004-10-11 Martin Baulig <martin@ximian.com>
6265 * appdomain.c: Bump corlib version number to 28.
6267 2004-10-10 Martin Baulig <martin@ximian.com>
6270 (MonoGenericInst): Added `MonoGenericContainer *container'.
6271 (MonoGenericMethod): Likewise.
6272 (MonoGenericContext): Likewise.
6273 (MonoGenericParam): Added `MonoGenericContainer *owner'.
6276 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
6277 (do_mono_metadata_parse_generic_inst): Likewise.
6278 (mono_metadata_parse_type_full): New public method. This is the actual
6279 mono_metadata_parse_type() implementation - with an additional
6280 `MonoGenericContainer *' argument.
6281 (mono_metadata_parse_array_full): Likewise.
6282 (mono_metadata_parse_signature_full): Likewise.
6283 (mono_metadata_parse_method_signature_full): Likewise.
6284 (mono_metadata_parse_mh_full): Likewise.
6285 (mono_type_create_from_typespec): Likewise.
6286 (mono_metadata_interfaces_from_typedef_full): New public method;
6287 this is similar to the other _full() methods, but we take a
6288 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
6289 (mono_metadata_parse_generic_param): Take an additional
6290 `MonoGenericContainer *' argument and lookup the MonoGenericParam
6291 from that container.
6292 (mono_metadata_generic_param_equal): New static method to compare
6293 two type parameters.
6294 (_mono_metadata_type_equal): New static method; takes an
6295 additional `gboolean signature_only' argument - if true, we don't
6296 compare the owners of generic parameters.
6297 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
6298 with a TRUE argument - do a signature-only comparision.
6300 * loader.c: Use the new _full() methods and pass the
6301 MonoGenericContainer to them.
6303 * object-internals.h (MonoReflectionTypeBuilder): Added
6304 `MonoGenericContainer *generic_container' field.
6305 (MonoReflectionMethodBuilder): Likewise.
6307 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
6309 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
6310 case initial images of dynamic assemblies.
6312 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
6314 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
6316 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
6317 length of event->other array.
6318 (typebuilder_setup_events): Ditto.
6320 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
6321 'assembly_by_name' and add an 'assemblies' list.
6323 * assembly.h assembly.c: Add a new search hook for determining whenever
6324 an assembly is already loaded. Use this instead of searching in the
6325 loaded_assemblies list.
6327 * domain.c appdomain.c: Implement the new search hook so loaded
6328 assemblies are now scoped by appdomain. Fixes #67727.
6330 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
6332 * threads.c (mono_thread_attach): Initialize synch_lock field so
6333 mono_thread_detach works again.
6335 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
6336 'lib' too. Fixes #63130.
6338 2004-10-06 Jackson Harper <jackson@ximian.com>
6340 * culture-info-tables.h: regenerated.
6342 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
6344 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
6345 implemented by other interfaces in the result. Fixes #65764.
6347 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6348 Handle unloadable modules without crashing.
6350 * image.c (load_modules): Revert the previous patch since modules must
6351 have a fixed index inside the array.
6353 * image.c (load_modules): Don't include native modules in the modules
6356 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
6358 * reflection.h: Add param_defaults field.
6360 * reflection.c: Add support for parameter defaults in dynamic methods.
6363 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
6364 an empty string when a type has no namespace. Fixes #64230.
6366 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
6368 * tabledefs.h: Added "internal" security actions to support non-CAS
6369 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
6370 Note: they do not seems to be used anymore in 2.0 (new metadata format)
6372 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
6374 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
6375 constructor of abstract class. Fixes #61689.
6377 2004-10-04 Martin Baulig <martin@ximian.com>
6379 * class-internals.h (MonoGenericContainer): New type.
6380 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
6381 `MonoGenericContainer *generic_container'.
6382 (MonoClass): Replaced `gen_params' and `num_gen_params' with
6383 `MonoGenericContainer *generic_container'.
6385 * metadata.c (mono_metadata_load_generic_params): Return a
6386 `MonoGenericContainer *' instead of a `MonoGenericParam *';
6387 removed the `num' argument.
6389 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
6391 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
6394 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
6397 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
6399 * reflection.c: Save pe_kind and machine values into the generated
6402 * appdomain.c: Bump corlib version number.
6404 * object-internals.h: Reorganize layout of LocalBuilder.
6406 * class-internals.h class.c (mono_class_get_implemented_interfaces):
6407 New helper function.
6409 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
6410 created MonoType for dynamic types. Fixes #66180.
6412 2004-10-02 Ben Maurer <bmaurer@ximian.com>
6414 * threadpool.c: the ares hashtable needs a critical section around it.
6415 this prevents some nasty segfaults
6417 2004-10-02 Massimiliano Mantione <massi@ximian.com>
6419 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
6420 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
6423 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
6425 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
6427 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
6429 * image.c: Always canonicalize image file names, to avoid loading
6430 the same assembly twice when referenced using a relative path.
6432 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
6434 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
6436 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
6438 * marshal.c: Fix warnings.
6440 2004-09-29 Geoff Norton <gnorton@customerdna.com>
6442 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
6443 attempting to marshal the delegate_trampoline as the method_addr.
6444 This patch has a static hashtable of marshalled delegates so that
6445 we can map delegate_trampoline addresses back to delegates. This
6446 allows a delegate passed to managed code to be passed back into native
6449 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
6451 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
6453 * reflection.c (method_encode_code): Align method headers properly.
6456 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
6458 * marshal.c: In the runtime invoke wrapper, reset the abort
6459 exception if it is cached. This avoids the automatic rethrowal of
6460 the exception after the catch of the wrapper. Also check for pending
6461 interruptions before calling the managed method. This is done using
6462 the new method emit_thread_force_interrupt_checkpoint, since the
6463 normal checkpoint method is ignored when running the invoke wrapper.
6464 * object.c: If the abort exception is rethrown, set the abort_exc
6465 field of the thread, so it will be rethrown aftere every catch.
6466 * threadpool.c: Only run an interruption checkpoint if what has been
6467 requested is a stop of the thread (aborts will be ignored).
6468 * threads.c: By default, a thread will now never be interrumped while
6469 running the runtime invoke wrapper (this ensures that runtime_invoke
6470 will always return to the caller if an exception pointer is provided).
6471 There is a new special method mono_thread_force_interruption_checkpoint()
6472 to force an interruption checkpoint even if running a protected
6473 wrapper, which is used by the same runtime invoke wrapper to do a check
6476 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
6478 * object.c, object-internals.h: Implemented mono_release_type_locks,
6479 which releases the cctor locks held by a thread.
6480 * threads.c, threads.h: In thread_cleanup, release cctor locks held
6481 by a thread. Added mono_thread_exit() method to be used to safely stop
6484 2004-09-28 Raja R Harinath <rharinath@novell.com>
6486 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6487 Move null check before dereference. Avoid indexing beyond the end
6488 of the 'modules' array.
6490 2004-09-28 Raja R Harinath <rharinath@novell.com>
6492 * metadata-internals.h (MonoImage): Add module_count field.
6493 * image.c (load_modules): Set image->module_count.
6494 (mono_image_load_file_for_image): Use image->module_count.
6495 * reflection.c (mono_image_load_module): Append to image->modules array
6496 of dynamic assembly.
6497 (mono_module_get_object): Fix loop to actually increment index.
6498 Use image->module_count.
6499 * assembly.c (mono_assembly_load_references): Use image->module_count.
6500 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6503 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
6505 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
6506 Avoid assert on generic types.
6508 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
6510 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
6512 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
6514 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
6515 function to convert a MarshalSpec structure to its managed counterpart.
6517 * reflection.c: Fix warnings.
6519 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
6522 * icall.c (mono_create_icall_signature): Fix build.
6524 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
6526 * icall.c: Add MakePointType icall.
6528 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
6531 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6533 * threadpool.c: reuse allocated slots in the queue.
6535 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
6537 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
6539 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
6541 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
6544 * tabledefs.h: Add constants for pinvoke attributes BestFit and
6545 ThrowOnUnmappableChar.
6547 * icall.c (ves_icall_Type_GetPacking): New icall.
6549 2004-09-24 Martin Baulig <martin@ximian.com>
6551 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
6553 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6556 (mono_domain_set): allow setting a domain that is being unloaded.
6557 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
6560 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
6562 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
6563 the GetCustomAttributes icall.
6565 2004-09-23 Martin Baulig <martin@ximian.com>
6567 * object-internals.h (MonoReflectionGenericParam): Replaced
6568 'has_ctor_constraint', `has_reference_type' and `has_value_type'
6569 with `guint32 attrs'.
6571 2004-09-23 Martin Baulig <martin@ximian.com>
6573 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
6575 2004-09-23 Martin Baulig <martin@ximian.com>
6577 * object-internals.h (GenericParameterAttributes): New enum.
6579 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
6581 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
6583 * class.c (init_events): Fill out event->other field.
6585 * class.c: Fix warnings.
6587 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
6589 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
6591 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
6592 walk which doesn't supply the IL offset.
6594 2004-09-22 Martin Baulig <martin@ximian.com>
6596 * reflection.c (mono_reflection_setup_internal_class): If we're
6597 System.ValueType, System.Object or System.Enum, set
6598 `klass->instance_size' and create the vtable.
6599 (mono_reflection_create_internal_class): If we're an enum type,
6600 get the base class from our current corlib.
6602 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
6604 * reflection.h (MonoResolveTokenError): New type.
6606 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
6609 * icall.c: Add an 'error' argument to the ResolveToken icalls.
6611 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
6613 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
6614 Support also calling constructors, but only for already allocated objects.
6616 2004-09-17 Geoff Norton <gnorton@customerdna.com>
6618 * reflection.c (type_get_qualified_name): If the klass is null
6619 return the typename to avoid a NullRefEx.
6620 (encode_cattr_value): Get the qualified name of the boxed type,
6621 not the underlying enumtype. Fixes #62984.
6623 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
6625 * marshal.c: Fix problems with previous checkin.
6627 2004-09-21 <vargaz@freemail.hu>
6629 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
6630 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
6632 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
6634 2004-09-21 Geoff Norton <gnorton@customerdna.com>
6636 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
6637 should only return a type for pointers, arrays, and passbyref types.
6640 2004-09-21 Martin Baulig <martin@ximian.com>
6642 * domain.c (mono_debugger_check_runtime_version): New public
6645 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
6647 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
6649 * reflection.c: Added missing sort to the declarative security
6650 attributes table. MS implementation stops seeing the attributes if the
6651 token number regress in the table (as shown by ildasm and permview).
6653 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
6655 * object-internals.h (MonoReflectionModule): Add 'token' field.
6657 * reflection.c (mono_reflection_get_token): Add support for Module
6659 (mono_module_get_object): Set 'token' field.
6660 (mono_module_file_get_object): Set 'token' field.
6662 * icall.c: Add new Assembly and Module icalls.
6664 * appdomain.c: Bump corlib version.
6666 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
6668 * loader.h loader.c class.h class.c: Add helper functions for obtaining
6669 tokens of metadata objects.
6671 * reflection.h reflection.c (mono_reflection_get_token): New function
6672 to obtain the token of a metadata object.
6674 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
6676 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
6678 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
6680 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
6682 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
6684 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
6685 * object-internals.h: Added 3 MonoArray* members to MonoReflection
6686 AssemblyBuilder to access the permissions set in the class lib.
6687 * reflection.c: Added security attributes encoding step in
6688 mono_image_build_metadata.
6689 * tabledefs.h: Added new security actions defined in 2.0:
6690 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
6692 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
6694 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
6697 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
6699 * locales.c: nullify the ICU_collator member of CompareInfo when it is
6700 finalized. There where random SIGSEVs at program termination, when
6701 an object being finalized was trying to do a string comparison and
6702 the current culture was already finalized.
6704 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6706 * threads.c: call thread_cleanup before finishing the thread if we get
6709 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
6711 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
6712 assemblies from the parent. Fixes #65665.
6714 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
6716 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
6719 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
6721 * reflection.h: add prototype for mono_get_dbnull_object
6722 * reflection.c: add prototypes for get_default_param_value_blobs
6723 and mono_get_object_from_blob for fussier compilers
6725 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
6727 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
6728 false deadlock checks in class initialization.
6730 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
6732 * image.c (mono_image_addref): Fix comment.
6734 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
6737 2004-09-12 Jambunathan K <kjambunathan@novell.com>
6739 * reflection.c (mono_param_get_objects): Modified to return
6740 ParameterInfo.DefaultValue object.
6742 (get_default_param_value_blobs):
6743 (mono_get_object_from_blob):
6744 (mono_get_dbnull_object): New helper routines.
6746 * object.c (mono_get_constant_value_from_blob): New helper routine
6747 carved out from get_default_field_value ()
6749 * object-internals.h (mono_get_constant_value_from_blob): Added
6750 function declaration.
6752 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
6754 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
6755 referenced assemblies. Fixes #62135.
6757 * exception.h exception.c (mono_get_exception_file_not_found2): New
6760 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
6762 * class.h class.c: Add mono_type_get_underlying_type ().
6764 2004-09-09 Geoff Norton <gnorton@customerndna.com>
6766 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
6767 Fix GetTypes() to support dynamically created assemblies.
6769 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
6771 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
6773 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
6776 * reflection.h reflection.c loader.c: Allow dynamic construction of
6777 pinvoke methods. Fixes #65571.
6779 * reflection.c (mono_reflection_get_type): Revert previous change since
6780 it causes regressions.
6782 2004-09-08 Martin Baulig <martin@ximian.com>
6784 * class.c (class_compute_field_layout): Don't call
6785 mono_class_layout_fields() for open generic instances.
6787 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
6788 * threads.c appdomain.c: fix typo in GC macro
6790 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6792 * threads.c: don't call mono_thread_detach() in start_wrapper(),
6793 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
6795 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
6797 * image.c (mono_image_close): Applied patch from
6798 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
6799 assembly is loaded multiple times from data.
6801 * image.c (mono_image_open): Fix warning.
6803 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
6805 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
6808 * reflection.c (mono_reflection_create_runtime_class): Initialize
6809 klass->nested_classes. Fixes #61224.
6811 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
6813 * threads.c: sched_yield() on exit, to allow threads to quit.
6815 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
6817 * object.c (mono_unhandled_exception): Remove leftover debug code.
6819 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
6821 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
6823 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
6825 * marshal.c (emit_marshal_array): Really null terminate string arrays.
6827 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
6829 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
6831 * marshal.c (emit_marshal_array): Null terminate string arrays.
6833 * marshal.c (raise_auto_layout_exception): Fix warning.
6835 * reflection.c (mono_param_get_objects): Initialize the default value
6836 with DBNull.Value, not null. Fixes #62123.
6838 2004-09-01 Miguel de Icaza <miguel@ximian.com>
6840 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
6841 throw an exception with a cute explanation.
6843 2004-09-06 Dick Porter <dick@ximian.com>
6845 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
6846 Close the new process's thread handle, as we don't use it. The
6847 handle stays around forever otherwise.
6849 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
6851 * object.c (arith_overflow): Fix warning.
6853 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
6854 calling conventions in method refs. Fixes #65352.
6856 * reflection.c: Fix warnings.
6858 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
6860 * icall.c: Add a new icall for Array.Clear
6862 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
6864 * object.c: When allocating an array, we have to throw
6865 an overflow exception if any of the lengths are < 0.
6867 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
6869 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
6870 properly. Also move implementation of string array marshalling to
6871 managed code. Fixes #42316.
6873 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6875 * assembly.c: provide more information when loading an assembly fails.
6877 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6879 * filewatcher.c: don't expect the development fam package to be
6882 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
6884 * marshal.c: Make a copy of the signature cookie since it will be
6885 freed by the caller.
6887 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
6889 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
6891 * metadata.c (mono_metadata_free_marshal_spec): New function to free
6894 * marshal.c: More refactoring.
6896 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
6899 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
6901 * object.c: In mono_message_invoke, fill the output parameter array after
6902 calling the managed method (it was done before the call). This fixes
6905 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
6907 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
6910 2004-09-02 Martin Baulig <martin@ximian.com>
6912 * class.c (mono_class_instance_size): Don't allow generic type
6913 definitions or open generic instances.
6914 (mono_class_array_element_size): If we're a value type, call
6915 mono_class_instance_size() on the original class.
6917 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
6918 handle generic instances.
6920 * mono-debug-debugger.c (write_type): Handle generic instances
6923 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
6925 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
6926 the allocation request fails. Fixes #65089.
6928 * object.c (mono_runtime_free_method): Do not call mono_free_method.
6930 * object.c (mono_runtime_free_method): New function to free a dynamic
6933 * marshal.c (mono_delegate_free_ftnptr): New function to free the
6934 delegate trampoline.
6936 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
6937 with hasthis as dynamic,
6939 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
6941 * domain.c (mono_jit_info_table_remove): New function to remove an
6942 entry from the jit info table.
6944 * class-internals.h (MonoMethod): Add 'dynamic' field.
6946 * loader.c: Fix warnings.
6948 2004-09-01 Martin Baulig <martin@ximian.com>
6950 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
6951 instead of mono_debugger_lock() because the latter one is a no-op
6952 unless running in the debugger.
6954 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
6956 * class.c (class_compute_field_layout): Classes with auto-layout or
6957 reference fields are not blittable.
6959 2004-09-01 Dick Porter <dick@ximian.com>
6961 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
6962 mono_image_get_filename() to get the assembly location.
6965 * metadata.h: Fix compile warnings
6967 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
6969 * class.c (class_compute_field_layout): System.Object is blittable.
6971 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
6972 as in/out. Fixes #59909.
6974 2004-09-01 Martin Baulig <martin@ximian.com>
6976 * metadata.h (MONO_TYPE_ISREFERENCE): Call
6977 mono_metadata_generic_inst_is_valuetype() if we're a generic
6978 instance to check whether our underlying type is a reference type.
6980 2004-09-01 Martin Baulig <martin@ximian.com>
6982 * metadata.c (mono_type_size): If we're a generic instance, call
6983 mono_class_value_size() for value types.
6985 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
6987 * marshal.c: Implement more custom marshalling functionality. Fixes
6990 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
6992 * mono-debug.c, debug-mono-symfile.c: add some locking love.
6994 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
6996 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
6998 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
7000 * icall.c: Fix some warnings.
7002 * threads.c (abort_appdomain_thread): Fix unref errors.
7003 (mono_thread_current): Fix THREAD_DEBUG define.
7005 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
7007 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
7009 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
7011 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
7013 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
7016 2004-08-28 Martin Baulig <martin@ximian.com>
7019 (mono_metadata_generic_inst_is_valuetype): New public function.
7021 * metadata.h (MONO_TYPE_ISSTRUCT): Call
7022 mono_metadata_generic_inst_is_valuetype() if we're a generic
7023 instance to check whether our underlying type is a valuetype.
7025 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
7027 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
7030 2004-08-25 Martin Baulig <martin@ximian.com>
7032 * loader.c (mono_get_method_from_token): Abstract methods can also
7033 be generic and thus have type parameters.
7035 * metadata-internals.h
7036 (MonoDynamicImage): Added `GPtrArray *gen_params'.
7038 * reflection.c (mono_image_get_generic_param_info): Don't create a
7039 metadata row, just add an entry to the `gen_params' array.
7040 (build_compressed_metadata): Sort the `gen_params' array and then
7041 actually create the metadata.
7043 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7045 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
7047 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
7049 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
7051 2004-08-24 Martin Baulig <martin@ximian.com>
7053 * class.cs (mono_class_is_subclass_of): Like an interface, a
7054 generic instance also derives from System.Object.
7056 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
7058 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
7059 custom modifiers to be in any order. Fixes #61990.
7061 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
7063 * object.c: Register mono_object_new_fast icall.
7065 * object.c (mono_class_get_allocation_ftn): Return to calling
7066 mono_object_new_fast, since it seems faster to compute the object
7067 size in unmanaged code than passing it as a parameter.
7069 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
7071 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
7072 this function with Boehm as the oom handler, so we don't have to check
7073 the result of GC_malloc.
7075 * object.c: Remove checks for oom.
7077 * object.h object.c (mono_class_get_allocation_ftn): New function to
7078 return the icall which can be used to allocate an instance of a given
7081 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
7083 * class-internals.h: Add 'enabled' field.
7085 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
7087 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
7089 2004-08-18 Jambunathan K <kjambunathan@novell.com>
7090 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
7093 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
7095 * appdomain.c: use the Tls function for appdomain too,
7096 at Zoltan's request. Actually return in mono_context_get
7098 * appdomain.c, profiler.c, threads.c: use __thread
7100 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
7102 * appdomain.c threads.c: Call GC_CreateThread on windows.
7104 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
7105 multiple libraries since this don't work on windows.
7107 2004-08-18 Martin Baulig <martin@ximian.com>
7110 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
7113 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
7114 MonoMethodNormal since we also need it for abstract and interface
7118 (build_compressed_metadata): Sort the GenericParam table.
7119 (mono_image_create_token): Added `gboolean create_methodspec'
7120 argument; this is false when generating a MethodImpl token.
7121 (reflection_methodbuilder_to_mono_method): Abstract and interface
7122 methods may also have generic parameters.
7124 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
7126 * appdomain.c: thread local alloc
7128 2004-08-17 Martin Baulig <martin@ximian.com>
7130 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
7133 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
7136 * class.c (mono_type_get_full_name): New public function.
7137 (mono_type_get_name): Don't include the type arguments.
7139 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
7141 * Makefile.am: Build static versions of libmetadata and libmonoruntime
7142 for inclusion into the mono executable.
7144 2004-08-16 Martin Baulig <martin@ximian.com>
7146 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
7147 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
7149 2004-08-14 Martin Baulig <martin@ximian.com>
7151 * class.c (dup_type): Also copy the `byref' field.
7153 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
7155 * reflection.c (create_dynamic_mono_image): Revert the last change
7156 since it breaks bootstrap.
7158 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
7160 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
7162 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
7163 not free them with g_free.
7165 2004-08-11 Martin Baulig <martin@ximian.com>
7167 * reflection.c (mono_reflection_setup_internal_class): Also call
7168 mono_class_setup_mono_type() if we already have a `tb->type.type'.
7170 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
7172 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
7173 called during default (first) AppDomain creation. Keep track of
7174 Evidence when loading assemblies.
7176 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7178 * opcodes.c, opcodes.h: reduce runtime relocations.
7180 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7182 * culture-info.h, locales.c: fixes and chages to sue the new
7183 optimized format of the locale data.
7184 * culture-info-tables.h: regenerated.
7186 2004-08-06 Geoff Norton <gnorton@customerdna.com>
7188 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
7190 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
7192 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
7193 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
7194 * domain-internals.h: icall declaration.
7195 * icall.c: icall registration.
7196 * object-internals.h: New fields in MonoAssembly for CAS.
7198 2004-08-05 Duncan Mak <duncan@ximian.com>
7200 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
7203 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7205 * reflection.c: fix to deal with object[] arrays in custom ctors
7208 2004-08-05 Martin Baulig <martin@ximian.com>
7210 * class.c (mono_class_array_element_size): Added support for
7211 generic instances and correctly handle "recursive" types.
7213 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
7215 * assembly.c: Fix warnings.
7217 2004-08-04 Martin Baulig <martin@ximian.com>
7220 (mono_type_get_name_recurse): Added `gboolean include_arity'
7221 argument specifying whether or not we should include the generic
7222 arity in the type name.
7223 (_mono_type_get_name): New static function.
7224 (mono_class_setup_vtable): If we're a generic instance, don't
7225 include the generic arity in the names of explicit method
7228 2004-08-03 Martin Baulig <martin@ximian.com>
7230 * class.c (mono_type_get_name_recurse): Enclose the generic type
7231 arguments in `<', '>'.
7233 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7235 * gc.c: make GC warning messages use the trace API, they are just
7236 noise to most of the users.
7238 2004-08-03 Martin Baulig <martin@ximian.com>
7240 * debug-mono-symfile.c (read_string): Correctly read the string.
7242 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
7244 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
7246 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
7248 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
7250 2004-07-30 Martin Baulig <martin@ximian.com>
7252 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
7253 Reflect latest symbol writer changes.
7255 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7257 * object.c: always create an object if null is passed
7258 to Invoke() where a valuetype is expected.
7260 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
7262 * marshal.c (mono_marshal_init): make managed
7263 signatures match native ones better for 64bits.
7265 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7267 * appdomain.c: hack to build correctly the private bin path on windows.
7270 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
7272 * assembly.c: Load mscorlib from the correct framework directory
7273 (mono/<version>/mscorlib.dll).
7274 * appdomain.h: Added prototypes for new functions.
7275 * internals.h: Added some prototypes.
7276 * domain.c: When initializing the runtime, get from the executable and
7277 the configuration files the runtime version that the app supports.
7278 Added support methods for reading app.exe.config. Added list of versions
7279 supported by the JIT. Added two new methods: mono_init_from_assembly,
7280 which initializes the runtime and determines the required version from
7281 the provided exe file, and mono_init_version, which initializes
7282 the runtime using the provided version.
7283 * icall.c: Get machine.config from version-specific directory.
7284 * reflection.c: When generating an image, embed the version number
7285 of the current runtime.
7287 2004-07-28 Dick Porter <dick@ximian.com>
7290 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
7291 returned sockaddr size before creating the remote address object.
7292 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
7295 2004-07-28 Dick Porter <dick@ximian.com>
7297 * locales.c (string_invariant_compare_char): Fix invariant char
7298 compares between upper and lower cases. Fixes bug 61458.
7300 2004-07-27 Ben Maurer <bmaurer@ximain.com>
7302 * marshal.c: actually cache stelem.ref wrappers.
7304 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7306 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
7307 sections and remove the mono_cli_rva_map () function.
7309 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7311 * debug-mono-symfile.c: fix one more endianess issue, from a patch
7312 by Geoff Norton (<gnorton@customerdna.com>).
7314 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7316 * class.c: fix class loads for pointer types (typeof(int) !=
7319 2004-07-27 Martin Baulig <martin@ximian.com>
7321 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
7322 reading the debugging information from an external ".mdb" file.
7324 2004-07-24 Martin Baulig <martin@ximian.com>
7326 * reflection.c (mono_image_get_type_info): Only write a class
7327 layout entry if we actually have a size or a packing size.
7329 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
7331 * reflection.c (type_get_fully_qualified_name):
7332 insert cast to get type checking of ?: with non-gcc compilers
7334 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
7336 * rand.c: use g_getenv for both lookups of
7339 2004-07-17 Martin Baulig <martin@ximian.com>
7341 * reflection.c (mono_reflection_bind_generic_method_parameters):
7342 Set `gmethod->reflection_info'.
7344 2004-07-17 Martin Baulig <martin@ximian.com>
7346 * class.c (mono_class_create_from_typedef): Insert the newly
7347 created class into the hash table before computing the interfaces
7348 since we could be called recursively.
7350 2004-07-16 Ben Maurer <bmaurer@ximain.com>
7352 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
7353 function to implement stelem.ref in managed code
7354 * class-internals.h, debug-helpers.c: a new wrapper type
7357 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7359 * gc.c: allow GC handles to work even when no GC is compiled in.
7360 Fix part of bug #61134 (GetAddrOfPinnedObject).
7362 2004-07-13 Peter Williams <peter@newton.cx>
7364 * process.c (complete_path): Make sure we don't attempt to execute
7367 2004-07-12 Geoff Norton <gnorton@customerdna.com>
7369 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
7370 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
7371 and will add/subtract the hour if needed
7373 2004-07-12 Martin Baulig <martin@ximian.com>
7375 * reflection.c (mono_field_get_object): If we have
7376 `field->generic_info', take the attributes from
7377 `field->generic_info->generic_type'.
7379 2004-07-12 Martin Baulig <martin@ximian.com>
7381 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
7382 This function must be called before initializing the runtime.
7383 (mono_debug_init_1): New function; call this after initializing
7384 the runtime, but before loading the assembly. It tells the
7385 debugger to load corlib and the builtin types.
7387 * mono-debug-debugger.c: Did some larger changes in the debugging
7388 code; support recursive class declarations, make sure we actually
7391 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7393 * debug-helpers.c: undo my previous patch and fixed the real issue in
7394 ../mini/exceptions-x86.c
7396 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7398 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
7399 when no HOME env. variable was set and a NullRef was thrown in a .cctor
7400 called from other .cctors.
7402 2004-07-09 Miguel de Icaza <miguel@ximian.com>
7404 * loader.c: Removed the mono_loader_wine_init hack now that we are
7405 doing a managed version of Windows.Forms.
7407 2004-07-09 Ben Maurer <bmaurer@ximian.com>
7409 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
7410 threadpool.c, threads.c: remove static data from rootset.
7412 2004-07-09 Dick Porter <dick@ximian.com>
7414 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
7415 Don't do any more processing if the matched length was 0. It was
7416 increasing the size of the string before. Fixes bug 61167.
7418 2004-07-09 Dick Porter <dick@ximian.com>
7422 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
7423 Add support for SO_PEERCRED if its available.
7425 2004-07-09 Peter Bartok <pbartok@novell.com>
7426 * loader.c: winelib.exe.so error message is now only displayed if
7427 MONO_DEBUG is set. To help us avoid questions when people are trying
7428 out the new Managed.Windows.Forms.
7430 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
7432 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
7433 for isinst and castclass wrappers.
7435 * class-internals.h icall.c: Move registration and lookup of JIT icalls
7436 to libmetadata from the JIT, so they could be used by the marshalling
7437 code and the interpreter.
7439 * marshal.c: Register marshalling related JIT icalls here instead of
7440 in mini.c. Use CEE_MONO_ICALL instead of the family of
7441 CEE_MONO_PROC<x> opcodes to call marshalling functions.
7443 * metadata.h: Remove unneeded marshalling conversions.
7445 * opcodes.c: Update for new opcodes.
7447 2004-07-08 Martin Baulig <martin@ximian.com>
7449 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
7450 (mono_debug_get_domain_data): Make this function static.
7452 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
7454 * gc.c, object.h: add nice GC handle API for embedders.
7456 2004-07-06 Ben Maurer <bmaurer@ximian.com>
7458 * reflection.c: more changes for the new api
7460 * object.c: When we reflect on a field w/ a constant value, it
7461 will not have a memory location, so we must access metadata. Also,
7462 allow easier reading of strings so that we can read them from
7465 * class.c (mono_class_layout_fields): no need for literal fields here.
7467 * class-internals.h: api changes for const fields
7469 * icall.c (ves_icall_get_enum_info): use new apis for const fields
7471 2004-07-06 Martin Baulig <martin@ximian.com>
7473 * mono-debug.h: Increment version number to 44.
7475 * mono-debug.c (mono_debug_add_wrapper): The second argument is
7476 now a gpointer, rewrote this whole method.
7478 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
7479 function. Add information about the wrapper in a new "misc table".
7481 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
7482 for the new misc table.
7484 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
7486 * metadata-internals.h image.c: Add a cache for helper signatures.
7488 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
7490 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
7492 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
7493 delegates from a delegate. Fixes #61033.
7495 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
7496 marshalling of stringbuilder arrays. Fixes #59900.
7498 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
7500 * icall.c: Add EnumBuilder:setup_enum_type icall.
7502 2004-06-30 Ben Maurer <bmaurer@ximian.com>
7504 * icall.c: Added a new icall for the property version of
7507 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
7509 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
7510 it has a constant size across platforms.
7512 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
7515 2004-06-29 Martin Baulig <martin@ximian.com>
7517 * mono-debug.c (mono_debug_add_method): Protect the whole function
7518 in mono_debugger_lock(), not just parts of it.
7520 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7522 * reflection.c: make sure padding bytes in heaps are zeroed.
7524 2004-06-24 David Waite <mass@akuma.org>
7526 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
7527 image.c, loader.c, locales.c, marshal.c, metadata.c,
7528 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
7529 string-icalls.c, threads.c: change to C90-style comments from C99 /
7532 2004-06-24 Dick Porter <dick@ximian.com>
7535 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
7536 return createdNew. Fixes bug 60412.
7539 * icall.c: Add createdNew parameter to CreateMutex icall
7541 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
7543 * reflection.c, object-internals.h: save default value in params.
7545 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7547 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
7548 no need to build a new path combining that with the application base.
7551 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
7553 * reflection.c: fixed minor standard compliance issues.
7555 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
7557 * reflection.c: fixed issue with encoding some custom attributes
7558 (arrays in properties and fields, bug #60411).
7560 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7562 * reflection.c: fix start address when copying the public key token.
7564 2004-06-23 Martin Baulig <martin@ximian.com>
7566 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
7567 the `exc' object in a static object to put it into the GC's root set.
7569 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
7571 * reflection.c: make mono_reflection_setup_internal_class ()
7572 callable a second time to setup a new parent class.
7574 2004-06-23 Dick Porter <dick@ximian.com>
7576 * threads.c: Check for WAIT_IO_COMPLETION return values.
7578 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
7580 * appdomain.c: Removed the g_free on the public key token. Now copy
7581 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
7582 * assembly.c: Added public key token string value when loading
7583 assemblies. Fix bug #60439.
7584 * icall.c: Added missing informations (like public key) in
7585 GetReferencedAssemblies. Fix #60519.
7586 * image.h: Changed definition for public key token from const char*
7587 public_tok_value to guchar public_key_token [17];
7588 * reflection.c: Updated for changes to public key token.
7590 2004-06-22 Lluis Sanchez Gual
7592 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
7593 for the field in base classes.
7595 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
7597 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
7598 mark headers as not supported, they are installed only for use by the
7601 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
7603 * *.c, *.h: avoid namespace pollution in public headers.
7605 2004-06-21 Martin Baulig <martin@ximian.com>
7607 * exception.c (mono_get_exception_security): It's in
7608 "System.Security", not in "System".
7610 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
7611 the exception classes.
7613 2004-06-21 Martin Baulig <martin@ximian.com>
7615 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
7616 Protect the exception object from being finalized.
7618 2004-06-21 Martin Baulig <martin@ximian.com>
7620 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
7623 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
7625 * reflection.c: Load the assembly in mono_reflection_type_from_name,
7626 if it was not loaded before. Fix parts of #60439.
7628 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
7630 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
7631 code that was broken since Ben's change: wrappers are now
7632 dependent on the method signature only again.
7634 2004-06-21 Martin Baulig <martin@ximian.com>
7636 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
7637 added interface support.
7639 2004-06-21 Martin Baulig <martin@ximian.com>
7641 * class.c (mono_vtable_get_static_field_data): New public method.
7643 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
7645 * filewatcher.c : Windows build fix to be compliant with API changes.
7647 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7649 * class.h, class.c: more accessors.
7650 * metadata.h, metadata.c: prepare for hiding MonoType and
7651 MonoMethodSignature: people should use the accessors from now on
7652 outside of the tree.
7654 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7656 * *.c, *.h: more API cleanups.
7658 2004-06-18 Jackson Harper <jackson@ximian.com>
7660 * assembly.c: Trace loading assemblies.
7661 * loader.c: Trace loading native libraries.
7662 * mono-config.c: Trace loading config files.
7664 2004-06-18 Dick Porter <dick@ximian.com>
7666 * locales.c: Tell ICU the lengths of strings, it can cope with
7667 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
7669 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
7671 * image.c: swapped name/filename;
7673 2004-06-18 Martin Baulig <martin@ximian.com>
7675 * mono-debug-debugger.c (write_class): Write the parent class at
7676 the end of the header.
7678 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7680 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
7682 2004-06-17 Raja R Harinath <rharinath@novell.com>
7684 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
7685 (bundle_obj): New conditional define.
7686 (BUILT_SOURCES): Remove.
7687 ($(bundle_srcs)): Make parallel-make safe.
7688 (libmonoruntime_la_LIBADD): Make unconditional.
7689 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
7690 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
7692 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
7694 * culture-info-tables.h: It was inconsistent with the latest
7697 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
7699 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
7702 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
7705 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7707 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
7708 cleaned up public header threads.h.
7710 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
7712 * Makefile.am, *.c, *.h: more API cleanups.
7714 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
7716 * Makefile.am: removed monosn from compilation.
7717 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
7718 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
7719 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
7720 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
7721 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
7722 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
7724 2004-06-15 Jackson Harper <jackson@ximian.com>
7726 * assembly.c: Make locales lower case when searching the GAC for
7727 assemblies. gacutil will always make locales lowercase when
7728 installing so this effectively makes them case insensitive.
7730 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
7732 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
7733 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
7734 parameter which allows to choose whether the wait can be interrupted or
7735 not. Also added the method mono_monitor_enter(), which locks the monitor
7736 using an infinite wait and without allowing interruption.
7737 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
7739 * object.h: Added new fields in MonoThread. suspend_event holds the event
7740 used to susped/resume the thread. synch_lock is the lock object to use for
7741 modifying the thread state.
7742 * threads.c: Use the new synch_lock object for locking, instead of "this",
7743 which can generate deadlocks.
7744 Moved thread state change in Thread.Sleep and Thread.Join from managed
7745 to unmanaged code. This avoids a deadlock when the thread was suspended
7746 just after acquiring the thread lock.
7747 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
7748 Implemented Thread.Suspend using an event instead of ThreadSuspend,
7749 which is not fully implemented in the io-layer.
7750 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
7752 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
7754 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
7755 threads-types.h: more API cleanups.
7757 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7759 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
7760 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
7761 threadpool.c, threads.c: first pass at the exported API cleanup.
7763 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
7765 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
7767 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7769 * icall.c: added internalGetHome.
7771 2004-06-14 Dick Porter <dick@ximian.com>
7773 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
7774 possible to return successfully when '.' or '..' were the only
7775 entries in a directory, but were skipped. The MonoIOStat was not
7776 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
7779 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7781 * reflection.c: make binaries run on .Net 1.1 by default.
7783 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
7785 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
7787 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
7789 * marshal.c: keep track of struct size with explicit layout
7792 2004-06-12 Martin Baulig <martin@ximian.com>
7794 * mono-debug-debugger.c: Comment out a debugging g_message().
7796 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
7798 * reflection.c, reflection.h: do not free custom attrs that are cached.
7799 * icall.c: use braces to make code clearer.
7801 2004-06-11 Martin Baulig <martin@ximian.com>
7803 * class.h (MonoInflatedField): New type.
7804 (MonoClassField): Replaced `MonoType *generic_type' with
7805 `MonoInflatedField *generic_info'.
7808 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
7810 2004-06-11 Martin Baulig <martin@ximian.com>
7812 * reflection.c (mono_image_create_method_token): Correctly encode
7815 2004-06-11 Martin Baulig <martin@ximian.com>
7817 * metadata.c (mono_metadata_parse_method_signature): When parsing
7818 a MethodDef which has VarArgs, also set sentinelpos if we don't
7819 have any parameters.
7821 2004-06-11 Martin Baulig <martin@ximian.com>
7823 * verify.c (mono_method_verify): In CEE_CALL, use
7824 mono_method_get_signature() to get the method's signature, unless
7825 we're a PInvoke method.
7827 2004-06-10 Jackson Harper <jackson@ximian.com>
7829 * assembly.c: Use <path>/lib/mono/gac for the extra paths
7830 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
7831 logical name as the supplied path is just a prefix to the gac not
7832 the direct path to it.
7834 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
7836 * reflection.c: make the token for a created method match
7837 the token of the MethodBuilder it was created from
7838 (IKVM requires this behaviour now).
7840 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
7842 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
7843 reflection.c, socket-io.c: leak fixes.
7845 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
7847 * icall.c: handle sentinel pos in vararg methods in position different
7850 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7852 * culture-info-tables.h: freshly generated.
7854 2004-06-09 Martin Baulig <martin@ximian.com>
7856 * loader.c (mono_get_method_constrained): Call `mono_class_init
7857 (constrained_class)'.
7859 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
7861 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
7862 any methods. Fixes #59629.
7864 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
7866 * culture-info-tables.h: reflecting locale-builder updates.
7868 2004-06-08 Dick Porter <dick@ximian.com>
7871 * locales.c: Fixed compile warnings, including a real bug in
7872 CompareInfo_internal_compare.
7874 2004-06-08 Dick Porter <dick@ximian.com>
7877 (ves_icall_System_Globalization_CompareInfo_internal_index):
7878 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
7879 Double-check the resuls of usearches, because ICU currently
7880 ignores most of the collator settings here. Fixes bug 59720.
7882 2004-06-08 Dick Porter <dick@ximian.com>
7885 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
7886 Fix memory leak and segfault-causing typo. No idea how this one
7887 lasted so long without being noticed.
7889 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
7891 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
7892 any methods. Fixes #59629.
7894 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7897 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
7898 own the critical section before). Removed dead code (that's done
7899 in the preload hook).
7901 (mono_assembly_load_with_partial_name): call the preload hook.
7903 2004-06-08 Martin Baulig <martin@ximian.com>
7905 * metadata.c (mono_metadata_signature_alloc): Default
7906 `sentinelpos' to -1.
7908 * reflection.c (mono_image_get_array_token): Likewise.
7910 2004-06-08 Martin Baulig <martin@ximian.com>
7912 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
7914 * metadata.c (mono_metadata_parse_method_signature): When parsing
7915 a MethodDef which has VarArgs, set sentinelpos.
7917 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
7918 `gint16' since we're using -1 for non-varargs methods.
7921 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
7922 (method_encode_signature): Added varargs support.
7923 (method_builder_encode_signature): Likewise.
7924 (mono_image_get_varargs_method_token): New static method.
7925 (mono_image_create_method_token): New public method; this is
7926 called via an icall instead of mono_image_create_token() when
7927 calling a varargs method.
7929 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
7931 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
7933 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
7935 * culture-info-tables.h : Reflecting the latest locale-builder that
7936 fixed empty array representation ({} to {0}).
7938 2004-06-07 Jackson Harper <jackson@ximian.com>
7940 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
7941 looking up extra gac paths. This allows MONO_GAC_PATH to act
7942 exactly like a prefix.
7944 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
7946 * reflection.c (mono_reflection_type_from_name): Make a copy of the
7947 type name before modifying it. Fixes #59405.
7949 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
7951 * culture-info.h: added fields for "all datetime patterns".
7952 * locales.c: ( ves_icall_System_Globalization_CultureInfo
7953 _construct_datetime_format ()): fill xxx_patterns fields.
7954 * object.h: added fields for "all datetime patterns" to
7955 MonoDateTimeFormatInfo.
7956 * culture-info-tables.h: reflecting locale-builder updates.
7958 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
7960 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
7961 the event has no add and remove methods. Fixes #59629.
7963 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
7965 * object.c: Fixed possible integer overflow when allocating large
7968 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
7970 * culture-info-tables.h: reflecting locale-builder updates.
7972 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
7974 * culture-info-tables.h: reflecting locale-builder updates.
7976 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
7978 * culture-info-tables.h: reflecting locale-builder updates.
7980 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
7982 * threads.c: Made Thread.Sleep abortable.
7984 2004-06-02 Martin Baulig <martin@ximian.com>
7986 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
7988 * debug-mono-symfile.h: Bumped symbol file version number to 37.
7990 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
7992 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
7994 2004-05-30 Jackson Harper <jackson@ximian.com>
7996 * reflection.c: Do not hardcode assembly versions or public key
7997 tokens anymore. All of this except the corlib section was dead
8000 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
8002 * object.c (mono_runtime_invoke_array): Automatically create boxed
8003 objects for byref valuetypes if needed. Fixes #59300.
8005 * object.c (mono_method_return_message_restore): Handle
8006 MONO_TYPE_OBJECT as well.
8008 2004-05-28 Jackson Harper <jackson@ximian.com>
8010 * reflection.c: The modified type encoding was causing build
8011 problems. Reverted for now.
8013 2004-05-28 Jackson Harper <jackson@ximian.com>
8015 * reflection.c/h: Take an assembly ref so that we dont create
8016 fully qualified names when encoding types in the same assembly as
8017 the custom attribute being emitted.
8018 * appdomain.c: Increment version number.
8020 2004-05-26 Duncan Mak <duncan@ximian.com>
8023 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8024 Set the full version number (major, minor, build, revision).
8026 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
8028 * marshal.c (emit_struct_conv): increment src/dst after blit
8029 (mono_marshal_get_managed_wrapper,
8030 mono_marshal_get_native_wrapper): make sure we have marshalling
8031 info before marshalling params (info computation affects
8034 * class.c (class_compute_field_layout): correctly deal with
8036 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
8037 value types (as per what windows dows by default)
8038 (mono_class_setup_mono_type): System.ValueType is blittable
8039 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
8042 * marshal.c (mono_marshal_load_type_info): flag types as
8043 non-blittable if the native layout doesn't match the managed
8046 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8048 * appdomain.c: don't add stuff in the private search path that is
8049 above the application base. If application base is not set, there's
8050 no private search path.
8052 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
8054 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
8055 byref struct arguments in native->managed marshalling.
8057 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
8059 * marshal.c (mono_marshal_get_runtime_invoke): correctly
8060 cache methods using signature (special case for methods
8061 that are value type or string class)
8063 * image.c (mono_image_close): clean up allocated GSList's
8064 in runtime_invoke_cache.
8066 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8068 * mono-config.c: set the correct path for mono_cfg_dir on windows when
8069 there's no MONO_CFG_DIR environment variable defined.
8071 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8073 * threads.c: windows version must be >= 0x0500 to include OpenThread.
8075 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
8077 * threadpool.c: Really wait for 500ms after the async call, even if the wait
8079 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
8080 before waiting for it, and call CloseHandle after the wait to unref it.
8081 This will make sure that handles are not disposed too early.
8083 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8088 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
8091 * object.c: se the application_base only for the domain that runs
8092 Main. Fixes bug #59216,
8094 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8097 * object.c: only the domain in which Main is run have
8098 SetupInformation.ConfigurationFile set, so moved a few lines from
8099 appdomain.c to object.c.
8101 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8103 * appdomain.c: we tried to load [name].(dll|exe), but according
8104 to bug #57710, we must also try [culture]/[name].(dll|exe) and
8105 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
8106 There's a test case attached to bug #58922.
8108 2004-05-27 Dick Porter <dick@ximian.com>
8111 * file-io.c: Implemented icalls for locking and unlocking regions
8113 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
8114 FALSE on error (fixes both compiler warning and real bug.)
8116 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
8118 * culture-info-tables.h: reflecting locale-builder updates.
8120 (Added missing ChangeLog entry for 05/26)
8122 2004-05-27 Jackson Harper <jackson@ximian.com>
8124 * locales.c: Fix some cut and paste errors.
8126 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8128 * mono-config.c: set the correct path for config. directory on windows.
8130 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
8132 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
8135 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
8137 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
8138 from pinvoke functions.
8140 * marshal.c (mono_ftnptr_to_delegate): Implement this.
8142 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
8144 * culture-info-tables.h: reflecting locale-builder updates.
8146 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
8148 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
8151 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
8153 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
8154 * icall.c: Modified icalls for RNG.
8155 * rand.c|h: Changed RNG interface to allow thread-safe usage under
8156 Windows (CryptoAPI).
8158 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
8160 * locales.c: Fix build.
8162 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
8164 * culture-info-tables.h: reflecting locale-builder updates.
8166 2004-05-25 Jackson Harper <jackson@ximian.com>
8168 * locales.c: When creating the current culture use the $LANGs
8169 specific culture. So DateTimeFormat and NumberFormat entries are created.
8171 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
8173 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
8174 a char array as parameter.
8176 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
8178 * image.c: In mono_image_open(), always use an absolute path name to
8179 look for already loaded images.
8181 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
8183 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
8184 missing in the windows build (like older cygwin include files).
8186 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
8188 * icall.c: Fixed check for possible integer overflow in Buffer_
8189 BlockCopy icall. Replaced comments style // by /* */.
8191 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
8193 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
8195 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
8196 check after MONO_VTADDR. Fixes pinvoke2.exe.
8198 * marshal.h marshal.c metadata.h: Add beginnings of support for
8199 ftnptr -> delegate marshalling.
8201 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
8203 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
8204 * threads.c: Fix warnings.
8206 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
8208 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
8209 * icall.c: Registered icalls for Suspend and Resume.
8210 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
8212 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
8213 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
8214 * process.c: Use WaitForSingleObjectEx.
8215 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
8217 * threads.c, threads.h: Make use of new Ex wait methods. Improved
8218 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
8219 for Suspend and Resume. Added new mono_thread_stop, used for stoping
8220 background threads. Added basic support for Abort in Windows.
8221 Start new threads using a managed delegate invoke wrapper. This wrapper
8222 has an interruption checkpoint that is needed since an interruption
8223 can be requested before the thread leaves the unmanaged code that starts
8225 * marshal.c: Added interruption checkpoint after every native call, and
8226 also before managed calls for wrappers called from unmanaged code to
8227 go into managed code.
8228 * object.h: Added new field in MonoThread to keep track of interruption
8231 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
8233 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
8236 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8243 * rand.c: getenv -> g_getenv (windows!)
8245 * process.c: complete_path is also used on non-windows platforms.
8247 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8249 * icall.c: new signature for Process_Start.
8251 * process.[ch]: new signature for Process_Start. If we're on windows
8252 and UseShellExecute is false, we have to search for the program by
8253 ourselves if we don't get a full path.
8255 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
8257 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
8258 marshalling and call CleanUpNativeData if needed. Fixes #58646.
8260 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8262 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
8265 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8267 * process.c: use double quotes to quote program name and arguments on
8268 windows. Fixes bug #58575.
8270 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8272 * file-io.c: don't return "." and ".." when using windows Find*File.
8274 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
8276 * marshal.c: Don't pass wrappers to message init because method
8277 addressed used to lookup metadata. part of remoting[2|3] fix.
8279 2004-05-15 Jackson Harper <jackson@ximian.com>
8281 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
8282 path is essentially the same as MONO_PATH except that it points to
8283 GACs instead of lib directories.
8284 * loader.h: The user gac is gone so we dont need function to
8286 * mono-config.c: user gac option is now gone.
8288 2004-05-15 Jackson Harper <jackson@ximian.com>
8290 * culture-info.h: Make defines more consistent, add calendar data
8291 to the culture info table.
8292 * culture-info-tables.h: Add basic calendar data. Basically
8293 everyone gets default gregorian until all the data is
8295 * locales.c: Use the new consistent defines. Set calendar data for
8296 culture info objects.
8297 * object.h: add a field for calendar data to CultureInfo
8299 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
8301 * image.c: image->runtime_invoke_cache is keyed on signatures now.
8302 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
8304 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
8305 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
8306 an extra param that is the pointer of the method to invoke. The IL for
8307 the invoke method is no longer specific to the method, but to the
8308 signature of the method. Thus, we can share the same code for multiple
8309 methods. This reduces the number of methods that have to be compiled.
8311 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
8313 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
8315 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8317 * icall.c: Optimize Buffer.BlockCopy.
8319 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8321 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
8322 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
8323 quote). Changed them to "MMMM yyyy".
8325 2004-05-12 Miguel de Icaza <miguel@ximian.com>
8328 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
8330 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
8332 * reflection.h: Updated after changes to managed structures.
8334 * appdomain.c: Bump corlib version.
8336 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8338 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
8341 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8343 * Makefile.am: link to ../os/libmonoos.la on windows.
8346 -If MONO_DEBUG, warn about non-existing directories in
8348 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
8349 compile time variable.
8350 -Removed init_default_path and call mono_set_rootdir from
8351 libmonoos.a instead (windows only).
8353 * assembly.h: declare mono_assembly_getrootdir().
8356 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
8358 * loader.c: s/getenv/g_getenv/
8360 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
8362 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
8364 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
8366 * metadata.h: Add new marshalling conversions.
8368 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
8371 * reflection.c (mono_reflection_get_type): Lookup the type in all
8372 modules of a multi-module assembly. Fixes #58291.
8374 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
8376 * threads.c: Before aborting a background, set the StopRequested
8377 state. This avoids throwing the Abort exception.
8378 In mono_thread_manage, don't continue with the shutdown until all
8379 aborted threads have actually stopped.
8381 2004-05-10 Jackson Harper <jackson@ximian.com>
8383 * locales.c: Remove the modifier from culture names.
8385 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8387 * Makefile.am: monosn is not installed any more. It has been deprecated
8390 2004-05-07 Jackson Harper <jackson@ximian.com>
8393 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
8394 Fix array construction, add bailout if the length is 0.
8396 2004-05-07 Dick Porter <dick@ximian.com>
8398 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
8399 machine doesn't have a DNS entry. Patch by Urs Muff
8400 (umuff@quark.com), fixes bug 57928.
8402 2004-05-06 Jackson Harper <jackson@ximian.com>
8404 * reflection.c: Handle null PublicTokens properly. alloc mem for
8405 assembly names culture so we dont crash when freeing it.
8407 2004-05-06 Jackson Harper <jackson@ximian.com>
8409 * assembly.c: Check the usergac when loading with partial names.
8411 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
8413 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
8414 does nothing for now (not required for Linux/Windows) but the class
8415 library can call it (and a newer or modified runtime could need it).
8416 * icall.c: Registred icall.
8418 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8420 * loader.c: prints a message on module loading error we set MONO_DEBUG
8421 environment variable.
8423 2004-05-05 Jackson Harper <jackson@ximian.com>
8425 * appdomain.c: Handle PublicKeyToken=null properly.
8427 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
8429 * environment.c|h: Added icall ves_icall_System_Environment_
8430 GetOSVersionString to get the current OS version as a string.
8431 * icall.c: Registred icall.
8433 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
8435 * object.c: in mono_object_get_virtual_method(), take into account that
8436 non-virtual methods don't have a slot in the vtable. Check needed when
8437 the object is a proxy.
8439 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
8441 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
8442 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
8444 * object.c (mono_class_compute_gc_descriptor): Fix warning.
8446 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
8447 passed when a valuetype is expected.
8449 * object.c (mono_unhandled_exception): Only set the exit code if the
8450 exception happens in the main thread. Fixes thread5.exe.
8452 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
8453 invalid names. Fixes #58047.
8455 2004-05-03 Jackson Harper <jackson@ximian.com>
8457 * assembly.c: This line was committed accidently and is unneeded.
8459 2004-05-03 Jackson Harper <jackson@ximian.com>
8461 * icall.c: Add new icall for Assembly::LoadWithPartialName
8462 * assembly.c/.h: new function that probes the GAC to load partial
8463 assembly names by Paolo Molaro.
8465 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8467 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
8468 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
8469 (type_get_fully_qualified_name): Added PublicKeyToken when building a
8472 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8474 * appdomain.c: fixed check for 'neutral' culture and removed warning.
8475 * reflection.c: fix bug when parsing a full type name and Version is not
8476 the last thing in the string.
8478 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
8480 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
8481 crashes when it is freed.
8483 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8485 * assembly.c: print the compat warning to stderr.
8487 2004-05-01 Miguel de Icaza <miguel@ximian.com>
8489 * assembly.c (mono_assembly_load_references): Add a compatibility
8490 hack to run old applications that might be still referencing the
8491 3300-based assemblies, only do this for System.xxx.
8493 2004-05-01 Jackson Harper <jackson@ximian.com>
8495 * appdomain.c: If the culture is neutral we set it to "".
8497 2004-04-29 Jackson Harper <jackson@ximian.com>
8499 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
8501 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
8503 * string-icalls.c: added low overhead function for copying chars
8504 * icall.c: added needed icall for the above function
8506 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8508 * icall.c: fix return value of get_global_assembly_cache. Implemented
8509 Environment.GetLogicalDrives.
8511 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
8513 * rand.c: try and talk to egd or prngd
8514 for random bytes if opening devices fail.
8516 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
8518 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
8519 alignment for the type using the native alignment of its members
8520 instead of using klass->min_align.
8522 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
8524 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8527 * socket-io.c: added check for sys/aio.h.
8529 2004-04-28 Dick Porter <dick@ximian.com>
8531 * threads.c: Don't abort a thread thats already aborting, when
8532 terminating everything.
8534 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8536 * icall.c: added 2 new async calls for Socket.
8538 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
8541 * threadpool.c: removed unused variable.
8543 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
8545 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
8547 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8549 * locales.c: put back string_invariant_tolower () and
8550 string_invariant_toupper ().
8552 2004-04-26 David Waite <mass@akuma.org>
8557 * unicode.h: remove comma from end of enumeration declarations
8559 2004-04-26 David Waite <mass@akuma.org>
8561 * debug-mono-symfile.h:
8564 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
8567 2004-04-26 Jackson Harper <jackson@ximian.com>
8569 * appdomain.c: Increment version number.
8571 2004-04-26 Jackson Harper <jackson@ximian.com>
8573 * appdomain.c: Set assembly references public token value when
8574 PublicKeyToken is specified, not the hash_value. Free public token
8575 values when free assembly name data. Previously the public key
8576 token was hex decoded, however we are using hex encoded public key
8577 tokens, so this is not neccasary.
8578 * assembly.c: Lookup assemblies in the gac if their public token
8579 value is set. Add function to allow enabling user gac
8580 lookups. Specify whether or not the assembly was loaded from the
8581 GAC. Compare full assembly names when checking the cache for
8582 assemblies (Temporarily disabled see comment in code). Remove
8583 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
8584 specifies trace-loader they get extra info to stdout on the
8585 loading of assemblies.
8586 * image.h: Add a field for an assembly references public token
8587 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
8588 whether an assembly has been loaded from the GAC.
8589 * image.c: Remove a corlib -> mscorlib name mapping.
8590 * loader.h: Add function to enable/disable the user gac.
8591 * mono-config.c: Check if the usergac is enabled in the config
8593 * icall.c: New icall to determine whether or not an assembly has
8594 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
8595 * tabldefs.h: Add constant for assemblyref flag that specifies a
8596 full public key is used instead of a public token.
8597 * reflection.c: Remove mscorlib -> corlib mappings. Set
8598 PublicTokenValue instead of hash value. This value is a hex
8599 string so it does not need to be expanded.
8601 2004-04-26 Martin Baulig <martin@ximian.com>
8603 * mono-debug-debugger.c (mono_debugger_initialize): Set
8604 `mono_debugger_initialized' before calling mono_debug_lock().
8606 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
8608 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
8609 InternalToUpper/InternalToLower.
8610 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
8611 removed invariant culture shortcut. This is now done in managed code.
8612 * locales.c: (string_invariant_toupper/tolower) removed.
8614 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8616 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
8617 Added Poll internal call.
8619 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
8620 call for Poll. Select was too heavy for polling a single socket.
8622 * threadpool.[ch]: added mono_threadpool_cleanup.
8623 * threads.c: use it. Don't use Thread_Abort on windows.
8625 2004-04-23 Martin Baulig <martin@ximian.com>
8627 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
8629 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
8631 * icall.c: Registred new icalls for key pair protection and added an
8632 icall for Environment.GetFolderPath on Windows.
8633 * security.c|h: Added new icalls for key pair protection.
8635 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8637 * socket-io.c: don't display the non-supported family warning for known
8638 families. Now this is not displayed on windows when checking support
8641 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8643 * class.c: don't display the layout warning for static fields.
8645 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
8647 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
8648 * locales.c, locales.h: Added new icalls for culture-specific
8649 Char.ToLower and Char.ToUpper.
8651 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8653 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
8656 2004-04-20 Martin Baulig <martin@ximian.com>
8658 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
8659 of the type name before passing it to mono_reflection_type_from_name().
8661 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
8663 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
8664 encodings here. Fixes #56965.
8666 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
8668 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
8669 fix test on strstr result not that I can see anything that
8670 relies on the result.
8672 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
8674 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
8677 * marshal.c (mono_marshal_get_string_encoding): New helper function.
8679 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
8680 function to determine which marshalling to use for strings. Fixes
8683 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
8685 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
8687 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
8689 * icall.c: #include mono-config.h
8691 2004-04-15 Jackson Harper <jackson@ximian.com>
8693 * culture-info-tables.h: Fix date formats for en-US culture.
8695 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
8697 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
8698 ThreadPool.SetMinThreads.
8699 * threadpool.c: Implemented ThreadPool.GetMinThreads and
8700 ThreadPool.SetMinThreads.
8702 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8704 * mono-config.c: also load the .config file in the directory
8705 where the assembly was found.
8707 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
8709 * assembly.c: load per-assembly config files.
8710 * icall.c: decrapified code to get the config dir and moved to
8712 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
8713 per-assembly config files. When doing a dll map lookup give precedence
8714 to the per-assembly data.
8716 2004-04-14 Martin Baulig <martin@ximian.com>
8718 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
8719 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
8720 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
8722 * mono-debugger-debugger.c: While the debugger is locked, remember
8723 whether the symbol tables have changes and send one single
8724 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
8726 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
8728 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
8730 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
8733 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
8734 account when marshalling string arrays. Fixes #56965.
8736 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
8738 * icall.c: Add new icalls mapping for security.
8739 * security.c|h: Add internal calls for WindowsIdentity,
8740 WindowsImpersonationContext and WindowsPrincipal.
8742 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
8744 * class.c: Added comment to ensure the System.MonoDummy class
8745 is removed when no longer necessary
8747 2004-04-13 Miguel de Icaza <miguel@ximian.com>
8749 * appdomain.c: Pass arguments to the bootstraping exceptions to
8750 minimize JITed methods at boot
8752 * metadata.c (mono_exception_from_name_two_strings): Allow for the
8753 second string to be null.
8755 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
8756 Change the protocol to minimize the JIT methods at startup. Now
8757 it Returns the internal codepage, if the value of "int_code_page"
8758 is 1 at entry, and we can not compute a suitable code page
8759 number, returns the code page as a string.
8761 2004-04-13 Jackson Harper <jackson@ximian.com>
8763 * culture-info-tables.h: Fix number of decimal digits for all
8766 2004-04-13 Jackson Harper <jackson@ximian.com>
8768 * icall.c: Clairfy out of sync error message. It is not always
8769 your corlib that is out of sync.
8771 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
8773 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
8774 properties when only the set accessor is overriden. Fixes #55874.
8776 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
8778 * assembly.c (mono_assembly_load_references): Make this thread safe.
8781 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
8783 * monosn.c: Add missing initialization calls.
8785 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
8788 ves_icall_System_Globalization_CultureInfo_construct_number_format
8789 Fix g_assert so it compiles on fussier compilers re int/ptr
8792 2004-04-08 Dick Porter <dick@ximian.com>
8795 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
8796 53992. Also rearrange the code so that the internal calls return
8797 an error value and exceptions are thrown from managed code.
8799 * icall.c: Add type info to the socket icalls.
8801 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8803 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
8806 2004-04-07 Martin Baulig <martin@ximian.com>
8808 * class.c (mono_class_from_generic_parameter): Don't default
8809 `klass->parent' to `mono_defaults.object_type'.
8811 2004-04-07 Martin Baulig <martin@ximian.com>
8813 * reflection.c (mono_reflection_initialize_generic_parameter): Set
8814 `param->pklass->reflection_info'.
8816 2004-04-07 Jackson Harper <jackson@ximian.com>
8818 * culture-info-tables.h: Fix date separator symbol.
8820 2004-04-07 Martin Baulig <martin@ximian.com>
8822 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
8823 from System.Type to System.MonoType.
8825 2004-04-07 Martin Baulig <martin@ximian.com>
8828 (MonoReflectionGenericParam): Added `has_reference_type' and
8829 `has_value_type' fields.
8831 * reflection.c (mono_image_get_generic_param_info): Encode the
8832 correct flags if we have the `class' or `struct' constraint.
8834 2004-04-07 Martin Baulig <martin@ximian.com>
8837 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
8839 2004-04-07 Jackson Harper <jackson@ximian.com>
8841 * appdomain.c: Revert extra patches, just wanted to bump the
8844 2004-04-07 Jackson Harper <jackson@ximian.com>
8846 * Makefile.am: Add culture-info private headers.
8847 * icall.c: Add new icalls for contructing locales.
8848 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
8849 * locales.h: Declare new culture info construction methods.
8850 * object.h: Add new fields used to avoid the CultureMap to
8852 * culture-info.h: Definition of structs used in the culture info
8854 * culture-info-tables.h: Autogenerated tables that contain culture
8855 info data. This file was generated with the locale-builder tool.
8856 * appdomain.c: Incement corlib version number.
8858 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
8860 * appdomain.c: (mono_runtime_init) move mono_thread_init
8861 to before mono_object_new calls so critical sections
8862 are initialized before use.
8864 2004-04-07 Martin Baulig <martin@ximian.com>
8867 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
8868 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
8869 (ves_icall_MonoGenericParam_initialize): Removed.
8870 (monogenericparam_icalls): Removed.
8871 (generictypeparambuilder_icalls): Added new table for
8872 System.Reflection.Emit.GenericTypeParameterBuilder.
8875 (mono_reflection_define_generic_parameter): Removed.
8876 (mono_reflection_initialize_generic_parameter): This is now called
8877 from GenericTypeParameterBuilder's .ctor.
8879 2004-04-06 Martin Baulig <martin@ximian.com>
8881 * class.c (mono_class_init): Don't inflate nested classes in a
8883 (mono_type_get_name_recurse): Include the generic arguments for
8884 generic instances and generic type declarations.
8885 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
8886 (_mono_class_get_instantiation_name): Removed.
8887 (mono_class_create_generic): Always use `gklass->name' as our name.
8889 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
8891 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
8892 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
8893 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
8894 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
8895 closed generic methods here.
8898 (mono_reflection_generic_inst_get_nested_types): Removed.
8899 (inflate_mono_method): Copy the generic parameters from the
8900 MonoMethodHeader into out MonoGenericMethod.
8902 2004-04-06 Martin Baulig <martin@ximian.com>
8905 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
8907 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
8909 * reflection.c (build_compressed_metadata): If we have any entries
8910 in the GenericParam, MethodSpec or GenericParamConstraint tables,
8911 set the header version to 1.1.
8913 2004-04-06 Martin Baulig <martin@ximian.com>
8915 * class.c (mono_class_init): If we're a generic instance,
8916 initialize our nested classes, too.
8917 (_mono_class_get_instantiation_name): Deal with the new `!%d'
8920 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8922 * process.c: quote the argument passed to the shell on windows.
8924 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
8926 * threads.c (mono_alloc_special_static_data): Allow this to be
8927 called during startup.
8929 2004-04-02 Martin Baulig <martin@ximian.com>
8932 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
8934 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
8936 * icall.c: Fix build.
8938 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
8940 * Makefile.am: Added security.c|h.
8941 * icall.c: Added icall for get_UserName;
8942 * security.c: New file for security related icalls. Added function
8943 get_UserName for System.Environment (fix #56144).
8944 * security.h: New. Header file for security.c
8946 2004-04-02 Dick Porter <dick@ximian.com>
8948 * icall.c: Deleted the icalls that were obsoleted some time ago
8949 by the ICU string code, and which were mixed into the icall
8950 rearranging. Fixes bug 55969.
8953 * string-icalls.c: Deleted the code that those icalls reference.
8955 2004-04-01 Martin Baulig <martin@ximian.com>
8957 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
8959 * class.c (mono_class_from_generic_parameter): Don't set
8960 TYPE_ATTRIBUTE_INTERFACE.
8961 (my_mono_class_from_generic_parameter): Likewise.
8963 2004-04-01 Martin Baulig <martin@ximian.com>
8965 * loader.c (find_method): Added an optional `MonoClass *ic'
8966 argument to search in a specific interface.
8967 (mono_get_method_constrained): New public function.
8969 2004-04-01 Martin Baulig <martin@ximian.com>
8971 * reflection.c (mono_image_get_generic_field_token): Use the
8972 `handleref' cache here.
8974 2004-04-01 Martin Baulig <martin@ximian.com>
8976 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
8978 * reflection.c (create_generic_typespec): Use the `typespec' hash
8979 here, not the `typeref' one.
8981 2004-04-01 Martin Baulig <martin@ximian.com>
8983 * class.c (mono_class_inflate_generic_type): Moved the
8984 functionality into a new static inflate_generic_type() which
8985 returns NULL if it didn't do anything. Only increment the
8986 `mono_stats.inflated_type_count' if we actually inflated
8988 (mono_class_get_full): Check the classes type to see whether we
8989 need to inflate it; also inflate MONO_TYPE_(M)VAR.
8991 2004-04-01 Jackson Harper <jackson@ximian.com>
8993 * reflection.c: Set culture for assembly references.
8995 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
8997 * reflection.[ch], icall.[ch], Fix support for pinning variables.
8999 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9002 (do_mono_assembly_open): the critical section also covers
9003 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
9005 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9008 (mono_manage_threads): abort the background threads when finishing.
9011 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9013 * gc.c: only close the done_event handle if there was no timeout.
9016 2004-03-30 Martin Baulig <martin@ximian.com>
9018 * icall.c (icall_entries): It's called "System.Activator", not
9019 "System.Activation".
9021 2004-03-30 Martin Baulig <martin@ximian.com>
9023 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
9024 (mono_class_create_from_typespec): Likewise.
9026 2004-03-30 Martin Baulig <martin@ximian.com>
9028 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
9029 `has_ctor_constraint' and `initialized'.
9031 2004-03-30 Martin Baulig <martin@ximian.com>
9033 * reflection.c (encode_new_constraint): New static function to add
9034 the constructor constraint attribute to a type parameter.
9035 (encode_constraints): Call encode_new_constraint() if necessary.
9038 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
9040 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
9042 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
9044 * reflection.c, icall.c: add support for pinning variables.
9046 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
9048 * marshal.c (mono_marshal_get_managed_wrapper):
9049 init bool local with zero rather than null.
9051 2004-03-29 Martin Baulig <martin@ximian.com>
9053 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
9054 the "official" behavior here.
9055 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
9057 2004-03-29 Martin Baulig <martin@ximian.com>
9059 * icall.c: Reflect latest API changes.
9061 2004-03-29 Martin Baulig <martin@ximian.com>
9063 * loader.c (mono_get_method_from_token): Also call
9064 mono_metadata_load_generic_params () for abstract and interface
9065 methods; replace the type arguments in the method signature with
9066 the ones which are loaded from the metadata.
9068 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
9070 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
9071 of the lock is not the current thread. MS.NET don't do it, in spite of
9072 what the documentation says. See bug #56157.
9074 2004-03-28 Martin Baulig <martin@ximian.com>
9076 * class.c (mono_class_init): Don't call init_properties() and
9077 init_events() for generic instances; set `prop->parent' when
9078 inflating properties.
9080 * reflection.c (mono_generic_inst_get_object): Call
9081 `mono_class_init (ginst->klass)'.
9082 (mono_type_get_object): Only create a MonoGenericInst if your
9083 generic type is a TypeBuilder.
9084 (do_mono_reflection_bind_generic_parameters): Only set
9085 `ginst->is_dynamic' if our generic type is a TypeBuilder.
9087 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
9089 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
9092 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9094 * icall.c: added Kill_internal icall.
9095 * process.[ch]: added Kill_internal icall.
9097 2004-03-25 Martin Baulig <martin@ximian.com>
9099 * class.h (MonoStats): Added `generic_instance_count',
9100 `inflated_method_count', `inflated_type_count' and
9101 `generics_metadata_size'.
9103 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9105 * reflection.c: no warnings now.
9107 2004-03-25 Martin Baulig <martin@ximian.com>
9109 * class.c (mono_class_get_full): New public function; does a
9110 mono_class_get(), but also takes a `MonoGenericContext *'.
9112 * loader.c (mono_field_from_memberref): Renamed to
9113 `field_from_memberref', made static and added `MonoGenericContext *'
9115 (mono_field_from_token): Added `MonoGenericInst *' argument.
9116 (method_from_memberef): Likewise.
9117 (mono_get_method_from_token): Likewise.
9118 (mono_get_method_full): New public function; does a
9119 mono_get_method(), but also takes a `MonoGenericContext *'.
9121 * verify.c (mono_method_verify): Get the method's generic context
9122 and pass it to mono_field_from_token(), mono_get_method_full() and
9123 mono_class_get_full().
9125 2004-03-25 Martin Baulig <martin@ximian.com>
9127 * class.c (mono_class_inflate_generic_type): Take a
9128 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
9129 `MonoGenericMethod *'.
9131 2004-03-25 Martin Baulig <martin@ximian.com>
9133 * loader.h (MonoMethodInflated): Store the MonoGenericContext
9134 instead of the MonoGenericMethod here.
9136 2004-03-25 Martin Baulig <martin@ximian.com>
9138 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
9139 each time we create a new MonoGenericInst, we also create a new
9140 context which points back to us.
9142 * class.c (inflate_method): Use `ginst->context' instead of
9143 creating a new context.
9145 * loader.c (method_from_memberref): Use
9146 `klass->generic_inst->context' instead of creating a new context.
9148 2004-03-25 Martin Baulig <martin@ximian.com>
9150 * class.h (MonoGenericContext): New struct.
9151 (MonoGenericMethod): Removed `generic_inst'.
9153 * class.c (mono_class_inflate_generic_method): Take a
9154 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
9156 2004-03-25 Martin Baulig <martin@ximian.com>
9158 * loader.h (MonoMethodInflated): New typedef.
9160 * metadata.h (MonoMethodSignature): Removed `gen_method', make
9161 `generic_param_count' consume just 30 bits, added `is_inflated'
9162 and `has_type_parameters' flags (one bit each).
9164 * class.c (mono_class_inflate_generic_method): Create a
9165 MonoMethodInflated instead of a MonoMethodNormal and set
9166 `is_inflated' in the method signature.
9168 * class.h (MonoGenericMethod): Removed `generic_method'.
9170 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
9172 * image.c: Make sure the name of a MonoImage is always an absolute path.
9173 This fixes bug #54415.
9175 2004-03-24 Martin Baulig <martin@ximian.com>
9177 * class.c (mono_class_setup_vtable): If we're a generic instance,
9178 use our generic type's vtable size.
9180 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
9182 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
9183 MONO_NO_UNLOAD env var as a temporary workaround for unloading
9186 2004-03-23 Martin Baulig <martin@ximian.com>
9188 * class.h (MonoDynamicGenericInst): Added `int count_events' and
9189 `MonoEvent *events'.
9191 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
9192 (typebuilder_icalls): Added "get_event_info"; calls
9193 mono_reflection_event_builder_get_event_info().
9195 * reflection.c (mono_reflection_generic_inst_initialize): Added
9196 `MonoArray *events'.
9197 (mono_reflection_event_builder_get_event_info): New function.
9199 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
9201 * object.h: add mono_type_initialization_init
9203 * object.c (mono_runtime_class_init):
9204 implement class constructor synchronization rules
9205 to cope with threading issues.
9206 add mono_type_initialization_init
9208 * appdomain.c (mono_runtime_init): call
9209 mono_type_initialization_init
9211 * class.h: removing initializing field from MonoVTable
9213 2004-03-23 Martin Baulig <martin@ximian.com>
9215 * class.c (my_mono_class_from_generic_parameter): Use
9216 `param->name' if it's not NULL.
9218 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
9220 * class.c: do not insert non-virtual methods in the vtable.
9221 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
9222 that means the method is non-virtual. This never would have
9225 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
9227 * profiler.c: Added lock for accessing coverage_hash.
9229 2004-03-22 Martin Baulig <martin@ximian.com>
9231 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
9232 `method->method->signature->generic_param_count != 0' to make it
9233 work for interface methods.
9235 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9237 * process.c: quote the string passed to the shell using g_shell_quote.
9239 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9242 (mono_threads_manage): don't remove the finalizer thread and self
9243 from the threads hash table so that mono_thread_manage can be called
9246 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9248 * process.c: quote the arguments when UseShellExecute is true. Fixes
9251 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9253 * threads.c: set mono_thread_detach as a cleanup routine for every
9254 thread. This way it's always executed upon thread termination, either
9255 aborted or finished normally. No more xsp hangs!
9257 2004-03-17 Martin Baulig <martin@ximian.com>
9259 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
9260 `int count_nested' and a `MonoType **nested'.
9262 * reflection.c (mono_reflection_bind_generic_parameters): Moved
9263 most of the functionality into a new static
9264 do_mono_reflection_bind_generic_parameters() and don't take a
9265 `MonoType *nested_in' argument any more. Don't compute nested
9267 (mono_reflection_generic_inst_get_nested_types): New public method
9268 to get nested types.
9270 * class.c (mono_class_create_generic): Set `klass->nested_in' if
9271 we're a nested class.
9273 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
9274 mono_reflection_generic_inst_get_nested_types() to compute the
9277 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
9279 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
9280 descriptive error message under windows.
9282 2004-03-17 Martin Baulig <martin@ximian.com>
9284 * class.c (dup_type): Added `const MonoType *original' argument;
9285 copy the attrs from the original type.
9287 2004-03-17 Martin Baulig <martin@ximian.com>
9289 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
9290 `m->generic_inst_cache' here.
9292 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
9294 * exception.h exception.c: Add stack_overflow_exception.
9296 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9299 (overlapped_callback): call SetEvent *after* invoking the callback.
9300 No need to call CloseHandle.
9302 2004-03-16 Martin Baulig <martin@ximian.com>
9304 * reflection.c (mono_image_get_fieldref_token): Take a
9305 `MonoReflectionField *' instead of a `MonoClassField *' and a
9306 `MonoClass *'; store the `MonoReflectionField *' in the hash.
9308 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9310 * appdomain.c: don't add the culture to the filename we're looking for
9311 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
9313 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9315 * locales.c: don't ignore symbols when doing case insensitive compares.
9316 Thanks Dick! Fixes bug #54046.
9318 * threads.c: surround 'threads' usage with enter/leave in
9321 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
9323 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
9324 implicitly marshalled as [Out]. Fixes #55450.
9326 (mono_marshal_get_runtime_invoke): Zero out the result if there is
9329 2004-03-16 Martin Baulig <martin@ximian.com>
9331 * class.c (mono_class_from_generic_parameter): Use the actual
9334 2004-03-16 Martin Baulig <martin@ximian.com>
9336 * reflection.c (type_get_signature_size): New static function.
9337 Compues the size of the type in a method signature.
9338 (method_get_signature_size): New static function; calls
9339 type_get_signature_size() to compute the actual size of the
9341 (method_encode_signature): Use method_get_signature_size() to get
9342 the signature's size rather than using `nparams * 10'.
9344 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9346 * file-io.h: define here WapiOverlapped on windows. I don't want the
9347 regular OVERLAPPED one.
9350 * threadpool.c: somehow, BindIoCompletionCallback is not found.
9351 Disabling AIO on windows.
9353 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9355 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
9358 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9360 * appdomain.c: upgraded corlib version.
9362 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
9363 and BeginWrite. Allow opening files for asynchrnous operations.
9365 * file-io.h: new struct that maps FileStreamAsyncResult.
9366 * icall.c: added new icalls.
9367 * process.[ch]: support setting child process environment variables
9368 and use the SHELL or COMSPEC when UseShellExecute is true.
9370 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
9371 callback for async. IO is here and also BindHandle.
9373 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
9376 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
9378 * reflection.c (create_custom_attr): Allow len == 0.
9380 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
9381 computation on big-endian machines.
9383 2004-03-13 Martin Baulig <martin@ximian.com>
9385 * class.h (MonoGenericInst): Added `int count_ifaces'.
9387 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
9388 `ginst->count_ifaces' instead `klass->interface_count' since we
9389 may get called before the vtable is created.
9391 * loader.c (mono_method_get_param_names): If we're a generic
9392 instance, return and don't initialize the class.
9394 * reflection.c (mono_reflection_setup_generic_class): Don't call
9395 ensure_runtime_vtable().
9396 (mono_reflection_bind_generic_parameters): Set
9397 `ginst->count_ifaces'.
9399 2004-03-11 Jackson Harper <jackson@ximian.com>
9403 * unicode.h: Remove unused System.Char icalls.
9405 2004-03-11 Miguel de Icaza <miguel@ximian.com>
9407 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
9408 code when we P/Invoke the first library in Windows.Forms, instead
9409 of when we first open the assembly.
9411 * assembly.c: Drop the lookup from here.
9413 2004-03-10 Martin Baulig <martin@ximian.com>
9415 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
9416 class for properties, fields and events. Finally fixes #54945.
9418 2004-03-10 Martin Baulig <martin@ximian.com>
9420 * metadata.c (mono_metadata_class_equal): New static function;
9421 checks whether two generic instances or two generic parameters are
9423 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
9426 2004-03-10 Martin Baulig <martin@ximian.com>
9428 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
9430 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
9431 argument and write it into the `reflection_info' field.
9434 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
9435 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
9437 2004-03-09 Jackson Harper <jackson@ximian.com>
9439 * char-conversions.h: use 8 bits for numeric data its all we need
9440 * icall.c: numeric data is only 8 bits now.
9442 2004-03-09 Martin Baulig <martin@ximian.com>
9444 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
9446 * class.c (init_properties, init_events): Initialize the new
9449 * reflection.c (typebuilder_setup_properties): Likewise.
9450 (typebuilder_setup_events): Likewise.
9452 * reflection.h (MonoEventInfo): Replaced `parent with
9453 `declaring_type' and `reflected_type'.
9455 * icall.c (ves_icall_get_property_info): Distinguish between
9456 declaring and reflected type.
9457 (ves_icall_get_event_info): Likewise.
9459 2004-03-09 Martin Baulig <martin@ximian.com>
9461 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
9462 (ves_icall_Type_GetField): Correctly set field->klass.
9464 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
9466 * loader.h: Fix warning.
9468 2004-03-08 Miguel de Icaza <miguel@ximian.com>
9470 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
9471 library routine if present. Notice that it will still continue
9472 executing even if its missing, for those working on the Gtk#
9473 edition of Windows.Forms.
9475 * assembly.c (do_mono_assembly_open): If loading the
9476 System.Windows.Forms call mono_loader_wini_init.
9478 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
9480 * class.h: Added MonoRemoteClass struct.
9481 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
9482 function for MonoStrings.
9483 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
9484 Added internal call for getting the proxy type.
9485 * marshal.c: Get the type of transparent proxies from its remote_class.
9486 Added methods that generate the IL for type checks and casts:
9487 mono_marshal_get_isinst, mono_marshal_get_castclass,
9488 mono_marshal_get_proxy_cancast.
9489 * marshal.h: Declaration of the previous new methods.
9490 * object.c: Added new moethods for creating and updating MonoRemoteClass
9491 instances: mono_remote_class, mono_upgrade_remote_class,
9492 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
9493 * verify.c: FIx transparent_proxy_fields layout.
9494 * appdomain.c: Bump corlib version.
9496 2004-03-04 Jackson Harper <jackson@ximian.com>
9498 * icall.c: Add icall to access char conversion tables.
9499 * char-conversions.h: Character conversion tables.
9500 * Makefile.am: Add char-conversions.h private header file.
9502 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
9504 * appdomain.c (unload_thread_main): Increase unloading timeout to
9505 10 sec as a temporary workaround for Nant problems.
9507 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
9509 * gc.c: Add checks for GC_enable and GC_disable.
9511 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
9512 (jaak@zd.com.pl). Fix memory corruption in String.Replace
9515 2004-02-27 Martin Baulig <martin@ximian.com>
9517 * reflection.c (mono_reflection_bind_generic_parameters): Take a
9518 `MonoReflectionType *' instead of a `MonoType *'.
9520 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
9522 * gc.c (run_finalize): Avoid finalizing the object representing the
9524 (finalizer_thread): Fix warning.
9526 2004-02-25 Martin Baulig <martin@ximian.com>
9528 * class.c (_mono_class_get_instantiation_name): Added `int offset'
9529 argument for nested types.
9530 (mono_class_create_generic): Added support for nested generictypes.
9532 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
9535 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
9537 * reflection.c (method_encode_signature): Increase the minimum
9538 value of `size' from 10 to 11.
9539 (mono_reflection_bind_generic_parameters): Take `int type_argc'
9540 and `MonoType **types' arguments instead of the `MonoArray
9541 *types'; added `MonoType *nested_in'. Recursively instantiate
9544 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
9546 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
9547 stack_overflow_ex members which are used by exception handling.
9549 * appdomain.c (mono_runtime_init): Initialize the new members.
9551 * gc.c (mono_gc_enable): New helper function.
9552 * gc.c (mono_gc_disable): New helper function.
9554 2004-02-23 Martin Baulig <martin@ximian.com>
9556 * icall.c: I must have been really stupid - make it actually work
9559 2004-02-23 Martin Baulig <martin@ximian.com>
9561 * loader.c (method_from_memberref): Only inflate the method if
9562 it's in another klass.
9564 2004-02-23 Martin Baulig <martin@ximian.com>
9566 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
9567 (mono_class_init): If we're a generic instance and an interface,
9568 compute `class->interface_id'; also create `class->interfaces'
9569 here and inflate them.
9571 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
9573 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
9575 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
9577 2004-02-15 Miguel de Icaza <miguel@ximian.com>
9579 * reflection.c (method_encode_code): Improved the error message
9580 generated by the exception.
9582 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9584 * icall.c: Martin did not do what he said in the ChangeLog for
9585 2004-02-18, but put back the changes for properties and events.
9586 Commenting those changes out again and adding comment to bug #54518.
9588 * process.c: removed warning.
9590 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
9592 * marshal.c (emit_struct_conv): Print an error message instead of
9593 asserting when a type does not have the StructLayout attribute.
9595 2004-02-20 Martin Baulig <martin@ximian.com>
9597 * reflection.c (mono_type_get_object): Also use the cache for
9599 (mono_reflection_bind_generic_parameters): Always compute
9602 2004-02-20 Martin Baulig <martin@ximian.com>
9604 * class.h (MonoGenericMethod): Removed `klass'.
9606 * class.c (mono_class_inflate_generic_method): Added `MonoClass
9609 2004-02-20 Martin Baulig <martin@ximian.com>
9611 * reflection.c (method_encode_methodspec): Actually use the
9612 uninflated signature for the memberref.
9614 2004-02-20 Martin Baulig <martin@ximian.com>
9616 * class.h (MonoGenericMethod): Removed `declaring'.
9618 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
9619 is NULL, compute it here.
9621 2004-02-20 Martin Baulig <martin@ximian.com>
9623 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
9625 * metadata.c (mono_metadata_generic_inst_hash): New method.
9626 (mono_metadata_generic_inst_equal): New method.
9628 * reflection.c (mono_reflection_bind_generic_parameters): Use the
9629 `klass->image->generic_inst_cache' cache to avoid creating
9630 duplicate MonoGenericInst's.
9632 * class.c (mono_class_inflate_generic_type): Use the cache.
9634 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
9636 * object.c: fixed gc descriptor calculation for embedded valuetypes.
9638 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9640 * icall.c: added Socket.WSAIoctl icall.
9642 * socket-io.[ch]: implemented
9643 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
9645 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
9647 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
9649 2004-02-18 Urs C Muff <umuff@quark.com>
9651 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
9652 this work on PPC and other big-endian architectures.
9654 * debug-mono-symfile.h: Prepended the names of all the `guint32'
9655 fields with an underscore to make sure they're only accessed by
9658 2004-02-18 Martin Baulig <martin@ximian.com>
9660 * icall.c: Put the klass->refclass changes back for methods and
9661 fields, but not for properties and events. We're currently not
9662 distinguishing between DeclaringType and ReflectedType for
9663 properties and events, that's what caused the regressions.
9665 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9668 (mono_async_result_new): the handle can be NULL.
9670 * threadpool.c: Use an event instead of a semaphore, don't initialize
9671 it until needed. This saves quite a few semaphores from being created
9672 when using the threadpool.
9674 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
9676 * object.c (mono_string_is_interned_lookup): Fix interning of long
9677 strings. Fixes #54473.
9679 * domain.c (ldstr_equal): Optimize if the two strings are equal.
9681 * icall.c: Revert the klass->refclass changes since they introduce
9682 regressions (bug #54518).
9684 2004-02-18 Martin Baulig <martin@ximian.com>
9686 * class.c (mono_class_init): If we're a generic instance and don't
9687 come from a TypeBuilder, inflate our members here.
9688 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
9689 (mono_class_create_generic): New public method.
9690 (mono_class_initialize_generic): Removed.
9691 (get_instantiation_name): Renamed to
9692 _mono_class_get_instantiation_name() and made it public.
9694 2004-02-18 Martin Baulig <martin@ximian.com>
9696 * class.c (mono_class_inflate_generic_type): Clear the new
9697 instance's `nginst->klass' when inflating a generic instance.
9698 (mono_class_is_subclass_of): Added (basic) support for generic
9701 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
9703 * appdomain.h, domain.c: use a MonoCodeManager instead of a
9704 MonoMempool to hold compiled native code.
9706 2004-02-17 Martin Baulig <martin@ximian.com>
9708 * class.h (MonoDynamicGenericInst): Added `count_properties' and
9711 * reflection.c (mono_reflection_generic_inst_initialize): Added
9712 `MonoArray *properties' argument.
9714 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
9716 2004-02-17 Martin Baulig <martin@ximian.com>
9718 * icall.c (ves_icall_Type_GetFields): Renamed to
9719 ves_icall_Type_GetFields_internal() and added a
9720 `MonoReflectionType *rtype' argument; pass it to
9721 mono_field_get_object() to set the field's "reflected" type.
9722 (ves_icall_Type_GetConstructors): Likewise.
9723 (ves_icall_Type_GetEvents): Likewise.
9724 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
9725 argument; pass it to mono_method_get_object() to set the method's
9728 2004-02-17 Martin Baulig <martin@ximian.com>
9730 * class.h (MonoDynamicGenericInst): New type.
9731 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
9733 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
9734 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
9735 (ves_icall_MonoGenericInst_GetFields): New interncall.
9737 * class.c (mono_class_from_generic): Don't call
9738 mono_class_initialize_generic() if this is a dynamic instance;
9739 ie. it's being created from a TypeBuilder.
9740 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
9741 `class->byval_arg.type'.
9743 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
9744 to `inflate_method' and made static.
9745 (mono_reflection_inflate_field): Removed.
9746 (mono_reflection_generic_inst_initialize): New public method.
9748 * reflection.h (MonoReflectionGenericInst): Removed `methods',
9749 `ctors' and `fields'; added `initialized'.
9751 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
9753 * debug-helpers.c (mono_method_full_name): Fix output for empty
9756 2004-02-12 Martin Baulig <martin@ximian.com>
9758 * class.h (MonoClassField): Added `MonoType *generic_type'.
9760 * reflection.c (mono_image_get_fieldref_token): Added support for
9761 instantiated generic types.
9762 (field_encode_inflated_field): Removed.
9763 (mono_image_get_inflated_field_token): Removed.
9764 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
9766 * reflection.h (MonoReflectionInflatedField): Removed.
9768 2004-02-12 Martin Baulig <martin@ximian.com>
9770 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
9771 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
9773 * reflection.c (mono_image_get_methodspec_token): Take a
9774 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
9775 (mono_image_create_token): Check whether we have a
9776 `method->signature->gen_method' and call
9777 mono_image_get_methodspec_token() if appropriate.
9778 (inflated_method_get_object): Removed.
9779 (mono_reflection_bind_generic_method_parameters): Return a
9780 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
9781 (mono_reflection_inflate_method_or_ctor): Likewise.
9783 * reflection.h (MonoReflectionInflatedMethod): Removed.
9785 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
9787 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
9788 for custom valuetype marshalling.
9790 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
9792 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9794 * icall.c: fixed WSAGetLastError_internal name.
9796 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
9798 * threads.c (mono_thread_attach): Allow this to be called multiple
9801 * threads.c (build_wait_tids): Do not wait for ourselves.
9803 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
9804 appdomain list is empty.
9806 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
9807 memory returned by mono_string_builder_to_utf16, since it points into
9808 managed memory. Thanks to Bernie Solomon for noticing this.
9810 * icall.c: Add AppDomainSetup icalls.
9812 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
9814 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
9817 * reflection.c (reflection_methodbuilder_to_mono_method): Save
9818 custom attributes to the method_aux struct. Also fix array indexes etc.
9820 * loader.c (mono_method_get_param_names): Make dynamic case work again.
9822 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
9824 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
9825 (both static and runtime) and reduce startup time.
9827 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
9829 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
9830 AsAny marshalling conversion instead of crashing.
9832 * marshal.c: Fix warnings.
9834 2004-02-09 Martin Baulig <martin@ximian.com>
9836 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
9838 * reflection.h (MonoReflectionInflatedMethod): Removed the
9839 `declaring' field, it's now in the unmanaged MonoGenericMethod.
9841 * reflection.c (method_encode_methodspec): Removed the `method'
9842 argument; we get it from `gmethod->declaring'.
9843 (inflated_method_get_object): Removed the `declaring' argument.
9845 2004-02-09 Martin Baulig <martin@ximian.com>
9847 * class.h (MonoGenericMethod): New type.
9848 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
9851 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
9852 a `MonoGenericMethod *gen_method' one.
9854 * class.c (mono_class_inflate_generic_type): Take an additional
9855 `MonoGenericMethod * argument. This is only non-NULL if we're
9856 inflating types for a generic method.
9857 (mono_class_inflate_generic_signature): Renamed to
9858 inflate_generic_signature() and made static; take a
9859 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
9860 (inflate_generic_header): Take a `MonoGenericMethod *' argument
9861 instead of a `MonoGenericInst *' one.
9862 (mono_class_inflate_generic_method): Likewise.
9864 * reflection.c (encode_generic_method_sig): Take a
9865 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
9866 (method_encode_methodspec): Likewise.
9867 (inflated_method_get_object): Likewise.
9869 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
9870 field with a `MonoGenericMethod *gmethod' one.
9872 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
9874 * class.h (mono_class_has_parent): add parens to expansion
9877 2004-02-08 Martin Baulig <martin@ximian.com>
9879 * image.h (MonoImage): Removed `generics_cache'.
9881 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
9882 instead of a `MonoType *' argument; removed the `inflate_methods'
9883 argument. Don't inflate methods here.
9885 * loader.c (find_method): If it's a generic instance, call
9886 mono_class_init() on the `sclass->generic_inst->generic_type'.
9888 * metadata.c (mono_type_size): Make this work on uninitialized
9889 generic instances; call it on the `ginst->generic_type's class.
9891 * reflection.c (mono_reflection_bind_generic_parameters): Call
9892 mono_class_from_generic() to create the `ginst->klass'.
9894 2004-02-08 Martin Baulig <martin@ximian.com>
9896 * class.h (MonoClass): Changed type of `generic_inst' from
9897 `MonoType *' to `MonoGenericInst *'.
9899 2004-02-08 Martin Baulig <martin@ximian.com>
9901 * icall.c (ves_icall_Type_BindGenericParameters): Just call
9902 mono_type_get_object(), this is now creating a `MonoGenericInst'
9903 for MONO_TYPE_GENERICINST.
9904 (ves_icall_MonoGenericInst_GetParentType): Likewise.
9905 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
9907 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
9908 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
9909 (inflated_method_get_object): Added `MonoClass *refclass' argument.
9910 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
9913 * reflection.h (MonoReflectionInflatedMethod): Removed
9914 `declaring_type' and `reflected_type'.
9916 2004-02-08 Martin Baulig <martin@ximian.com>
9918 * class.h (MonoGenericInst): Added `MonoType *parent' and
9919 `MonoType **ifaces'.
9921 * reflection.h (MonoReflectionGenericInst): Removed `klass',
9922 `parent' and `interfaces'.
9924 * reflection.c (mono_reflection_bind_generic_parameters): Take a
9925 `MonoType *' argument and return a `MonoType *'.
9928 (ves_icall_MonoGenericInst_GetParentType): New interncall.
9929 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
9931 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
9933 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
9934 valuetype marshalling.
9936 2004-02-06 Martin Baulig <martin@ximian.com>
9939 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
9940 (my_mono_class_from_generic_parameter): Likewise.
9942 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
9944 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
9945 contents of the symbol files lazily.
9947 * object.h (MonoThread): Add 'name' and 'name_len' fields.
9949 * threads.h threads.c icall.c: New icalls for getting and setting the
9952 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
9954 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
9955 Raise an exception when the domain is not found.
9957 2004-02-03 Martin Baulig <martin@ximian.com>
9959 * reflection.c (mono_image_get_methodspec_token): Use the
9960 uninflated signature; fixes gen-33.
9962 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
9964 * gc.c threads.c: Make the finalizer thread a normal managed thread so
9965 the finalizer code can use thread functionality.
9967 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
9968 the finalizer thread.
9970 * threads.c: Make some functions more robust.
9972 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
9974 * metadata.h: Add new marshalling conventions.
9976 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
9977 stringbuilder marshalling. Fixes #53700.
9979 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
9981 * reflection.c (mono_image_get_type_info): Save declarative security
9984 * reflection.c (mono_image_get_field_info): Handle uninitialized
9985 unmanaged fields as well.
9987 * appdomain.c: Bump corlib version.
9989 2004-02-01 Martin Baulig <martin@ximian.com>
9991 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
9992 method type arguments.
9994 2004-01-30 Duncan Mak <duncan@ximian.com>
9996 * marshal.h: Add prototype for
9997 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
9999 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
10002 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
10004 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
10005 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
10007 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
10009 * marshal.c (mono_marshal_get_native_wrapper): Add support for
10010 custom marshalling of valuetypes.
10012 * marshal.c: Fix some warnings.
10014 2004-01-29 Martin Baulig <martin@ximian.com>
10016 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
10017 for generic method parameters.
10019 * reflection.c (method_encode_methodspec): Write the uninflated
10020 signature into the methodspec table.
10021 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
10022 is always the uninflated method.
10023 (reflection_methodbuilder_to_mono_method): Copy the generic
10024 parameters from the MethodBuilder into `header->gen_params'.
10026 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
10028 * class.c (mono_class_from_generic_parameter): Fix warning.
10030 2004-01-27 Martin Baulig <martin@ximian.com>
10032 * class.c (mono_class_from_generic_parameter): Don't create
10033 `klass->methods' here.
10035 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
10037 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
10038 extension since it does not work with libraries named lib<FOO>.dll.so.
10040 2004-01-25 Martin Baulig <martin@ximian.com>
10042 * class.c (mono_class_inflate_generic_type): Added support for
10043 MONO_TYPE_GENERICINST.
10045 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
10046 inflate methods on open constructed types.
10048 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10050 * object.c: fire ProcessExit event in the root AppDomain after running
10051 Main. Fixes bug #53299.
10053 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10055 * socket-io.c: include the new socket-wrappers.h header.
10056 Use the wrappers instead of the unix socket functions to make the code
10059 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
10061 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
10063 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10066 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
10068 * reflection.c (mono_image_create_pefile): Handle the case when the
10069 entry point is not a MethodBuilder.
10071 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10072 field to ReflectionMethod since it is not allways a builder.
10074 * reflection.c (type_get_fully_qualified_name): New helper function to
10075 return the fully qualified name of a type.
10077 * reflection.c (encode_marshal_blob): Always emit the fully qualified
10078 type name for custom marshallers.
10080 * reflection.c (mono_marshal_spec_from_builder): Ditto.
10082 * class.c (mono_class_setup_vtable): If a parent class already
10083 implements an interface, use the implementing methods from that class.
10086 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10088 * threadpool.c: just return instead of ExitThread to allow for thread
10091 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
10093 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
10094 when closing resource modules.
10096 * reflection.c (mono_image_create_pefile): Handle the case when the
10097 entry point is not a MethodBuilder.
10099 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10100 field to ReflectionMethod since it is not allways a builder.
10102 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
10104 * marshal.c (mono_marshal_get_managed_wrapper):
10105 mono_marshal_alloc takes native int so CONV_I
10106 the arg for 64bits.
10108 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
10110 * reflection.c (fixup_cattrs): New function to fixup the methoddef
10111 tokens in the cattr table. Fixes #53108.
10113 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10115 * loader.c: don't trim ".dll" before looking up in the config file.
10116 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
10118 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
10120 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
10121 Return the module which contains the resource as well.
10122 (ves_icall_System_Reflection_Module_Close): New icall.
10124 * appdomain.c: Bump corlib version number.
10126 * image.c (mono_image_addref): New public function.
10128 * assembly.c: Call mono_image_addref.
10130 * reflection.c (mono_module_get_object): Increase reference count of
10133 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10136 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
10137 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
10138 proper exceptions on DllImport problems.
10140 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
10142 * class.c, metadata.c: eliminate CSIZE macro.
10144 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
10146 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
10147 * object.h: Added async_callback field in MonoAsyncResult.
10148 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
10149 * verify.c: Added async_callback in MonoAsyncResult layout.
10151 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
10153 * reflection.c (mono_reflection_get_custom_attrs): Add support
10156 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
10158 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
10160 (mono_marshal_method_from_wrapper): Add null pointer check.
10162 2004-01-16 Martin Baulig <martin@ximian.com>
10164 * debug-mono-symfile.h: Set version number to 36 and reflect
10165 latest symbol writer changes.
10167 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
10169 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
10170 multi-dimensional arrays.
10171 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
10172 (mono_class_from_mono_type): Use bounded_array_class_get.
10174 * class.c (mono_bounded_array_class_get): New function which takes
10175 a 'bounded' bool argument to distinguish vectors from one dimensional
10178 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
10179 bounded_array_class_get if the array has bounds.
10181 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10182 Search modules loaded using AssemblyBuilder:AddModule as well.
10184 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10186 * appdomain.c: increased corlib version.
10187 * filewatcher.c: removed g_print.
10189 (get_property_info): only allocate what is actually requested.
10190 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
10192 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10194 * Makefile.am: added filewatcher.[ch]
10195 * filewatcher.[ch]: FileSystemWatcher runtime support.
10196 * icall.c: added new FSW icalls.
10198 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10200 * string-icalls.c: fix stringbuilder regression as suggested by
10201 Iain McCoy <iain@mccoy.id.au>.
10203 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
10205 * process.c (process_read_stringtable_block): Recognize '007f' as
10206 a language neutral stringtable block.
10208 2004-01-12 Patrik Torstensson
10210 * object.h (MonoStringBuilder) : Changed layout to support our
10211 new stringbuilder class.
10212 * marshal.c: Change marshalling to support the new layout of
10214 * appdomain.c: increased version number because new layout of
10217 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
10219 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
10220 assembly name as an string instead of an AssemblyName, since it is
10221 easier to extract info from it.
10223 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
10224 the culture subdirectories too. Fixes #52231.
10226 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10228 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
10229 It takes 2 new parameters with an optional name for the method to look
10230 for and case ignoring info.
10232 * threadpool.c: removed unused variable.
10234 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10236 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
10237 It takes 2 new parameters with an optional name for the property to look
10238 for and case ignoring info.
10241 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
10243 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
10246 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10249 * assembly.c: escape the uri before passing it to g_filename_from_uri.
10252 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
10254 * reflection.c: Add support for more than one unmanaged resource.
10256 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
10257 in field->def_value, as done in all other cases.
10259 * reflection.c (mono_reflection_get_custom_attrs): Add support for
10262 * reflection.c (mono_reflection_create_runtime_class): Remove
10263 errorneous assignment to klass->element_class, since it is already
10264 done in mono_reflection_setup_internal_class.
10266 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10268 * gc.c: added missing LeaveCriticalSection.
10269 * icall.c: indented a couple of lines.
10270 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
10271 if we call EndInvoke inside a callback. Fixes bug #52601.
10273 2004-01-07 Martin Baulig <martin@ximian.com>
10275 * mono-debug-debugger.h
10276 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
10278 2004-01-06 Miguel de Icaza <miguel@ximian.com>
10280 * appdomain.c: Use messages in NotImplementedException.
10282 * exception.c (mono_get_exception_not_implemented): Now this takes
10283 a message argument.
10285 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
10286 exception instead of g_asserting an aborting when something is not
10289 Add some inline docs.
10291 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
10293 * reflection.h: Update after changes to object layout.
10295 * reflection.c: Implement saving of unmanaged aka win32 resources.
10297 * appdomain.c: Bump version number.
10299 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
10300 Handle missing domains gracefully.
10302 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
10304 * file-io.c : On Windows, there are much more invalid_path_chars.
10306 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10308 * class.h, object.c: prepare for GetType () speedup.
10310 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
10312 * profiler.c: workaround for --profile null reference exception on
10313 cygwin. Patch by Patrik Torstensson.
10315 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
10317 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
10318 make work for unaligned access.
10320 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
10322 * class.c: small cleanup (class->fields [i] -> field).
10323 * image.c: check address of metadata is valid.
10325 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
10327 * assembly.h assembly.c (mono_assembly_loaded): New public function to
10328 search the list of loaded assemblies.
10330 * reflection.c (mono_reflection_type_from_name): Use
10331 mono_assembly_loaded instead of mono_image_loaded.
10333 * reflection.c: Fix warnings.
10335 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
10337 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
10338 is dynamic. This is needed since an assembly can contain both dynamic and
10339 non-dynamic images.
10341 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
10344 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
10346 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
10347 to store modules loaded using AddModule.
10349 * reflection.c (mono_image_fill_file_table): Generalize this so it works
10352 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
10354 * reflection.c (mono_image_fill_export_table_from_module): New function to
10355 fill out the EXPORTEDTYPES table from a module.
10357 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
10358 into a separate function. Also handle loaded non-dynamic modules.
10360 * reflection.c (mono_image_basic_init): Fix memory allocation.
10362 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10364 * assembly.c (mono_assembly_load_references): Make this public.
10366 2003-12-19 Martin Baulig <martin@ximian.com>
10368 * class.c (mono_class_initialize_generic): Made this static, take
10369 a `MonoGenericInst *' instead of a `MonoClass *'.
10370 (mono_class_from_generic): Call mono_class_initialize_generic()
10371 unless we're already initialized or being called from
10372 do_mono_metadata_parse_generic_inst().
10374 * class.h (MonoGenericInst): Added `initialized' and
10375 `init_pending' flags.
10377 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
10378 `mono_class_init (gklass)' or mono_class_initialize_generic()
10379 here; set `generic_inst->init_pending' while parsing the
10382 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
10384 * locales.c: include string.h for memxxx prototypes
10386 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
10388 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
10389 constructor when accessing literal fields.
10391 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
10393 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10395 * reflection.c (assembly_add_resource_manifest): New function to fill
10396 the MANIFESTRESOURCE table.
10398 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
10400 * reflection.h: Update to changes in class layout.
10402 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
10403 Reenable call to mono_runtime_is_shutting_down ().
10405 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
10406 determine if the runtime is shutting down.
10408 2003-12-16 Jackson Harper <jackson@ximian.com>
10410 * icall.c: comment out call to mono_runtime_is_shutting_down to
10413 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
10415 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
10416 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
10418 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
10420 * reflection.c: move definition of swap_with_size
10421 to before its first call
10423 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
10425 * appdomain.c (mono_runtime_is_shutting_down): New public function.
10427 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
10430 * object.c: Fix warnings.
10432 * icall.c (ves_icall_Type_Get...): Only consider inherited static
10433 members if FlattenHierarchy is set.
10435 * reflection.c (mono_image_add_decl_security): New function to emit
10436 declarative security.
10438 * reflection.h reflection.c: Add support for declarative security.
10440 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
10442 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
10444 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
10446 * appdomain.c verify.c: Moved corlib version checking into its own
10447 function in appdomain.c since it needs to create vtables etc.
10449 2003-12-13 Patrik Torstensson <p@rxc.se>
10451 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
10452 instead of unwrapped server.
10454 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
10456 * verify.c (check_corlib): Fix field index.
10458 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
10460 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
10463 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
10465 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
10466 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
10467 cope with sizeof(size_t) != sizeof(guint32).
10469 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10471 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
10472 in case of failure.
10474 2003-12-10 Mark Crichton <crichton@gimp.org>
10476 * icall.c: removed the GetNonZeroBytes. We now handle this case
10479 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
10481 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
10483 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
10486 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
10488 * verify.c (check_corlib): Handle the case when the version field is
10489 initialized by a static constructor.
10491 2003-12-08 Patrik Torstensson <p@rxc.se>
10493 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
10495 2003-12-08 Martin Baulig <martin@ximian.com>
10497 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
10498 a MonoReflectionGenericParameter, also take the parameter index
10499 and name as arguments.
10500 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
10501 (ves_icall_MonoGenericParam_initialize): New interncall.
10502 (ves_icall_Type_make_byref_type): New interncall.
10504 * reflection.h (MonoReflectionGenericParam): Derive from
10505 MonoReflectionType, not just from MonoObject. Added `refobj' and
10508 * reflection.c (mono_reflection_define_generic_parameter): Create
10509 and return a new MonoReflectionGenericParam; don't initialize the
10511 (mono_reflection_initialize_generic_parameter): New public method;
10512 initializes the constraints and creates the `param->pklass'.
10514 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
10516 * reflection.h reflection.c: Use the new fields 'num_types',
10517 'num_fields' and 'num_methods' to track the number of types etc.
10519 * verify.c (check_corlib): Check corlib version number.
10521 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
10523 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
10524 function works on all methods.
10526 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
10528 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
10529 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
10530 the custom_type_info flag of the transparent proxy.
10531 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
10532 objects that supports IRemotingTypeInfo.
10533 * object.h: Added custom_type_info field in transparent proxy.
10535 2003-12-06 Martin Baulig <martin@ximian.com>
10537 * class.c (mono_class_create_from_generic): Removed.
10538 (mono_class_from_generic): Check `ginst->klass' before doing
10539 anything else. This is important to fully support "recursive"
10542 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
10543 empty `generic_inst->klass' before doing anything else.
10545 2003-12-06 Dick Porter <dick@ximian.com>
10550 * locales.c: Use C structs to access class fields. Don't do a
10551 conversion between MonoString and UChar because both are
10552 platform-endian UTF-16. Compare now takes startindex and count
10553 parameters. Add a char overload for IndexOf. Speed up the
10554 invariant string IndexOf.
10556 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
10558 * Makefile.am (monosn_LDADD): Fix parallel build.
10560 2003-12-04 Martin Baulig <martin@ximian.com>
10563 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10564 (ves_icall_Type_make_array_type): New interncall.
10566 2003-12-04 Martin Baulig <martin@ximian.com>
10568 * locales.c: also change it in the !HAVE_ICU case.
10570 2003-12-04 Dick Porter <dick@ximian.com>
10573 * locales.c: construct_compareinfo is now in CompareInfo, not
10576 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
10578 * image.c (mono_image_load_file_for_image): Cache loaded images in the
10579 image->files array.
10581 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
10584 * assembly.c (mono_assembly_load_references): Only load references
10587 * class.c (mono_class_from_name): Avoid linear search of the
10588 EXPORTEDTYPE table.
10590 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
10592 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
10594 * image.h (MonoImage): Add 'field_cache' field.
10596 * loader.c (mono_field_from_token): Cache field lookups.
10598 * reflection.c (mono_module_get_object): Fix name property.
10600 * icall.c (ves_icall_get_enum_info): Update after changes to
10601 mono_metadata_get_constant_index ().
10603 * icall.c: Get rid of get_type_info icall, use a separate icall for
10604 each type property to avoid needless memory allocations. Fixes #51514.
10606 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
10607 to avoid needless binary searches.
10609 * class.c (class_compute_field_layout): Move the initialization of
10610 field->def_value to mono_class_vtable ().
10612 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
10615 * object.c (mono_object_allocate): Make it inline.
10617 * object.c (mono_object_allocate_spec): Make it inline.
10619 2003-12-02 Dick Porter <dick@ximian.com>
10621 * locales.c (create_NumberFormat): NumberFormatInfo construction.
10622 Patch by Mohammad DAMT (mdamt@cdl2000.com).
10624 2003-12-01 Dick Porter <dick@ximian.com>
10626 * threads.c: Fix signature and call in CreateMutex and
10629 2003-12-01 Dick Porter <dick@ximian.com>
10632 * locales.c: Implement string compares and searching
10634 * object.h: Add extra Thread field
10636 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
10638 * reflection.c (fixup_method): Add support for MonoCMethod.
10640 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
10642 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
10644 * reflection.c (assembly_name_to_aname): Allow extra characters in
10645 assembly names. Fixes #51468.
10647 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
10649 * exception.c (mono_exception_from_name_domain): New helper function.
10651 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
10652 exception object in the correct domain.
10654 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
10655 formatting + make a copy a the input data.
10657 * loader.c (mono_get_method_from_token): Methods which contain
10658 native code do not have entries in the ImplMap.
10660 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
10661 Thanks to Gonzalo for spotting this.
10663 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
10664 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
10666 * assembly.h (mono_assembly_load_from): Split the second part of
10667 assembly loading into a new public function.
10669 * exception.h (mono_get_exception_bad_image_format): New function.
10671 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
10673 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10674 Enumerate all modules inside a dynamic assembly. Fixes #51293.
10676 * icall.c: Add new icall for creating dynamic methods.
10678 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
10680 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
10682 * reflection.c (mono_reflection_create_dynamic_method): New icall to
10683 create a dynamic method.
10685 * reflection.c (resolve_object): New helper function.
10687 * reflection.c: Generalize ReflectionMethodBuilder and the functions
10688 which manipulate it so they can also work on dynamic methods.
10690 * reflection.c (reflection_method_builder_to_mono_method): Avoid
10691 creating the MonoReflectionMethodAux structure if it is not needed.
10693 * reflection.h verify.c: Update after changes to object layout.
10695 * reflection.c (method_builder_encode_signature): Fix compilation on
10698 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
10700 * appdomain.h: Added support for context static fields. Added static_data
10701 field to MonoAppContext and renamed thread_static_fields to a more
10702 generic special_static_fields in MonoAppDomain, since it can now contain
10703 context static fields.
10704 * domain.c: Updated hashtable name.
10705 * object.c: Replaced field_is_thread_static() for a more generic
10706 field_is_special_static() which also checks for context static attribute.
10707 In mono_class_vtable(), added support for static context fields.
10708 * threads.c: Changed methods that manage thread static fields to more
10709 generic methods so they can be reused both for thread and context static
10711 * threads.h: Declared some new methods.
10713 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
10715 * reflection.h: Update after changes to the managed types.
10717 * reflection.c (encode_custom_modifiers): New helper function.
10719 * reflection.c (method_encode_signature): Emit custom modifiers.
10721 * reflection.c (field_encode_signature): Emit custom modifiers.
10723 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
10725 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
10727 * icall.c (ves_icall_System_ValueType_Equals): New optimized
10730 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
10733 * object.c (mono_field_get_value_object): New function.
10735 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
10738 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
10740 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
10741 return a preallocated out-of-memory exception instance.
10743 * object.c (out_of_memory): Use the new function.
10745 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
10746 flag is before the custom modifiers. Fixes #49802.
10748 2003-11-16 Martin Baulig <martin@ximian.com>
10750 * class.c (mono_class_is_open_constructed_type): Implemented the
10751 MONO_TYPE_GENERICINST case.
10753 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
10755 * assembly.c (mono_assembly_fill_assembly_name): New function to
10756 fill out the MonoAssemblyName structure.
10757 (mono_assembly_open): Use the new function.
10759 * icall.c (fill_reflection_assembly_name): New helper function.
10761 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
10764 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
10766 2003-11-15 Martin Baulig <martin@ximian.com>
10768 * class.c (mono_class_is_open_constructed_type): New public
10769 function; checks whether a type is an open constructed type,
10770 ie. whether it still contains type parameters.
10771 (mono_class_inflate_generic_type): If we're a type parameter and
10772 the inflated type is also a MONO_TYPE_(M)VAR, return the original
10775 * class.h (MonoGenericInst): Added `guint32 is_open'.
10777 * loader.c (method_from_methodspec): Check whether we're an open
10778 or closed constructed type and set `ginst->is_open'.
10780 * reflection.c (mono_reflection_bind_generic_parameters): Check
10781 whether we're an open or closed constructed type and set
10783 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
10784 from open constructed types.
10786 2003-11-15 Martin Baulig <martin@ximian.com>
10788 * reflection.c (mono_reflection_bind_generic_parameters): If we're
10789 a generic instance (instead of a generic type declaration) with
10790 unbound generic parameters, bind them to our actual types.
10792 2003-11-14 Martin Baulig <martin@ximian.com>
10794 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
10796 * reflection.c (mono_reflection_bind_generic_parameters): If we're
10797 an interface type, populate `res->interfaces' with instantiated
10798 versions of all the interfaces we inherit.
10800 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
10802 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
10803 when MONO_PATH is set but doesn't contain the install dir.
10805 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10808 (ves_icall_Type_GetInterfaces): don't return an interface twice when
10809 it's also implemented in base classes. Fixes bug #50927.
10811 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
10813 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
10814 if this method is called from a finalizer. Fixes #50913.
10816 2003-11-12 Miguel de Icaza <miguel@ximian.com>
10818 * threads.c: Implement VolatileRead/VolatileWrite
10820 * icall.c: Add new icalls for VolatileRead/VolatileWrite
10822 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
10824 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
10825 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
10828 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
10829 from Peter Ross (pro@missioncriticalit.com).
10831 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
10833 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
10835 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
10837 * assembly.c (mono_assembly_load_references): Disable check because it
10838 triggers on older corlibs which lots of people have.
10840 2003-11-12 Jackson Harper <jackson@ximian.com>
10842 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
10843 load corlib.dll if mscorlib.dll is not found.
10844 * assembly.h: Remove corlib name define.
10847 * image.c: Change corlib name to mscorlib.
10849 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
10851 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
10853 2003-11-11 Miguel de Icaza <miguel@ximian.com>
10855 * appdomain.h: Added loader_optimization here to sync with the C#
10856 code, and add disallow_binding_redirects field.
10858 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
10860 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
10862 * reflection.c (mono_image_build_metadata): Fix crash on modules
10865 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
10867 * icall.c (ves_icall_get_method_info): Return callingConvention as
10870 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
10871 namespaces from the EXPORTEDTYPE table as well.
10873 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
10874 from all modules inside the assembly.
10876 2003-11-11 Martin Baulig <martin@ximian.com>
10878 * reflection.c (mono_reflection_bind_generic_parameters): Make
10879 this work for interfaces.
10881 2003-11-11 Martin Baulig <martin@ximian.com>
10883 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
10885 2003-11-11 Martin Baulig <martin@ximian.com>
10887 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
10888 "MonoInflatedMethod" and "MonoInflatedCtor".
10890 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
10892 * reflection.c (resolution_scope_from_image): Use the assembly table
10893 from the manifest module, since other modules don't have it.
10895 * debug-helpers.c (mono_type_full_name): New helper function.
10897 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
10899 * image.c (mono_image_load_file_for_image): New public function which
10900 is a replacement for the load_file_for_image in class.c.
10902 * assembly.c (mono_assembly_load_module): A wrapper for the function
10903 above which does assembly association and reference loading too.
10905 * class.c (mono_class_from_name): Call mono_assembly_load_module.
10907 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10909 * appdomain.c: not all of the attributes for the full assembly name
10910 are required and the order doesn't matter. Fixes bug #50787.
10912 2003-11-10 Dick Porter <dick@ximian.com>
10914 * locales.c: Use platform-endian UTF16
10916 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
10918 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
10920 2003-11-10 Martin Baulig <martin@ximian.com>
10923 (mono_metadata_load_generic_params): Make this actually work.
10925 * reflection.c (mono_reflection_bind_generic_parameters): If our
10926 parent is a generic instance, pass all the `types' to it, no
10927 matter whether it has the same number of type parameters or not.
10929 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
10931 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
10933 * assembly.c (mono_assembly_load_references): Move the image<->assembly
10934 assignment code to this function so it gets called recursively for all
10937 * image.c (load_modules): Remove the assembly assignment since it is
10938 now done by mono_assembly_load_references.
10940 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10941 Add 'module' argument.
10942 (mono_module_get_types): New helper function.
10943 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
10945 2003-11-08 Martin Baulig <martin@ximian.com>
10947 * class.c (mono_class_inflate_generic_method): Interface method
10948 don't have a header.
10950 * reflection.c (mono_image_get_methodspec_token): Take an
10951 additional `MonoGenericInst *' argument instead of reading it from
10952 the header; this is necessary to support interfaces.
10953 (mono_image_create_token): Pass the `MonoGenericInst *' from the
10954 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
10955 (inflated_method_get_object): Take an additional `MonoGenericInst *'
10958 * reflection.h (MonoReflectionInflatedMethod): Added
10959 `MonoGenericInst *ginst'.
10961 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
10963 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
10965 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
10967 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
10969 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
10972 (reflection_methodbuilder_from_method_builder):
10973 (reflection_methodbuilder_from_ctor_builder): New helper functions to
10974 initialize a ReflectionMethodBuilder structure.
10975 (mono_image_get_methodbuilder_token):
10976 (mono_image_get_ctorbuilder_token): New functions to emit memberref
10977 tokens which point to types in another module inside the same assembly.
10979 * reflection.c: Use the new helper functions.
10981 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
10983 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
10984 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
10986 * reflection.c (resolution_scope_from_image): Emit a moduleref if
10989 * reflection.c (mono_image_build_metadata): Emit metadata only for the
10990 current module. Emit the manifest only for the main module.
10992 * reflection.c (mono_image_create_token): Add assertion when a
10993 memberref needs to be created.
10995 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
10997 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
10998 larger buffer for the custom attribute blob. Fixes #50637.
11000 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11002 * threadpool.c: notify listener on async processing handles after
11003 invoking the async callback. Thanks to Zoltan.
11005 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11007 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
11008 avoid code duplication.
11010 * reflection.h (MonoDynamicImage): New type which is currently unused,
11011 but will be used through the ref.emit code in place of
11012 MonoDynamicAssembly.
11014 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11017 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
11018 a MonoDynamicImage instead of just a MonoImage.
11020 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
11021 icalls to ModuleBuilder but keep their semantics, so they will work
11022 with moduleb->assemblyb. This will change later.
11024 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11026 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11029 * reflection.c (mono_image_build_metadata): Avoid creation of a default
11030 main module, since it is now done by the managed code.
11032 2003-11-03 Martin Baulig <martin@ximian.com>
11034 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
11035 `ginst->klass' here.
11036 (method_encode_methodspec): Don't use the `ginst->generic_method's
11037 klass if it's a generic instance, use `ginst->klass' in this case.
11039 2003-11-03 Martin Baulig <martin@ximian.com>
11041 * reflection.c (mono_image_get_generic_method_param_info):
11042 Removed, use mono_image_get_generic_param_info() instead.
11043 (mono_image_get_type_info): Write the GenericParam table before
11044 the Method table. This is neccessary because in the GenericParam
11045 table, type parameters of the class (ie. '!0' etc.) must come
11046 before the ones from its generic methods (ie. '!!0' etc).
11048 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11050 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
11052 2003-11-02 Martin Baulig <martin@ximian.com>
11054 * reflection.c (create_generic_typespec): Take a
11055 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
11056 the generic parameters from it.
11058 2003-11-02 Martin Baulig <martin@ximian.com>
11060 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
11061 instead of a `MonoClassField *' since we just need the type.
11062 (create_generic_typespec): New static function. Creates a
11063 TypeSpec token for a generic type declaration.
11064 (mono_image_get_generic_field_token): New static function.
11065 (mono_image_create_token): If we're a FieldBuilder in a generic
11066 type declaration, call mono_image_get_generic_field_token() to get
11069 2003-11-02 Martin Baulig <martin@ximian.com>
11072 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
11073 `MonoReflectionGenericInst *declaring_type' and
11074 `MonoReflectionGenericInst *reflected_type' fields.
11076 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
11077 `MonoReflectionGenericInst *declaring_type' and a
11078 `MonoReflectionGenericInst *reflected_type' argument instead of a
11079 single `MonoReflectionGenericInst *type' one. Set
11080 `res->declaring_type' and `res->reflected_type' from them.
11081 (mono_reflection_inflate_field): Likewise.
11083 2003-11-02 Martin Baulig <martin@ximian.com>
11085 * class.c (mono_class_setup_vtable): Don't store generic methods
11088 2003-11-02 Martin Baulig <martin@ximian.com>
11090 * reflection.h (MonoReflectionGenericInst): Added
11091 `MonoReflectionType *declaring_type'.
11093 * reflection.c (mono_reflection_bind_generic_parameters): Use
11094 `if (tb->parent)' instead of `klass->parent'.
11096 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
11098 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
11099 with an empty ASSEMBLY table.
11101 * reflection.c (mono_image_build_metadata): Avoid using the same loop
11102 variable in the inner and outer loops.
11104 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
11106 * metadata.h (mono_metadata_make_token): Put parentheses around macro
11109 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
11111 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
11112 icalls. Instead, do everything in managed code. This is needed since
11113 it is hard to restore the original domain etc. in unmanaged code in the
11114 presence of undeniable exceptions.
11116 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
11117 New icalls to push and pop appdomain refs.
11119 2003-10-31 Martin Baulig <martin@ximian.com>
11121 * class.c (inflate_generic_type): Renamed to
11122 mono_class_inflate_generic_type() and made it public.
11124 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
11127 * loader.c (mono_field_from_memberref): Also set the retklass for
11130 * fielder.c (mono_image_get_inflated_field_token): New static
11131 method; creates a metadata token for an inflated field.
11132 (mono_image_create_token, fixup_method): Added support for
11133 "MonoInflatedField".
11134 (fieldbuilder_to_mono_class_field): New static function.
11135 (mono_reflection_inflate_field): New public function.
11138 (MonoReflectionGenericInst): Added `MonoArray *fields'.
11139 (MonoReflectionInflatedField): New typedef.
11141 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
11143 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
11144 for Solaris and other platforms without s6_addr16
11146 2003-10-30 Martin Baulig <martin@ximian.com>
11148 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
11149 argument instead of two.
11150 (mono_class_inflate_generic_signature): Likewise.
11151 (inflate_generic_header): Likewise.
11152 (mono_class_inflate_generic_method): Likewise. In addition, if
11153 `ginst->klass' is set, it becomes the new `method->klass'.
11155 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
11158 * reflection.c (encode_generic_method_sig): Write a 0xa as the
11159 first byte. [FIXME]
11160 (method_encode_methodspec): If we have generic parameters, create
11161 a MethodSpec instead of a MethodRef.
11162 (fixup_method): Added support for "MonoInflatedMethod" and
11163 "MonoInflatedCtor".
11164 (mono_image_create_token): Added support for "MonoInflatedMethod"
11165 and "MonoInflatedCtor".
11166 (inflated_method_get_object): New static function; returns a
11167 managed "System.Reflection.MonoInflatedMethod" object.
11168 (mono_reflection_bind_generic_method_parameters): Return a
11169 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
11170 (mono_reflection_inflate_method_or_ctor): Likewise.
11171 (mono_image_get_generic_method_param_info): Initialize unused
11173 (mono_image_get_generic_param_info): Likewise.
11175 * reflection.h (MonoReflectionInflatedMethod): New public
11176 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
11177 "S.R.MonoInflatedCtor" classes.
11179 * loader.c (method_from_memberref): If we're a TypeSpec and it
11180 resolves to a generic instance, inflate the method.
11182 2003-10-28 Dick Porter <dick@ximian.com>
11184 * object.c (mono_runtime_run_main): Convert command-line arguments
11185 into utf8, falling back to the user's locale encoding to do so.
11187 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
11189 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
11192 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
11194 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
11195 up icalls at method definition time. Partially fixes #33569.
11197 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
11199 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
11200 marshalling of arrays. Fixes #50116.
11202 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
11204 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
11205 points to a vtable in the dying appdomain.
11207 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
11208 listeners into unmanaged code inside the lock.
11210 * object.c (mono_class_vtable): Turn off typed allocation in non-root
11211 domains and add some comments.
11213 2003-10-25 Martin Baulig <martin@ximian.com>
11215 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
11217 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
11219 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
11220 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
11221 currently parsing. Create the generic class and store it in
11222 `generic_inst->klass' before parsing the type arguments. This is
11223 required to support "recursive" definitions; see mcs/tests/gen-23.cs
11225 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
11226 to support recursive typespec entries.
11228 * class.c (mono_class_setup_parent): If our parent is a generic
11229 instance, we may get called before it has its name set.
11230 (mono_class_from_generic): Splitted into
11231 mono_class_create_from_generic() and mono_class_initialize_generic().
11233 2003-10-25 Martin Baulig <martin@ximian.com>
11235 * icall.c (ves_icall_Type_BindGenericParameters): Return a
11236 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
11237 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
11238 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
11240 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
11241 (create_typespec): Likewise.
11242 (mono_reflection_bind_generic_parameters): Return a
11243 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
11244 (mono_reflection_inflate_method_or_ctor): New public function.
11246 * reflection.h (MonoReflectionGenericInst): New typedef.
11248 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
11250 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
11251 inside the domain lock. Fixes #49993.
11253 * object.c (mono_class_vtable): When typed allocation is used,
11254 allocate vtables in the GC heap instead of in the mempool, since the
11255 vtables contain GC descriptors which are used by the collector even
11256 after the domain owning the mempool is unloaded.
11258 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
11260 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
11261 reflect what it does. Also invalidate mempools instead of freeing
11262 them if a define is set.
11264 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
11267 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
11268 hold the finalizable objects in this domain.
11270 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
11273 * appdomain.c (mono_domain_set): New function to set the current
11274 appdomain, but only if it is not being unloaded.
11276 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
11277 appdomain which is being unloaded.
11279 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
11280 unloading of the root appdomain.
11282 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
11283 icall to execute a method in another appdomain. Intended as a
11284 replacement for InternalSetDomain, which can confuse the code
11285 generation in the JIT.
11287 * appdomain.c (mono_domain_is_unloading): New function to determine
11288 whenever an appdomain is unloading.
11290 * appdomain.c (mono_domain_unload): New function to correctly unload
11293 * assembly.c (mono_assembly_load_references): Check that an assembly
11294 does not references itself.
11296 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
11297 domain manually, it asks the finalizer thread to do it, then waits for
11298 the result. Also added a timeout.
11300 * icall.c: Register the new icalls.
11302 * threads.h threads.c: Export the mono_gc_stop_world and
11303 mono_gc_start_world functions.
11305 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
11306 function to fill out the mempool with 0x2a.
11308 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
11310 * reflection.h (MonoReflectionMethodAux): New structure to store
11311 information which is rarely used, thus is not in the MonoMethod
11314 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
11315 store the aux info.
11317 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
11318 and marshalling info into the aux structure.
11320 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
11321 from the aux structure.
11323 * loader.c (mono_method_get_param_names): Retrieve the param names from
11326 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
11328 * exception.h exception.c: Add AppDomainUnloadedException && fix
11331 2003-10-21 Dick Porter <dick@ximian.com>
11334 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
11335 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
11337 2003-10-21 Martin Baulig <martin@ximian.com>
11339 * reflection.c (mono_reflection_bind_generic_parameters):
11340 `klass->parent' is NULL for interfaces.
11342 2003-10-21 Martin Baulig <martin@ximian.com>
11344 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11346 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
11348 * exception.c (mono_exception_from_name_msg): New helper function for
11349 creating exceptions and initializing their message field.
11351 * exception.c: Simplify functions using the new helper.
11353 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
11356 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
11357 mono_raise_exception, since otherwise gcc doesn't generate the function
11358 epilog for raise_exception, confusing the stack unwinding in the JIT.
11361 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
11362 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
11365 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11367 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
11370 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
11372 * icall.c: Removed GetUninitializedObject method because
11373 AllocateUninitializedClassInstance does the same.
11375 2003-10-18 Martin Baulig <martin@ximian.com>
11377 * class.c (inflate_generic_signature): Renamed to
11378 mono_class_inflate_generic_signature() and made it public.
11379 (my_mono_class_from_generic_parameter): New static function; if we
11380 don't already have the generic parameter's MonoClass, create a
11381 very simple one which is just used internally in the runtime and
11382 not passed back to managed code.
11384 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
11386 * metadata.h (MonoMethodSignature): Moved the
11387 `MonoGenericParam *gen_params' to the MonoMethodHeader.
11388 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
11390 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
11391 ves_icall_MonoMethod_GetGenericArguments(); this is now an
11392 interncall on the MonoMethod class, not on MethodInfo.
11393 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
11394 calling mono_reflection_bind_generic_method_parameters() directly.
11396 * loader.c (mono_method_get_signature): If this is a MethodSpec;
11397 return the already computed `method->signature'.
11398 (method_from_methodspec): New static function to load a method
11399 from a MethodSpec entry.
11400 (mono_get_method_from_token): Call the new method_from_methodspec()
11401 for MethodSpec tokens.
11402 (mono_get_method_from_token): If we're a generic method, load the
11405 * reflection.c (mono_image_get_memberref_token): Allow
11406 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
11408 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
11409 (mono_image_create_token): First check whether it's a generic
11410 method (so we'd need to create a MethodSpec), then do the other
11412 (mono_reflection_bind_generic_method_parameters): Return a
11413 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
11414 called directly from the interncall.
11416 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
11418 * reflection.c (load_public_key): Move loading of the public key
11421 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
11423 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
11426 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
11427 culture, hash_alg and public_key. Fixes #49555.
11429 2003-10-17 Martin Baulig <martin@ximian.com>
11431 * class.h (MonoGenericInst): Moved this declaration here and added
11432 `MonoMethod *generic_method'.
11435 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
11436 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
11438 * metadata.c (mono_metadata_type_equal): Two types of
11439 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
11440 index; ie. don't compare the address of the `MonoGenericParam'
11442 (mono_metadata_load_generic_params): Removed the `MonoMethod
11445 * metadata.h (MonoGenericInst): Moved declaration to class.h.
11446 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
11448 * reflection.c (method_encode_signature): Encode the number of
11449 generic parameters.
11450 (encode_generic_method_sig): New static function.
11451 (method_encode_methodspec): New static function; creates an entry
11452 in the MethodSpec table for a generic method.
11453 (mono_image_get_methodspec_token): New static function.
11454 (mono_image_create_token): Call mono_image_get_methodspec_token()
11455 for generic methods.
11456 (mono_reflection_bind_generic_method_parameters): New public
11457 function. Instantiates a generic method.
11459 2003-10-16 Martin Baulig <martin@ximian.com>
11461 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
11462 *gen_params' here from MonoMethodHeader.
11464 * metadata.c (mono_metadata_parse_method_signature): If we have
11465 generic parameters, initialize `method->gen_params' and then set
11466 the correct `type->data.generic_param' in all the parameters.
11468 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
11470 * threads.c (mono_threads_get_default_stacksize): New function to
11471 return the default stacksize.
11473 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
11474 termination of the finalizer thread, since the previous method had
11475 race conditions. Fixes #49628.
11477 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
11478 as for the other managed threads.
11480 2003-10-16 Martin Baulig <martin@ximian.com>
11482 * class.c (inflate_generic_signature): Copy `generic_param_count'
11485 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
11488 * metadata.c (mono_metadata_parse_method_signature): Actually set
11489 the `method->generic_param_count' here.
11490 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
11492 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
11494 * object.h: Add a new field to TypedRef to simplify the implementation
11495 of the REFANY opcodes in the JIT.
11497 * icall.c: Make use of the new field.
11499 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
11502 2003-10-15 Martin Baulig <martin@ximian.com>
11504 * class.c (mono_class_from_gen_param): Renamed to
11505 mono_class_from_generic_parameter() and moved most of the
11506 functionality from mono_reflection_define_generic_parameter()
11507 here; ie. we create a "real" class here.
11508 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
11509 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
11510 previously been called.
11512 * class.h (MonoGenericParam): Moved the declaration of this struct
11513 here from metadata.h and added `MonoMethod *method'.
11515 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
11518 * loader.c (mono_get_method_from_token): If we have any generic
11519 parameters, call mono_metadata_load_generic_params() to read them
11520 from the MONO_TABLE_GENERICPAR.
11522 * metadata.c (mono_metadata_load_generic_params): Added
11523 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
11525 * metadata.h (MonoMethodSignature): Replaced
11526 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
11527 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
11529 * reflection.c (mono_reflection_define_generic_parameter): Moved
11530 most of the functionality into the new
11531 mono_class_from_generic_parameter(); set the `method' field if
11532 we're a method parameter.
11534 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
11536 * marshal.c (emit_struct_conv): if native size is 0
11539 2003-10-14 Martin Baulig <martin@ximian.com>
11541 * icall.c: The generics API has changed in the spec since it was
11542 added to System.Type; these modifications make it match the spec
11544 (ves_icall_Type_GetGenericParameters): Renamed to
11545 `ves_icall_Type_GetGenericArguments'.
11546 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
11547 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
11548 `ves_icall_MonoType_get_HasGenericArguments'.
11549 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
11550 `ves_icall_MonoType_get_IsGenericParameter'.
11551 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
11552 this is no interncall anymore.
11553 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
11554 `ves_icall_TypeBuilder_get_IsGenericParameter'.
11556 2003-10-14 Martin Baulig <martin@ximian.com>
11558 * reflection.c (mono_reflection_bind_generic_parameters): Also
11559 inflate generic methods if we're reading the class from IL.
11561 2003-10-13 Martin Baulig <martin@ximian.com>
11563 * reflection.c (mono_reflection_define_generic_parameter): This
11564 method isn't called directly from the icall anymore; take a
11565 `MonoReflectionAssemblyBuilder *' so we can use this for type and
11566 method generic parameters.
11567 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
11568 (method_builder_encode_signature): Encode generic parameters.
11569 (mono_image_get_method_info): Write generic params to the
11570 MONO_TABLE_GENERICPARAM table.
11572 * reflection.h (MonoReflectionMethodBuilder): Added
11573 `MonoArray *generic_params'.
11575 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
11577 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
11578 wrapper for mono_reflection_define_generic_parameter().
11579 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11581 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
11583 * marshal.h: Add missing function to fix build.
11585 * marshal.c (mono_marshal_get_native_wrapper): Add support for
11586 the SetLastError pinvoke attribute.
11588 * marshal.c (mono_marshal_set_last_error): New helper function called
11589 by the generated code.
11591 * marshal.c (mono_mb_emit_branch): New helper function.
11593 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
11595 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
11596 classes as parameters and return values of delegates. Fixes #29256.
11598 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
11600 * locales.c: use gint32 in non HAVE_ICU case
11602 2003-10-11 Martin Baulig <martin@ximian.com>
11604 * mono-debug.c (mono_debug_add_method): Added a workaround for
11607 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
11609 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
11610 delegates passed to native code must use the STDCALL calling
11611 convention. Fixes #35987.
11613 2003-10-10 Martin Baulig <martin@ximian.com>
11615 * class.c (inflate_generic_type): If we're inflating for a generic
11616 type instance (and not for a generic method), return
11617 MONO_TYPE_MVAR unchanged.
11619 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11621 * string-icalls.c: Join ignores null strings in the source array.
11622 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
11623 * threads.c: GetAvailableTheads is slightly more accurate.
11625 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
11627 * threads.h threads.c : add mono_threads_set_default_stacksize
11628 and pass default to CreateThread calls.
11630 2003-10-09 Dick Porter <dick@ximian.com>
11634 * locales.c: Internal calls for constructing CultureInfo and
11635 related objects from libicu (if its available.)
11637 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
11639 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
11641 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11643 * threadpool.c: added an argument to async_invoke_thread that is the
11644 item to process, pass the MonoAsyncResult to the thread start function
11645 when creating a new thread. This way we don't need to acquire any lock
11646 when we're creating a new thread. Readded a semaphore for faster
11647 response times (instead of that Sleep i added).
11649 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
11651 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
11652 get daylight change dates better on Windows, fix handling
11653 of platforms without tm_gmtoff.
11655 2003-10-06 Martin Baulig <martin@ximian.com>
11657 * class.c (inflate_generic_method): Renamed to
11658 mono_class_inflate_generic_method() and made public.
11659 (mono_class_init): Don't inflate the generic methods here.
11660 (mono_class_from_generic): Added `gboolean inflate_methods'
11661 argument. Inflate the methods here.
11663 * loader.c (mono_method_get_param_names): Ignore instances of
11664 generic types for the moment.
11666 * reflection.c (fixup_method): Added support for inflated methods.
11667 (mono_image_create_token): Use mono_image_get_methodref_token()
11668 for inflated methods.
11669 (mono_custom_attrs_from_param): Ignore instances of generic types
11671 (mono_reflection_bind_generic_parameters): New public function.
11672 Moved all the functionality from
11673 ves_icall_Type_BindGenericParameters() here and added support for
11675 (mono_reflection_define_generic_parameter): Initialize
11676 `klass->methods' here.
11678 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
11679 functionality into mono_reflection_define_generic_parameter().
11680 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
11681 TypeBuilder, return that TypeBuilder.
11683 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11685 * appdomain.c: removed mono_delegate_semaphore.
11688 (mono_thread_pool_add): moved hash table creation inside and the thread
11689 creation outside of the critical region.
11690 (mono_thread_pool_finish): removed obsolete code.
11691 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
11692 continue or exit the thread depending on the queue.
11694 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
11696 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
11697 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
11698 handle more bool marshalling options
11700 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
11702 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
11703 arrays of structs. Also add a more descriptive error message when
11704 a structure member is marshalled as LPArray.
11706 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
11708 * marshal.c (mono_marshal_get_native_wrapper): Add support for
11709 marshalling arrays of complex types. Fixes #29098. Also remove an
11710 usused and incomplete function.
11712 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
11714 * gc.c: report heap_size - free_bytes as total memory allocated
11717 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
11719 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
11720 fix timezone handling problems on Windows.
11722 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
11723 asserts when the year is outside the range handled by ms the functions.
11725 * class.c (setup_interface_offsets): If the class is an interface,
11726 fill out its interface_offsets slot.
11728 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11730 * threadpool.c: mark threadpool threads as background.
11732 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
11734 * decimal.c - define DECINLINE to nothing if not using GCC
11736 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
11738 * assembly.c: More refcount fixes.
11740 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11742 * string-icalls.c: if we're not trimming, return the same string.
11743 When not splitting, don't create a new string.
11745 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11748 (mono_image_open): increment the ref_count inside the critical section.
11750 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
11752 * image.c (mono_image_open): Fix reference counting bug.
11754 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
11756 * marshal.c (mono_marshal_type_size) struct alignment changed for
11757 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
11758 64bits. Avoid leak in mono_marshal_get_native_wrapper when
11759 mono_lookup_pinvoke_call throws.
11761 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
11763 * reflection.c (mono_reflection_parse_type): Fix #49114.
11765 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
11766 temporary workaround for cygwin header problem.
11768 * object.c (mono_object_isinst): Synchronize this with the code
11769 generated by the JIT for casts.
11771 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
11773 * reflection.c (encode_type): Fix #38332.
11775 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
11777 * marshal.c (mono_marshal_method_from_wrapper): New function to return
11778 the original method from the wrapper method.
11780 2003-09-25 Martin Baulig <martin@ximian.com>
11782 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
11783 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
11784 (ves_icall_Type_get_IsGenericInstance): New interncall.
11786 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
11788 * object.c: fix cast warning in big endian code.
11790 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
11792 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
11794 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11796 * assembly.c: don't call check_env from mono_assembly_load. It's
11797 already done once in mono_assemblies_init and may cause headaches when
11798 multiple threads are loading assemblies.
11800 2003-09-19 Martin Baulig <martin@ximian.com>
11802 * reflection.c (mono_reflection_define_generic_parameter): Don't
11803 allocate `klass->methods', set `klass->flags' to
11804 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
11806 2003-09-18 Martin Baulig <martin@ximian.com>
11808 * class.c (mono_class_init): Don't create `class->methods' if it's
11809 already initialized.
11811 * metadata.c (mono_metadata_load_generic_params): Make this
11814 * reflection.c (mono_reflection_define_generic_parameter): Set
11815 parent class and interfaces from the constraints.
11817 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
11818 to keep this struct in sync with the declaration in TypeBuilder.cs.
11820 2003-09-17 Martin Baulig <martin@ximian.com>
11822 * metadata.h (MonoType): Replaced the data's `int type_param'
11823 field with `MonoGenericParam *generic_param'.
11824 (MonoGenericParam): Added `MonoClass *klass'.
11826 * class.c (mono_class_from_gen_param): Removed the
11827 `MonoImage *image' and `int type_num' arguments.
11829 * metadata.c (mono_metadata_parse_generic_param): New static
11830 method; creates a MonoGenericParam which just contains the index.
11831 (do_mono_metadata_parse_type): Call
11832 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
11835 * reflection.c (mono_image_typedef_or_ref): Generic type
11836 parameters may be in the same assembly, but never use a typedef
11838 (mono_reflection_define_generic_parameter): We're now creating a
11839 "real" class for the type parameter; it's now safe to call
11840 mono_class_from_mono_type() on the class'es type, it'll do the
11843 2003-09-16 Martin Baulig <martin@ximian.com>
11845 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
11846 `symfile->range_entry_size' and `symfile->class_entry_size' here;
11847 the `symfile' data structure must be fully initialized before it
11848 gets added to the table.
11850 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
11852 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
11854 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
11855 class init trampolines.
11857 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
11859 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
11860 to the built-in profiler to turn off time and allocation profiling
11863 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
11865 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
11868 * debug-helpers.c (mono_method_full_name): Print the wrapper type
11869 in human readable form.
11871 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
11873 * reflection.c icall.c: Fixed warnings.
11875 * image.c (load_class_names): Use a temporary hash table to hold the
11876 namespaces in order to avoid doing many string comparisons.
11878 * image.h: Fix typo.
11880 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
11881 Pass NULL instead of g_direct_equal to the GHashTable constructor
11882 since the NULL case is short-circuited inside g_hash_table_lookup,
11883 leading to better performance.
11885 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
11886 obtain the first custom attribute for a given index. Depends on the
11887 CustomAttribute table being sorted by the parent field.
11889 * reflection.c (mono_custom_attrs_from_index): Use the new function
11890 for better performance.
11892 2003-09-07 Martin Baulig <martin@ximian.com>
11894 * class.c (mono_class_init): If we're a generic instance, inflate
11895 all our methods instead of loading them from the image.
11896 (mono_class_from_generic): Set `class->methods = gklass->methods'.
11898 2003-09-07 Martin Baulig <martin@ximian.com>
11900 * mono-debug-debugger.c: Added support for constructors.
11902 2003-09-06 Martin Baulig <martin@ximian.com>
11904 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
11907 * reflection.c (mono_reflection_setup_generic_class): Call
11908 ensure_runtime_vtable() to create the vtable.
11910 2003-09-05 Martin Baulig <martin@ximian.com>
11912 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
11915 2003-09-04 Martin Baulig <martin@ximian.com>
11917 * reflection.c (mono_reflection_define_generic_parameter): Generic
11918 parameters start with zero.
11920 2003-09-04 Martin Baulig <martin@ximian.com>
11922 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11924 * reflection.h (MonoReflectionGenericParam): New typedef.
11925 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
11926 the generic parameters from the managed TypeBuilder.
11928 * reflection.c (mono_reflection_define_generic_parameter): New function.
11929 (mono_reflection_create_runtime_class): Encode generic parameters.
11930 (mono_reflection_setup_generic_class): New function; this is
11931 called after adding adding all generic params to the TypeBuilder.
11932 (encode_type): Added MONO_TYPE_VAR.
11934 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
11936 * class.h class.c (mono_class_needs_cctor_run): Moved this method
11939 * assembly.h assembly.c: Moved the AOT loading code into an assembly
11942 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
11944 * reflection.h reflection.c class.h class.c: Delete duplicate
11945 definition of mono_type_get_name () from reflection.c and export the
11948 * class.c: Class loading fixes from Bernie Solomon
11949 (bernard@ugsolutions.com).
11951 * reflection.c: Endianness fixes from Bernie Solomon
11952 (bernard@ugsolutions.com).
11954 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
11956 * assembly.h assembly.c: Define a file format version for AOT
11959 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
11961 * appdomain.h (MonoJitInfo): New field to determine whenever the
11962 code is domain neutral.
11964 2003-08-31 Miguel de Icaza <miguel@ximian.com>
11966 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
11968 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
11970 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
11971 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
11972 Avoid caching the result since strings must be domain specific. Fixes
11975 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
11977 * marshal.c (mono_marshal_init): Make this callable multiple times
11978 since it is hard to find a correct place to call it.
11980 * object.c (mono_runtime_class_init): Execute static constructors in
11981 the correct appdomain.
11983 * image.c (build_guid_table): Handle the case when multiple images have
11986 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11988 * icall.c: added a couple of icalls for System.Web.
11990 2003-08-28 Martin Baulig <martin@ximian.com>
11992 * icall.c (ves_icall_Type_BindGenericParameters): Use
11993 `klass->generic_inst' instead of `&klass->byval_arg' in the
11994 mono_type_get_object() call. The returned type must be
11995 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
11997 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
12001 * object.c (mono_class_proxy_vtable): Make it thread safe.
12003 * pedump.c: Fix warning.
12005 * object.c appdomain.h: Get rid of metadata_section.
12006 It is no longer needed and it was causing deadlocks with domain->lock.
12008 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
12010 2003-08-26 Martin Baulig <martin@ximian.com>
12012 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
12014 2003-08-26 Martin Baulig <martin@ximian.com>
12016 * pedump.c (main): Call mono_metadata_init(),
12017 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
12018 and mono_loader_init().
12020 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
12022 * loader.h: Add missing include to fix build.
12024 * image.h: mono_image_load_references is no more.
12026 * assembly.c: Reworked assembly loading to make it really thread safe.
12027 After these changes, the assembly returned by mono_assembly_open is
12028 fully initialized, i.e. all its references assemblies are loaded.
12030 * assembly.c (mono_image_load_references): Renamed to
12031 mono_assembly_load_references, and made private, since clients no
12032 longer need to call it.
12034 * class.c: Removed calls to mono_assembly_load_references, since it was
12035 a source of deadlocks.
12037 * loader.h loader.c class.h class.c: Protect data structures using a
12038 new lock, the loader lock.
12040 * class.c (mono_class_setup_vtable): Create temporary hash tables and
12041 GPtrArrays only when needed.
12043 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
12044 into empty structures by mcs. Fixes pinvoke7.cs.
12046 * domain.c (mono_init): Call a new initialization function.
12048 * appdomain.c (mono_runtime_init): Call the new initializer function
12049 of the marshal module.
12051 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
12052 inserted into empty structures by mcs. Fixes pinvoke7.cs.
12054 * marshal.h marshal.c: Added locks around the wrapper caches to make
12055 this module thread safe.
12057 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
12058 this argument. Fixes pinvoke1.exe.
12060 2003-08-25 Lluis Sanchez <lluis@ximian.com>
12062 * object.h: Added call_type field to MonoMethodMessage and the corresponding
12063 enumeration of values. Removed fields to store remote call output values in
12064 MonoAsyncResult. Not needed any more.
12065 * object.c: Initialize call_type and async_result fields in mono_message_init.
12066 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
12067 dispatching the message.
12068 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
12069 async call to finish. To do it use a message with EndInvoke call type.
12071 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
12073 * loader.h loader.c (mono_method_hash_marhal_info): New function which
12074 determines whenever a method has marshalling info.
12076 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12078 * assembly.c: fix the build on windows.
12080 2003-08-22 Lluis Sanchez <lluis@ximian.com>
12082 * object.cs: Fixed bug #47785.
12084 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
12086 * string-icalls.c (StringReplace): If their are no occurances of
12087 the old string found return a reference to the supplied
12088 string. This saves some memory and matches MS behavoir.
12090 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12092 * socket-io.c: fixed compilation for systems that define AF_INET6
12093 and don't define SOL_IP/SOL_IPV6.
12095 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
12097 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
12098 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
12100 * rawbuffer.c rawbuffer.h: Make this module thread safe.
12102 * domain.c: Make this module thread safe.
12104 * domain.c (mono_init): Call new initialization function.
12106 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
12107 reference types too. Fixes #38812.
12109 * image.c (mono_image_init): Fixed warnings.
12111 * class.c (mono_class_from_typeref): Handle assembly load failure
12114 * appdomain.c (add_assemblies_to_domain): Handle the case when
12115 the references of an assembly are not yet loaded.
12117 * metadata.c image.c assembly.c: Moved initialization of global
12118 variables to a separate function called at startup since lazy
12119 initialization of these variables is not thread safe.
12121 * image.c assembly.c: Made this module thread safe by adding locks in
12122 the appropriate places.
12124 * domain.c (mono_init): Call the new initialization functions of the
12127 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
12129 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
12130 make a direct call. It is proxy's work to make the call asynchronous.
12131 mono_delegate_end_invoke(): If the targe is a proxy, just collect
12133 * object.cs: mono_method_call_message_new(): read AsyncResult and
12134 state object from parameters list, if this info is requested.
12135 * object.h: Added fields to store remote call output values in
12136 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
12138 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12140 * object.h: add needed fields to MonoThread.
12141 * threads.c, threads.h: allow registering a function to cleanup data
12142 allocated per thread by the JIT.
12144 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12146 * loader.h: portability fix by Bernie Solomon
12147 * <bernard@ugsolutions.com>.
12149 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
12151 * reflection.h reflection.c (mono_param_get_objects): Changed this to
12152 return a MonoArray. This simplifies the code and also ensures that
12153 the cache allways contains an object reference as a value.
12155 * icall.c (ves_icall_get_parameter_info): Simplified using the new
12158 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12160 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
12161 fixes a problem with byte ordering when getting the address family for
12164 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
12166 * .cvsignore: Added monosn.
12168 * reflection.h reflection.c loader.c: Added support for parameter
12169 marshalling to dynamically created types. Fixes #47295.
12171 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12173 * rand.c: remove useless warnings.
12175 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12177 * class.c: implemented ldtoken for methods and fieldrefs.
12179 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12181 * threadpool.c: when mono_async_invoke was called, no one took care of
12182 monitoring the queue. So if the method invoked took some time and we
12183 got new async invoke requests after 500 ms (the thread created waited
12184 that long in WaitForSingleObject), the new async invoke was not called
12185 until the previous one finished.
12187 This is fixed now. Thanks to Totte for helping with it.
12189 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12191 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
12193 2003-08-11 Martin Baulig <martin@ximian.com>
12195 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
12197 2003-08-06 Martin Baulig <martin@ximian.com>
12199 * mono-debug-debugger.c: Added support for static fields,
12200 properties and methods.
12202 2003-08-06 Martin Baulig <martin@ximian.com>
12204 * mono-debug-debugger.c: Don't store the MonoString's vtable to
12205 make this work for applications with multiple application domains.
12207 2003-08-04 Martin Baulig <martin@ximian.com>
12209 * mono-debug-debugger.c: Completely reworked the type support; the
12210 most important thing is that we're now just using one single
12211 `MonoType' instance per type.
12213 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
12215 * mono-endian.h, mono-endian.c, icall.c: Added icall
12216 ves_icall_System_Double_AssertEndianity to assert double word endianity
12217 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
12219 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12221 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
12222 support, icalls and fixes.
12224 2003-07-31 Miguel de Icaza <miguel@ximian.com>
12226 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
12227 classes that are a punctuation character in .NET is not the same a
12230 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12232 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
12234 2003-07-29 Miguel de Icaza <miguel@ximian.com>
12236 * icall.c: Add new MemCopy internalcall.
12237 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
12238 Simplified code; It is not necessary to handle all the cases here,
12239 as the C# code takes care of it. Only handle the case of the name
12240 resource embedded into the assembly.
12242 Changed signature to return the data pointer and the size of the
12245 2003-07-26 Miguel de Icaza <miguel@ximian.com>
12247 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
12248 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
12250 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
12252 * socket-io.c: ignore EINTR error in select.
12254 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12256 * class.h, class.c: removed unused subclasses field in MonoClass.
12258 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
12260 * icall.c: improve fix of get_base_definition(). If the parent class
12261 doesn't have the mehod, look at the parent of the parent.
12262 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
12263 to check if a parameter is an in or out parameter
12264 (PARAM_ATTRIBUTE_IN is not set by default).
12265 mono_method_return_message_restore(): Use mono_class_value_size to
12266 get the size of a value type. mono_type_stack_size (parameterType)
12267 does not return the correct value if parameterType is byRef.
12268 mono_load_remote_field(), mono_load_remote_field_new(),
12269 mono_store_remote_field(), mono_store_remote_field_new():
12270 raise exception if the remote call returns an exception.
12272 2003-07-28 Martin Baulig <martin@ximian.com>
12274 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
12275 method. This is a wrapper around mono_runtime_invoke() which
12276 boxes the instance object if neccessary.
12278 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12280 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
12281 metadata.h, row-indexes.h, verify.c: first cut of generics support.
12283 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12285 * icall.c: disable mcs bug workaround.
12287 2003-07-21 Miguel de Icaza <miguel@ximian.com>
12289 * object.c (mono_runtime_class_init): Take the metadata_section
12290 mutex before obtaining the domain mutex.
12292 * appdomain.h: Added definition of metadata_section mutex here.
12294 * object.c: define metadata_mutex here.
12296 2003-07-24 Ravi Pratap <ravi@ximian.com>
12298 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
12301 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
12303 * reflection.c: Fix bug #46669
12305 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12310 * object.h: fill in the type name for TypeLoadException.
12312 2003-07-23 Ravi Pratap <ravi@ximian.com>
12314 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
12315 relationship between TypeBuilders while compiling corlib) and bug
12316 45993 (Array types returned from the runtime while compiling
12317 corlib were from the loaded corlib).
12319 2003-07-22 Martin Baulig <martin@ximian.com>
12321 * mono-debug-debugger.c: Reworked the type support a bit more;
12322 distinguish between types and classes.
12324 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
12326 * icall.c: add IsArrayImpl icall.
12328 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
12330 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
12331 initializing real_size only once. Also fix bug #46602.
12333 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
12335 * object.c: Renamed mono_metadata_section to metadata_section.
12337 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
12339 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
12340 empty array if the type is an array. Fixed.
12341 ves_icall_MonoMethod_get_base_definition: if the base method
12342 is abstract, get the MethodInfo from the list of methods of
12344 * reflection.c: ParameterInfo.PositionImpl should be zero-based
12345 and it was 1-based. Fixed in mono_param_get_objects.
12347 2003-07-20 Martin Baulig <martin@ximian.com>
12349 * mono-debug.h: Set version number to 31.
12350 (mono_debug_init): Added `MonoDomain *' argument.
12352 * mono-debug-debugger.c: Reworked the type support; explicitly
12353 tell the debugger about builtin types; pass the `klass' address to
12356 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
12358 * image.c: Allow new metadata tables to be loaded without a
12359 warning. Also update the warning message to give the new constant value.
12361 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12363 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
12364 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
12365 array type representation changes.
12367 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12369 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
12370 on Environment.Exit () call.
12372 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12374 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
12375 requires a matching corlib.
12377 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
12379 * Changelog: My editor decided to add a CR to each line. Sorry about that.
12380 Committed again without the CRs.
12382 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
12384 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
12385 getting it from the "this" socket instance. Did not work
12386 if the socket is a subclass of Socket.
12387 Also fixed bug #35371.
12389 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12391 * metadata.c: fixed size for TypedByRef.
12392 * loader.c: when searching for a method, consider the vararg amrker.
12393 * unicode.c, decimal.c: constify some arrays.
12395 2003-07-15 Dick Porter <dick@ximian.com>
12397 * socket-io.c: Fixed compilation for gcc < 3.2.
12399 Fixed compilation for machines that don't have AF_INET6 (thanks to
12400 Bernie Solomon <bernard@ugsolutions.com> for that part.)
12402 Fixed compile warnings.
12404 Fixed formatting and line endings.
12406 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
12409 * socket-io.c: Added IPv6 support.
12411 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
12413 * class.c (mono_class_is_assignable_from): New function to implement
12414 the is_assignable_from logic. Used by mono_object_isinst,
12415 Type::IsAssignableFrom () and the interpreter.
12417 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
12418 Object, even interfaces.
12420 * object.c (mono_object_isinst): Implement in terms of
12421 is_assignable_from.
12423 * icall.c (ves_icall_type_is_assignable_from): New icall.
12425 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
12427 * domain.c (foreach_domain): fix compiler warning.
12429 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
12431 * image.c (load_metadata_ptrs): use g_strndup because strndup is
12432 not available on all plattforms
12434 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
12436 * image.h image.c: Store the metadata version string in MonoImage.
12437 * icall.c: New icall to retrieve the image version.
12438 * reflection.c (create_dynamic_image): Fill in the image version field
12439 * reflection.c (build_compressed_metadata): Use the image version
12440 from the image structure.
12442 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12444 * appdomain.c: modified comment.
12445 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
12446 That will be its last iteration when mono_gc_cleanup is called from
12447 mono_runtime_cleanup and before the domain is unloaded.
12451 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
12453 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
12456 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12458 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
12459 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
12460 Bernie Solomon <bernard@ugsolutions.com>.
12462 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12464 * object.c, object.h: provide mono_object_new_fast() for faster
12465 allocation in some special cases.
12467 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12469 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
12470 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
12472 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
12474 * threadpool.c: fix leaks.
12476 2003-07-01 Dick Porter <dick@ximian.com>
12478 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
12479 using MonoGHashTables. Fixes threadpool bug posted to list.
12481 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12483 * image.h, image.c: added support to load an assembly from a byte array.
12484 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
12485 assembly bundle support.
12487 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
12489 * threadpool.c (mono_thread_pool_add): keep a reference to the
12490 AsyncResult to prevent GC
12492 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12494 * class.c: leak fix.
12496 2003-06-25 Dick Porter <dick@ximian.com>
12498 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
12499 for the async object, the WaitHandle object will close the handle.
12502 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12504 * class.c: in mono_array_class_get (), lookup from the hash with the
12505 same type we insert: this works around a bug in
12506 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
12507 lluis. The real fix will have to wait for after the release.
12509 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12511 * icall.c: fix memory leak when getting type members.
12513 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
12515 * reflection.c: added more pubtoken special cases.
12517 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12519 * class.c: handle field offset correctly when class size
12520 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
12522 2003-06-20 Martin Baulig <martin@ximian.com>
12524 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
12527 2003-06-20 Martin Baulig <martin@ximian.com>
12529 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
12531 2003-06-20 Martin Baulig <martin@ximian.com>
12533 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
12534 just distinguish between variables in registers and variables at
12535 an offset relative to a register.
12537 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12539 * icall.c: #ifdef out latest changes until mcs is fixed.
12541 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12543 * icall.c: return members in metadata order.
12545 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12547 * icall.c: avoid infinite loop in GetTimeZoneData.
12549 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
12551 * icall.c: added Marshal.Prelink/All icalls.
12553 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
12555 * object.c, object.h: fix warnings and do some overflow checking
12556 when creating arrays.
12558 2003-06-17 Dick Porter <dick@ximian.com>
12561 * file-io.c: File attributes need to be tweaked slightly when
12562 passed from the managed to the w32 world.
12564 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
12565 * profiler.h profiler-private.h profiler.c: Rework last patch
12566 based on suggestion by Paolo.
12568 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
12570 * profiler.h profiler-private.h profiler.c: Added infrastructure for
12571 instruction level coverage data collection.
12572 * profiler.h profiler.c (: Added new callback function which can be
12573 used by the profiler to limit which functions should have coverage
12575 * profiler.c (mono_profiler_load): Call g_module_build_path to
12576 generate the file name of the profiler library.
12578 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12580 * profiler.c, profiler.h, profiler-private.h: added basic block
12581 coverage profiling API.
12583 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
12585 * reflection.c (mono_reflection_create_runtime_class): Add support
12586 for events in dynamically generated code.
12588 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
12591 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12593 * icall.c: when getting timezone info, return reasonable values if we
12594 can't get the actual data.
12596 2003-06-14 Dick Porter <dick@ximian.com>
12598 * threads.c (start_wrapper): Remove the reference to the thread
12599 object in the TLS data, so the thread object can be finalized.
12600 This won't be reached if the thread threw an uncaught exception,
12601 so those thread handles will stay referenced :-( (This is due to
12602 missing support for scanning thread-specific data in the Boehm GC
12603 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
12605 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
12607 * reflection.c: ensure streams and tables are first allocated with
12608 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
12610 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12612 * icall.c: fixed GetElementType for byrefs (bug# 44792).
12614 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
12616 * reflection.c (mono_reflection_create_runtime_class): Add support for
12617 properties to dynamically created classes.
12618 * reflection.c: Fix a few places where non-MonoObjects were inserted
12619 into the tokens hashtable.
12621 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12623 * object.c: some support to handle out of memory exceptions.
12625 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
12627 * marshal.c (mono_marshal_get_native_wrapper): support reference
12630 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12632 * object.h, object.c: more portability stuff from Bernie Solomon.
12633 Unexport mono_object_allocate(). Added mono_object_unbox ().
12634 Set exitcode when an unhandled exception is thrown.
12636 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
12638 * marshal.c (mono_marshal_get_native_wrapper): use custom
12639 marshaler for return types.
12641 2003-06-10 Dick Porter <dick@ximian.com>
12643 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
12644 ip_mreq is available
12646 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
12648 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
12649 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
12650 by Bernie Solomon <bernard@ugsolutions.com>.
12652 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
12654 * gc.c (mono_gc_init): Avoid error message on shutdown when
12655 GC_DONT_GC=1 is used.
12657 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
12658 New icall to return the GUID of a module.
12660 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12662 * class.c: ensure instance size always includes the parent's size
12663 even whem class size is set explicitly (fixes bug#44294).
12665 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12667 * profiler.h, profiler.c: made the simple profiler thread-safe,
12668 get more accurate timing info. Allow the loading of an
12669 externally-developed profiler module.
12671 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
12673 * marshal.c (mono_marshal_get_native_wrapper): improved
12674 class/byref arguments.
12675 (mono_marshal_get_native_wrapper): better string marshaling support.
12677 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12679 * class.c: ensure .pack and .size are handled correctly and
12680 simplified layout of static fields.
12682 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
12685 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
12687 * loader.c (mono_lookup_pinvoke_call): look for modules in the
12688 current directory (fix bug 44008)
12690 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
12692 * marshal.c (mono_marshal_get_native_wrapper): started support for
12694 (mono_delegate_to_ftnptr): consider marshalling specifications
12696 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12698 * reflection.c, reflection.h: emit custom marshal info.
12700 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12702 * object.c: free the GError.
12703 * icall.c: added CloseEvent_internal.
12705 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
12708 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
12710 * loader.c (mono_method_get_signature): Add support for dynamic
12713 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12715 * reflection.c: fixed bug #43905.
12717 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12719 * class.c, domain.c, icall.c, metadata.h, object.h: support for
12720 handling TypedReference and ArgIterator.
12721 * loader.c, loader.h: added function to get signature at call site.
12723 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12725 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
12726 data readonly. Buglets and warning fixes. Some MethodSpec support.
12728 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12730 * class.h, class.c, object.c: remove relative numbering support.
12732 2003-05-26 Miguel de Icaza <miguel@ximian.com>
12734 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
12735 free the string, until we get a chance to fix Gtk#
12737 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12739 * marshal.c: revert last patch.
12741 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12743 * icall.c: updates for new mono_class_vtable() not calling
12744 the type constructor anymore.
12746 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12748 * object.h, object.c: separate vtable creation from type
12749 initialization. Make running the .cctor thread safe.
12751 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
12753 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
12755 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
12757 * loader.c (mono_get_method): consider calling convention
12759 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
12761 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
12762 to return the invisible global type for a module.
12764 * reflection.c (mono_image_build_metadata): Emit global fields too.
12766 2003-05-20 Peter Williams <peterw@ximian.com>
12768 * loader.c (mono_lookup_internal_call): Add a few newlines.
12770 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
12772 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
12775 * appdomain.c (set_domain_search_path): Recalculate search path when
12776 AppDomainSetup.PrivateBinPath changes.
12778 * object.c (mono_class_compute_gc_descriptor): It turns out some
12779 parts of the class libs (like System.Thread) holds pointers to
12780 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
12781 to treat native int a pointer type here.
12783 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
12785 * appdomain.h, domain.c: add hashtable for jump target resolution.
12787 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
12789 * reflection.h reflection.c icall.c: Added new icalls
12790 GetManifestResourceInfoInternal, GetModulesInternal and support
12793 2003-05-16 Dick Porter <dick@ximian.com>
12797 * file-io.c: Implement System.IO.MonoIO::GetTempPath
12799 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
12801 * object.c: mono_store_remote_field: little fix to previous patch.
12803 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12805 * class.c: add constructors to array classes.
12806 * icall.c: special case array construction for InternalInvoke (),
12808 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
12810 * class.h class.c reflection.c object.c: Added support for field
12811 defaults in dynamically generated classes.
12813 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12815 * reflection.c: properly encode charset for ddlimport.
12817 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
12819 * threads.c: allow compiling without GC.
12821 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12823 * appdomain.h, object.c, object.h, threads.c, threads.h: added
12824 handling of thread static data.
12826 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12828 * reflection.h, reflection.c: added mono_custom_attrs_free ().
12830 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
12832 * class.c (mono_array_class_get): always set the serializable flags
12833 (mono_array_class_get): always set the SEALED attribute for array types
12835 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
12837 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
12838 attributes (fix for bug 42021).
12840 2003-05-12 Dick Porter <dick@ximian.com>
12842 * gc.c: Don't run finalizers when the finalizer thread is
12843 finishing up, because the default domain has already been
12846 2003-05-11 Miguel de Icaza <miguel@ximian.com>
12848 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
12849 value is null, we should throw an exception. This is slightly
12850 different than the other conventions used for the constructor.
12852 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12854 * socket-io.c: fixed windows build.
12856 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12858 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
12860 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
12862 * object.c (mono_string_new_wrapper): Compatibility fix for MS
12865 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
12867 * class.c (mono_class_layout_fields): Add experimental GC aware
12868 auto layout facility. Requires class library changes to work correctly.
12870 (mono_class_setup_vtable): Avoid overriding explicit interface
12871 method implementations. Fixes iface3.exe test.
12873 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
12875 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
12876 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
12878 * metadata.h: Add new type classification macro which determines
12879 whenever the type holds an object reference.
12881 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
12883 * marshal.c (mono_marshal_get_native_wrapper): cleanups
12885 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
12887 * gc.c (finalizer_thread): Work around a GC bug.
12889 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
12891 * marshal.c (emit_struct_conv): allow unions
12893 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
12895 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
12897 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
12899 2003-05-06 Martin Baulig <martin@ximian.com>
12901 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
12903 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12906 (Select_internal): allow NULLs, don't create arrays if not needed.
12907 Coupled with Socket.cs changes.
12910 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
12911 register a finalizer for it that will close the semaphore handle. This
12912 fixes the leak and make Lupus' test run with > 4080 loops.
12914 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
12916 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
12917 Jerome Laban (bug #42287)
12919 2003-05-02 Martin Baulig <martin@ximian.com>
12921 * debug-mono-symfile.h
12922 (MonoSymbolFile): Moved declaration into mono-debug.h.
12923 (MonoDebugMethodJitInfo): Likewise.
12924 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
12926 (_mono_debug_address_from_il_offset): Take a
12927 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
12930 (MonoDebugDomainData): New struct.
12931 (mono_debug_get_domain_data): New function.
12932 (mono_debug_add_method): Take an additional `MonoDomain *'
12934 (mono_debug_source_location_from_address): Likewise.
12935 (mono_debug_il_offset_from_address): Likewise.
12936 (mono_debug_address_from_il_offset): Likewise.
12938 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
12940 * reflection.c: one more check for null type in custom attrs.
12942 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12944 * reflection.c: avoid warning (comparison is always false due to limited
12945 range of data type).
12947 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12949 * icall.c: throw an exception in Type.GetField if the argument 'name'
12952 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
12954 * reflection.c: fixed handling of enums in named arguments to custom
12955 attributes (bug #42123).
12957 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12959 * reflection.c: use the right array element type and handle
12960 a null for a Type argument, too.
12962 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
12964 * reflection.c: handle arrays as arguments to custom attributes.
12966 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12968 * reflection.c: handle a string value in a custom attr
12969 ctor that takes an object.
12971 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
12973 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
12976 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
12978 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
12980 2003-04-27 Martin Baulig <martin@ximian.com>
12982 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
12983 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
12984 MONO_DEBUGGER_EVENT_BREAKPOINT.
12985 (mono_breakpoint_trampoline_code): Removed.
12986 (mono_debugger_event_handler): The last argument is now a
12988 (mono_debugger_insert_breakpoint_full): Removed the
12989 `use_trampoline' argument.
12990 (mono_debugger_method_has_breakpoint): Likewise.
12991 (mono_debugger_trampoline_breakpoint_callback): Renamed to
12992 mono_debugger_breakpoint_callback(); take the method and
12993 breakpoint number as arguments.
12995 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12997 * metadata.c: fix off by one when loading parameters attributes.
12999 2003-04-24 Martin Baulig <martin@ximian.com>
13001 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
13003 2003-04-24 Martin Baulig <martin@ximian.com>
13005 * mono-debug-debugger.c: Moved all code which interacts with the
13006 Mono Debugger here.
13008 * debug-mono-symfile.c: This code now just deals with the symbol
13009 file itself, the debugger code is now in mono-debug-debugger.c.
13011 2003-04-23 Martin Baulig <martin@ximian.com>
13013 * mono-debug.c (mono_debug_source_location_from_il_offset):
13014 New method; like mono_debug_source_location_from_address(), but
13015 takes an IL offset instead of a machine address.
13017 2003-04-23 Martin Baulig <martin@ximian.com>
13019 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
13020 `line' field; this is now computed by the debugger.
13022 2003-04-23 Martin Baulig <martin@ximian.com>
13024 * mono-debug.[ch]: New files. This is the new debugging interface.
13026 * mono-debug-debugger.[ch]: New files. Moved all code which
13027 interacts with the Mono Debugger here.
13029 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
13031 * domain.c (mono_init): initialize mono_defaults.monitor_class
13033 2003-04-21 Miguel de Icaza <miguel@ximian.com>
13035 * reflection.c (method_encode_code): Add a spicy exception to help
13036 future compiler authors.
13038 2003-04-21 Martin Baulig <martin@ximian.com>
13041 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13042 Make this work with relative pathnames; g_filename_to_uri() needs
13043 an absolute filename.
13045 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
13047 * icall.c: Track name changes in Object and ValueType.
13049 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
13051 * metadata.c (mono_type_stack_size): size should be a multiple of
13054 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13057 (internal_domain_finalize): moved into mono_domain_finalize. No need
13058 to create another thread because the finalizers will be run in the
13061 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
13062 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
13063 to be run (MS does this too).
13065 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
13067 * object.c (mono_class_compute_gc_descriptor): Update comment.
13069 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
13071 * image.h: Add synchronized wrapper cache.
13073 * image.c (do_mono_image_open): Initialize cache.
13075 * reflection.c (create_dynamic_mono_image): Initialize cache.
13077 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13079 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
13080 ves_icall_System_Buffer_ByteLengthInternal.
13082 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13084 * reflection.c: setup klass->nested_in earlier. Allow
13085 a dash in the assembly name.
13087 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
13089 * metadata.c (mono_type_to_unmanaged): dont access
13090 type->data.klass for MONO_TYPE_OBJECT
13091 (mono_type_to_unmanaged): consider System.Delegate class
13093 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
13095 * class.c: just setup supertypes in the proper place instead of
13096 initializing the full element class for arrays.
13098 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13100 * class.c: ensure the element class of arrays is initialized.
13101 Setup the supertype info for array classes, too.
13103 2003-04-14 Miguel de Icaza <miguel@ximian.com>
13105 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
13107 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13109 * Makefile.am: re-added -m option when running cygpath. This way,
13110 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
13112 * mono-config.c: same codepath for locating mono config file for WIN32
13114 * assembly.c: if mono_assembly_setrootdir is called, don't override
13117 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13119 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
13120 MONO_ASSEMBLIES variable.
13122 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13124 * icall.c: added Assembly::GetNamespaces() icall.
13126 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13128 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
13130 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
13132 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
13133 * object.c: fixed bug in the construction of vtable for proxies
13135 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
13137 * object.c (mono_array_new): Mark mono_array_new as an icall.
13139 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13141 * class.c: fixed test for public method when overriding interfaces.
13144 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13146 * appdomain.h, domain.c: added mono_domain_foreach() to
13147 be able to access the currently loaded appdomains.
13148 * object.c: make string interning work across sppdomains.
13149 Mark some functions for use as icalls.
13151 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
13153 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
13155 * reflection.h reflection.c: Allocate long living data using
13156 GC_MALLOC_ATOMIC so the collector does not need to scan it.
13158 * reflection.c: Double the allocation size in streams instead of
13159 increasing it, to prevent unneccesary copying on large assemblies.
13161 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
13162 creation if the assembly does not have the Run flag set.
13164 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13166 * class.h: avoid the C++ keywords in header files (Jerome Laban
13167 spotted and fixed this).
13169 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13172 (mono_unhandled_exception): fill in the arguments for the
13173 UnhandledException event. Only trigger that event for the default
13174 domain (as MS does).
13176 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
13178 * object.c: Improve typed allocation stuff based on suggestions from
13179 Paolo. Also turn it on if the GC library supports it.
13181 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
13183 * object.c object.h class.h: Added experimental typed allocation
13184 facility using the interfaces in gc_gcj.h.
13186 * os/gc_wrapper.h: Added new include files.
13188 2003-04-03 Martin Baulig <martin@ximian.com>
13190 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
13191 which is not yet enabled by default.
13193 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
13195 (mono_gc_lock, mono_gc_unlock): New static functions.
13197 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
13198 functions; stop/start the world for the garbage collector. This
13199 is using the windows API; we need to complete the SuspendThread()/
13200 ResumeThread() implementation in the io-layer to make this work on Unix.
13201 (mono_gc_push_all_stacks): New public function; tells the garbage
13202 collector about the stack pointers from all managed threads.
13204 2003-04-03 Martin Baulig <martin@ximian.com>
13206 * object.h (MonoThread): Added `gpointer stack_ptr'.
13208 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
13210 2003-04-03 Martin Baulig <martin@ximian.com>
13212 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
13214 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
13216 * reflection.c (typebuilder_setup_fields): Initialize field.first and
13219 2003-04-02 Miguel de Icaza <miguel@ximian.com>
13221 * loader.c (mono_lookup_internal_call): Report the corlib that is
13224 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
13226 * icall.c (ves_icall_type_GetTypeCode): fixed check for
13227 System.DBNull (it's class not valuetype).
13229 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13231 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
13232 if the array method was already assigned a token (fixes bug#40646).
13234 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
13236 * reflection.c (mono_reflection_get_type): Attempt type resolve even
13237 if no assembly is given.
13239 2003-04-01 Miguel de Icaza <miguel@ximian.com>
13241 * metadata.h: Added the new tables.
13243 * row-indexes.h: Added definitions for new tables.
13245 * metadata.c: Add schemas for new tables, and add support for
13246 computing the sizes of them.
13248 * class.c: Update for handling the new type cases.
13250 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
13252 * metadata.h (MONO_TYPE_IS_VOID): new macro
13254 2003-03-31 Martin Baulig <martin@ximian.com>
13256 * threads.h (MonoThreadCallbacks): Added `thread_created'.
13258 * threads.c (mono_thread_new_init): Call `thread_created' in the
13259 mono_thread_callbacks.
13261 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
13263 * loader.h: added marshalbyrefobject_class to mono_defaults
13264 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
13265 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
13266 generation of output parameters.
13267 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
13268 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
13269 contextbound and the target object belongs to the context of the caller.
13270 * object.h: added context and unwrapped_server variables in MonoRealProxy.
13271 * object.c: Implemented support for interfaces and abstract classes
13272 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
13273 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
13275 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
13277 * class.h class.c (mono_class_is_subclass_of): New function.
13279 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
13280 routines for most common case (calls from ArrayList::ToArray).
13282 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
13283 routine so programs which call Environment::Exit() can be profiled.
13285 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13286 Added MONO_ARCH_SAVE_REGS.
13288 * icall.c (ves_icall_type_is_subtype_of): Use new function.
13290 2003-03-29 Miguel de Icaza <miguel@ximian.com>
13292 * blob.h: Add a couple of new MonoType types definitions.
13294 * tabledefs.h: Add a couple of new call convs.
13296 2003-03-27 Zoltan Varga <vargaz@freemail.h>
13298 * reflection.h (MonoReflectionDynamicAssembly): track changes in
13299 the layout of the class.
13301 * reflection.c (alloc_table): double the size on overflow to avoid
13302 unnecessary copying.
13304 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
13305 avoid filling out metadata tables and blobs. Also set mb->ilgen to
13306 null so it can be garbage collected.
13308 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
13310 * reflection.c (mono_reflection_get_type): Return the resolved type
13311 only if it is in the assembly we searched.
13313 * reflection.c (ensure_runtime_vtable): Initialize method slots.
13315 * class.c (mono_class_setup_vtable): Set the slot of the overriding
13318 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13321 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
13322 the right one is 'file:///blah', but MS allows it.
13324 (mono_assembly_open): allow 'file://blah'
13326 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
13328 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
13330 * socket-io.c: fixes bug #40310.
13332 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
13334 * reflection.c (mono_reflection_parse_type): handle deeply nested
13337 * reflection.c (mono_image_create_token): Use unique token values
13338 since they will be put into a hash table.
13340 * class.c (mono_class_setup_vtable): If a method occurs in more than
13341 one place in the vtable, and it gets overriden, then change the
13342 other occurances too.
13344 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13345 object as return type.
13347 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
13349 * icall.c: Deleted "ToString" implementation for double and float
13350 because they are full implemented in managed code.
13352 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13354 * reflection.c, reflection.h: implemented and exported functions
13355 to retrieve info about custom attributes.
13357 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13359 * appdomain.c: moved Uri handling to assembly.c
13360 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
13361 work when using a file Uri in *nix and windows.
13363 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
13364 GetReferencedAssemblies.
13366 2003-03-18 Dick Porter <dick@ximian.com>
13368 * icall.c: Rename a couple of internal calls
13370 * threads.c: Set the thread state to Stopped when a thread exits.
13373 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
13375 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13378 * object.c (mono_class_vtable): fix warning.
13380 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
13382 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
13384 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
13386 (method_encode_clauses): Create exception info structures in the right
13388 (mono_reflection_setup_internal_class): Initialize supertypes field.
13390 * class.c object.c: Handle interfaces which implement other interfaces
13393 * class.h class.c: Move the supertypes array initialization code into
13394 a separate function so it can be used for dynamic types too. Also call
13395 it earlier, in mono_class_init(), since it can be used before the
13396 type is initialized.
13398 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13402 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
13407 * object.c: remove warnings.
13409 2003-03-13 Martin Baulig <martin@ximian.com>
13411 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
13412 (MonoDebugLexicalBlockEntry): New types.
13414 * debug-mono-symfile.c
13415 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
13417 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13419 * process.c: ret can be any non-zero value accroding to MS doc.
13421 2003-03-07 Miguel de Icaza <miguel@ximian.com>
13423 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
13424 fixing a warning for a miss-used prototype, would have cause
13425 random memory corruption.
13427 2003-03-07 Martin Baulig <martin@ximian.com>
13429 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
13430 getting really annoying ....
13432 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
13434 * reflection.c (fixup_method): added support for array methods.
13436 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13438 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
13439 (pointed out by Michael Adams).
13441 2003-03-04 Dick Porter <dick@ximian.com>
13443 * icall.c: Temporarily reverted the Double and Single ToString()
13444 change, because it broke nunit.
13446 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
13448 * object.h, threads.h: make include files compatible with C++
13449 (patch by Jerome Laban <jlaban@wanadoo.fr>).
13451 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
13453 * icall.c: Erased ToString helper functions for Double and Single.
13454 Now, that implementations ar all in managed code (Double and Single
13457 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
13459 * appdomain.c: Added method for initializing the default context of
13460 a domain. Added internal call for getting the default context.
13461 * appdomain.h: Added context variable in MonoDomain struct.
13462 * domain.c: mono_domain_set also sets the default context of the domain
13463 * icall.c: Mapped internal method InternalGetDefaultContext.
13464 * object.c: mono_object_get_virtual_method returns always a remoting
13465 wrapper if the object is a transparent proxy.
13466 mono_runtime_invoke_array: when creating an object by calling the
13467 constructor, if the created object is a proxy, then the constructor should
13468 be called using the a remoting wrapper.
13470 2003-03-03 Dick Porter <dick@ximian.com>
13472 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
13473 variable so it compiles on solaris. Problem spotted by
13474 Christopher Taylor <ct@cs.clemson.edu>
13476 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13479 (get_info_from_assembly_name): don't leak value.
13482 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
13485 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
13487 * assembly.c: export mono_image_load_references ().
13488 * class.c: handle function pointers. mono_class_from_name() now
13489 supports nested type names directly.
13491 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
13493 * reflection.h reflection.c: Encode already created dynamic methods
13494 and fields correctly as a DEF instead of a REF.
13496 * reflection.c: Get rid of the force_ref argument to
13497 mono_image_typedef_or_ref since it was wrong in the first place.
13499 * string-icalls.c: add error checking to string constructors according
13502 * reflection.c: Emit types in the order their TypeBuilders were
13503 created. Previously, a new table index was assigned to each type before
13504 the tables were emitted. This was wrong because the signature blob
13505 might already refer to a type by its original table index.
13507 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
13509 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
13512 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13514 * Makefile.am: make assemblies dir have \ instead of / on windows.
13516 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
13518 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
13519 iterate over the NESTEDCLASS table using a linear search since the
13520 table is not guaranteed to be sorted by the secondary key.
13522 * class.c (mono_class_create_from_typedef): fixed up call to
13523 mono_metadata_nesting_typedef.
13525 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
13527 * marshal.c (mono_string_to_byvalstr): clear the memory as
13528 suggested by Jerome Laban <jlaban@wanadoo.fr>
13530 2003-02-26 Dick Porter <dick@ximian.com>
13532 * process.c: Cope with padding in .rsrc blocks
13534 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
13536 * metadata.h: reverted the filter_len change, it breaks reflection
13538 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
13540 * metadata.h: added a new field to store the filter_len
13543 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13545 * reflection.c: handle custom attributes for types and members
13546 created with Reflection.Emit (bug#38422).
13548 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
13550 * reflection.c: define RTSpecialName automatically for constructors for
13551 compatibility with MS.NET.
13553 * reflection.c (mono_reflection_create_runtime_class): initialize
13554 nested_in field of dynamically created classes.
13556 2003-02-22 Martin Baulig <martin@ximian.com>
13558 * debug-mono-symfile.h: Incremented version number.
13560 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
13562 * object.h icall.c process.c: fix warnings.
13564 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
13566 * appdomain.h appdomain.c:
13567 (mono_domain_try_type_resolve): split the
13568 name_or_tb argument into a name and a tb argument.
13569 (mono_domain_has_type_resolve): new function to check whenever the
13570 application has registered a TypeResolve event handler.
13572 * icall.c reflection.h reflection.c: move the type resolve logic into
13573 mono_reflection_get_type () so it will be invoked when
13574 Assembly::GetType () is called.
13577 (mono_reflection_get_type): renamed to get_type_internal.
13578 (mono_reflection_get_type): fixed type name generation so it works
13579 for nested types too.
13580 (mono_reflection_get_type): call has_type_resolve () to avoid the
13581 costly type name generation if there is no resolve event handler.
13583 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13585 * class.c, image.c: load exported types from file references.
13587 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
13589 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
13590 used to cache the managed methods used to create proxies and make
13591 remote invocation of methods.
13592 * class.h: Added in MonoVTable a flag to indicate that a class needs
13593 to be remotely created.
13594 * object.c: Modified the method mono_class_vtable(). It now initializes
13595 the remote flag of the vtable. Modified mono_object_new_specific(),
13596 so now it checks the remote flag.
13597 * icall.c: Added a couple of internal methods, one for enabling instance
13598 creation interception for a type, and one for creating objects bypassing
13601 2003-02-18 Martin Baulig <martin@ximian.com>
13603 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
13604 New interncall to get a method's metadata token.
13606 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
13607 New interncall for the debugger.
13609 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
13611 * class.c (mono_class_setup_vtable): allocate supertype array
13613 2003-02-18 Martin Baulig <martin@ximian.com>
13615 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
13617 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13620 (assembly_name_to_aname): jump over unknown properties (i've found
13621 something like: 'type, assembly, version=xxx, custom=null, public...',
13622 so now will ignore custom=null and still get the rest of the values).
13624 2003-02-17 Dick Porter <dick@ximian.com>
13626 * threads.c: Have Thread.Start() wait for a semaphore to signal
13627 that the thread has set up all its local data. This fixes bug
13628 34323, where Abort() raced the new thread's TLS data.
13630 Also removes the handle_store() call from start_wrapper, because
13631 threads are now always created suspended and there is no longer a
13632 race between the parent and child threads to store the info.
13634 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
13636 * image.c: explain the #- heap issue in a message, hopefully
13637 avoiding FAQs on mono-list.
13639 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13642 (GetEntryAssembly): if the domain has not invoked
13643 AppDomain.ExecuteAssembly yet, return the assembly of the default
13646 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
13648 * class.c (mono_ldtoken): make it work in dynamic assemblies.
13650 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
13652 * metadata.c, reflection.c: simple speedup to type hash
13655 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
13657 * image.c, image.h, class.c, assembly.c: move module loading
13658 to MonoImage. When loading metadata, consider alignemnet from
13659 the start of metadata, not from the metadata address in memory.
13661 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
13663 * reflection.c (mono_reflection_get_custom_attrs): Added support for
13664 AssemblyBuilder objects. Factored out custom attribute creation into
13665 a separate function.
13666 (create_custom_attr): new function to create custom attributes.
13668 2003-02-12 Miguel de Icaza <miguel@ximian.com>
13670 * Makefile.am: Got tired of typing the full pathname to pedump.
13671 Until there is another option, am installing this.
13673 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
13675 * class.c (class_compute_field_layout): always set field->parent
13676 (mono_ldtoken): use mono_defaults.fieldhandle_class;
13678 2003-02-11 Dick Porter <dick@ximian.com>
13681 * monitor.c: Rewrote Monitor, making lock much faster and
13682 Pulse/Wait work as specified. Also uses much fewer handles, and only
13683 creates them as needed.
13685 * exception.c: Added SynchronizationLockException
13687 * threads.c: Deleted old Monitor implementation. The new one is
13690 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13692 * class.c: handled TypedReference type code. Set the correct size for
13693 class data. Setup interface_offsets for interface classes, too.
13695 2003-02-09 Martin Baulig <martin@ximian.com>
13697 * debug-mono-symfile.h: Reflect latest symbol writer changes.
13699 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
13701 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
13702 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
13703 * object.c: fixed mono_object_get_virtual_method () for interfaces.
13704 * verify.c: check for code that runs after the end of the method.
13706 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
13708 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
13709 "System.Math::Round2".
13710 * sysmath.h: Added Floor, Round and Round2 definitions.
13711 * sysmath.c: Modified certain functions that were not 100% compliant
13712 with MS.NET (math precision) and added the implementation of Floor,
13715 2003-02-07 Martin Baulig <martin@ximian.com>
13717 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
13719 2003-02-07 Martin Baulig <martin@ximian.com>
13721 * debug-mono-symfile.c: Reflected latest symwriter changes.
13722 (mono_debug_create_mono_symbol_file): Removed.
13723 (mono_debug_open_mono_symbol_file): Take an argument which
13724 specifies whether to create a dynamic symbol file.
13726 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
13728 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
13730 2003-02-05 Martin Baulig <martin@ximian.com>
13732 * reflection.c (mono_image_build_metadata): Make this public,
13733 protect it against being called multiple times, don't create
13734 resources and don't build the compressed metadata here.
13735 (mono_image_create_pefile): Do this here.
13738 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
13740 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13742 * socket-io.c: fixed bug #36322.
13744 2003-02-06 Piers Haken <piersh@friskit.com>
13748 * debug-mono-symfile.c:
13754 * socket-io.c: warning cleanups
13756 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
13758 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
13759 function. works like remoting invoke, but does a check for the Proxy first.
13761 2003-02-05 Miguel de Icaza <miguel@ximian.com>
13763 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
13765 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
13767 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
13769 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
13770 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
13772 * object.c (mono_store_remote_field_new): used by the new jit
13773 instead of mono_store_remote_field
13774 (mono_load_remote_field_new): used by the new jit
13775 instead of mono_load_remote_field
13777 2003-02-05 Patrik Torstensson
13779 * appdomain.c: changed unload to take the domain id instead
13782 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
13785 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13787 * appdomain.c: don't look for assemblies in ApplicationBase if
13788 PrivateBinPathProbe is set.
13790 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13792 * object.c: make the first argument in main_args contain the absolute
13793 path to the assembly. Fixes bug #37511.
13795 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13797 * icall.c: get correct UTC offset for countries not using daylight
13798 time saving. Fixes bug #30030.
13800 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13802 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
13803 and 1 are the family).
13805 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
13807 * icall.c (ves_icall_InternalExecute): removed wrong assertion
13809 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
13811 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
13813 * reflection.c: added support for SignatureHelper tokens, which is
13814 needed by the Calli opcode.
13816 * reflection.h: track changes to SignatureHelper class.
13818 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
13820 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13822 * appdomain.c: fixed loading assemblies from PrivateBinPath.
13824 2003-02-03 Patrik Torstensson
13825 * appdomain.[c|h], domain.c :
13826 - Added support for getting a domain via domain id
13827 - Support for setting and getting domain from System.AppDomain
13828 (used in cross appdomain channel)
13829 - Added support for get/set for a MonoAppContext on a thread
13830 (Context class in System.Runtime.Remoting.Contexts),
13831 - Removed hack in Get/SetData and ExecuteAssembly.
13833 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
13834 the managed world to get control when a proxy is created.
13836 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
13838 2003-02-03 Miguel de Icaza <miguel@ximian.com>
13841 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13842 Populate the codebase field as well.
13844 2003-02-02 Martin Baulig <martin@ximian.com>
13846 * debug-mono-symfile.c
13847 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
13848 (mono_debug_symfile_add_method): Allow interncalls.
13850 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13852 * icall.c: throw parse exception if strtod fails or the string is empty.
13854 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
13856 * marshal.c: handle object type separately from defined
13859 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
13861 * marshal.c: handle NATIVE_LPSTR for strings when it's
13862 explicitly specified.
13864 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
13866 * reflection.c, reflection.h, icall.c: setup the reflection
13867 handle cache for ModuleBuilders and AssemblyBuilders.
13869 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
13871 * reflection.c (reflection_methodbuilder_to_mono_method): set
13874 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13876 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
13878 2003-01-29 Dick Porter <dick@ximian.com>
13880 * threads.c: No need for the fake_thread kludge now that Thread
13881 doesn't run a class constructor
13883 2003-01-29 Dick Porter <dick@ximian.com>
13885 * threads.c: Use g_direct_hash instead of the rather bogus
13888 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
13890 * marshal.c (mono_marshal_get_native_wrapper): add check for null
13891 (fix pinvoke12.exe)
13892 (mono_marshal_get_struct_to_ptr): generate valid IL code
13893 (mono_marshal_get_ptr_to_struct): generate valid IL code
13894 (*): correctly set sig->pinvoke, we need to memdup the signature
13897 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13899 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
13900 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
13902 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
13904 * profiler.c: provide more callers information.
13906 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
13908 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
13910 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
13912 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
13914 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13916 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
13917 exception instead of going into an infinite loop on dates which it
13920 * string-icalls.c (ves_icall_System_String_get_Chars): raise
13921 out-of-range exception if needed.
13923 * class.c (mono_class_setup_vtable): allow a virtual method to provide
13924 an implementation for an interface method and to override an inherited
13925 method at the same time.
13926 Imagine a scenario when a virtual method is used to override a
13927 virtual abstract method in a parent class, and this same method
13928 provides an implementation for an method inherited from an interface.
13929 In this case, the interface resolution code will set im->slot, which
13930 means that the virtual method override pass will skip this method
13931 which means a pointer to the abstract method inherited from the parent
13932 will remain in the vtable of this non-abstract class.
13934 * class.c: (mono_class_setup_vtable): continue search for a real
13935 method if only an abstract method is found.
13937 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
13939 * reflection.c: add size to encoding for ByValStr and ByValArray
13940 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
13942 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13944 * class.c (mono_class_setup_vtable): pass the override info as an
13947 * class.c (mono_class_setup_vtable): set the slot of overriding methods
13950 * reflection.c (ensure_runtime_vtable); add support for method
13953 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13955 * reflection.c (resolution_scope_from_image): Hack to work to work with
13956 dynamic assemblies.
13958 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
13959 added a 'force_ref' argument to force this function to allways return
13960 a TypeRef. This is needed by mono_image_get_memberref_token ().
13962 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13964 * reflection.c (mono_image_get_type_info): interfaces really don't have
13967 * reflection.c (mono_image_basic_init): fill out missing fields of
13970 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
13971 dynamic assemblies. This is required so dynamic assemblies show up in
13972 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
13973 Type::GetType() etc. This is consistent with MS behaviour.
13975 * image.c image.h reflection.c: add newly created classes to the name
13976 cache so mono_class_get () will find them.
13978 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
13980 First part of changes to get IKVM.NET running under mono.
13982 * appdomain.h, appdomain.c: added new function
13983 mono_domain_try_type_resolve() which will emit TypeResolve events.
13984 This function will call AppDomain::DoTypeResolve to do the actual work.
13986 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
13987 moved existing code dealing with dynamic tokens to a new function
13988 called mono_reflection_lookup_dynamic_token (). This function will
13989 raise TypeResolve events when appropriate. Since reflection.c is not
13990 part of libmetadata, a new hook function called
13991 mono_lookup_dynamic_token() is added to class.c which will call this.
13993 * assembly.h assembly.c: make the invoke_load_hook function public,
13994 so it can be called for dynamic assemblies.
13996 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
13998 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
14001 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
14002 MonoGHashTable, since it contains pointers to objects which the GC
14005 * assembly.c (search_loaded): remove unused variable.
14007 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
14009 * object.c: fixed issue exposed by gcc-generated IL programs
14010 that use RVA data for pointers.
14012 2003-01-25 Martin Baulig <martin@ximian.com>
14014 * threads.c (start_wrapper): Moved the initialization of
14015 `start_func' above the mono_new_thread_init() call to which we
14016 pass it as argument.
14018 2003-01-24 Martin Baulig <martin@ximian.com>
14020 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
14021 the MonoThread pointer.
14023 2003-01-21 Miguel de Icaza <miguel@ximian.com>
14025 * icall.c: Rename `PowImpl' to Pow.
14027 2003-01-23 Dick Porter <dick@ximian.com>
14029 * threads.c (start_wrapper): Create a Thread object if needed, so
14030 the Main() thread can do the class initialisation in a subthread
14031 that has been set up to allow managed code execution.
14033 Pass the thread ID instead of the MonoThread pointer to the thread
14034 start and attach callbacks. This change is required, because the
14035 jit thread start callback must be called _before_ the Thread
14036 object can be created.
14038 (mono_thread_init): Removed much object creation code that is no
14039 longer needed. No managed code is called from here now.
14041 * object.c (mono_runtime_exec_managed_code): Create a subthread
14042 for Main, and call back to the runtime to use it.
14043 Set the exit code when Main exits.
14045 * gc.c: Make sure domain finalisation happens in a subthread.
14046 Re-enable threaded GC, fixing bug 31333 (again).
14048 * environment.c: System.Environment internall calls (so far just
14049 ExitCode is here, the others are still in icall.c)
14051 * appdomain.c (mono_runtime_cleanup): All threads running managed
14052 code should have finished before mono_runtime_cleanup() is
14053 reached, so no need to clean up threads.
14055 2003-01-22 Martin Baulig <martin@ximian.com>
14057 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
14058 `gpointer func' arguments.
14059 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
14060 but added `MonoThread *thread' argument.
14061 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
14063 * threads.c (mono_new_thread_init): Added `gpointer func' argument
14064 and pass it to the mono_thread_start_cb callback.
14065 (mono_install_thread_callbacks): New public function to install a
14066 set of callbacks which are set by the debugger.
14067 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
14069 2003-01-22 Martin Baulig <martin@ximian.com>
14071 * Makefile.am: Install debug-mono-symfile.h.
14073 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
14075 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
14077 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
14079 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
14080 * class.c (mono_ptr_class_get): correctly set access levels of pointers
14081 (mono_array_class_get): correctly set access levels of arrays
14083 2003-01-20 Patrik Torstensson
14084 * image.h (MonoAssemblyName): changed major, minor, build, revision
14085 from signed to unsigned.
14087 2003-01-20 sean kasun <skasun@azstarnet.com>
14089 * reflection.c (load_cattr_value): Now this handles
14090 MONO_TYPE_SZARRAY. Fixes bug #35629
14092 2003-01-20 Miguel de Icaza <miguel@ximian.com>
14094 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
14097 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14099 * decimal.c: fixed bug #26056.
14101 2003-01-17 Martin Baulig <martin@ximian.com>
14103 * gc.c: Raise an ExecutionEngineException instead of using g_error().
14105 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14108 (mono_get_exception_type_initialization): new function.
14110 * object.c: throw a TypeInitializationException when an exception is
14111 thrown invoking the class constructor.
14113 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14115 * reflection.c: fixed attribute reading.
14117 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14120 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
14121 provided, look for the type in the calling assembly and then in
14122 mscorlib; if the assembly name is provided, only try that one.
14124 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14126 * object.c: register the vtable before there is a chance it's
14127 queried again recursively.
14129 2003-01-13 Duncan Mak <duncan@ximian.com>
14131 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
14134 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
14136 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
14138 2003-01-11 Martin Baulig <martin@ximian.com>
14140 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
14141 this to 20 for the release.
14143 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
14145 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
14147 * loader.c (mono_method_get_marshal_info): bug fix
14149 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
14150 structures with explicit layout
14152 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14154 * profiler.c: made the output more readable (and sorted).
14155 Added caller information for the allocation profiler.
14157 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
14159 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
14161 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14163 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
14164 to get value types.
14166 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
14168 * object.c, profiler.h, profiler.c, profiler-private.h:
14169 Added object allocation profiler.
14171 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
14173 * reflection.h, reflection.c: handle global methods.
14174 Compress blob entries.
14176 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
14178 * marshal.c: fix compilation.
14180 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
14182 * loader.c (mono_method_get_marshal_info): impl.
14184 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
14186 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14188 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
14189 for reference types.
14191 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
14193 * loader.c: fixed off by one error in loaded parameter names.
14195 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
14197 * marshal.c (mono_marshal_get_icall_wrapper): like
14198 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
14199 instead of a MonoMethod.
14201 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14203 * decimal.c: fixed bug #36537.
14205 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
14207 * marshal.c: throw a missing method exception if a
14208 P/Invoke method is not found.
14210 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14212 * icall.c: allow a null this for constructors.
14214 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14216 * icall.c: raise the proper exceptions if the arguments to the
14217 internal Invoke are incorrect.
14219 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
14221 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
14223 2003-01-03 Martin Baulig <martin@ximian.com>
14225 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14227 2002-12-31 Martin Baulig <martin@ximian.com>
14229 * debug-mono-symfile.c: Completely rewrote the type section.
14230 Instead of using individual malloc()ed fields, we use one big
14231 continuous memory area and offsets into this area.
14232 See the comments in the source code for details.
14234 2002-12-30 Martin Baulig <martin@ximian.com>
14236 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
14238 2002-12-30 Martin Baulig <martin@ximian.com>
14240 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
14241 line number table in this data blob instead of using an external
14244 2002-12-28 Martin Baulig <martin@ximian.com>
14246 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14248 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
14250 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
14251 as a boxed return type.
14253 2002-12-21 Miguel de Icaza <miguel@ximian.com>
14256 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
14257 g_build_filename to properly get separators on the filename created.
14259 * object.h: Small change, introduce MonoMarshalByRefObject to
14260 track the layout of that structure in the C# universe as we make
14263 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
14265 * object.c: removed assert to allow static fields on interfaces.
14266 * loader.c: a TypeSpec may be used for any type, not just arrays.
14268 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14270 * class.c, class.h: added mono_class_array_element_size ().
14271 Ignore static methods in interfaces.
14273 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14275 * threads.c: fixed the build under cygwin.
14277 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
14279 * reflection.c: handle nullref constants. Allocate keys for
14280 reflection handles with the GC.
14282 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14284 * threads.c, threads.h: added mono_thread_get_abort_signal()
14285 to get a suitable signal for thread abort.
14287 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14289 * metadata.c: fix handling of ExportedType table.
14291 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14293 * icall.c: added WriteWindowsDebugString internal call.
14295 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14297 * reflection.h: added fields to match C# implementation.
14299 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14301 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
14303 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
14305 * gc.h, gc-internal.h: Rename header for GC internal calls to
14306 gc-internal.h from gc.h as to not clash with Boehm GC having its
14307 header installed as <gc.h> in outside include paths.
14308 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
14309 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
14311 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14313 * icall.c: assign minor, build and revision in FillName.
14315 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
14317 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
14318 Added support for running code generated by Reflection.Emit.
14320 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14322 * appdomain.c: check for NULL argument in LoadFrom.
14324 2002-12-10 Dick Porter <dick@ximian.com>
14326 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
14328 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14330 * appdomain.c: fix buglet when building exe file name. Handle full
14331 assembly name (needed after latest changes to AssemblyName).
14333 (mono_image_close): free some hashtables.
14335 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
14337 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
14338 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
14339 on some systems (redhat 7.3)
14341 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
14343 * threads.c: delete the critical section of a sync block,
14344 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
14346 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
14348 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
14350 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14352 * appdomain.[ch]: handle the assembly preload event to try loading the
14353 assemblies using the paths we have in the current domain.
14355 * assembly.[ch]: created an assembly preload hook that is called to try
14356 loading the assembly by other means that the ones provided here.
14358 * domain.c: initialize the domain search path.
14360 From now on, assemblies (TODO: except corlib and System) are loaded
14361 according to these rules when using mono_assembly_load ():
14363 1. It tries to load the assembly from the ApplicationBase
14364 of the current domain appending .dll and .exe (TODO: have to
14365 try loading from name/name.dll and name/name.exe).
14367 2. It tries the search path specified in PrivateBinPath for the
14368 current domain (if any).
14370 3. Previous behavior.
14372 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
14374 * icall.c: implemented GetInterfaceMap() related icall.
14375 * domain.c, loader.h: load MethodInfo in mono_defaults.
14377 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14379 * gc.c: disable the finalizer thread for now, untill all the issues
14380 with it are resolved.
14382 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14384 * string-icalls.c: handle embedded nulls in string ctor when the
14385 length is specified.
14387 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
14389 * class.c: look for explicit interface implementation in parent
14392 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
14394 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
14396 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
14398 * gc.c: protect handles with a critical section.
14400 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14403 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
14404 parameters. If no assembly specified, try getting the type from all
14405 the assemblies in the current domain, else, load the assembly and get
14408 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14410 * marshal.c: applied patch from Aleksey Demakov that fixes
14411 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
14413 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14415 * icall.c: fixed get_location.
14417 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
14419 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
14420 declarations to make it work with older gcc.
14422 * loader.c (mono_get_method): set signature->pinvoke for native calls
14424 2002-11-20 Dick Porter <dick@ximian.com>
14426 * threads.c (mono_thread_init): Set the main thread's handle
14428 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
14430 * gc.c: allow compilation without GC support. Changed to match the
14433 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
14435 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
14437 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
14439 * reflection.c: set a public key token on the core assemblies.
14441 2002-11-18 Dick Porter <dick@ximian.com>
14443 * threads.c: Split out some thread initialisation so that other
14444 files can set the start callback function.
14446 * gc.c: Run finalisers in a separate thread, to avoid stack
14447 overflow. Fixes bug 31333.
14449 * appdomain.c: Set up GC finalisation thread.
14453 * domain.c: Use gc.h macros for GC_malloc
14455 2002-11-15 Dick Porter <dick@ximian.com>
14459 * appdomain.c: Removed mono_runtime_init_with_attach(),
14460 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
14461 merging the extra parameter with the existing function. Removed
14462 unneeded code in mono_thread_attach().
14464 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
14466 * image.c (mono_image_loaded_by_guid): a method to get loaded
14468 (load_metadata_ptrs): we store the guid as string.
14470 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
14472 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
14474 * metadata.c (mono_guid_to_string): imported method form Zoltan
14475 Varga (slightly modified)
14477 * assembly.c (mono_assembly_open): load precompiled code
14479 * loader.h (MonoMethod): we store the method token for use in the
14482 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14484 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
14485 the hook function called when an assembly is loaded.
14487 * domain.c: Modified file.
14488 (mono_domain_assembly_load): removed hash table insertion of assemblies.
14492 2002-11-07 Miguel de Icaza <miguel@ximian.com>
14494 * reflection.c: Map PEFileKind to the value expected by the WinNT
14497 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14499 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
14500 Read until the buffer is filled completely.
14502 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14504 * icall.c: implemented MonoType.InternalGetEvent ().
14506 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14508 * appdomain.c: implemented InitAppDomainSetup. Delayed
14509 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
14510 the entry_assembly.
14512 * assembly.c: base_dir is now an absolute path ending with
14515 * icall.c: modified get_location according to the above changes.
14517 * object.c: init AppDomain.SetupInformation for the default domain after
14518 we have the entry assembly.
14520 * domain.c: when unloading a domain, setup = NULL.
14522 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
14524 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
14526 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
14528 * object.h, object.c: introduced mono_object_get_virtual_method ()
14529 to lookup the method invoked on an object when a callvirt is done on
14531 * icall.c: make MethodInfo::Invoke() always do a virtual call.
14533 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14535 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
14536 current domain when loaded an assembly and failed to load it.
14538 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
14540 2002-10-31 Dick Porter <dick@ximian.com>
14544 * file-io.c: Return the error status in a parameter, as the
14545 GetLastError() value has long since been blown away if we try and
14546 look it up in a subsequent internal call invocation. Delete the
14547 GetLastError() internal call, because it's useless.
14549 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
14551 * class.[ch]: added cast_class to fix bug 29517
14553 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
14555 * marshal.c: create valid IL code in the filter clause:
14556 the new JIT is less forgiving:-)
14558 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14560 * icall.c: removed get_property internal call.
14562 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
14564 * appdomain.h domain.c: Added an ID to appdomains.
14566 * threads.c threads.h icall.c: Implement icall
14567 Thread:GetDomainID(), and remove unused icall
14568 CurrentThreadDomain_internal.
14570 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14572 * icall.c: Don't recurse through the base types in GetConstructor.
14575 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
14577 * mempool.h, mempool.c: added mono_mempool_empty() and
14578 mono_mempool_stats().
14580 2002-10-23 Dick Porter <dick@ximian.com>
14584 * icall.c: Added MonoIO.GetFileType internal call
14586 2002-10-17 Dick Porter <dick@ximian.com>
14588 * appdomain.c (mono_runtime_cleanup): Don't signal the async
14589 delegate semaphore before waiting for all threads to finish,
14590 because new threads can also call async delegates. Fixes bug
14593 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
14594 of 3 seconds, in case another async job is queued. (This part is
14595 needed because the bug fix reintroduced the 3s exit lag.) This
14596 makes the mono_runtime_shutdown flag superfluous.
14598 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
14600 * reflection.c: include ehader size in method section headers.
14601 Really check for suplicated modules entries.
14603 2002-10-17 Martin Baulig <martin@gnome.org>
14605 * debug-mono-symfile.c: Added back support for locals.
14607 2002-10-14 Martin Baulig <martin@gnome.org>
14609 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
14612 2002-10-14 Martin Baulig <martin@gnome.org>
14614 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
14615 mono_class_get() instead of looking in the class cache.
14617 2002-10-13 Martin Baulig <martin@gnome.org>
14619 * debug-mono-symfile.c: Set version number to 28, include the
14620 signature in method names.
14622 2002-10-13 Martin Baulig <martin@gnome.org>
14624 * debug-mono-symfile.h: Set version number to 27.
14626 2002-10-11 Martin Baulig <martin@gnome.org>
14628 * gc.c: Don't register/unregister NULL pointers as disappearing links.
14630 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14632 * metadata.c, metadata.h: added helper function to allocate signatures.
14634 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14636 * icall.c: added internal call to get the location of machine.config.
14638 2002-10-08 Martin Baulig <martin@gnome.org>
14640 * debug-mono-symfile.c: Ignore classes with a pending init for the
14643 2002-10-03 Dick Porter <dick@ximian.com>
14645 * threads.c: Freebsd pthread_t is a pointer
14647 2002-10-03 Dick Porter <dick@ximian.com>
14649 * socket-io.c: Implemented GetHostName_internal
14651 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14654 (mono_config_parse_file): don't leak the text.
14656 2002-10-02 Martin Baulig <martin@gnome.org>
14658 * debug-mono-symfile.c: Added support for methods.
14660 2002-10-01 Martin Baulig <martin@gnome.org>
14662 * debug-mono-symfile.c: Don't emit methods and line numbers for
14663 the dynamic symbol file, just write the type table. We can easily
14664 have an external helper program which creates a symbol file for an
14667 2002-10-01 Dick Porter <dick@ximian.com>
14669 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
14670 Only add the handle to the cleanup array when we're about to
14671 launch the thread. Bug 31425 deadlocked when the test was run on
14674 2002-10-01 Martin Baulig <martin@gnome.org>
14676 * debug-mono-symfile.c: Added support for properties.
14678 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14680 * reflection.c: unaligned store fix from Mark Crichton
14681 <crichton@gimp.org>.
14683 2002-09-27 Martin Baulig <martin@gnome.org>
14685 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
14688 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
14690 * assembly.h, assembly.c: use a sane API to hook into the assembly
14691 loading process instead of a useless special-purpouse hack
14692 (ngen needs a hook, too, for example).
14694 2002-09-27 Dick Porter <dick@ximian.com>
14696 * threads.c (mono_thread_init): Call GetCurrentProcess() so
14697 io-layer can set up some process handle info. Not needed on w32,
14698 but doesn't hurt either.
14700 * process.c: Pass the program name in the second parameter to
14701 CreateProcess, so the path is searched. Include the working
14702 directory. Implemented process name, process enumeration, and some
14703 process detail internal calls.
14705 * icall.c: Added internal calls for process lookup, and some
14708 2002-09-26 Martin Baulig <martin@gnome.org>
14710 * assembly.c (mono_install_open_assembly_hook): New global
14711 function to install a function to be invoked each time a new
14712 assembly is loaded.
14713 (mono_assembly_open): Run this callback function if set.
14715 * debug-mono-symfile.c: Put back line numbers for the dynamic
14716 symbol file and also record the .il file as source file. This
14717 allows us to install the temporary symbol file as `file.dbg' just
14718 like a compiler-generated one.
14720 2002-09-26 Nick Zigarovich <nick@chemlab.org>
14722 * Corrected typo in gc.c (BOHEM vs BOEHM).
14724 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14726 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
14727 GetProperties. Also avoid calling g_slist_length in GetProperties and
14730 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14732 * reflection.c: avoid unaligned stores (bug spotted by
14733 Mark Crichton <crichton@gimp.org>).
14735 2002-09-25 Martin Baulig <martin@gnome.org>
14737 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
14738 instead of guint64 for addresses and added prologue/epilogue info.
14740 2002-09-25 Martin Baulig <martin@gnome.org>
14742 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
14743 store line number info. For the dynamic symbol file, we only need
14744 to provide the JIT generated dynamic line number info for the dynamic
14747 2002-09-25 Martin Baulig <martin@gnome.org>
14749 * debug-mono-symfile.h: Incremented version number.
14751 2002-09-24 Martin Baulig <martin@gnome.org>
14753 * class.c (mono_debugger_class_init_func): New global function
14755 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
14758 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
14759 function. This is called via the mono_debugger_class_init_func
14760 hook to add all types to the dynamic type table.
14761 (ves_icall_MonoDebugger_GetType): New interncall to get a class
14762 from its metadata token.
14764 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
14765 New interncall for the debugger.
14767 2002-09-24 Nick Drochak <ndrochak@gol.com>
14769 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
14770 before using it in case it is null.
14772 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14774 * metadata.c: allow custom modifiers in local var signatures
14775 (bug spotted by Zoltan Varga).
14777 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14779 * class.c: deal with the <Module> class that may have a NULL vtable.
14780 Eliminate warnings.
14782 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14784 * image.c, image.h: more strong name helpers.
14785 * monosn.c: more work: convert pem keys to cryptoapi format.
14787 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14789 * string-icalls.c: speedup IndexOf.
14791 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14793 * icall.c: updates from Zoltan.2.Varga@nokia.com.
14795 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14797 * icall.c: cleanup: use mono_object_domain ().
14799 2002-09-23 Martin Baulig <martin@gnome.org>
14801 * debug-mono-symfile.c: Improved type support.
14803 2002-09-22 Martin Baulig <martin@gnome.org>
14805 * debug-mono-symfile.c: Added support for reference types and strings.
14807 2002-09-22 Martin Baulig <martin@gnome.org>
14809 * debug-mono-symfile.c: Started to work on the type table.
14811 2002-09-21 Martin Baulig <martin@gnome.org>
14813 * debug-mono-symfile.c: Largely reworked the symbol table format.
14814 The symbol table is now incrementally updated each time a new
14815 method is added. We're now also using our own magic and version
14816 so that you don't need to recompile all your classes if the
14817 dynamic table changes.
14818 (mono_debug_update_mono_symbol_file): Removed.
14819 (mono_debug_symfile_add_method): New function to add a method.
14821 2002-09-21 Martin Baulig <martin@gnome.org>
14824 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
14827 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
14828 New interncall to get a method from its metadata token.
14830 2002-09-21 Martin Baulig <martin@gnome.org>
14832 * debug-mono-symfile.c: Create type table.
14834 2002-09-20 Martin Baulig <martin@gnome.org>
14836 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
14838 2002-09-20 Martin Baulig <martin@gnome.org>
14840 * debug-mono-symfile.c: Provide information about params and locals.
14842 2002-09-20 Martin Baulig <martin@gnome.org>
14844 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
14847 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
14848 interncall to get a method from its metadata token.
14850 2002-09-20 Martin Baulig <martin@gnome.org>
14852 * debug-mono-symfile.c: Added a few checks for method->header
14853 being non-NULL. This should never happen, but for the moment
14854 let's use a g_warning() rather than a g_assert().
14856 2002-09-19 Mark Crichton <crichton@gimp.org>
14858 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
14859 even if support for it isn't present. Added an #ifdef to fix this.
14861 * socket-io.c: Added checks back for Solaris support.
14863 2002-09-19 Martin Baulig <martin@gnome.org>
14865 * debug-mono-symfile.c (read_string, write_string): Reflect latest
14866 changes in the symbol file format.
14868 2002-09-18 Martin Baulig <martin@gnome.org>
14870 * debug-mono-symfile.c: Set version number to 21.
14872 2002-09-18 Dick Porter <dick@ximian.com>
14874 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
14875 on netbsd. Fixes bug 30051.
14877 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14880 (set_version_from_string): little fix.
14882 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14884 * monosn.c, Makefile.am: added strong name utility.
14885 * reflection.h, reflection.c: implemented delayed signing,
14886 locale, version and hash id assembly attributes.
14888 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
14890 * loader.c, metadata.c: load param attributes in signatures.
14892 2002-09-16 Martin Baulig <martin@gnome.org>
14894 * debug-mono-symfile.c: Added string table with all method names.
14896 2002-09-14 Martin Baulig <martin@gnome.org>
14898 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
14899 fast method lookup.
14901 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14903 * reflection.c: record the public key token of referenced assemblies.
14905 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14907 * image.c, image.h: added functions to get the strong name and the
14908 public key of an assembly.
14909 * pedump.c: use them.
14911 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
14913 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
14915 2002-09-12 Miguel de Icaza <miguel@ximian.com>
14917 * marshal.c (mono_marshal_get_managed_wrapper): Added
14920 2002-09-11 Martin Baulig <martin@gnome.org>
14922 * gc.c: Call GC_unregister_disappearing_link() on all links when
14923 finalizing them, this is necessary to aviod a crash in boehm's
14926 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14928 * gc.c: handle GetTarget for finalized objects spotted and fixed by
14931 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
14933 * icall.c: implemented MonoType::Module.
14934 * reflection.c, reflection.h: mono_module_get_object () from
14935 Tomi Pakarinen <tomi.pakarinen@welho.com>.
14937 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14939 * icall.c: ignore overridden methods in GetMethods ().
14940 Fix for FieldInfo::SetValue().
14941 * object.c: handle float/double in runtime invoke.
14943 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14945 * object.c: allow a constructor to be called again on an object.
14947 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14949 * class.h, class.c: move field layout code to it's own function and
14950 export it. Get an interface id earlier. Move fields in MonoClass
14951 so they are more cache friendly and align the bitfields.
14952 * loader.c: temporary handle get_param_names() for a runtime method.
14953 * reflection.c, reflection.h: more code to handle runtime creation of
14956 2002-09-09 Martin Baulig <martin@gnome.org>
14958 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
14959 signature with the pinvoke field being set for the actual call.
14961 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14963 * icall.c: removed some unused icalls. Start of map of glib charsets
14964 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
14966 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14968 * debug-helpers.c: break infinite loop (found and fixed by
14969 Holger Arnold <harnold@gmx.de>).
14971 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14973 * icall.c: target may be null in create_delegate.
14975 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14977 * marshal.c: handle a boolean return type.
14979 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14981 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
14983 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14985 * gc.c: fix weakreferences.
14987 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
14989 * icall.c: added icall to get default codepage.
14991 2002-09-03 Dick Porter <dick@ximian.com>
14994 * threads.c: Use MonoThread instead of MonoObject where
14997 Store running thread objects in a hash table, so that we have all
14998 the info to hand when waiting for them to finish
14999 (means we don't need OpenThread() any more, so mingw builds should
15000 be fully functional again.)
15003 * object.h: Added thread ID to MonoThread
15005 2002-09-03 Martin Baulig <martin@gnome.org>
15007 * icall.c (System.Reflection.Assembly::get_location): New interncall.
15009 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15011 * icall.c: fixed leak in get_temp_path. Thanks lupus.
15013 2002-09-03 Martin Baulig <martin@gnome.org>
15015 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
15016 argument to store the end address of the disassembled instruction.
15018 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
15019 here from debug-symfile.h.
15020 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
15021 JIT into this struct.
15022 (MonoSymbolFile): Added `char *image_file' field.
15023 (MonoDebugGetMethodFunc): Removed.
15024 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
15025 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
15026 (mono_debug_find_method): New method.
15028 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
15029 create a full symbol file.
15030 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
15031 and static symbol files.
15032 (mono_debug_find_method): The symbol file keeps an internal method hash,
15033 call this to get a MonoDebugMethodInfo from a MonoMethod.
15035 * debug-symfile.[ch]: Removed.
15037 2002-08-29 Miguel de Icaza <miguel@ximian.com>
15039 * image.c (do_mono_image_open): Remove linker version check.
15041 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
15043 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
15044 wrappers for instance methods.
15046 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15048 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
15050 2002-08-28 Dick Porter <dick@ximian.com>
15052 * Makefile.am: Export HOST_CC for w32 builds
15054 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15056 * file-io.c process.c: MonoString are null terminated, no
15057 need for mono_string_to_utf16() anymore.
15059 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15061 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
15063 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
15065 * icall.c, reflection.h: speedup System.MonoType.
15067 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15069 * reflection.c: allow null as the value of a string argument in
15070 custom attributes constructors.
15072 2002-08-27 Martin Baulig <martin@gnome.org>
15074 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
15075 `trampoline_address' field.
15077 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
15079 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
15080 check (fixes bug #29486)
15082 2002-08-27 Martin Baulig <martin@gnome.org>
15084 * debug-mono-symfile.c: Changed the file format in a way that allows us
15085 open it read-only and to use a specially malloced area for all the
15086 dynamic data. We can now also generate a symbol file on-the-fly if we're
15087 debugging IL code and there is no MCS generated symbol file for it.
15089 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15091 * object.c: added a define for a good string and array
15092 creation speedup (not enabled by default because we need to deal with
15095 2002-08-26 Martin Baulig <martin@gnome.org>
15097 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
15098 function to create a dynamic symbol file. This is used by the
15099 debugger to create a symbol file for IL code on-the-fly.
15101 2002-08-26 Martin Baulig <martin@gnome.org>
15103 * loader.c (mono_lookup_pinvoke_call): Include the error message
15104 from g_module_error() in the error message.
15106 2002-08-24 Martin Baulig <martin@gnome.org>
15108 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
15109 function to update the symbol file. The symbol file is mmap()ed
15110 writable, but private. This allows us to install the symbol file
15111 together with the assembly.
15113 2002-08-24 Martin Baulig <martin@gnome.org>
15115 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
15116 but they can read the new symbol file format which mcs is now creating.
15118 * debug-symfile.c (mono_debug_find_source_location): Moved to
15119 debug-mono-symfile.c; this is now operating on the new symbol file.
15121 2002-08-23 Martin Baulig <martin@gnome.org>
15123 * debug-helpers.c (mono_method_desc_from_method): New function to get
15124 a MonoMethodDesc from a MonoMethod.
15126 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15128 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
15129 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
15131 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15133 * string-icalls.[ch]: make helper methods static.
15135 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15137 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
15138 types to it and to SetValueInternal.
15140 * object.c: Moved handle_enum label to its proper place. This was the
15143 This time i compiled mcs and gtk-sharp and they both work.
15145 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15147 * icall.c: reverted partially my previous patch until
15148 object.c:set_value handles enums correcly.
15150 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15153 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
15154 (ves_icall_System_Environment_get_MachineName): removed warning when
15155 compiling under cygwin.
15157 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15159 * object.c: fixed field_get_value() for reference types.
15161 2002-08-22 Dick Porter <dick@ximian.com>
15163 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
15164 Don't free a buffer while it's still needed. Patch from Jonathan
15165 Liger <Jonathan.liger@wanadoo.fr>
15167 2002-08-21 Miguel de Icaza <miguel@ximian.com>
15169 * icall.c (ves_icall_System_Environment_get_Platform): Add new
15172 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
15174 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
15175 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
15177 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
15178 we call unmanaged code which throws exceptions.
15180 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15182 * appdomain.h: added per-domain entry_assembly.
15183 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
15185 * icall.c: Assembly::GetEntryAssembly icall.
15186 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
15187 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
15189 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15191 * appdomain.h, gc.c: added mono_domain_finalize ().
15193 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15196 (mono_print_unhandled_exception): changed g_warning by g_printerr
15197 because g_log has a 1024 characters limit (yeah, i got a big stack
15198 trace). Don't print exception name, that should be in ToString
15201 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15203 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
15204 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
15206 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15209 (mono_print_unhandled_exception): after previous commit, i realized
15210 that MS calls ToString on the exception. I changed this function to
15211 do that. This way we get stack_trace for free.
15213 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15216 (mono_print_unhandled_exception): invoke Message property instead of
15217 getting 'message' field from Exception. Don't allocate memory for
15218 'trace' and 'message' if not needed.
15220 2002-08-18 Dick Porter <dick@ximian.com>
15222 * unicode.c: Fix asserts to match Encoder.cs checks
15224 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15226 * marshal.c: fix unaligned store issue and a few wrong
15227 opcode argument types.
15229 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15231 * icall.c: added GetUninitializedObjectInternal internal call.
15233 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
15235 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
15236 to the right domain.
15238 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
15240 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
15242 * class.c (class_compute_field_layout): set blittable to false for Strings
15244 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
15246 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15248 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
15249 first chunk of code to create types at runtime. Code to
15250 handle ReflectedType/DeclaringType. Make reflection handles
15253 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15255 * class.c: set correct name in arrays.
15257 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
15259 * appdomain.c (mono_domain_transfer_object): make it work with
15260 valuetypes. bug fixes.
15262 2002-08-12 Dick Porter <dick@ximian.com>
15264 * object.h: Rename some parameters to avoid c++ keywords (Patch
15265 from Joseph Wenninger <kde@jowenn.at>)
15267 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
15269 * icall.c: added icall to implement Assembly.GetFile*.
15271 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15273 * reflection.h, reflection.c: code to embed managed resources.
15275 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15277 * class.c: move all the type size stuff into
15278 class_compute_field_layout().
15280 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15282 * class.c: ensure enums have always the correct instance size.
15283 * unicode.c: remove wrong assert.
15285 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15287 * assembly.c: fix mem corruption issue.
15288 * image.h, image.c: added mono_image_get_resource () to access
15290 * icall.c: implemented Assembly.EntryPoint property and some
15291 Managed Resources related internalcalls.
15294 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15296 * image.c, image.h: impemented mono_image_get_entry_point ().
15297 * appdomain.c: use mono_image_get_entry_point.
15299 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15301 * reflection.c: support the object type argument when loading
15304 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
15306 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
15307 String as return type.
15309 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
15311 * reflection.c: fix encoding of named args for custom attrs to match
15312 the ms implementation. Read them back when instantiating custom
15315 2002-08-02 Radek Doulik <rodo@ximian.com>
15317 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
15318 by Dietmar as quick fix
15319 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
15320 16 as stack size, used on more places as quick fix before Dietmar
15321 will fix it properly
15323 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15325 * object.h, object.c: added accessors for fields and properties.
15327 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15329 * class.c, class.h: made mono_class_get_field_from_name ()
15330 loop on parent types.
15331 Added mono_class_get_property_from_name ().
15333 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15335 * class.c, class.h: move the code to setup the type vtable in its own
15336 function so that it can be reused also for types created at runtime.
15337 Eliminate the "class" identifier from the header file.
15338 * reflection.c: setup the vtable for enums so that we can create
15339 objects for use in SetConstant ().
15341 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
15343 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
15344 instead of the delegate itself as this pointer (bug #28383)
15346 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
15348 * marshal.c (mono_marshal_get_managed_wrapper): added return type
15351 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15353 * loader.c: don't set the pinvoke bit on icalls.
15355 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
15357 * debug-helpers.c (mono_method_full_name): only print a number to
15358 indicate wrapper type (so that the output is more readable in traces).
15360 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
15362 * class.c (mono_class_init): include method override patch from Paolo
15364 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
15366 * icall.c: fixed GetTypeCode().
15368 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
15370 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
15371 use real delegate invoke function to make it work with multicast
15372 delegates (fix bug# 28291).
15374 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15376 * object.c: load constant strings.
15378 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15380 * reflection.c: no magic numbers.
15381 * tabledefs.h: security action enum.
15383 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15385 * assembly.c: fix possible memory corruption.
15387 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15389 * reflection.h, reflection.c: added support for linking resources.
15390 * verify.c: check we have an updated corlib.
15392 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
15394 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
15396 (mono_marshal_string_array): null terminate unmanaged string arrays.
15397 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
15399 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15401 * icall.c: Type.GetType () can now return also types from the
15404 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
15406 * loader.h, loader.c: stack walking support.
15407 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
15408 GetCallingAssembly.
15410 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
15412 * marshal.c: added optimisations for blittable types
15414 * class.c (mono_array_class_get): do not set blittable attribute on arrays
15415 (mono_class_setup_mono_type): set blittable attribute for single
15418 * marshal.c (mono_string_utf8_to_builder): impl.
15419 (mono_string_builder_to_utf8): impl.
15420 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
15422 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
15424 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
15425 (mono_marshal_get_managed_wrapper): impl. byref types
15427 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15430 (search_method): don't display debug message.
15432 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
15434 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
15436 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
15438 * appdomain.c: set the missing filename when throwing exception.
15440 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
15442 * metadata.c (mono_type_size): code cleanup
15443 (mono_type_stack_size): removed some test code
15445 2002-07-21 Miguel de Icaza <miguel@ximian.com>
15447 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
15448 mono_get_exception_file_not_found now.
15450 * exception.c (mono_exception_from_name_two_strings): New version
15451 that will call a constructor with two string arguments.
15452 (mono_get_exception_file_not_found): New helper routine, used to
15453 report file-not-found errors.
15455 2002-07-20 Dick Porter <dick@ximian.com>
15458 * process.c: Pass file handles to CreateProcess
15462 * file-io.c: Implemented CreatePipe
15464 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
15466 * metadata.c (mono_get_param_info): set alignment for value types
15468 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15470 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
15471 Constify mono_domain_assembly_open().
15472 * loader.c: handle null namespace in icalls.
15474 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
15476 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
15477 (emit_str_to_ptr_conv): marshal object as structs
15479 * metadata.c (mono_type_to_unmanaged): marshal object as structs
15481 * marshal.c (mono_marshal_get_runtime_invoke): support value types
15483 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
15485 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
15486 (mono_marshal_get_native_wrapper): we an now return value types
15488 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15490 * verify.c: more checks implemented.
15492 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
15494 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
15496 (mono_marshal_get_native_wrapper): allow byref arguments
15497 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
15498 impl. PtrToStringXXX methods
15499 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
15500 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
15501 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
15502 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
15503 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
15505 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15507 * reflection.c: fix buglet in parsing an assembly name.
15509 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
15511 * marshal.c (emit_ptr_to_str_conv): first impl.
15513 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15515 * object.c, class.h: cache the vtable in the class as suggested by
15516 vargaz@freemail.hu (Zoltan Varga).
15518 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15520 * class.h, loader.c: added mono_field_from_token().
15521 * verify.c: first cut of type checking code.
15523 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
15525 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
15527 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
15529 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
15531 (mono_marshal_get_remoting_invoke): impl.
15532 (mono_delegate_begin_invoke): impl.
15533 (mono_mb_emit_save_args): impl.
15534 (mono_delegate_end_invoke): impl.
15535 (mono_marshal_get_delegate_begin_invoke):
15536 (mono_marshal_get_delegate_end_invoke):
15537 (mono_marshal_get_delegate_invoke): generate a special name for
15538 those methods (including the signature) and associate them whith
15539 the delegate class.
15541 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
15544 (mono_reflection_type_from_name): now it has a MonoImage parameter
15545 which is used as the default image to search the type in. If the image
15546 is NULL or getting the type from it fails, it defaults to corlib.
15548 * icall.c: changed 1 call to mono_reflection_type_from_name to match
15551 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15553 * reflection.c: update the parameter table index.
15555 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
15557 * domain.c: don't include the mark byte in the string hash.
15559 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
15561 * icall.cs: icall for Type.GetTypeCode ().
15562 * verify: a couple of fixes and disabled local initialization checks.
15564 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
15566 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
15568 * debug-helpers.c (mono_method_full_name): print the type of the
15571 * metadata.c (mono_signature_hash): a hash function for signatures
15572 (mono_signature_hash): better hash algorithm
15574 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
15576 * debug-helpers.c (mono_method_full_name): this can now generate
15577 method names with signatures
15579 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
15580 method dont have this pointers.
15582 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15584 * reflection.c: fixup typebuilder tokens.
15585 * image.c: fix buglet.
15586 * marshal.h: remove whitespace.
15587 * metadata.h, metadata.c: reinstate code that was removed.
15588 * verify.c: handle catch directives and fix another couple of bugs.
15590 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
15592 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
15593 (mono_marshal_get_native_wrapper): make it comp. with the old code
15594 (mono_marshal_get_native_wrapper): support boolean
15595 (mono_marshal_get_managed_wrapper): support more types
15597 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
15599 * class.c (class_compute_field_layout): compute class->blittable attribute.
15601 2002-07-09 Dick Porter <dick@ximian.com>
15603 * threads.c: Make the thread cleaning up cope with threads that
15606 2002-07-08 Radek Doulik <rodo@ximian.com>
15608 * reflection.c (method_encode_code): use non-translated values to
15609 compute finally_start, this fixes exception handling on ppc, yay!
15611 * decimal.h (struct signscale): fix endianess
15613 2002-07-07 Radek Doulik <rodo@ximian.com>
15615 * reflection.c: swap box_val and not val
15617 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
15619 * reflection.c, reflection.h: handle full assembly info in type name.
15620 Handle Type arguments when loading custom attributes.
15621 * icall.c: updated to use new mono_reflection_type_from_name () method.
15623 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15626 (method_from_memberref): also print assembly name when method not found.
15628 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15631 (ves_icall_TypeGetProperties): fixed bug #27473.
15633 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15635 * reflection.c: display image name and token when cannot find the
15636 .ctor for an attribute.
15638 2002-07-05 Martin Baulig <martin@gnome.org>
15640 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
15642 2002-07-04 Dick Porter <dick@ximian.com>
15644 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
15645 compile on mingw. This will cause mingw builds to not wait for
15646 subthreads to terminate after the main thread does. I've lodged a
15647 bug with the mingw developers for them to wrap OpenThread().
15649 2002-07-03 Dick Porter <dick@ximian.com>
15651 * threads.c: Store thread IDs instead of handles, because
15652 GetCurrentThread() returns a pseudohandle and therefore stores
15653 useless values. mono_thread_cleanup() continues checking the
15654 array of threads until it is empty, to cope with subthreads
15655 spawning new threads after the main thread has finished.
15659 * profiler-private.h: Pass the thread ID to thread profiler
15660 functions, instead of a handle
15662 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15664 * verify.c: fixes to make it more usable.
15665 * pedump.c: added --verify code to verify IL code in an assembly.
15667 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15669 * reflection.c: turn errors into warnings to allow compiling corlib.
15671 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15673 * reflection.c: add special cases to compile corlib.
15675 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15677 * reflection.c: handle properties with only a set method.
15679 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15681 * opcodes.h: add enum with opcodes in opval order.
15683 2002-07-01 Dick Porter <dick@ximian.com>
15686 * object.c (mono_runtime_run_main): Removed unneeded argument
15688 2002-06-28 Martin Baulig <martin@gnome.org>
15690 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
15692 2002-06-27 Dick Porter <dick@ximian.com>
15694 * threads.c: Store the handle in both the parent thread and in the
15695 subthread, to minimise the time between starting a new thread and
15698 2002-06-26 Dick Porter <dick@ximian.com>
15700 * appdomain.c (mono_runtime_cleanup): Close the socket library
15701 after all the threads have finished, not before
15703 2002-06-26 Martin Baulig <martin@gnome.org>
15705 * debug-symfile.c (mono_debug_find_source_location): Added
15706 `guint32 *line_number' argument. If it's not NULL, store the line number
15707 there and return the file name without the line number.
15709 2002-06-25 Dick Porter <dick@ximian.com>
15713 * process.c: Process forking and other support functions
15715 2002-06-25 Dick Porter <dick@ximian.com>
15717 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
15718 things dont happen when the image is closed.
15719 (mono_image_lookup_resource): Walk the resource section looking
15720 for a particular entry
15722 * cil-coff.h: PE resource section decoding
15724 2002-06-25 Dick Porter <dick@ximian.com>
15728 (mono_assembly_foreach): Accessor functions to walk the list of
15730 (mono_assembly_set_main):
15731 (mono_assembly_get_main): Process methods need to know which
15732 assembly is the "main" one
15734 * object.c (mono_runtime_run_main): Record the main assembly
15736 * debug-helpers.c: Fix typo
15738 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
15740 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
15741 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
15743 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15745 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
15747 2002-06-21 Miguel de Icaza <miguel@ximian.com>
15749 * image.c (do_mono_image_open): Initialize reference count,
15750 otherwise we leak the MonoImage.
15752 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15754 * reflection.c: small tweak to handle self-hosting.
15756 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15758 * reflection.c: fix type name parse code.
15760 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15762 * reflection.c: break out of the loop.
15763 * image.c: special case corlib.
15765 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15767 * reflection.c: add all the custom attrs at the end to ensure the
15768 ctors have been properly initialized when the attributes are defined
15769 in the current assembly.
15771 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15773 * reflection.c: handle correctly multiple-nested types.
15775 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15777 * row-indexes.h: fix typos.
15778 * reflection.c: adjust for typos and fix method_def_or_ref
15779 encoding in MethodImpl table.
15781 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15783 * reflection.c: fix entry point patching (thanks Serge!).
15785 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
15787 * verify.c: add check for System.Exception
15789 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
15791 * image.c, class.c: minifix for code just c&p'ed.
15792 * reflection.c: warning fix.
15793 * object.h, loader.h, domain.c: load also StringBuilder.
15795 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15797 * marshal.h, marshal.c: some support code to handle complex marshaling.
15799 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15801 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
15802 Better signatures with vtable error dump.
15804 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
15806 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
15808 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
15810 * icall.c (ves_icall_Type_GetField): impl.
15812 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15814 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
15815 to retrieve a marshal description blob for a field or param.
15817 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15819 * reflection.h, reflection.c: change order of nested type emission
15820 to avoid table corruption. The NestedTypes table is sorted.
15821 * icall.c: change order of GetConstructor results to workaround mcs bug.
15823 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15825 * reflection.h, reflection.c: handle field and param marshal
15828 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15830 * icall.c, marshal.c marshal.h: more Marshal class implementation.
15832 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15834 * reflection.c: fix call convention.
15836 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15838 * reflection.h, reflection.c: mono_image_get_memberref_token()
15839 takes a type instead of a class, now. Added
15840 mono_image_get_array_token() to create tokens for the special
15841 multi-dim array methods.
15843 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15845 * assembly.c: handle modules (no assembly table). Split
15846 loading references in its own function.
15847 * class.c: handle moduleref resolution scope.
15848 * image.c, image.h: cache module name in image.
15850 2002-06-07 Martin Baulig <martin@gnome.org>
15852 * reflection.c (mono_image_get_type_info): Only add a class layout entry
15853 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
15855 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15857 * icall.c: more signature fixes that used uint instead of int.
15859 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15861 * reflection.c: fixed signature of field refs.
15863 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15865 * class.c, reflection.c: handle typerefs of nested types
15866 (both on read and when writing files).
15868 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15870 * icall.c: fix method signatures that tried to workaround the previous
15873 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15875 * debug-helpers.c: fix typo.
15877 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15879 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
15880 rewrote the PE/COFF writing code (our programs are understood by the
15883 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15885 * gc.c, gc.h, icall.c: weakreference support.
15887 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15889 * Makefile.am, mono-config.c: use $(sysconfdir).
15891 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15893 * icall.c: changed default precision of Double.ToString() to 15.
15894 Fixed memory leak. Unified with Single.ToString.
15896 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15898 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
15900 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15902 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
15903 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
15904 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
15907 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15909 * debug-symfile.c, sysmath.c: yet more compilation fixes.
15911 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15913 * reflection.c, socket-io.c: more compilation fixes.
15915 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15917 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
15918 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
15919 unicode.c: warning and compiler compatibility fixes.
15921 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15923 * class.h, metadata.c: fixed warnings/compilation errors.
15925 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15927 * Makefile.am, mono-config.c, mono-config.h: configuration file
15929 * loader.c, loader.h: make Dll mapping configurable at runtime in the
15930 config file. Export methods to insert and lookup mappings.
15932 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15934 * reflection.c: handle types and boxed objects in custom attr
15937 2002-05-30 Martin Baulig <martin@gnome.org>
15940 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
15942 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
15944 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
15945 to lookup the implmap row for a P/Invoke method.
15946 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
15947 P/Invoke method from the runtime on an as needed basis.
15949 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
15951 * metadata.c (mono_metadata_parse_signature): impl.
15953 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15955 * class.c: handle .pack directive.
15957 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15959 * object.c: initialize static fields with RVA data.
15961 2002-05-25 Martin Baulig <martin@gnome.org>
15964 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
15966 2002-05-24 Martin Baulig <martin@gnome.org>
15969 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
15970 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
15971 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
15973 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15975 * object.c: special case string ctros in invoke.
15976 * gc.c: silly whitespace changes.
15978 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
15980 * threadpool.[ch]: impl. a threadpool that can
15981 be used by mint and mono.
15983 2002-05-22 Martin Baulig <martin@gnome.org>
15985 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
15986 The first argument is now a `MonoReflectionModuleBuilder *', the return
15987 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
15988 `methods' field to get the method builder. The `token' argument is the
15991 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
15992 invalid characters instead of g_assert_not_reached()ing. This seems
15993 to be the behaviour of mscorlib.
15995 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
15997 * object.c (mono_runtime_invoke_array): applied patch from Rachel
15998 Hestilow to fix bug #25104
16000 2002-05-21 Martin Baulig <martin@gnome.org>
16002 * debug-symfile.c (mono_debug_find_source_location): New function.
16003 Looks up an IL offset in the line number table and returns the source
16004 location as a string.
16006 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16009 (mono_double_ToStringImpl): changed %f by %g until we have something
16012 2002-05-21 Nick Drochak <ndrochak@gol.com>
16014 * icall.c : Use different name for Math.Pow's icall. Needed to check
16015 parameters first in C#.
16017 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16019 * icall.c, reflection.h: added icall to get info about an event.
16021 2002-05-20 Radek Doulik <rodo@ximian.com>
16023 * object.c (mono_value_box): don't use memcpy for boxing on BIG
16025 (mono_value_box): don't use memcpy for small sizes on
16026 architectures with unaligned access
16028 2002-05-20 Martin Baulig <martin@gnome.org>
16030 * reflection.c (mono_reflection_setup_internal_class): Don't crash
16031 if `tb->parent == NULL'.
16032 (mono_reflection_create_internal_class): New function. This is
16033 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
16036 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
16039 2002-05-19 Martin Baulig <martin@gnome.org>
16041 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
16042 argument to get the length, don't default to the array length.
16044 2002-05-18 Miguel de Icaza <miguel@ximian.com>
16046 * assembly.c (mono_assembly_setrootdir): New function used to
16047 override the MONO_ASSEMBLIES directory.
16049 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16051 * icall.c: ValueType_GetHashCode() initialize local var.
16053 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16055 * reflection.c: sort custom attributes table.
16057 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16059 * reflection.c: support named args in custom attributes (write support).
16061 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16063 * reflection.c: fix finally position calculation.
16065 2002-05-15 Radek Doulik <rodo@ximian.com>
16067 * reflection.c: fixed endianess at many places
16069 * icall.c (ves_icall_InitializeArray): comment out debug msg
16071 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
16073 * object.c (mono_unhandled_exception): new function to handle
16074 unhandled exceptions.
16075 (mono_unhandled_exception): call the UnhandledException event.
16076 (mono_runtime_delegate_invoke): impl.
16078 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
16080 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
16081 returns the RVA, not the direct pointer to the data. Handle the case
16082 when the class size is fixed.
16084 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16086 * reflection.c: fix some endianess issues.
16088 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
16090 * object.c (mono_runtime_invoke): is now able to catch exceptions.
16092 * threads.c (mono_thread_init): added a callback which is invoked
16095 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
16097 * icall.c: make GetHashCode return non-negative values.
16099 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
16101 * object.c, icall.c, gc.c: revert to address-based hashcode.
16103 2002-05-13 Miguel de Icaza <miguel@ximian.com>
16105 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
16107 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16109 * icall.c, class.c: special case <Module>.
16111 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
16113 * icall.c: fix bug in GetNow().
16115 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
16117 * object.c (mono_runtime_class_init): make sure that we call all
16118 static class constructors.
16120 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16122 * reflection.c: sort methodsemantics table.
16124 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16126 * reflection.h, reflection.c: honour init locals setting.
16128 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
16130 * icall.c: copied Double ToStringImpl for Single ToStringImpl
16132 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16134 * reflection.c: support ContructorBuilders in attribute blob creation.
16136 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16138 * reflection.c: some changes to build a binary that can be run
16139 directly in windows.
16141 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16143 * loader.c: print a big message when an icall can't be found.
16145 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16147 * string-icalls.c: fix bug 24248.
16149 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16151 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
16152 icall.c, reflection.h: separate assembly loading by pathname and by
16153 assembly name. Use the MONO_PATH env var to search for assemblies.
16155 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16157 * assembly.c, image.h: add some support for assemblies
16158 with multiple modules.
16159 * class.c, class.h: export mono_class_from_typeref().
16160 * loader.c: remove duplicated code and use mono_class_from_typeref(),
16163 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16165 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
16166 documentation says (the ECMA one is correct).
16168 2002-05-02 Dick Porter <dick@ximian.com>
16170 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
16171 Don't name the synchronisation mutex.
16173 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
16176 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
16177 Make the prototypes match.
16178 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
16182 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
16183 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
16184 all systems have tm.tm_zone, so use strftime() with %Z to print
16185 the timezone abreviation into a temp string.
16187 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
16188 rather than mono_array_addr() on a MonoString on Big Endian
16191 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
16193 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
16196 2002-04-30 Dick Porter <dick@ximian.com>
16198 * socket-io.c: Cope with SOCKET being an integer rather than a
16201 * threads.c: Added Thread_free_internal, to deal with thread
16202 handle cleanup. Moved calls to handle_store() and handle_remove()
16203 to start_wrapper(), so each can only be called once. Allocate
16204 synchronisation blocks with GC_malloc(), and use GC finalisation
16205 to close the handles.
16207 * icall.c: added System.Threading.Thread::Thread_free_internal
16209 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16211 * icall.c: support Environment.Exit, CommandLineArgs().
16213 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16215 * object.c, object.h: added mono_runtime_run_main () and
16216 mono_runtime_get_main_args () for use in System.Environment.
16218 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16220 * gc.c: fix thinko, enable actual finalization since the jit is now
16223 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16225 * gc.c, object.c: take into account that an object may be offset wrt the address
16226 returned by GC_malloc().
16228 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16230 * image.c: handle files without entries in the assembly table (modules).
16232 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
16234 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
16235 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
16236 allowed to be null when it's System.Object class setup.
16238 2002-04-27 Martin Baulig <martin@gnome.org>
16240 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
16241 if `tb->parent == NULL' rather than crashing.
16243 2002-04-28 Nick Drochak <ndrochak@gol.com>
16245 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
16246 calling acos() where asin() should have been called.
16248 2002-04-26 Martin Baulig <martin@gnome.org>
16250 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
16251 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
16252 there's a subdirectory called `System', but we don't want to read that
16253 subdirectory as an assembly.
16255 2002-04-25 Martin Baulig <martin@gnome.org>
16257 * debug-symfile.c: Reflect latest MonoString changes.
16259 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16261 * rand.c, rand.h: instance method icalls need to have an explicit
16262 this pointer as first argument in the C implementation.
16264 2002-04-25 Nick Drochak <ndrochak@gol.com>
16266 * icall.c: Fix typo in map for GetNonZeroBytes
16268 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16270 * string-icalls.c : String does now passes unit tests without any
16271 errors, the following changes has been made:
16273 Implemented replace methods.
16274 Renaming of methods to (try) follow the standard.
16275 Fixed compare ordinal
16276 Made all memory allocated directly to function instead of via icall function.
16277 Small performance fix in is_in_array function
16279 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
16281 c (mono_string_Internal_ctor_charp_int_int):
16282 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
16283 sindex < 0, throw ArgumentOutOfRangeException instead of
16284 ArgumentNullException.
16286 Added new check for length == 0, however
16287 I need to make it return String.Empty from the C code.
16289 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
16290 that calculate the length for us here.
16292 (mono_string_Internal_ctor_sbytep_int_int): Replaced
16293 mono_string_new_utf16 with mono_string_new, since value is utf8.
16295 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16297 * object.c: register the object for finalization if needed.
16298 Allocate one more char in the string for the terminating 0 char.
16300 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16302 * class.c, class.h, image.c: check if a type implemenst a destructor.
16303 Use the proper key for array class lookups.
16304 * icall.c: register the icalls in the System.GC class.
16305 * gc.c, gc.h: GC-related functions and icalls.
16307 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16311 * unicode.c: free some strings gotten from mono_string_to_utf8 and
16312 changed a couple of free () by g_free ().
16314 * decimal.c: one-liner in the comments for decimal2string ().
16316 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16318 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
16320 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16322 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
16323 * object.c (mono_runtime_invoke_array) : handle null in params
16325 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16327 * string-icalls.c: fixed bug in split (one off bug)
16329 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16331 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
16332 * icalls.c: added String::Equals as internal method
16334 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16336 * threads.c: fixed bug in the double interlocked functions
16338 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
16340 * threads.c: implemented all of the new interlocked icalls.
16341 * string-icalls.c: fix a bug in insert.
16342 * icalls.c: added the icalls for interlocked, removed old string functions.
16344 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16346 * loader.c: fix off-by-one error when reading argument names.
16348 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16350 * profiler.c: win32 counter implementation (untested).
16351 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
16352 (the latter needs testing and more complete impl. from win32 folks).
16354 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
16356 * object.c: mono_array_new_full workaround mono_array_class_get
16359 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16361 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
16362 * object.h (mono_string_chars): Changed casting type.
16364 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16366 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
16367 method signatures to use gunichar2 instead of gint16.
16369 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
16371 * object.h, object.c: domain-specific versions of mono_object_new and
16374 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
16376 * object.c: changed String layout
16378 * string-icalls.c (mono_string_Internal_ctor_chara): added
16379 internal string constructors.
16381 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
16383 * threads.c: pass 'this' to the thread start routine.
16385 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16387 * string-icalls.c: fix IndexOf and LastIndexOf. Now
16388 InternalCompareStr don't call twice mono_string_cmp_char for the last
16389 character. Improved performance in mono_string_cmp_char.
16391 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16393 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
16394 code into its own library: libmonoruntime.
16396 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
16398 * object.h, object.c: changed array format so that szarrays do not
16399 require a bounds structure.
16400 * icall.c, appdomain.c: support for new szarray format.
16402 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16404 * metadata.c: compare also the retuns type when comparing signatures:
16405 we didn't do this as an optimization since really overloaded methods
16406 must differ also in the arguments, but this doesn't work with
16407 low-level IL code (or when using explicit conversion operators: see
16408 bug#23498 for an example).
16410 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16412 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
16414 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16416 * icall.c: make MonoType::GetElementType its own icall.
16418 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16420 * icall.c: remove MonoMethod_get_Name().
16421 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
16424 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16426 * string-icalls.c: optimized a few methods.
16428 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16430 * icall.c: added all new string internal calls
16431 * string-icalls.c: added, new string internal call implementation.
16432 * object.c: added mono_string_new_size for allocating a string a size
16434 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
16436 * object.c (mono_object_isinst): use the same code as in the
16437 optimized x86 version.
16439 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16441 * profiler.c: TSC-based timer code (faster and more accurate).
16442 Not hooked up in configure, yet (set USE_X86TSC to 1).
16444 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
16446 * profiler.c, profiler.h: track time spent compiling methods.
16447 * threads.c: track thread creation/destruction.
16449 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
16451 * profiler.c, profiler.h, profiler-private.h: profiling interface
16452 and sample implementation. Moved here so that it can be used also by
16455 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
16457 * reflection.c, reflection.h: keep types and other handles separate in
16458 the hash tables for referred tokens. Add guid for modules.
16460 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16462 * assembly.c: fix bugs found with valgrind.
16463 * metadata.h, metadata.c: added mono_metadata_guid_heap().
16465 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
16467 * threads: added icall support for getting current domain for
16470 2002-04-13 Martin Baulig <martin@gnome.org>
16472 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
16473 (MonoDebugVarInfo): Added `index' field for register based addresses.
16474 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
16475 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
16476 `MonoDebugVarInfo *params' and `guint32 this_offset' with
16477 `MonoDebugVarInfo *this_var'.
16479 * debug-symfile.c (relocate_variable): New static function to write
16480 a location description for a local variable or method parameter.
16482 2002-04-12 Martin Baulig <martin@gnome.org>
16484 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
16485 stack offset and begin/end scope address of a local variable.
16486 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
16487 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
16488 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
16490 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
16491 Added new relocation types for start/end scope of a local variable.
16493 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16495 * object.h: add mono_object_domain() macro.
16496 * reflection.c: handle typespecs.
16497 * icall.c: MonoMethod::get_Name() implementation.
16499 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16501 * icall.c: String::GetHashCode() icall implementation.
16503 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16505 * icall.c: String::IndexOfAny icall.
16506 * object.c, object.h: make array->max_length more useful.
16507 Intrduced mono_object_class() and mono_string_length() macros.
16509 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16511 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
16512 instead of g_unichar_isdigit.
16514 2002-04-11 Nick Drochak <ndrochak@gol.com>
16516 * icall.c: Implement a simple Double.ToString().
16518 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16520 * appdomain.h: only io-layer.h is supposed to be included.
16521 * icall.c: explicitly import environ. Fix warning.
16523 2002-04-10 Nick Drochak <ndrochak@gol.com>
16525 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
16526 return true even if it's not Daylight Savings time.
16527 Only return false for the case where the function isn't
16528 implemented for a plaform (read Windows).
16530 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16532 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
16535 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
16537 * mempool.c (mono_mempool_alloc): only use g_malloc when
16538 absolutely necessary.
16540 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
16542 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
16544 * class.c (mono_class_vtable): use domain mempool to allocate vtable
16545 (mono_class_proxy_vtable): use domain mempool
16547 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16549 * appdomain.h, appdomain.c: split initialization that requires the
16550 execution engine support into mono_runtime_init().
16552 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
16554 * class.c (mono_class_init): don't include vtable inside MonoClass
16555 to save some memory, gather some statistics.
16556 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
16558 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16560 * icall.c: internalcall implementation for ValueType.Equals().
16562 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
16564 * object.c (mono_message_init): moved
16565 (mono_runtime_exec_main): new arch. independent impl.
16566 (mono_runtime_invoke_array): new method - like
16567 mono_runtime_invoke, but you can pass an array of objects.
16568 (mono_remoting_invoke): new arch. independent impl.
16569 (mono_message_invoke): new arch. independent impl.
16570 (mono_runtime_class_init): new arch. independent impl.
16571 (mono_runtime_object_init): new arch. independent impl.
16573 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16575 * metadata.c, object.c, reflection.c: documented the exported
16578 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16580 * icall.c: simpler code to pass the assembly builder data to corlib.
16581 Implement GetNestedTypes() internalcall.
16583 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16585 * class.c: warn if a type can't be loaded.
16587 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
16589 * image.h: typedef MonoImageOpenStatus
16590 * types.h: removed unused file
16592 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
16594 * icall.c: Enum_ToObject accepts enum value arguments.
16596 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16598 * class.c: move initialization of properties, events and nested
16599 classes, so that they happen for interfaces, too.
16601 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16603 * icall.c: cleanup some ugly casts in Array_SetValue*.
16605 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16607 * icall.c: the values array fro enums is of the correct type, now.
16608 Implement (correctly) getFullName instead of assQualifiedName for
16610 * reflection.h, reflection.c: added mono_type_get_name ().
16612 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16614 * assembly.c, image.h: for each MonoImage, record from wich assembly
16616 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
16617 Make Type.Assembly work.
16619 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
16621 * debug-symfile.h: use char* instead of gpointer to avoid
16624 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
16626 * icall.c (ves_icall_InternalExecute): impl. FielSetter
16627 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
16629 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
16631 * icall.c (mono_message_init): impl. (code cleanup)
16632 (ves_icall_InternalExecute): impl. FieldGetter
16634 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
16635 defined we call all (non-static)methods through the vtable.
16637 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
16639 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
16640 finalizer even though the memory is still referenced (and the chunk of
16641 memory is not freed).
16643 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
16645 * assembly.c: fix brokeness.
16647 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
16649 * class.c: kill some warnings. Check explicit interface method
16650 implementation also without considering the namespace.
16651 Load also literal strings in static class data.
16653 2002-03-29 Miguel de Icaza <miguel@ximian.com>
16655 * assembly.c (default_assembly_name_resolver): Kill memory leak.
16656 (default_assembly_name_resolver): Make the resolver take the
16657 "base" directory where the assembly was originally defined, so we
16658 can load DLLs that are in the same directory as the assembly that
16659 is being referenced.
16661 2002-03-28 Dick Porter <dick@ximian.com>
16667 * unicode.c: Warning cleanups
16669 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
16671 * object.h, reflection.h: use the correct type instead of MonoObject.
16673 2002-03-28 Martin Baulig <martin@gnome.org>
16675 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
16676 (mono_debug_update_symbol_file): Initialize classes if necessary.
16678 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
16680 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
16681 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
16683 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
16685 * assembly.h: fix function prototype.
16686 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
16687 * mono-endian.h: use const cast.
16689 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
16691 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
16693 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
16695 * loader.c: don't assert when a typeref can't be loaded, give
16696 a chance to the runtime to trow an exception instead.
16697 * loader.h: fix warning.
16699 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
16701 * class.c (mono_class_proxy_vtable): added proxy support
16703 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
16705 * icall.c: removed last of PAL calls, added System.Environment
16706 * file-io.h, file-io.c: MonoIO implementation
16707 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
16709 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
16711 * appdomain.c: do not use the byte marker in ldstr table lookup.
16712 * debug-helpers.c: allow two ':' to separate class and method name.
16713 * object.c: allocate arrays bounds with the GC, too.
16714 * verify: add a few more checks.
16716 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
16718 * reflection.c: output also literal strings. Allocate parameter data
16719 with GC_malloc() (thanks, Martin, for catching this!).
16721 2002-03-26 Martin Baulig <martin@gnome.org>
16723 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
16724 include the `this' offset in the `param_offsets'.
16726 2002-03-25 Martin Baulig <martin@gnome.org>
16728 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
16729 mono_debug_get_class() function to get the classes. Added new
16730 relocation types for arrays and strings.
16731 (mono_debug_get_class): New static function to search in all
16732 referenced assemblies for a metadata token.
16734 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
16736 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
16738 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
16739 hold gc-allocated objects. Make the string heap a stream like the
16740 others. Removed duplicated code when writing stream info.
16741 Added asserts to catch possible buffer overflows. Set the sorted map
16742 for tables that need sorting. Added some documentation.
16744 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
16746 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
16747 for interned strings and vtables.
16749 2002-03-24 Martin Baulig <martin@gnome.org>
16751 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
16752 it in the array since it was created with g_slist_prepend().
16754 2002-03-24 Martin Baulig <martin@gnome.org>
16756 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
16757 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
16758 (mono_debug_method_from_token): Renamed to
16759 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
16760 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
16762 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
16765 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
16767 2002-03-24 Martin Baulig <martin@gnome.org>
16769 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
16770 (mono_debug_method_from_token): New func.
16772 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
16773 New interncall, calls mono_debug_local_type_from_signature().
16774 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
16775 calls mono_debug_method_from_token().
16777 2002-03-23 Martin Baulig <martin@gnome.org>
16779 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
16780 specifies the number of bytes to be converted, not the array size.
16781 Return the number of chars, not the number of bytes.
16782 (ves_icall_iconv_get_chars): The `byteCount' argument
16783 specifies the number of bytes to be converted, not the array size.
16785 2002-03-23 Martin Baulig <martin@gnome.org>
16787 * reflection.h (MonoReflectionSigHelper): New type.
16789 * reflection.c (mono_reflection_sighelper_get_signature_local),
16790 (mono_reflection_sighelper_get_signature_local): New functions.
16792 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
16793 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
16796 2002-03-23 Martin Baulig <martin@gnome.org>
16798 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
16799 is_writeable is set.
16800 (mono_raw_buffer_update): New function to write the modified map
16803 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
16805 * debug-symfile.c (mono_debug_update_symbol_file): Call
16806 mono_raw_buffer_update() when done writing.
16808 2002-03-23 Martin Baulig <martin@gnome.org>
16810 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
16812 * debug-symfile.c: Added support for arguments and local variables.
16814 2002-03-23 Dick Porter <dick@ximian.com>
16816 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
16817 protected by ifdefs, hence breaking the w32 build.
16819 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16821 * object.c: implement is_interned() the right way.
16823 2002-03-21 Martin Baulig <martin@gnome.org>
16825 * debug-symfile.[ch]: New files to handle debugging information
16826 files. There's also support to dynamically update these symbol
16827 files to include machine dependent information.
16829 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
16831 * threads.c (mono_thread_create): new function to create thread
16834 2002-03-20 Martin Baulig <martin@gnome.org>
16836 * icall.c (ves_icall_InternalInvoke): Create a new object if the
16837 method is a constructor.
16838 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
16839 points to ves_icall_InternalInvoke().
16841 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
16843 * file-io.c: Flush shouldn't throw exceptions.
16845 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
16847 * file-io.c: FileStream flush support; FileSetLength now
16848 restores file pointer.
16850 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
16852 * class.c: set image for pointer classes.
16854 2002/03/19 Nick Drochak <ndrochak@gol.com>
16856 * sysmath.c: Forgot one.
16858 2002-03-18 Miguel de Icaza <miguel@ximian.com>
16860 * sysmath.c: Avoid redefining existing names.
16862 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
16864 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
16865 handled by runtime as icall rather than dllimport from libm.so
16866 * file-io.c, file-io.h: fixed handle argument type.
16868 2002-03-18 Dick Porter <dick@ximian.com>
16870 * reflection.c (mono_image_get_type_info): rename interface to
16871 iface, because of "#define interface struct" on windows.
16873 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
16875 * class.c, class.h: rename and export mono_ptr_class_get().
16876 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
16877 * reflection.c, reflection.h, icall.c: better/saner type name
16878 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
16881 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
16883 * class.c (mono_class_init): removed hardcoded GHC_SLOT
16885 * icall.c (ves_icall_InternalInvoke): impl.
16887 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16889 * reflection.c: output the interface map table, too.
16891 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
16893 * class.c (class_compute_field_layout): separate computation of
16894 static field layout
16896 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
16898 * icall.c: added System.Buffer support.
16899 * file-io.c: moved file icalls from PAL to FileStream.
16901 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
16903 * icall.c (ves_icall_System_Object_GetHashCode): impl.
16905 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
16907 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
16909 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16911 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
16913 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
16915 * debug-helpers.{c,h}: moved here from monograph some useful functions
16916 to locate a method by name/signature in a class or image. Included
16917 also a small and flexible IL disassembler.
16919 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16921 * reflection.c: fixup tokens in methods with small header size, too.
16923 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
16925 * object.c (mono_string_to_utf8): remove assert(!error), instead
16928 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
16930 * icall.c: update to the new mono_Array_class_get interface.
16932 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
16934 * appdomain.c, object.c: Boehm-GC enable.
16935 * icall.c: make get_data_chunk() support split data requests.
16936 Ensure a class is initialized in more cases. Return only the first
16937 property found in GetProperties() or the compiler gets confused.
16938 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
16939 * reflection.h, reflection.c: add fixup mechanism for field and method
16940 tokens. Initialize assembly->typeref in a single place. Output
16941 properties after events. Support custom attributes for events, too.
16942 Typo fix for paramter custom attrs.
16944 2002-03-07 Martin Baulig <martin@gnome.org>
16946 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
16948 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
16950 * class.c (mono_array_class_get): fix. for multi. dim. arrays
16952 2002-03-06 Martin Baulig <martin@gnome.org>
16954 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
16955 non-zero lower bounds. See testcases #F10-#F13.
16957 2002-03-05 Martin Baulig <martin@gnome.org>
16959 * exception.c (mono_get_exception_argument_out_of_range): New exception.
16961 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
16962 ves_icall_System_Array_GetValue(), only calculate the absolute array position
16964 (ves_icall_System_Array_SetValue): Likewise.
16965 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
16966 as argument and does the actual work. This function is used when copying a
16967 multi-dimensional array.
16968 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
16969 now do all the widening conversions of value types.
16970 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
16972 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16974 * class.c: remove some magic numbers and use the smbolic names,
16975 instead. Added init_events() to load event info at class init time.
16976 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
16977 and mono_metadata_methods_from_event().
16978 * reflection.h, reflection.c: added support for writing out the evnets
16979 related information.
16981 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
16983 * reflection.h, icall.c: use a different method (GetInterfaces)
16984 to gather interface info and add isbyref, isprimitive and
16985 ispointer to the ves_icall_get_type_info() return value.
16987 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
16989 * class.h: stared adding support for events.
16990 * icall.c: split find_members implementation. Added debug icall to get
16991 the address of an object.
16992 * reflection.c: handle TypeBuilders in mono_type_get_object().
16994 2002-03-01 Martin Baulig <martin@gnome.org>
16996 * icall.c (ves_icall_System_Array_GetLength): This must throw an
16997 ArgumentOutOfRangeException(), not an ArgumentException().
16998 (ves_icall_System_Array_GetLowerBound): Likewise.
16999 (ves_icall_System_Array_GetValue): Improved argument checking.
17000 (ves_icall_System_Array_SetValue): Improved argument checking.
17002 2002-03-01 Martin Baulig <martin@gnome.org>
17004 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
17005 called with invalid arguments rather than just dying with g_assert().
17006 (ves_icall_System_Array_SetValue): Likewise.
17007 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
17008 raise a NotImplementedException instead.
17009 (ves_icall_System_Array_GetLength): Added argument checking.
17010 (ves_icall_System_Array_GetLowerBound): Added argument checking.
17012 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
17014 * object.h (mono_assert): new macros mono_assert and
17015 mono_assert_not_reached
17017 2002-02-28 Martin Baulig <martin@gnome.org>
17019 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
17020 and "System::String::IsInterned" to "System::String::_IsInterned".
17022 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
17024 * icall.c: remove hacks for typebuilder. Added icall to create a
17025 modified type from a tybebuilder.
17026 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
17027 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
17028 to create a backing MonoClass for a TypeBuilder.
17030 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17032 * class.c, class.h: more refactoring of class init.
17033 Export mono_class_setup_mono_type() and mono_class_setup_parent().
17035 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
17037 * marshal.c, marshal.h: start of marshaling interface.
17039 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17041 * icall.c: fix order in assembly qualified name icall.
17043 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17045 * class.c: do not free str, since we store it in the hash table.
17046 * reflection.h: add label field to MonoILExceptionInfo.
17047 * reflection.c: handle references to more than one assembly. Handle
17048 case when there isn't a module created in the assembly.
17050 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17052 * class.c: Fix typo. Start refactoring of class init code.
17054 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17056 * appdomain.c: exit with 1 on error.
17057 * class.c: we already have the name in MonoClassField.
17058 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
17059 MonoStreamHeader instead of an offset of image->raw_metadata.
17061 2002-02-26 Miguel de Icaza <miguel@ximian.com>
17063 * appdomain.c (mono_init): Be even more descriptive about the error.
17065 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
17067 * appdomain.c: give the user an informative message when corlib can't
17070 2002-02-26 Martin Baulig <martin@gnome.org>
17072 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17073 New icall to get the time zone data.
17075 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17077 * reflection.c: set virtual and raw size of section correctly.
17078 * threads.c: transfer domain information to newly created threads.
17080 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17082 * class.c: when instancing a class in a domain, load the default
17083 vaules for static fields from the constant table. Fix System.Enum to
17085 * icall.c: implement Object::GetType() internalcall. Implemented
17086 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
17087 Fixed checking of binding flags in find_members().
17088 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
17089 * reflection.c: handle enumerations when writing to the constant
17090 table. Use a different object cache for types.
17093 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
17095 * object.c (mono_object_isinst): fix for arrays
17097 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
17099 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17101 * object.c: don't use mprotect () and fix intern pool hash table
17102 lookup for big endian systems.
17104 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17106 * icall.c: change type_is_subtype_of () signature.
17108 2002-02-21 Mark Crichton <crichton@gimp.org>
17110 * rand.c, rand.h: Added random number generator for
17111 System.Security.Cryptography classes.
17113 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
17115 * icall.c: Added System.Security.Cryptography calls.
17117 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17119 * class.c, icall.c, metadata.c: better support for pointer types.
17120 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
17121 * reflection.c: Add support for getting custom attrs for properties
17122 and simplify some code.
17124 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17126 * icall.c: change getToken () and add custom attribute GetBlob()helper
17128 * reflection.h: add custom attrs array to the reflection builder structures.
17129 * reflection.c: encode and emit custom attributes for all the relevant
17130 reflection objects. Cache fieldref and methodref tokens. Change
17131 mono_image_create_token() interface to take a MonoDynamicAssembly.
17132 More complete custom attributes decoder. Load custom attributes for
17133 Assembly, Field, Method and Constructor objects, too. Make the
17134 returned array an Attribute[] one, not object[]. Added
17135 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
17136 custom attribute constructor.
17138 2002-02-20 Dick Porter <dick@ximian.com>
17142 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
17143 problem code out for now).
17145 2002-02-19 Radek Doulik <rodo@ximian.com>
17147 * object.c (mono_ldstr): use hash table to avoid multiple swapping
17149 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
17151 * icall.c: register the GetCustomAttributes method.
17152 * object.c, object.h: add mono_string_new_len ().
17153 * reflection.h, reflection.c: added mono_runtime_invoke(),
17154 mono_install_runtime_invoke(). Added
17155 mono_reflection_get_custom_attrs () to load custom attributes and
17156 create the attribute objects.
17158 2002-02-19 Dick Porter <dick@ximian.com>
17159 * threads-dummy-types.c:
17160 * threads-dummy-types.h:
17163 * threads-pthread-types.c:
17164 * threads-pthread-types.h:
17165 * threads-pthread.c:
17166 * threads-pthread.h: Deleted obsolete files
17168 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
17170 * class.c (mono_class_vtable): runtime init the class when we
17171 allocate static class data.
17173 * icall.c (ves_icall_System_Array_SetValue): check for null values.
17175 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
17176 and String - but we will need generic marshalling support in the
17178 (mono_init): set the domain name in a ms compatible way
17180 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
17183 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
17185 * object.c (mono_array_clone): use alloca() instead of g_malloc
17188 * appdomain.c (mono_domain_unload): impl.
17190 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17192 * appdomain.c, object.c: fix intern pool implementation.
17193 * class.c: fix alignment code.
17195 2002-02-16 Radek Doulik <rodo@ximian.com>
17197 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
17198 and s2 > s1, just copy lower bytes to be compatible with little
17199 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
17200 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
17202 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
17203 force big_endian to be 1 for big endian machines
17204 (ves_icall_iconv_new_decoder): ditto
17206 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
17208 * socket-io.c (convert_sockopt_level_and_name): If the system
17209 doesn't define SOL_IP or SOL_TCP, get them by hand using
17210 getprotobyname() and caching the values (because this could be a
17212 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
17213 Use the appropriate struct when the system does support it. Ie,
17214 not all systems have struct ip_mreqn so use struct ip_mreq when
17217 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
17219 * reflection.c: handle finally clauses.
17221 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
17223 * socket-io.c: use g_snprintf() instead of snprintf.
17225 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
17227 * reflection.c (mono_param_get_objects): Cast second argument to
17228 mono_method_get_param_names to a const char** to silence the
17231 * appdomain.c (mono_domain_assembly_open): Put parens around the
17232 truth statement in the for-loop.
17234 * unicode.c (iconv_convert): Got rid of a compiler warning about
17235 int i being unused when the system has a new iconv.
17236 (iconv_get_length): Same.
17238 * image.c (load_class_names): Cast the second argument to
17239 g_hash_table_insert() to char* to hush compiler warnings about the
17241 (mono_image_open): Same here.
17243 * socket-io.c: Don't conditionally include sys/filio.h or
17244 sys/sockio.h here anymore since we now get them from
17245 io-layer/io-layer.h
17246 (inet_pton): If the system doesn't support inet_aton, implement
17247 using inet_addr and also #define INADDR_NONE if it isn't defined
17250 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17252 * metadata.c, metadata.h: added function to get packing and size info
17254 * reflection.h, reflection.c: handle field RVA data. Save info about
17255 the table layout if needed. Assign typedef indexes to all the types
17256 before dumping the info about them to avoid forward reference problems.
17258 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
17260 * socket-io.c (convert_sockopt_level_and_name): ifdef
17261 SO_ACCEPTCONN because it is not defined on my system (old debian)
17263 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17265 * opcode.c: use stddef.h to get NULL.
17267 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
17269 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
17270 for FIONBIO, FIONREAD and SIOCATMARK.
17271 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
17272 define INADDR_NONE and besides, inet_addr() is deprecated and
17273 should not be used. Use inet_pton() instead - it also has the
17274 added bonus that it can easily handle IPv6 addresses as well.
17275 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
17277 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17279 * decimal.c: remove _MSC_VER conditional.
17281 2002-02-13 Dick Porter <dick@ximian.com>
17284 * icall.c: Internal calls for Blocking, Select, Shutdown,
17285 GetSocketOption and SetSocketOption
17287 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17289 * assembly.cs: better resolver: use it instead of some kludgy
17292 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
17294 * reflection.c: the best way to speed-up the compiler is to avoid
17297 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
17299 * class.c (mono_class_vtable): changed the object layout
17300 (obj->vtable->class).
17301 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
17303 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17305 * assembly.c: look for assemblies in the assembly dir, too.
17307 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17309 * class.c: fix thinko in mono_class_from_type().
17311 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17313 * exception.h, exception.c: added TypeLoadException.
17314 * object.h, object.c: added mono_array_clone ().
17315 * icall.c: handle throwOnError in AssemblyGetType().
17316 Added Array.Clone().
17317 * opcode.h, opcode.c: use a single value for the opcode val.
17318 Compile fix for non-gcc compilers.
17320 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
17322 * opcodes.c, opcodes.h: export interesting info about opcodes.
17324 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
17326 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
17329 * class.c (class_compute_field_layout): set element_class for enums
17330 (mono_class_create_from_typedef): set element_class for normal classes
17332 * icall.c (ves_icall_System_Enum_get_value): impl.
17334 * class.c (mono_class_create_from_typedef): do not set valuetype
17335 flag for System.ValueType and System.Enum
17337 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
17339 * unicode.c (iconv_convert): fix big endian problem.
17341 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17343 * class.c: add asserts if we are ever going to scribble over memory.
17344 * socket-io.c: not all systems have AF_IRDA defined.
17346 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
17348 * class.c (class_compute_field_layout): do not consider static
17349 fields to compute alignment
17351 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
17353 * appdomain.c (mono_appdomain_get): impl.
17354 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
17356 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17358 * icall.c: ignore "file://" prefix when loading an assembly.
17360 2002-01-23 Dick Porter <dick@ximian.com>
17364 * Makefile.am: Added socket support
17366 2002-01-23 Miguel de Icaza <miguel@ximian.com>
17368 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
17369 code back. This should return the assemblies that are loaded by
17370 the runtime on behalf of an application domain.
17372 The current implementation is still broken, it just returns every
17373 assembly loaded, but until we get real applications domain this
17376 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
17378 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
17381 2002-01-23 Miguel de Icaza <miguel@ximian.com>
17383 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
17384 the mono_class_from_name lookup.
17385 (ves_icall_get_parameter_info): ditto.
17386 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
17388 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
17390 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
17392 * class.c: load also nested classes on class init.
17393 System.ValueType instance methods gets passed boxed
17394 values, unless methods in derived classed that get a pointer to the
17396 * icall.c: use better name parsing code in GetType().
17397 * image.c, image.h: add mono_image_loaded ().
17398 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
17399 * reflection.c, reflection.h: added mono_reflection_parse_type().
17401 2002-01-22 Veronica De Santis <veron78@interfree.it>
17403 * icall.c : Added mapping of internal calls for Manual and Auto reset events
17404 * threads.c : Added the implementation of internal calls for events
17405 * threads.h : Added prototypes of internal calls for events
17407 2002-01-21 Radek Doulik <rodo@ximian.com>
17409 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
17411 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
17413 * class.c (mono_class_init): set min_align to 1 (instead of 0)
17414 (mono_class_value_size): use min_align
17416 2002-01-20 Dick Porter <dick@ximian.com>
17419 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
17420 so it compiles on w32.
17422 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
17424 * metadata.c (mono_type_stack_size): impl.
17426 * class.c (mono_class_get_field): impl. memberref token
17428 2002-01-16 Veronica De Santis <veron78@@interfree.it>
17430 * icall.h : Added the internal calls mapping for CreateMutex_internal
17431 and ReleaseMutex_internal.
17432 * threads.h : Added the prototype of mutexes internal calls.
17433 * threads.c : Added the implementations of mutexes internal calls.
17435 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17437 * metaparse.h: removed unused file.
17438 * reflection.c, reflection.h: added stream_data_align () function
17439 to align data in streams and keep stream aligned. Add support for
17440 exception support in method headers.
17442 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
17444 * unicode.c: make iconv_convert () return the number of bytess written
17445 in the output buffer.
17447 2002-01-15 Dick Porter <dick@ximian.com>
17448 * threads.c: Make the runtime's idea of infinite timeouts coincide
17449 with the class library's
17451 Fix a particularly egregious bug in mono_thread_cleanup(). That
17452 code was so utterly bogus it must have been written on a Monday.
17454 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17456 * reflection.h: add subtypes field to TypeBuilder.
17457 * reflection.c: encode constants for literal fields.
17458 Handle subtypes. Fix user string token (and add a zero byte)
17461 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
17463 * class.c (mono_class_init): bug fix: assign slot numbers for
17466 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17468 * reflection.c: don't try to output a code RVA for abstract methods.
17469 Small fixes for method header format. Output parameter info to the
17470 ParamDef table. Save method overriding info to MethodImpl table.
17471 Fix property support. Allow typedef.extends to be a type in the
17473 * verify.c: fix off-by-one error.
17475 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
17477 * class.c: fix mono_class_from_mono_type () for szarray types.
17478 Remove unused cache check in mono_class_from_type_spec().
17479 * icall.c: *type_from_name () functions handle simple arrays and byref.
17480 * reflection.c: handle byref and szarray types. Handle methods without
17481 body (gets P/Invoke compilation working). Handle types and fields in
17483 * reflection.h: add rank to MonoTypeInfo.
17485 2002-01-10 Dick Porter <dick@ximian.com>
17487 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
17490 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17492 * icall.c: initialize class in type_from_handle ().
17493 Loop also in parent classes for get_method ().
17494 * reflection.c: properly encode class and valuetype types.
17495 Start on encoding TypeBuilder types. Handle fieldrefs.
17496 Use correct length when registering a user string.
17497 Handle ConstructorBuilder and MonoMethod in get_token ().
17498 Make mono_type_get_object () aware of cached types.
17499 * object.c: back out change to mono_string_new ().
17501 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
17502 * object.c: mono_string_new should return a NULL when the string
17503 passed in is NULL -- not try to deference it.
17505 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17507 * icall.c: hack to make IsSubType work for TypeBuilders.
17508 * reflection.c: emit constructors before methods.
17509 Retrieve param names in mono_param_get_objects().
17511 2002/01/05 Nick Drochak <ndrochak@gol.com>
17513 * Makefile.am: fix list of headers and sources so automake 1.5
17514 doesn't complain. Removed \# at end of list.
17516 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17518 * reflection.c: get token for a method ref. Set return type of
17519 constructor to void.
17520 * loader.c: debug message.
17521 * class.c: typo fix.
17523 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
17525 * icall.c: fix array init with rank > 1. FindMembers
17526 loops in parent class as well.
17527 * image.c: do not insert nested types in name cache.
17528 * reflection.c: warning fix.
17529 * reflection.h: add override method (for interface impl).
17531 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
17533 * metadata.c: fix customattr decoding.
17535 2001-12-21 Miguel de Icaza <miguel@ximian.com>
17537 * rawbuffer.cs: Added native Win32 implementation, avoids using
17538 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
17540 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
17542 * class.c: make the low-level routines handle the cache.
17544 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
17546 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
17548 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
17550 * class.c: fix mono_array_element_size() for objects.
17551 * class.h, class.c: add properties to MonoClass and load them
17553 * icall.c: check with isinst() when assigning a value to an array
17554 instead of requiring the classes to match exactly.
17555 Implemented icall for System.Type::GetType().
17556 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
17557 enums. Handle bindingflags when looking for methods and fields.
17558 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
17559 and mono_metadata_methods_from_property().
17560 * reflection.h, reflection.c: added structures for propreties,
17561 parameters and enums. Implemented mono_property_get_object() and
17562 mono_param_get_objects().
17564 2001-12-18 Dick Porter <dick@ximian.com>
17566 * file-io.c: Use mono_string_to_utf16() instead of
17567 mono_string_chars()
17569 * object.c: Added mono_string_to_utf16(), which copies the non
17570 NULL-terminated MonoString into a new double-null-terminated
17573 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
17575 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
17577 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
17579 * file-io.c: raise exceptions if handle is invalid.
17581 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
17583 * assembly.c: yet another check for mscorlib.
17584 * class.c, class.h: load nesting info for classes.
17585 * icall.c: many new functions to support the Reflection classes.
17586 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
17587 * reflection.h, reflection.c: mono_image_create_token(),
17588 mono_assembly_get_object(), mono_type_get_object(),
17589 mono_method_get_object(), mono_field_get_object(): methods to return
17590 objects that parallel the C representation of assemblies, types,
17593 2001-12-11 Dick Porter <dick@ximian.com>
17596 * file-io.c: Internal calls for file IO.
17598 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
17600 * tabledefs.h: missing FileAttributes.
17601 * verify.h, verify.c: use is_valid_string () to simplify and check for
17602 valid strings more correctly. Fix warnings and speeling.
17603 Check more tables: Filed, File, ModuleRef, StandAloneSig.
17604 Check code: branches, maxstack, method calls.
17606 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
17608 * object.c (mono_object_allocate): removed static, so that the jit
17609 can allocate value types.
17611 * icall.c (ves_icall_System_DateTime_GetNow): impl.
17613 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17615 * class.c: init enum types right away and register the
17616 token->MonoClass map in mono_class_create_from_typedef ().
17617 * verify.h, verify.c: first cut of the verifier.
17618 * pedump.c: add --verify switch to verify metadata tables.
17619 * tabledefs.h: add some missing enums.
17621 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
17623 * class.c (mono_install_runtime_class_init): impl.
17624 (mono_class_init): renamed mono_class_metadata_init to
17625 mono_class_init, also removed the metadata_inited flag
17627 * object.c (mono_object_isinst): use faster algorithm
17629 2001-11-30 Radek Doulik <rodo@ximian.com>
17631 * mono-endian.h: reverted last change
17632 added function prototypes
17634 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
17635 add mono-endian.c back
17637 * mono-endian.c: returned back, as Paolo pointed out, it's needed
17638 for unaligned access, I've mistaked it with endianess. I am
17640 (mono_read16): fix reverted endianess
17641 (mono_read64): ditto
17642 (mono_read32): ditto
17644 2001-11-30 Dick Porter <dick@ximian.com>
17646 * exception.c: Implement mono_exception_from_name()
17648 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
17650 * metadata.h, metadata.c: remove params_size and locals_size and their
17651 calculation from the metadata code: they are only usefult to the
17654 2001-11-29 Radek Doulik <rodo@ximian.com>
17656 * object.c (mono_ldstr): swap bytes here, it's probably not the
17657 best place, but works for me now, I'll redo it once I know mono
17658 better, also note that I add PROT_WRITE and don't reset back, also
17659 note that it's only affects big endians, so x86 should be OK
17661 * mono-endian.h (read16): use just glib macros for both endians
17663 * mono-endian.c: removed as glib macros are used in in
17664 mono-endian.h so we don't need to care about endianess for read
17665 macros as glib does that for us already
17667 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
17669 * class.h, class.h: take minimum alignment into consideration so
17670 that the fields of a class remain aligned also when in an array.
17672 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17674 * loader.h, loader.c: add mono_method_get_param_names().
17675 * class.c: 0-init class fields.
17677 2001-11-26 Dick Porter <dick@ximian.com>
17681 * threads.c: New file that handles System.Threading on all platforms
17684 * object.h: Remove the synchronisation struct from MonoObject,
17685 replace it with a pointer that gets initialised on demand
17687 * Makefile.am: Replace all the system-specific threading code with
17688 a single file that uses the new wrapper library
17690 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
17692 * class.c, class.h: add mono_install_trampoline() so that the runtime
17693 can register a function to create a trampoline: removes the ugly
17694 requirement that a runtime needed to export arch_create_jit_trampoline.
17695 * object.h, object.c: added mono_install_handler() so that the runtime
17696 can install an handler for exceptions generated in C code (with
17697 mono_raise_exception()). Added C struct for System.Delegate.
17698 * pedump.c: removed arch_create_jit_trampoline.
17699 * reflection.c: some cleanups to allow registering user strings and
17700 later getting a token for methodrefs and fieldrefs before the assembly
17702 * row-indexes.h: updates and fixes from the new ECMA specs.
17704 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
17706 * class.h, class.c: add enum_basetype field to MonoClass.
17707 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
17708 to get index in the constant table reated to a field, param or
17710 * reflection.h, reflection.c: handle constructors. Set public-key and
17711 version number of the built assembly to 0.
17712 * row-indexes.h: update from new ECMA spec.
17714 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
17716 * class.h, class.c: add a max_interface_id to MonoClass.
17717 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
17718 since it's used to do that. Added mono_type_type_from_obj().
17719 Make GetType() return NULL instead of segfaulting if the type was not
17720 found. Handle simple arrays in assQualifiedName.
17721 * object.h: add a struct to represent an Exception.
17722 * reflection.c: output call convention in method signature.
17723 Add code to support P/Invoke methods and fixed offsets for fields.
17725 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
17727 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
17729 * icall.c: use mono_array_addr instead of array->vector: fixes the
17730 reflection image writing.
17731 * reflection.c: init call convention byte to 0 in method signature.
17732 Encode the property signature. Don't output property-related methods
17733 twice. Really process the properties for a type (don't cast a field to
17734 a property, my mom always told me that).
17735 Fix 64 bit issues in pointer alignment in a different and more
17738 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
17740 * loader.h: Removed type class from MonoDefaults, added monotype
17742 * loader.c: Loaded MonoType, removed loading of Type
17744 * icall.c (my_mono_new_object): Now returns a System.MonoType,
17745 and fills in System.Type._impl with a RuntimeTypeHandle rather
17746 than the actual MonoClass *
17748 (ves_icall_type_from_handle): change from type_class to
17751 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
17754 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
17757 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
17759 (ves_icall_System_Reflection_Assembly_GetType): implemented
17761 (ves_icall_System_MonoType_assQualifiedName): implemented
17763 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
17765 2001-11-09 Miguel de Icaza <miguel@ximian.com>
17767 * assembly.c (mono_assembly_open): Implement a cache for the
17770 (mono_assembly_close): only destroy the assembly when the last
17773 2001-11-09 Dick Porter <dick@ximian.com>
17775 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
17777 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
17779 * class.c (mono_class_metadata_init): bug fix: compute the right slot
17781 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
17783 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
17784 from Martin Weindel.
17785 * object.h: add mono_string_chars ().
17787 2001-11-07 Miguel de Icaza <miguel@ximian.com>
17789 * reflection.c (build_compressed_metadata): Eliminates warnings
17790 and uses 64-bit clean code.
17792 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
17793 (mono_type_equal): Change signature to eliminate warnings.
17795 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17797 * icall.c, loader.c: remove the internalcall array constructors.
17798 Changes to match the new MonoArray structure.
17799 * object.h, object.c: an array object doesn't allocate an extra
17800 vector. Add mono_array_new_full () to create jagged arrays easily.
17802 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
17804 * metadata.h, metadata.c: add mono_metadata_field_info () to
17805 retreive all the info about a field from vairous tables.
17806 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
17807 * class.h, class.c: augment MonoClassField with more info.
17808 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
17809 policy and load a field's RVA if needed.
17811 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
17813 * class.c (mono_class_metadata_init): create a trampoline for all
17814 virtual functions instead of actually compiling them.
17816 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
17818 * class.h, class.c: include name in MonoClassField.
17819 * class.c: fix fundamental type of System.Object and System.String.
17820 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
17822 * icall.c: remove internalcalls for the Reflection stuff that is now
17824 * loader.c: mono_field_from_memberref () implementation.
17825 * mono-endian.c: thinko (s/struct/union/g).
17826 * object.c, object.h: make the mono_string_* prototypes actually use
17827 MonoString instead of MonoObject.
17828 * reflection.c, reflection.h: updates for changes in the reflection
17829 code in corlib: we use C structures that map to the actual C# classes.
17830 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
17831 fat method header if needed and use the info from the ILGenerator for
17832 methods. Handle fields in types. Misc fixes.
17834 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
17836 * class.c (mono_class_metadata_init): bug fix: always allocate
17837 space for static class data
17839 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
17841 * class.c (mono_compute_relative_numbering): use relative
17842 numbering to support fast runtime type checks.
17844 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
17846 * class.c (mono_class_create_from_typeref): added debugging output
17847 to print class name when MonoDummy is returned instead of real class
17849 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
17851 * class.c (mono_class_metadata_init): interface offset table now
17852 contains pointers into the vtable - this is more efficient for the jit
17854 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
17856 * class.c (mono_class_metadata_init): use a temporary vtable (the
17857 old algorithm only worked for the interpreter, but not for the jit)
17859 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
17861 * loader.c (method_from_memberref): use mono_class_get to get the
17862 class of an array instead of using System.Array directly.
17863 (mono_get_method): also add MEMBERREF methods to the method cache
17864 which usefull for arrays.
17866 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
17868 * pedump.c (arch_compile_method): added to compute vtable entry
17870 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
17871 number of interfaces.
17873 * class.h: merged MonoArrayClass into MonoClass
17875 * class.c (mono_class_create_from_typedef): compute the vtable size and
17876 allocate space to include the vtable inside MonoClass
17877 (mono_class_metadata_init): initialize the vtable
17879 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
17881 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
17882 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
17883 * image.c: endian fixes by Laurent Rioux.
17884 * object.h, object.c: rename MonoStringObject to MonoString and
17885 MonoArrayObject to MonoArray. Change some function names to conform to
17886 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
17887 guint16* as first argument, so don't use char*.
17888 Provide macros to do the interesting things on arrays in a portable way.
17889 * threads-pthread.c: updates for the API changes and #include <sched.h>
17890 (required for sched_yield()).
17891 * icall.c: updates for the API changes above.
17892 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
17893 platforms that need them.
17895 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
17897 * class.c: set the correct type for all the fundamental
17898 type when loading the class.
17900 2001-10-05 Dick Porter <dick@ximian.com>
17902 * threads-pthread.c (pthread_mutex_timedlock): Simple
17903 compatibility version for C libraries that lack this call.
17905 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17907 * class.c: MonoTypes stored in MonoClass are stored as
17908 fundamental MonoTypes when the class represents a
17909 fundamental type (System.Int32, ...).
17910 The TypeHandle return by ldtoken is a MonoType*.
17911 * icall.c: ves_icall_get_data_chunk () write out all the
17912 PE/COFF stuff. Implement ves_icall_define_method (),
17913 ves_icall_set_method_body (), ves_icall_type_from_handle ().
17914 * image.c: properly skip unknown streams.
17915 * loader.h, loader.c: add type_class to mono_defaults.
17916 * metadata.c, metadata.h: export compute_size () as
17917 mono_metadata_compute_size () with a better interface.
17918 Typo and C&P fixes.
17919 * pedump.c: don't try to print the entry point RVA if there is no entry point.
17920 * reflection.c, reflection.h: many cleanups, fixes, output method
17921 signatures and headers, typedef and typeref info, compress the metadata
17922 tables, output all the heap streams, cli header etc.
17923 * row-indexes.h: typo fixes.
17925 2001-10-04 Dick Porter <dick@ximian.com>
17927 * object.h: Add a synchronisation mutex struct to MonoObject
17929 * object.c (mono_new_object): Initialise the object
17930 synchronisation mutexes
17932 * icall.c: System.Threading.Monitor internal calls
17934 * threads-pthread.h:
17935 * threads-pthread.c: System.Threading.Monitor internal calls
17937 * threads-types.h: New file, includes the system-specific thread
17940 * threads-pthread-types.h:
17941 * threads-pthread-types.c: New files, handle pthread-specific
17942 synchronisation types
17944 * threads-dummy-types.h:
17945 * threads-dummy-types.c: New files of dummy support for
17946 thread-specific types
17950 * pedump.c: include mono-endian.h not endian.h
17952 * Makefile.am: More threads files.
17953 Name mono-endian.h not endian.h
17955 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
17957 * Makefile.am, reflection.h, reflection.c: move here the reflection related
17958 stuff and implement a few more bits.
17959 * icall.c: a field needs to be dereferenced twice. Do not use the same
17960 name for two variables in the same scope.
17961 * image.c, image.h: cleanups.
17963 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
17965 * class.c (mono_class_metadata_init): bug fix: compute the right size
17967 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
17969 * icall.c: implemented some of the Reflection internalcalls.
17970 * image.c, image.h: start writing out the PE/COFF image.
17971 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
17972 that does the reverse than decode_blob_size ().
17973 * object.c: use mono_metadata_encode_value (). Move here
17974 temporary implementation of mono_string_to_utf8 ().
17975 * rawbuffer.c: make malloc_map static.
17977 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17979 * metadata.c: fix type comparison for arrays.
17980 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
17981 Added a couple of new classes to monodefaults.
17982 * icall.c: added a couple of Reflection-related internalcalls.
17983 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
17984 Added a byval_arg MonoType to MonoClass.
17986 2001-09-28 Dick Porter <dick@ximian.com>
17989 * threads-pthread.h:
17990 * threads-pthread.c: Implemented internal calls for
17991 LocalDataStoreSlot operations. Applied mutexes around all shared
17992 data. Reworked the thread creation and Start() operations to
17993 avoid a race condition.
17996 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
17998 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
18000 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
18002 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
18004 * class.c, loader.c: warn and return NULL instead of erroring out.
18005 * icall.c: added System.AppDomain::getCurDomain().
18006 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
18008 2001-09-25 Dick Porter <dick@ximian.com>
18010 * threads-pthread.h:
18011 * threads-pthread.c: Implemented timed thread joining and added
18012 System.Threading.Thread::Join_internal internal call
18014 * icall.c: Added System.Threading.Thread::Join_internal internal call
18017 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
18019 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
18021 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
18022 mono_string_intern () to implement the semantics of the ldstr opcode
18023 and the interning of System.Strings.
18024 * icall.c: provide hooks to make String::IsIntern and String::Intern
18027 2001-09-23 Dick Porter <dick@ximian.com>
18030 * threads-dummy.h: New files of dummy threading routines
18032 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
18033 support code based on system specifics
18035 Rename PTHREAD_LIBS to THREAD_LIBS
18037 2001-09-23 Dick Porter <dick@ximian.com>
18039 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
18040 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
18042 (mono_thread_init): Set up a Thread object instance to return when
18043 the main thread calls Thread.CurrentThread
18044 (mono_thread_cleanup): Wait for all subthreads to exit
18046 * icall.c: New internal calls for System.Threading.Thread::Sleep
18047 (including Schedule) and CurrentThread
18049 * threads.h: New file, to insulate thread-specific stuff from the
18052 2001-09-21 Dick Porter <dick@ximian.com>
18054 * threads-pthread.h:
18055 * threads-pthread.c: New file, for handling pthreads-style
18056 threading support. Start() now starts a new thread and executes
18057 the ThreadStart delegate instance.
18059 * icall.c: Added the internalcall for
18060 System.Threading.Thread::Start_internal
18062 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
18064 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
18066 * loader.c: work around the different signatures for delegates
18067 constructors csc generates in compiled code vs the ones compiled in mscorlib.
18069 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18071 * class.h, class.c: add mono_class_get_field_from_name ().
18072 * *: Fix C comments and other ANSI C issues.
18074 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
18076 * endian.h, assembly.c: fix some endianness issues.
18078 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
18080 * loader.h, load.c: add delegate_class to mono_defaults.
18081 Handle runtime provided methods in mono_get_method ().
18083 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
18085 * loader.c (mono_get_method): use pinvoke for internal call
18087 * icall.c: use pinvoke for internal call
18089 * loader.c (method_from_memberref): set the method name
18091 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
18093 * metadata.c: help the compiler generate better code for
18094 mono_class_from_mono_type ().
18096 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
18098 * class.c (mono_class_metadata_init): delayed computing of the
18099 class size to mono_class_metadata_init ()
18101 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
18103 * class.c, class.h: add an interfaces member to MonoClass.
18104 * image.c, image.h: add assembly_name field to MonoImage
18105 from the assembly table.
18106 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
18108 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18110 * class.c: Handle Array in mono_class_from_mono_type ().
18111 * metadata.c, pedump.c: some endian fixes.
18113 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18115 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
18116 * metadata.c: fix small problem introduced with the latest commit.
18118 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
18120 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
18121 We don't need a MonoMetadata pointer anymore to compare signatures in
18122 mono_metadata_signature_equal (), update callers.
18123 Reduced memory usage an number of allocations for MonoMethodHeader and
18124 MonoMethodSignature.
18126 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
18128 * metadata.c: added compare for szarray.
18130 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
18132 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
18133 and add a couple more types to it and mono_defaults. Give an hint on
18134 classes that need implementing in our corlib and are referenced
18137 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
18139 * class.h, class.c: keep track if a class is also an Enum.
18140 * loader.c: Implement a couple more types for use in libffi
18141 marshalling. Gives better diagnostics when failing to dlopen
18142 a library. Set method->klass for P/Invoke methods, too.
18144 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
18146 * class.c, class.h: add a MonoType this_arg to MonoClass that
18147 represents a pointer to an object of the class' type that
18148 can be used by the interpreter and later the type cache.
18149 Add best guess alignment info for valuetype objects.
18151 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
18153 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
18154 into MonoType: one less level of indirection and allocation and
18155 simplifies quite a bit of code. Added cache for MonoTypes that are
18156 used frequently, so that we don't need to allocate them all the time.
18158 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
18160 * class.c (mono_class_create_from_typedef): System.Enum is also a
18161 value type, although it does not derive from System.ValueType
18162 (maybe a bug in the ms compiler?)
18164 * metadata.c (mono_type_size): return the right size for value types
18166 * loader.c (mono_get_method): only initialize method header if not abstract
18168 * class.c (mono_class_from_mono_type): use mono_default values.
18170 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
18172 * *: use MonoClass pointers instead of <type_tokens>
18174 * class.h: new flag: metadata_inited.
18176 * class.c (mono_class_metadata_init): impl.
18177 (mono_class_instance_size): impl.
18178 (mono_class_data_size): impl.
18180 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18182 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
18183 MonoClass now has the name and name_space fields.
18184 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
18185 mono_get_method () takes and optional MonoClass as argument.
18186 Removed mono_typedef_from_name() and added mono_class_token_from_name()
18187 instead that takes advantage of a map from class names to typedef
18188 tokens in MonoImage.
18190 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
18192 * metadata.c: zero is not a valid alignment boundary.
18193 Merge MONO_TYPE_VOID in default decoding code.
18195 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
18197 * image.h: merged MonoMetadata into MonoImage
18199 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
18200 identify the type of elements.
18202 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
18204 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
18205 * cil-coff.h: split MonoMSDOSHeader and add size info.
18206 * image.c: add some consistency checks.
18207 * metadata.c: fix row size computation: one programmer
18208 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
18209 add explanation for the locator routine.
18210 Fix decoding of size in method header.
18212 2001-08-20 Miguel de Icaza <miguel@ximian.com>
18214 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
18215 (g_concat_dir_and_file): Bring g_concat_dir_and_file
18216 function from gnome-libs. This uses the right path separator
18217 based on the OS, and also works around a bug in some systems where
18218 a double slash is not allowed.
18219 (default_assembly_name_resolver): Use g_concat_dir_and_file
18220 (mono_assembly_open): ditto.
18222 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
18224 * metadata.c (mono_metadata_signature_equal): impl.
18226 * *: void is now a realy MonoType (instead of using NULL)
18228 * metadata.c (do_mono_metadata_parse_type): use
18229 mono_metadata_parse_type to parse void value.
18231 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
18233 * metadata.c, metadata.h: in the signature and method header store
18234 only the space required for holding the loca vars and incoming arguments.
18236 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
18238 * metadata.c (do_mono_metadata_parse_type): treat void like any
18239 other type (instead of assigning NULL);
18241 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
18243 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
18245 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
18247 * image.c (do_mono_image_open): added a cache for arrays.
18249 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18251 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
18252 decode a single column from a row in a metadata table and changes
18253 to take advantage of it in the typedef locator (gives a nice speed up).
18254 Store offset info for function params.
18256 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
18258 * image.h (MONO_IMAGE_IS_CORLIB): removed
18260 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
18262 * assembly.c: how could mono_assembly_close () had ever worked?
18263 * metadata.c, metadata.h: provide offset info for local vars.
18264 Implement mono_type_size () to take care of alignment as well
18265 as size (it was mono_field_type_size in cli/class.c before).
18267 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
18269 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
18271 * assembly.h (CORLIB_NAME): set to corlib.dll
18273 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
18275 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18277 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
18278 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
18279 tokentype.h: massive namespace cleanup.
18281 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18283 * metadata.h, metadata.c: decode exception clauses when parsing method header.
18285 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
18287 * metadata.c (mono_metadata_free_type): added check for type !=
18288 NULL (void) before calling mono_metadata_free_type()
18290 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
18292 * metadata.h, row_indexes.h: added header with enumerations to use
18293 to index in the columns from tables in metadata and to decode coded
18294 tokens: we should start using this instead of embedding magic numbers
18297 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
18299 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
18300 Move metadata_t info from cli_image_info_t to MonoImage, where
18301 it's easily accessible. Changed all the uses accordingly.
18302 Added the method and class caches to MonoImage.
18303 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
18304 and mono_metadata_decode_value () signature to be more consistent
18305 with the other parse functions (and simplify code). Taken advantage
18306 of zero-length array allocation with GCC. Removed reduntant (and
18307 wrong) MonoFieldType struct and use MonoParam instead. Changed
18308 mono_metadata_parse_field_type () to use common code for parsing.
18309 Added mono_metadata_typedef_from_field () and
18310 mono_metadata_typedef_from_method () to lookup a typedef index from a
18311 field or method token.
18312 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
18314 2001-07-23 Miguel de Icaza <miguel@ximian.com>
18316 * metadata.c (mono_metadata_parse_field_type): Implement.
18317 (do_mono_metadata_parse_type): Split engine from
18318 mono_metadata_parse_type, so that we can create smaller structures
18319 for things that just have one pointer to the MonoType (look at
18322 2001-07-20 Miguel de Icaza <miguel@ximian.com>
18324 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
18325 as Jan Gray found out, it is incorrect.
18327 2001-07-18 Miguel de Icaza <miguel@ximian.com>
18329 * assembly.c: Implement asssembly loading. This loads an image
18330 and loads all the referenced assemblies. Come to think of it, we
18331 could always do lazy loading of the assemblies.
18333 * image.c (mono_image_open): Keep loaded images in a hashtable.
18335 * image.h (MonoImage): Add reference count.
18337 2001-07-17 Miguel de Icaza <miguel@ximian.com>
18339 * assembly.c (mono_assembly_open): Keep track of the file name in
18340 case the assembly has no ASSEMBLY table.
18342 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
18345 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
18347 * metadata.c, metadata.h: decode local vars in method header
18348 parse function. Change callers accordingly.
18350 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
18352 * metadata.h, cil-coff.h: protect against multiple inclusion.
18353 Added some new structures to hold information decoded from metadata:
18354 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
18355 and relevant decoding/free functions.
18356 * metadata.c: implement decoding functions. Add warning for out of bounds
18357 index in mono_metadata_locate(). Implement mono_get_method () to retreive
18358 all the info about a method signature and invocation. Remove check on
18359 uninitialized local var in parse_mh() and fix memory leak.
18361 2001-07-12 Miguel de Icaza <miguel@ximian.com>
18363 * metadata.h: More macros.
18365 * tokentype.h: New file.
18367 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
18369 * assembly.c: added a consistency check and initialize
18370 some structures with g_new0().
18371 * metadata.c: fixed a couple more bugs in table size computation
18372 and add other checks for out-of bound access to metadata.
18374 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
18376 * metatada.c: fix bugs computing table sizes. Spew a
18377 warning when index in string heap is out of bounds.
18379 2001-07-04 Miguel de Icaza <miguel@ximian.com>
18381 * metadata.h: Add a couple of macros to manipulate tokens.
18383 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18385 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
18386 cli_section_tables).
18388 2001-07-01 Miguel de Icaza <miguel@ximian.com>
18390 * metadata.c (mono_metadata_user_string): New function, provides
18391 access to the UserString heap.
18393 2001-06-27 Miguel de Icaza <miguel@ximian.com>
18395 * metadata.c: Add inline documentation.
18397 2001-06-26 Miguel de Icaza <miguel@ximian.com>
18399 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
18402 2001-06-22 Miguel de Icaza <miguel@ximian.com>
18404 * typeattr.h: New file, TypeAttribute flags.
18406 2001-06-21 Miguel de Icaza <miguel@ximian.com>
18408 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
18409 mono_assembly_ensure_section): Section loading code.
18410 (load_section_tables): Load the sections.
18412 * mono/metadata/metadata.c (mono_metadata_locate_token,
18413 mono_metadata_locate): Functions to locate the information
18414 definition given a token or a table and an index.
18415 (mono_metadata_compute_table_bases): New.
18416 (compute_size): New function to compute the sizes of the various
18419 * mono/metadata/metadata.h: Finish listing the different index
18422 * mono/metadata/pedump.c: Improve to dump new information.
18424 2001-06-19 Miguel de Icaza <miguel@ximian.com>
18426 * mono/metadata/metadata.c: Entered all the tables matching
18429 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2