1 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
3 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
5 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7 * marshal.c: Fix warnings.
9 2004-09-29 Geoff Norton <gnorton@customerdna.com>
11 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
12 attempting to marshal the delegate_trampoline as the method_addr.
13 This patch has a static hashtable of marshalled delegates so that
14 we can map delegate_trampoline addresses back to delegates. This
15 allows a delegate passed to managed code to be passed back into native
18 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
20 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
22 * reflection.c (method_encode_code): Align method headers properly.
25 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
27 * marshal.c: In the runtime invoke wrapper, reset the abort
28 exception if it is cached. This avoids the automatic rethrowal of
29 the exception after the catch of the wrapper. Also check for pending
30 interruptions before calling the managed method. This is done using
31 the new method emit_thread_force_interrupt_checkpoint, since the
32 normal checkpoint method is ignored when running the invoke wrapper.
33 * object.c: If the abort exception is rethrown, set the abort_exc
34 field of the thread, so it will be rethrown aftere every catch.
35 * threadpool.c: Only run an interruption checkpoint if what has been
36 requested is a stop of the thread (aborts will be ignored).
37 * threads.c: By default, a thread will now never be interrumped while
38 running the runtime invoke wrapper (this ensures that runtime_invoke
39 will always return to the caller if an exception pointer is provided).
40 There is a new special method mono_thread_force_interruption_checkpoint()
41 to force an interruption checkpoint even if running a protected
42 wrapper, which is used by the same runtime invoke wrapper to do a check
45 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
47 * object.c, object-internals.h: Implemented mono_release_type_locks,
48 which releases the cctor locks held by a thread.
49 * threads.c, threads.h: In thread_cleanup, release cctor locks held
50 by a thread. Added mono_thread_exit() method to be used to safely stop
53 2004-09-28 Raja R Harinath <rharinath@novell.com>
55 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
56 Move null check before dereference. Avoid indexing beyond the end
57 of the 'modules' array.
59 2004-09-28 Raja R Harinath <rharinath@novell.com>
61 * metadata-internals.h (MonoImage): Add module_count field.
62 * image.c (load_modules): Set image->module_count.
63 (mono_image_load_file_for_image): Use image->module_count.
64 * reflection.c (mono_image_load_module): Append to image->modules array
66 (mono_module_get_object): Fix loop to actually increment index.
67 Use image->module_count.
68 * assembly.c (mono_assembly_load_references): Use image->module_count.
69 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
72 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
74 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
75 Avoid assert on generic types.
77 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
79 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
81 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
83 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
84 function to convert a MarshalSpec structure to its managed counterpart.
86 * reflection.c: Fix warnings.
88 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
91 * icall.c (mono_create_icall_signature): Fix build.
93 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
95 * icall.c: Add MakePointType icall.
97 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
100 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
102 * threadpool.c: reuse allocated slots in the queue.
104 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
106 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
108 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
110 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
113 * tabledefs.h: Add constants for pinvoke attributes BestFit and
114 ThrowOnUnmappableChar.
116 * icall.c (ves_icall_Type_GetPacking): New icall.
118 2004-09-24 Martin Baulig <martin@ximian.com>
120 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
122 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
125 (mono_domain_set): allow setting a domain that is being unloaded.
126 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
129 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
131 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
132 the GetCustomAttributes icall.
134 2004-09-23 Martin Baulig <martin@ximian.com>
136 * object-internals.h (MonoReflectionGenericParam): Replaced
137 'has_ctor_constraint', `has_reference_type' and `has_value_type'
138 with `guint32 attrs'.
140 2004-09-23 Martin Baulig <martin@ximian.com>
142 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
144 2004-09-23 Martin Baulig <martin@ximian.com>
146 * object-internals.h (GenericParameterAttributes): New enum.
148 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
150 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
152 * class.c (init_events): Fill out event->other field.
154 * class.c: Fix warnings.
156 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
158 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
160 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
161 walk which doesn't supply the IL offset.
163 2004-09-22 Martin Baulig <martin@ximian.com>
165 * reflection.c (mono_reflection_setup_internal_class): If we're
166 System.ValueType, System.Object or System.Enum, set
167 `klass->instance_size' and create the vtable.
168 (mono_reflection_create_internal_class): If we're an enum type,
169 get the base class from our current corlib.
171 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
173 * reflection.h (MonoResolveTokenError): New type.
175 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
178 * icall.c: Add an 'error' argument to the ResolveToken icalls.
180 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
182 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
183 Support also calling constructors, but only for already allocated objects.
185 2004-09-17 Geoff Norton <gnorton@customerdna.com>
187 * reflection.c (type_get_qualified_name): If the klass is null
188 return the typename to avoid a NullRefEx.
189 (encode_cattr_value): Get the qualified name of the boxed type,
190 not the underlying enumtype. Fixes #62984.
192 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
194 * marshal.c: Fix problems with previous checkin.
196 2004-09-21 <vargaz@freemail.hu>
198 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
199 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
201 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
203 2004-09-21 Geoff Norton <gnorton@customerdna.com>
205 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
206 should only return a type for pointers, arrays, and passbyref types.
209 2004-09-21 Martin Baulig <martin@ximian.com>
211 * domain.c (mono_debugger_check_runtime_version): New public
214 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
216 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
218 * reflection.c: Added missing sort to the declarative security
219 attributes table. MS implementation stops seeing the attributes if the
220 token number regress in the table (as shown by ildasm and permview).
222 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
224 * object-internals.h (MonoReflectionModule): Add 'token' field.
226 * reflection.c (mono_reflection_get_token): Add support for Module
228 (mono_module_get_object): Set 'token' field.
229 (mono_module_file_get_object): Set 'token' field.
231 * icall.c: Add new Assembly and Module icalls.
233 * appdomain.c: Bump corlib version.
235 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
237 * loader.h loader.c class.h class.c: Add helper functions for obtaining
238 tokens of metadata objects.
240 * reflection.h reflection.c (mono_reflection_get_token): New function
241 to obtain the token of a metadata object.
243 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
245 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
247 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
249 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
251 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
253 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
254 * object-internals.h: Added 3 MonoArray* members to MonoReflection
255 AssemblyBuilder to access the permissions set in the class lib.
256 * reflection.c: Added security attributes encoding step in
257 mono_image_build_metadata.
258 * tabledefs.h: Added new security actions defined in 2.0:
259 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
261 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
263 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
266 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
268 * locales.c: nullify the ICU_collator member of CompareInfo when it is
269 finalized. There where random SIGSEVs at program termination, when
270 an object being finalized was trying to do a string comparison and
271 the current culture was already finalized.
273 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
275 * threads.c: call thread_cleanup before finishing the thread if we get
278 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
280 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
281 assemblies from the parent. Fixes #65665.
283 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
285 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
288 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
290 * reflection.h: add prototype for mono_get_dbnull_object
291 * reflection.c: add prototypes for get_default_param_value_blobs
292 and mono_get_object_from_blob for fussier compilers
294 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
296 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
297 false deadlock checks in class initialization.
299 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
301 * image.c (mono_image_addref): Fix comment.
303 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
306 2004-09-12 Jambunathan K <kjambunathan@novell.com>
308 * reflection.c (mono_param_get_objects): Modified to return
309 ParameterInfo.DefaultValue object.
311 (get_default_param_value_blobs):
312 (mono_get_object_from_blob):
313 (mono_get_dbnull_object): New helper routines.
315 * object.c (mono_get_constant_value_from_blob): New helper routine
316 carved out from get_default_field_value ()
318 * object-internals.h (mono_get_constant_value_from_blob): Added
319 function declaration.
321 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
323 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
324 referenced assemblies. Fixes #62135.
326 * exception.h exception.c (mono_get_exception_file_not_found2): New
329 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
331 * class.h class.c: Add mono_type_get_underlying_type ().
333 2004-09-09 Geoff Norton <gnorton@customerndna.com>
335 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
336 Fix GetTypes() to support dynamically created assemblies.
338 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
340 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
342 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
345 * reflection.h reflection.c loader.c: Allow dynamic construction of
346 pinvoke methods. Fixes #65571.
348 * reflection.c (mono_reflection_get_type): Revert previous change since
349 it causes regressions.
351 2004-09-08 Martin Baulig <martin@ximian.com>
353 * class.c (class_compute_field_layout): Don't call
354 mono_class_layout_fields() for open generic instances.
356 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
357 * threads.c appdomain.c: fix typo in GC macro
359 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
361 * threads.c: don't call mono_thread_detach() in start_wrapper(),
362 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
364 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
366 * image.c (mono_image_close): Applied patch from
367 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
368 assembly is loaded multiple times from data.
370 * image.c (mono_image_open): Fix warning.
372 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
374 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
377 * reflection.c (mono_reflection_create_runtime_class): Initialize
378 klass->nested_classes. Fixes #61224.
380 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
382 * threads.c: sched_yield() on exit, to allow threads to quit.
384 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
386 * object.c (mono_unhandled_exception): Remove leftover debug code.
388 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
390 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
392 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
394 * marshal.c (emit_marshal_array): Really null terminate string arrays.
396 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
398 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
400 * marshal.c (emit_marshal_array): Null terminate string arrays.
402 * marshal.c (raise_auto_layout_exception): Fix warning.
404 * reflection.c (mono_param_get_objects): Initialize the default value
405 with DBNull.Value, not null. Fixes #62123.
407 2004-09-01 Miguel de Icaza <miguel@ximian.com>
409 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
410 throw an exception with a cute explanation.
412 2004-09-06 Dick Porter <dick@ximian.com>
414 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
415 Close the new process's thread handle, as we don't use it. The
416 handle stays around forever otherwise.
418 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
420 * object.c (arith_overflow): Fix warning.
422 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
423 calling conventions in method refs. Fixes #65352.
425 * reflection.c: Fix warnings.
427 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
429 * icall.c: Add a new icall for Array.Clear
431 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
433 * object.c: When allocating an array, we have to throw
434 an overflow exception if any of the lengths are < 0.
436 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
438 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
439 properly. Also move implementation of string array marshalling to
440 managed code. Fixes #42316.
442 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
444 * assembly.c: provide more information when loading an assembly fails.
446 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
448 * filewatcher.c: don't expect the development fam package to be
451 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
453 * marshal.c: Make a copy of the signature cookie since it will be
456 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
458 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
460 * metadata.c (mono_metadata_free_marshal_spec): New function to free
463 * marshal.c: More refactoring.
465 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
468 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
470 * object.c: In mono_message_invoke, fill the output parameter array after
471 calling the managed method (it was done before the call). This fixes
474 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
476 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
479 2004-09-02 Martin Baulig <martin@ximian.com>
481 * class.c (mono_class_instance_size): Don't allow generic type
482 definitions or open generic instances.
483 (mono_class_array_element_size): If we're a value type, call
484 mono_class_instance_size() on the original class.
486 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
487 handle generic instances.
489 * mono-debug-debugger.c (write_type): Handle generic instances
492 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
494 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
495 the allocation request fails. Fixes #65089.
497 * object.c (mono_runtime_free_method): Do not call mono_free_method.
499 * object.c (mono_runtime_free_method): New function to free a dynamic
502 * marshal.c (mono_delegate_free_ftnptr): New function to free the
505 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
506 with hasthis as dynamic,
508 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
510 * domain.c (mono_jit_info_table_remove): New function to remove an
511 entry from the jit info table.
513 * class-internals.h (MonoMethod): Add 'dynamic' field.
515 * loader.c: Fix warnings.
517 2004-09-01 Martin Baulig <martin@ximian.com>
519 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
520 instead of mono_debugger_lock() because the latter one is a no-op
521 unless running in the debugger.
523 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
525 * class.c (class_compute_field_layout): Classes with auto-layout or
526 reference fields are not blittable.
528 2004-09-01 Dick Porter <dick@ximian.com>
530 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
531 mono_image_get_filename() to get the assembly location.
534 * metadata.h: Fix compile warnings
536 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
538 * class.c (class_compute_field_layout): System.Object is blittable.
540 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
541 as in/out. Fixes #59909.
543 2004-09-01 Martin Baulig <martin@ximian.com>
545 * metadata.h (MONO_TYPE_ISREFERENCE): Call
546 mono_metadata_generic_inst_is_valuetype() if we're a generic
547 instance to check whether our underlying type is a reference type.
549 2004-09-01 Martin Baulig <martin@ximian.com>
551 * metadata.c (mono_type_size): If we're a generic instance, call
552 mono_class_value_size() for value types.
554 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
556 * marshal.c: Implement more custom marshalling functionality. Fixes
559 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
561 * mono-debug.c, debug-mono-symfile.c: add some locking love.
563 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
565 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
567 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
569 * icall.c: Fix some warnings.
571 * threads.c (abort_appdomain_thread): Fix unref errors.
572 (mono_thread_current): Fix THREAD_DEBUG define.
574 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
576 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
578 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
580 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
582 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
585 2004-08-28 Martin Baulig <martin@ximian.com>
588 (mono_metadata_generic_inst_is_valuetype): New public function.
590 * metadata.h (MONO_TYPE_ISSTRUCT): Call
591 mono_metadata_generic_inst_is_valuetype() if we're a generic
592 instance to check whether our underlying type is a valuetype.
594 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
596 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
599 2004-08-25 Martin Baulig <martin@ximian.com>
601 * loader.c (mono_get_method_from_token): Abstract methods can also
602 be generic and thus have type parameters.
604 * metadata-internals.h
605 (MonoDynamicImage): Added `GPtrArray *gen_params'.
607 * reflection.c (mono_image_get_generic_param_info): Don't create a
608 metadata row, just add an entry to the `gen_params' array.
609 (build_compressed_metadata): Sort the `gen_params' array and then
610 actually create the metadata.
612 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
614 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
616 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
618 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
620 2004-08-24 Martin Baulig <martin@ximian.com>
622 * class.cs (mono_class_is_subclass_of): Like an interface, a
623 generic instance also derives from System.Object.
625 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
627 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
628 custom modifiers to be in any order. Fixes #61990.
630 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
632 * object.c: Register mono_object_new_fast icall.
634 * object.c (mono_class_get_allocation_ftn): Return to calling
635 mono_object_new_fast, since it seems faster to compute the object
636 size in unmanaged code than passing it as a parameter.
638 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
640 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
641 this function with Boehm as the oom handler, so we don't have to check
642 the result of GC_malloc.
644 * object.c: Remove checks for oom.
646 * object.h object.c (mono_class_get_allocation_ftn): New function to
647 return the icall which can be used to allocate an instance of a given
650 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
652 * class-internals.h: Add 'enabled' field.
654 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
656 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
658 2004-08-18 Jambunathan K <kjambunathan@novell.com>
659 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
662 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
664 * appdomain.c: use the Tls function for appdomain too,
665 at Zoltan's request. Actually return in mono_context_get
667 * appdomain.c, profiler.c, threads.c: use __thread
669 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
671 * appdomain.c threads.c: Call GC_CreateThread on windows.
673 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
674 multiple libraries since this don't work on windows.
676 2004-08-18 Martin Baulig <martin@ximian.com>
679 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
682 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
683 MonoMethodNormal since we also need it for abstract and interface
687 (build_compressed_metadata): Sort the GenericParam table.
688 (mono_image_create_token): Added `gboolean create_methodspec'
689 argument; this is false when generating a MethodImpl token.
690 (reflection_methodbuilder_to_mono_method): Abstract and interface
691 methods may also have generic parameters.
693 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
695 * appdomain.c: thread local alloc
697 2004-08-17 Martin Baulig <martin@ximian.com>
699 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
702 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
705 * class.c (mono_type_get_full_name): New public function.
706 (mono_type_get_name): Don't include the type arguments.
708 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
710 * Makefile.am: Build static versions of libmetadata and libmonoruntime
711 for inclusion into the mono executable.
713 2004-08-16 Martin Baulig <martin@ximian.com>
715 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
716 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
718 2004-08-14 Martin Baulig <martin@ximian.com>
720 * class.c (dup_type): Also copy the `byref' field.
722 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
724 * reflection.c (create_dynamic_mono_image): Revert the last change
725 since it breaks bootstrap.
727 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
729 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
731 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
732 not free them with g_free.
734 2004-08-11 Martin Baulig <martin@ximian.com>
736 * reflection.c (mono_reflection_setup_internal_class): Also call
737 mono_class_setup_mono_type() if we already have a `tb->type.type'.
739 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
741 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
742 called during default (first) AppDomain creation. Keep track of
743 Evidence when loading assemblies.
745 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
747 * opcodes.c, opcodes.h: reduce runtime relocations.
749 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
751 * culture-info.h, locales.c: fixes and chages to sue the new
752 optimized format of the locale data.
753 * culture-info-tables.h: regenerated.
755 2004-08-06 Geoff Norton <gnorton@customerdna.com>
757 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
759 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
761 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
762 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
763 * domain-internals.h: icall declaration.
764 * icall.c: icall registration.
765 * object-internals.h: New fields in MonoAssembly for CAS.
767 2004-08-05 Duncan Mak <duncan@ximian.com>
769 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
772 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
774 * reflection.c: fix to deal with object[] arrays in custom ctors
777 2004-08-05 Martin Baulig <martin@ximian.com>
779 * class.c (mono_class_array_element_size): Added support for
780 generic instances and correctly handle "recursive" types.
782 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
784 * assembly.c: Fix warnings.
786 2004-08-04 Martin Baulig <martin@ximian.com>
789 (mono_type_get_name_recurse): Added `gboolean include_arity'
790 argument specifying whether or not we should include the generic
791 arity in the type name.
792 (_mono_type_get_name): New static function.
793 (mono_class_setup_vtable): If we're a generic instance, don't
794 include the generic arity in the names of explicit method
797 2004-08-03 Martin Baulig <martin@ximian.com>
799 * class.c (mono_type_get_name_recurse): Enclose the generic type
800 arguments in `<', '>'.
802 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
804 * gc.c: make GC warning messages use the trace API, they are just
805 noise to most of the users.
807 2004-08-03 Martin Baulig <martin@ximian.com>
809 * debug-mono-symfile.c (read_string): Correctly read the string.
811 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
813 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
815 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
817 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
819 2004-07-30 Martin Baulig <martin@ximian.com>
821 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
822 Reflect latest symbol writer changes.
824 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
826 * object.c: always create an object if null is passed
827 to Invoke() where a valuetype is expected.
829 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
831 * marshal.c (mono_marshal_init): make managed
832 signatures match native ones better for 64bits.
834 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
836 * appdomain.c: hack to build correctly the private bin path on windows.
839 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
841 * assembly.c: Load mscorlib from the correct framework directory
842 (mono/<version>/mscorlib.dll).
843 * appdomain.h: Added prototypes for new functions.
844 * internals.h: Added some prototypes.
845 * domain.c: When initializing the runtime, get from the executable and
846 the configuration files the runtime version that the app supports.
847 Added support methods for reading app.exe.config. Added list of versions
848 supported by the JIT. Added two new methods: mono_init_from_assembly,
849 which initializes the runtime and determines the required version from
850 the provided exe file, and mono_init_version, which initializes
851 the runtime using the provided version.
852 * icall.c: Get machine.config from version-specific directory.
853 * reflection.c: When generating an image, embed the version number
854 of the current runtime.
856 2004-07-28 Dick Porter <dick@ximian.com>
859 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
860 returned sockaddr size before creating the remote address object.
861 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
864 2004-07-28 Dick Porter <dick@ximian.com>
866 * locales.c (string_invariant_compare_char): Fix invariant char
867 compares between upper and lower cases. Fixes bug 61458.
869 2004-07-27 Ben Maurer <bmaurer@ximain.com>
871 * marshal.c: actually cache stelem.ref wrappers.
873 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
875 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
876 sections and remove the mono_cli_rva_map () function.
878 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
880 * debug-mono-symfile.c: fix one more endianess issue, from a patch
881 by Geoff Norton (<gnorton@customerdna.com>).
883 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
885 * class.c: fix class loads for pointer types (typeof(int) !=
888 2004-07-27 Martin Baulig <martin@ximian.com>
890 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
891 reading the debugging information from an external ".mdb" file.
893 2004-07-24 Martin Baulig <martin@ximian.com>
895 * reflection.c (mono_image_get_type_info): Only write a class
896 layout entry if we actually have a size or a packing size.
898 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
900 * reflection.c (type_get_fully_qualified_name):
901 insert cast to get type checking of ?: with non-gcc compilers
903 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
905 * rand.c: use g_getenv for both lookups of
908 2004-07-17 Martin Baulig <martin@ximian.com>
910 * reflection.c (mono_reflection_bind_generic_method_parameters):
911 Set `gmethod->reflection_info'.
913 2004-07-17 Martin Baulig <martin@ximian.com>
915 * class.c (mono_class_create_from_typedef): Insert the newly
916 created class into the hash table before computing the interfaces
917 since we could be called recursively.
919 2004-07-16 Ben Maurer <bmaurer@ximain.com>
921 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
922 function to implement stelem.ref in managed code
923 * class-internals.h, debug-helpers.c: a new wrapper type
926 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
928 * gc.c: allow GC handles to work even when no GC is compiled in.
929 Fix part of bug #61134 (GetAddrOfPinnedObject).
931 2004-07-13 Peter Williams <peter@newton.cx>
933 * process.c (complete_path): Make sure we don't attempt to execute
936 2004-07-12 Geoff Norton <gnorton@customerdna.com>
938 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
939 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
940 and will add/subtract the hour if needed
942 2004-07-12 Martin Baulig <martin@ximian.com>
944 * reflection.c (mono_field_get_object): If we have
945 `field->generic_info', take the attributes from
946 `field->generic_info->generic_type'.
948 2004-07-12 Martin Baulig <martin@ximian.com>
950 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
951 This function must be called before initializing the runtime.
952 (mono_debug_init_1): New function; call this after initializing
953 the runtime, but before loading the assembly. It tells the
954 debugger to load corlib and the builtin types.
956 * mono-debug-debugger.c: Did some larger changes in the debugging
957 code; support recursive class declarations, make sure we actually
960 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
962 * debug-helpers.c: undo my previous patch and fixed the real issue in
963 ../mini/exceptions-x86.c
965 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
967 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
968 when no HOME env. variable was set and a NullRef was thrown in a .cctor
969 called from other .cctors.
971 2004-07-09 Miguel de Icaza <miguel@ximian.com>
973 * loader.c: Removed the mono_loader_wine_init hack now that we are
974 doing a managed version of Windows.Forms.
976 2004-07-09 Ben Maurer <bmaurer@ximian.com>
978 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
979 threadpool.c, threads.c: remove static data from rootset.
981 2004-07-09 Dick Porter <dick@ximian.com>
983 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
984 Don't do any more processing if the matched length was 0. It was
985 increasing the size of the string before. Fixes bug 61167.
987 2004-07-09 Dick Porter <dick@ximian.com>
991 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
992 Add support for SO_PEERCRED if its available.
994 2004-07-09 Peter Bartok <pbartok@novell.com>
995 * loader.c: winelib.exe.so error message is now only displayed if
996 MONO_DEBUG is set. To help us avoid questions when people are trying
997 out the new Managed.Windows.Forms.
999 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
1001 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
1002 for isinst and castclass wrappers.
1004 * class-internals.h icall.c: Move registration and lookup of JIT icalls
1005 to libmetadata from the JIT, so they could be used by the marshalling
1006 code and the interpreter.
1008 * marshal.c: Register marshalling related JIT icalls here instead of
1009 in mini.c. Use CEE_MONO_ICALL instead of the family of
1010 CEE_MONO_PROC<x> opcodes to call marshalling functions.
1012 * metadata.h: Remove unneeded marshalling conversions.
1014 * opcodes.c: Update for new opcodes.
1016 2004-07-08 Martin Baulig <martin@ximian.com>
1018 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
1019 (mono_debug_get_domain_data): Make this function static.
1021 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
1023 * gc.c, object.h: add nice GC handle API for embedders.
1025 2004-07-06 Ben Maurer <bmaurer@ximian.com>
1027 * reflection.c: more changes for the new api
1029 * object.c: When we reflect on a field w/ a constant value, it
1030 will not have a memory location, so we must access metadata. Also,
1031 allow easier reading of strings so that we can read them from
1034 * class.c (mono_class_layout_fields): no need for literal fields here.
1036 * class-internals.h: api changes for const fields
1038 * icall.c (ves_icall_get_enum_info): use new apis for const fields
1040 2004-07-06 Martin Baulig <martin@ximian.com>
1042 * mono-debug.h: Increment version number to 44.
1044 * mono-debug.c (mono_debug_add_wrapper): The second argument is
1045 now a gpointer, rewrote this whole method.
1047 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
1048 function. Add information about the wrapper in a new "misc table".
1050 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
1051 for the new misc table.
1053 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
1055 * metadata-internals.h image.c: Add a cache for helper signatures.
1057 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
1059 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
1061 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
1062 delegates from a delegate. Fixes #61033.
1064 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
1065 marshalling of stringbuilder arrays. Fixes #59900.
1067 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
1069 * icall.c: Add EnumBuilder:setup_enum_type icall.
1071 2004-06-30 Ben Maurer <bmaurer@ximian.com>
1073 * icall.c: Added a new icall for the property version of
1076 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
1078 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
1079 it has a constant size across platforms.
1081 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
1084 2004-06-29 Martin Baulig <martin@ximian.com>
1086 * mono-debug.c (mono_debug_add_method): Protect the whole function
1087 in mono_debugger_lock(), not just parts of it.
1089 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
1091 * reflection.c: make sure padding bytes in heaps are zeroed.
1093 2004-06-24 David Waite <mass@akuma.org>
1095 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
1096 image.c, loader.c, locales.c, marshal.c, metadata.c,
1097 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
1098 string-icalls.c, threads.c: change to C90-style comments from C99 /
1101 2004-06-24 Dick Porter <dick@ximian.com>
1104 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
1105 return createdNew. Fixes bug 60412.
1108 * icall.c: Add createdNew parameter to CreateMutex icall
1110 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
1112 * reflection.c, object-internals.h: save default value in params.
1114 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1116 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
1117 no need to build a new path combining that with the application base.
1120 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
1122 * reflection.c: fixed minor standard compliance issues.
1124 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
1126 * reflection.c: fixed issue with encoding some custom attributes
1127 (arrays in properties and fields, bug #60411).
1129 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1131 * reflection.c: fix start address when copying the public key token.
1133 2004-06-23 Martin Baulig <martin@ximian.com>
1135 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
1136 the `exc' object in a static object to put it into the GC's root set.
1138 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
1140 * reflection.c: make mono_reflection_setup_internal_class ()
1141 callable a second time to setup a new parent class.
1143 2004-06-23 Dick Porter <dick@ximian.com>
1145 * threads.c: Check for WAIT_IO_COMPLETION return values.
1147 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
1149 * appdomain.c: Removed the g_free on the public key token. Now copy
1150 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
1151 * assembly.c: Added public key token string value when loading
1152 assemblies. Fix bug #60439.
1153 * icall.c: Added missing informations (like public key) in
1154 GetReferencedAssemblies. Fix #60519.
1155 * image.h: Changed definition for public key token from const char*
1156 public_tok_value to guchar public_key_token [17];
1157 * reflection.c: Updated for changes to public key token.
1159 2004-06-22 Lluis Sanchez Gual
1161 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
1162 for the field in base classes.
1164 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
1166 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
1167 mark headers as not supported, they are installed only for use by the
1170 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
1172 * *.c, *.h: avoid namespace pollution in public headers.
1174 2004-06-21 Martin Baulig <martin@ximian.com>
1176 * exception.c (mono_get_exception_security): It's in
1177 "System.Security", not in "System".
1179 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
1180 the exception classes.
1182 2004-06-21 Martin Baulig <martin@ximian.com>
1184 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
1185 Protect the exception object from being finalized.
1187 2004-06-21 Martin Baulig <martin@ximian.com>
1189 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
1192 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
1194 * reflection.c: Load the assembly in mono_reflection_type_from_name,
1195 if it was not loaded before. Fix parts of #60439.
1197 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
1199 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
1200 code that was broken since Ben's change: wrappers are now
1201 dependent on the method signature only again.
1203 2004-06-21 Martin Baulig <martin@ximian.com>
1205 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
1206 added interface support.
1208 2004-06-21 Martin Baulig <martin@ximian.com>
1210 * class.c (mono_vtable_get_static_field_data): New public method.
1212 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
1214 * filewatcher.c : Windows build fix to be compliant with API changes.
1216 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
1218 * class.h, class.c: more accessors.
1219 * metadata.h, metadata.c: prepare for hiding MonoType and
1220 MonoMethodSignature: people should use the accessors from now on
1221 outside of the tree.
1223 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
1225 * *.c, *.h: more API cleanups.
1227 2004-06-18 Jackson Harper <jackson@ximian.com>
1229 * assembly.c: Trace loading assemblies.
1230 * loader.c: Trace loading native libraries.
1231 * mono-config.c: Trace loading config files.
1233 2004-06-18 Dick Porter <dick@ximian.com>
1235 * locales.c: Tell ICU the lengths of strings, it can cope with
1236 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
1238 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
1240 * image.c: swapped name/filename;
1242 2004-06-18 Martin Baulig <martin@ximian.com>
1244 * mono-debug-debugger.c (write_class): Write the parent class at
1245 the end of the header.
1247 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
1249 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
1251 2004-06-17 Raja R Harinath <rharinath@novell.com>
1253 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
1254 (bundle_obj): New conditional define.
1255 (BUILT_SOURCES): Remove.
1256 ($(bundle_srcs)): Make parallel-make safe.
1257 (libmonoruntime_la_LIBADD): Make unconditional.
1258 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
1259 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
1261 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
1263 * culture-info-tables.h: It was inconsistent with the latest
1266 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
1268 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
1271 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
1274 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
1276 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
1277 cleaned up public header threads.h.
1279 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
1281 * Makefile.am, *.c, *.h: more API cleanups.
1283 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
1285 * Makefile.am: removed monosn from compilation.
1286 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
1287 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
1288 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
1289 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
1290 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
1291 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
1293 2004-06-15 Jackson Harper <jackson@ximian.com>
1295 * assembly.c: Make locales lower case when searching the GAC for
1296 assemblies. gacutil will always make locales lowercase when
1297 installing so this effectively makes them case insensitive.
1299 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
1301 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
1302 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
1303 parameter which allows to choose whether the wait can be interrupted or
1304 not. Also added the method mono_monitor_enter(), which locks the monitor
1305 using an infinite wait and without allowing interruption.
1306 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
1308 * object.h: Added new fields in MonoThread. suspend_event holds the event
1309 used to susped/resume the thread. synch_lock is the lock object to use for
1310 modifying the thread state.
1311 * threads.c: Use the new synch_lock object for locking, instead of "this",
1312 which can generate deadlocks.
1313 Moved thread state change in Thread.Sleep and Thread.Join from managed
1314 to unmanaged code. This avoids a deadlock when the thread was suspended
1315 just after acquiring the thread lock.
1316 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
1317 Implemented Thread.Suspend using an event instead of ThreadSuspend,
1318 which is not fully implemented in the io-layer.
1319 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
1321 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
1323 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
1324 threads-types.h: more API cleanups.
1326 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
1328 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
1329 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
1330 threadpool.c, threads.c: first pass at the exported API cleanup.
1332 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
1334 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
1336 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1338 * icall.c: added internalGetHome.
1340 2004-06-14 Dick Porter <dick@ximian.com>
1342 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
1343 possible to return successfully when '.' or '..' were the only
1344 entries in a directory, but were skipped. The MonoIOStat was not
1345 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
1348 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
1350 * reflection.c: make binaries run on .Net 1.1 by default.
1352 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1354 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
1356 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
1358 * marshal.c: keep track of struct size with explicit layout
1361 2004-06-12 Martin Baulig <martin@ximian.com>
1363 * mono-debug-debugger.c: Comment out a debugging g_message().
1365 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
1367 * reflection.c, reflection.h: do not free custom attrs that are cached.
1368 * icall.c: use braces to make code clearer.
1370 2004-06-11 Martin Baulig <martin@ximian.com>
1372 * class.h (MonoInflatedField): New type.
1373 (MonoClassField): Replaced `MonoType *generic_type' with
1374 `MonoInflatedField *generic_info'.
1377 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
1379 2004-06-11 Martin Baulig <martin@ximian.com>
1381 * reflection.c (mono_image_create_method_token): Correctly encode
1384 2004-06-11 Martin Baulig <martin@ximian.com>
1386 * metadata.c (mono_metadata_parse_method_signature): When parsing
1387 a MethodDef which has VarArgs, also set sentinelpos if we don't
1388 have any parameters.
1390 2004-06-11 Martin Baulig <martin@ximian.com>
1392 * verify.c (mono_method_verify): In CEE_CALL, use
1393 mono_method_get_signature() to get the method's signature, unless
1394 we're a PInvoke method.
1396 2004-06-10 Jackson Harper <jackson@ximian.com>
1398 * assembly.c: Use <path>/lib/mono/gac for the extra paths
1399 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
1400 logical name as the supplied path is just a prefix to the gac not
1401 the direct path to it.
1403 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
1405 * reflection.c: make the token for a created method match
1406 the token of the MethodBuilder it was created from
1407 (IKVM requires this behaviour now).
1409 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
1411 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
1412 reflection.c, socket-io.c: leak fixes.
1414 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
1416 * icall.c: handle sentinel pos in vararg methods in position different
1419 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1421 * culture-info-tables.h: freshly generated.
1423 2004-06-09 Martin Baulig <martin@ximian.com>
1425 * loader.c (mono_get_method_constrained): Call `mono_class_init
1426 (constrained_class)'.
1428 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
1430 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
1431 any methods. Fixes #59629.
1433 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
1435 * culture-info-tables.h: reflecting locale-builder updates.
1437 2004-06-08 Dick Porter <dick@ximian.com>
1440 * locales.c: Fixed compile warnings, including a real bug in
1441 CompareInfo_internal_compare.
1443 2004-06-08 Dick Porter <dick@ximian.com>
1446 (ves_icall_System_Globalization_CompareInfo_internal_index):
1447 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1448 Double-check the resuls of usearches, because ICU currently
1449 ignores most of the collator settings here. Fixes bug 59720.
1451 2004-06-08 Dick Porter <dick@ximian.com>
1454 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1455 Fix memory leak and segfault-causing typo. No idea how this one
1456 lasted so long without being noticed.
1458 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
1460 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
1461 any methods. Fixes #59629.
1463 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1466 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
1467 own the critical section before). Removed dead code (that's done
1468 in the preload hook).
1470 (mono_assembly_load_with_partial_name): call the preload hook.
1472 2004-06-08 Martin Baulig <martin@ximian.com>
1474 * metadata.c (mono_metadata_signature_alloc): Default
1475 `sentinelpos' to -1.
1477 * reflection.c (mono_image_get_array_token): Likewise.
1479 2004-06-08 Martin Baulig <martin@ximian.com>
1481 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
1483 * metadata.c (mono_metadata_parse_method_signature): When parsing
1484 a MethodDef which has VarArgs, set sentinelpos.
1486 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
1487 `gint16' since we're using -1 for non-varargs methods.
1490 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
1491 (method_encode_signature): Added varargs support.
1492 (method_builder_encode_signature): Likewise.
1493 (mono_image_get_varargs_method_token): New static method.
1494 (mono_image_create_method_token): New public method; this is
1495 called via an icall instead of mono_image_create_token() when
1496 calling a varargs method.
1498 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
1500 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
1502 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
1504 * culture-info-tables.h : Reflecting the latest locale-builder that
1505 fixed empty array representation ({} to {0}).
1507 2004-06-07 Jackson Harper <jackson@ximian.com>
1509 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
1510 looking up extra gac paths. This allows MONO_GAC_PATH to act
1511 exactly like a prefix.
1513 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
1515 * reflection.c (mono_reflection_type_from_name): Make a copy of the
1516 type name before modifying it. Fixes #59405.
1518 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
1520 * culture-info.h: added fields for "all datetime patterns".
1521 * locales.c: ( ves_icall_System_Globalization_CultureInfo
1522 _construct_datetime_format ()): fill xxx_patterns fields.
1523 * object.h: added fields for "all datetime patterns" to
1524 MonoDateTimeFormatInfo.
1525 * culture-info-tables.h: reflecting locale-builder updates.
1527 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
1529 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
1530 the event has no add and remove methods. Fixes #59629.
1532 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
1534 * object.c: Fixed possible integer overflow when allocating large
1537 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
1539 * culture-info-tables.h: reflecting locale-builder updates.
1541 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
1543 * culture-info-tables.h: reflecting locale-builder updates.
1545 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
1547 * culture-info-tables.h: reflecting locale-builder updates.
1549 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
1551 * threads.c: Made Thread.Sleep abortable.
1553 2004-06-02 Martin Baulig <martin@ximian.com>
1555 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
1557 * debug-mono-symfile.h: Bumped symbol file version number to 37.
1559 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
1561 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
1563 2004-05-30 Jackson Harper <jackson@ximian.com>
1565 * reflection.c: Do not hardcode assembly versions or public key
1566 tokens anymore. All of this except the corlib section was dead
1569 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
1571 * object.c (mono_runtime_invoke_array): Automatically create boxed
1572 objects for byref valuetypes if needed. Fixes #59300.
1574 * object.c (mono_method_return_message_restore): Handle
1575 MONO_TYPE_OBJECT as well.
1577 2004-05-28 Jackson Harper <jackson@ximian.com>
1579 * reflection.c: The modified type encoding was causing build
1580 problems. Reverted for now.
1582 2004-05-28 Jackson Harper <jackson@ximian.com>
1584 * reflection.c/h: Take an assembly ref so that we dont create
1585 fully qualified names when encoding types in the same assembly as
1586 the custom attribute being emitted.
1587 * appdomain.c: Increment version number.
1589 2004-05-26 Duncan Mak <duncan@ximian.com>
1592 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
1593 Set the full version number (major, minor, build, revision).
1595 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
1597 * marshal.c (emit_struct_conv): increment src/dst after blit
1598 (mono_marshal_get_managed_wrapper,
1599 mono_marshal_get_native_wrapper): make sure we have marshalling
1600 info before marshalling params (info computation affects
1603 * class.c (class_compute_field_layout): correctly deal with
1605 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
1606 value types (as per what windows dows by default)
1607 (mono_class_setup_mono_type): System.ValueType is blittable
1608 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
1611 * marshal.c (mono_marshal_load_type_info): flag types as
1612 non-blittable if the native layout doesn't match the managed
1615 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1617 * appdomain.c: don't add stuff in the private search path that is
1618 above the application base. If application base is not set, there's
1619 no private search path.
1621 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
1623 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
1624 byref struct arguments in native->managed marshalling.
1626 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
1628 * marshal.c (mono_marshal_get_runtime_invoke): correctly
1629 cache methods using signature (special case for methods
1630 that are value type or string class)
1632 * image.c (mono_image_close): clean up allocated GSList's
1633 in runtime_invoke_cache.
1635 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1637 * mono-config.c: set the correct path for mono_cfg_dir on windows when
1638 there's no MONO_CFG_DIR environment variable defined.
1640 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1642 * threads.c: windows version must be >= 0x0500 to include OpenThread.
1644 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
1646 * threadpool.c: Really wait for 500ms after the async call, even if the wait
1648 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
1649 before waiting for it, and call CloseHandle after the wait to unref it.
1650 This will make sure that handles are not disposed too early.
1652 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1657 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
1660 * object.c: se the application_base only for the domain that runs
1661 Main. Fixes bug #59216,
1663 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1666 * object.c: only the domain in which Main is run have
1667 SetupInformation.ConfigurationFile set, so moved a few lines from
1668 appdomain.c to object.c.
1670 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1672 * appdomain.c: we tried to load [name].(dll|exe), but according
1673 to bug #57710, we must also try [culture]/[name].(dll|exe) and
1674 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
1675 There's a test case attached to bug #58922.
1677 2004-05-27 Dick Porter <dick@ximian.com>
1680 * file-io.c: Implemented icalls for locking and unlocking regions
1682 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
1683 FALSE on error (fixes both compiler warning and real bug.)
1685 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
1687 * culture-info-tables.h: reflecting locale-builder updates.
1689 (Added missing ChangeLog entry for 05/26)
1691 2004-05-27 Jackson Harper <jackson@ximian.com>
1693 * locales.c: Fix some cut and paste errors.
1695 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1697 * mono-config.c: set the correct path for config. directory on windows.
1699 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
1701 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
1704 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
1706 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
1707 from pinvoke functions.
1709 * marshal.c (mono_ftnptr_to_delegate): Implement this.
1711 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
1713 * culture-info-tables.h: reflecting locale-builder updates.
1715 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
1717 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
1720 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
1722 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
1723 * icall.c: Modified icalls for RNG.
1724 * rand.c|h: Changed RNG interface to allow thread-safe usage under
1725 Windows (CryptoAPI).
1727 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
1729 * locales.c: Fix build.
1731 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
1733 * culture-info-tables.h: reflecting locale-builder updates.
1735 2004-05-25 Jackson Harper <jackson@ximian.com>
1737 * locales.c: When creating the current culture use the $LANGs
1738 specific culture. So DateTimeFormat and NumberFormat entries are created.
1740 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
1742 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
1743 a char array as parameter.
1745 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
1747 * image.c: In mono_image_open(), always use an absolute path name to
1748 look for already loaded images.
1750 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
1752 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
1753 missing in the windows build (like older cygwin include files).
1755 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
1757 * icall.c: Fixed check for possible integer overflow in Buffer_
1758 BlockCopy icall. Replaced comments style // by /* */.
1760 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
1762 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
1764 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
1765 check after MONO_VTADDR. Fixes pinvoke2.exe.
1767 * marshal.h marshal.c metadata.h: Add beginnings of support for
1768 ftnptr -> delegate marshalling.
1770 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
1772 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
1773 * threads.c: Fix warnings.
1775 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
1777 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
1778 * icall.c: Registered icalls for Suspend and Resume.
1779 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
1781 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
1782 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
1783 * process.c: Use WaitForSingleObjectEx.
1784 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
1786 * threads.c, threads.h: Make use of new Ex wait methods. Improved
1787 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
1788 for Suspend and Resume. Added new mono_thread_stop, used for stoping
1789 background threads. Added basic support for Abort in Windows.
1790 Start new threads using a managed delegate invoke wrapper. This wrapper
1791 has an interruption checkpoint that is needed since an interruption
1792 can be requested before the thread leaves the unmanaged code that starts
1794 * marshal.c: Added interruption checkpoint after every native call, and
1795 also before managed calls for wrappers called from unmanaged code to
1796 go into managed code.
1797 * object.h: Added new field in MonoThread to keep track of interruption
1800 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
1802 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
1805 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1812 * rand.c: getenv -> g_getenv (windows!)
1814 * process.c: complete_path is also used on non-windows platforms.
1816 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1818 * icall.c: new signature for Process_Start.
1820 * process.[ch]: new signature for Process_Start. If we're on windows
1821 and UseShellExecute is false, we have to search for the program by
1822 ourselves if we don't get a full path.
1824 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
1826 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
1827 marshalling and call CleanUpNativeData if needed. Fixes #58646.
1829 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1831 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
1834 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1836 * process.c: use double quotes to quote program name and arguments on
1837 windows. Fixes bug #58575.
1839 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1841 * file-io.c: don't return "." and ".." when using windows Find*File.
1843 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
1845 * marshal.c: Don't pass wrappers to message init because method
1846 addressed used to lookup metadata. part of remoting[2|3] fix.
1848 2004-05-15 Jackson Harper <jackson@ximian.com>
1850 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
1851 path is essentially the same as MONO_PATH except that it points to
1852 GACs instead of lib directories.
1853 * loader.h: The user gac is gone so we dont need function to
1855 * mono-config.c: user gac option is now gone.
1857 2004-05-15 Jackson Harper <jackson@ximian.com>
1859 * culture-info.h: Make defines more consistent, add calendar data
1860 to the culture info table.
1861 * culture-info-tables.h: Add basic calendar data. Basically
1862 everyone gets default gregorian until all the data is
1864 * locales.c: Use the new consistent defines. Set calendar data for
1865 culture info objects.
1866 * object.h: add a field for calendar data to CultureInfo
1868 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
1870 * image.c: image->runtime_invoke_cache is keyed on signatures now.
1871 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
1873 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
1874 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
1875 an extra param that is the pointer of the method to invoke. The IL for
1876 the invoke method is no longer specific to the method, but to the
1877 signature of the method. Thus, we can share the same code for multiple
1878 methods. This reduces the number of methods that have to be compiled.
1880 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
1882 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
1884 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1886 * icall.c: Optimize Buffer.BlockCopy.
1888 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1890 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
1891 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
1892 quote). Changed them to "MMMM yyyy".
1894 2004-05-12 Miguel de Icaza <miguel@ximian.com>
1897 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
1899 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
1901 * reflection.h: Updated after changes to managed structures.
1903 * appdomain.c: Bump corlib version.
1905 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1907 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
1910 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1912 * Makefile.am: link to ../os/libmonoos.la on windows.
1915 -If MONO_DEBUG, warn about non-existing directories in
1917 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
1918 compile time variable.
1919 -Removed init_default_path and call mono_set_rootdir from
1920 libmonoos.a instead (windows only).
1922 * assembly.h: declare mono_assembly_getrootdir().
1925 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
1927 * loader.c: s/getenv/g_getenv/
1929 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
1931 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
1933 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
1935 * metadata.h: Add new marshalling conversions.
1937 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
1940 * reflection.c (mono_reflection_get_type): Lookup the type in all
1941 modules of a multi-module assembly. Fixes #58291.
1943 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
1945 * threads.c: Before aborting a background, set the StopRequested
1946 state. This avoids throwing the Abort exception.
1947 In mono_thread_manage, don't continue with the shutdown until all
1948 aborted threads have actually stopped.
1950 2004-05-10 Jackson Harper <jackson@ximian.com>
1952 * locales.c: Remove the modifier from culture names.
1954 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1956 * Makefile.am: monosn is not installed any more. It has been deprecated
1959 2004-05-07 Jackson Harper <jackson@ximian.com>
1962 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
1963 Fix array construction, add bailout if the length is 0.
1965 2004-05-07 Dick Porter <dick@ximian.com>
1967 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
1968 machine doesn't have a DNS entry. Patch by Urs Muff
1969 (umuff@quark.com), fixes bug 57928.
1971 2004-05-06 Jackson Harper <jackson@ximian.com>
1973 * reflection.c: Handle null PublicTokens properly. alloc mem for
1974 assembly names culture so we dont crash when freeing it.
1976 2004-05-06 Jackson Harper <jackson@ximian.com>
1978 * assembly.c: Check the usergac when loading with partial names.
1980 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
1982 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
1983 does nothing for now (not required for Linux/Windows) but the class
1984 library can call it (and a newer or modified runtime could need it).
1985 * icall.c: Registred icall.
1987 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1989 * loader.c: prints a message on module loading error we set MONO_DEBUG
1990 environment variable.
1992 2004-05-05 Jackson Harper <jackson@ximian.com>
1994 * appdomain.c: Handle PublicKeyToken=null properly.
1996 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
1998 * environment.c|h: Added icall ves_icall_System_Environment_
1999 GetOSVersionString to get the current OS version as a string.
2000 * icall.c: Registred icall.
2002 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
2004 * object.c: in mono_object_get_virtual_method(), take into account that
2005 non-virtual methods don't have a slot in the vtable. Check needed when
2006 the object is a proxy.
2008 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
2010 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
2011 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
2013 * object.c (mono_class_compute_gc_descriptor): Fix warning.
2015 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
2016 passed when a valuetype is expected.
2018 * object.c (mono_unhandled_exception): Only set the exit code if the
2019 exception happens in the main thread. Fixes thread5.exe.
2021 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
2022 invalid names. Fixes #58047.
2024 2004-05-03 Jackson Harper <jackson@ximian.com>
2026 * assembly.c: This line was committed accidently and is unneeded.
2028 2004-05-03 Jackson Harper <jackson@ximian.com>
2030 * icall.c: Add new icall for Assembly::LoadWithPartialName
2031 * assembly.c/.h: new function that probes the GAC to load partial
2032 assembly names by Paolo Molaro.
2034 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2036 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
2037 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
2038 (type_get_fully_qualified_name): Added PublicKeyToken when building a
2041 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2043 * appdomain.c: fixed check for 'neutral' culture and removed warning.
2044 * reflection.c: fix bug when parsing a full type name and Version is not
2045 the last thing in the string.
2047 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
2049 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
2050 crashes when it is freed.
2052 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2054 * assembly.c: print the compat warning to stderr.
2056 2004-05-01 Miguel de Icaza <miguel@ximian.com>
2058 * assembly.c (mono_assembly_load_references): Add a compatibility
2059 hack to run old applications that might be still referencing the
2060 3300-based assemblies, only do this for System.xxx.
2062 2004-05-01 Jackson Harper <jackson@ximian.com>
2064 * appdomain.c: If the culture is neutral we set it to "".
2066 2004-04-29 Jackson Harper <jackson@ximian.com>
2068 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
2070 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
2072 * string-icalls.c: added low overhead function for copying chars
2073 * icall.c: added needed icall for the above function
2075 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2077 * icall.c: fix return value of get_global_assembly_cache. Implemented
2078 Environment.GetLogicalDrives.
2080 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
2082 * rand.c: try and talk to egd or prngd
2083 for random bytes if opening devices fail.
2085 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
2087 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
2088 alignment for the type using the native alignment of its members
2089 instead of using klass->min_align.
2091 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
2093 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2096 * socket-io.c: added check for sys/aio.h.
2098 2004-04-28 Dick Porter <dick@ximian.com>
2100 * threads.c: Don't abort a thread thats already aborting, when
2101 terminating everything.
2103 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2105 * icall.c: added 2 new async calls for Socket.
2107 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
2110 * threadpool.c: removed unused variable.
2112 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
2114 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
2116 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
2118 * locales.c: put back string_invariant_tolower () and
2119 string_invariant_toupper ().
2121 2004-04-26 David Waite <mass@akuma.org>
2126 * unicode.h: remove comma from end of enumeration declarations
2128 2004-04-26 David Waite <mass@akuma.org>
2130 * debug-mono-symfile.h:
2133 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
2136 2004-04-26 Jackson Harper <jackson@ximian.com>
2138 * appdomain.c: Increment version number.
2140 2004-04-26 Jackson Harper <jackson@ximian.com>
2142 * appdomain.c: Set assembly references public token value when
2143 PublicKeyToken is specified, not the hash_value. Free public token
2144 values when free assembly name data. Previously the public key
2145 token was hex decoded, however we are using hex encoded public key
2146 tokens, so this is not neccasary.
2147 * assembly.c: Lookup assemblies in the gac if their public token
2148 value is set. Add function to allow enabling user gac
2149 lookups. Specify whether or not the assembly was loaded from the
2150 GAC. Compare full assembly names when checking the cache for
2151 assemblies (Temporarily disabled see comment in code). Remove
2152 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
2153 specifies trace-loader they get extra info to stdout on the
2154 loading of assemblies.
2155 * image.h: Add a field for an assembly references public token
2156 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
2157 whether an assembly has been loaded from the GAC.
2158 * image.c: Remove a corlib -> mscorlib name mapping.
2159 * loader.h: Add function to enable/disable the user gac.
2160 * mono-config.c: Check if the usergac is enabled in the config
2162 * icall.c: New icall to determine whether or not an assembly has
2163 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
2164 * tabldefs.h: Add constant for assemblyref flag that specifies a
2165 full public key is used instead of a public token.
2166 * reflection.c: Remove mscorlib -> corlib mappings. Set
2167 PublicTokenValue instead of hash value. This value is a hex
2168 string so it does not need to be expanded.
2170 2004-04-26 Martin Baulig <martin@ximian.com>
2172 * mono-debug-debugger.c (mono_debugger_initialize): Set
2173 `mono_debugger_initialized' before calling mono_debug_lock().
2175 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
2177 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
2178 InternalToUpper/InternalToLower.
2179 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
2180 removed invariant culture shortcut. This is now done in managed code.
2181 * locales.c: (string_invariant_toupper/tolower) removed.
2183 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2185 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
2186 Added Poll internal call.
2188 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
2189 call for Poll. Select was too heavy for polling a single socket.
2191 * threadpool.[ch]: added mono_threadpool_cleanup.
2192 * threads.c: use it. Don't use Thread_Abort on windows.
2194 2004-04-23 Martin Baulig <martin@ximian.com>
2196 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
2198 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
2200 * icall.c: Registred new icalls for key pair protection and added an
2201 icall for Environment.GetFolderPath on Windows.
2202 * security.c|h: Added new icalls for key pair protection.
2204 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2206 * socket-io.c: don't display the non-supported family warning for known
2207 families. Now this is not displayed on windows when checking support
2210 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2212 * class.c: don't display the layout warning for static fields.
2214 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
2216 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
2217 * locales.c, locales.h: Added new icalls for culture-specific
2218 Char.ToLower and Char.ToUpper.
2220 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2222 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
2225 2004-04-20 Martin Baulig <martin@ximian.com>
2227 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
2228 of the type name before passing it to mono_reflection_type_from_name().
2230 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
2232 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
2233 encodings here. Fixes #56965.
2235 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
2237 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
2238 fix test on strstr result not that I can see anything that
2239 relies on the result.
2241 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
2243 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
2246 * marshal.c (mono_marshal_get_string_encoding): New helper function.
2248 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
2249 function to determine which marshalling to use for strings. Fixes
2252 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
2254 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
2256 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
2258 * icall.c: #include mono-config.h
2260 2004-04-15 Jackson Harper <jackson@ximian.com>
2262 * culture-info-tables.h: Fix date formats for en-US culture.
2264 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
2266 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
2267 ThreadPool.SetMinThreads.
2268 * threadpool.c: Implemented ThreadPool.GetMinThreads and
2269 ThreadPool.SetMinThreads.
2271 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
2273 * mono-config.c: also load the .config file in the directory
2274 where the assembly was found.
2276 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
2278 * assembly.c: load per-assembly config files.
2279 * icall.c: decrapified code to get the config dir and moved to
2281 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
2282 per-assembly config files. When doing a dll map lookup give precedence
2283 to the per-assembly data.
2285 2004-04-14 Martin Baulig <martin@ximian.com>
2287 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
2288 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
2289 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
2291 * mono-debugger-debugger.c: While the debugger is locked, remember
2292 whether the symbol tables have changes and send one single
2293 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
2295 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
2297 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
2299 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
2302 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
2303 account when marshalling string arrays. Fixes #56965.
2305 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
2307 * icall.c: Add new icalls mapping for security.
2308 * security.c|h: Add internal calls for WindowsIdentity,
2309 WindowsImpersonationContext and WindowsPrincipal.
2311 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
2313 * class.c: Added comment to ensure the System.MonoDummy class
2314 is removed when no longer necessary
2316 2004-04-13 Miguel de Icaza <miguel@ximian.com>
2318 * appdomain.c: Pass arguments to the bootstraping exceptions to
2319 minimize JITed methods at boot
2321 * metadata.c (mono_exception_from_name_two_strings): Allow for the
2322 second string to be null.
2324 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
2325 Change the protocol to minimize the JIT methods at startup. Now
2326 it Returns the internal codepage, if the value of "int_code_page"
2327 is 1 at entry, and we can not compute a suitable code page
2328 number, returns the code page as a string.
2330 2004-04-13 Jackson Harper <jackson@ximian.com>
2332 * culture-info-tables.h: Fix number of decimal digits for all
2335 2004-04-13 Jackson Harper <jackson@ximian.com>
2337 * icall.c: Clairfy out of sync error message. It is not always
2338 your corlib that is out of sync.
2340 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
2342 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
2343 properties when only the set accessor is overriden. Fixes #55874.
2345 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
2347 * assembly.c (mono_assembly_load_references): Make this thread safe.
2350 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
2352 * monosn.c: Add missing initialization calls.
2354 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
2357 ves_icall_System_Globalization_CultureInfo_construct_number_format
2358 Fix g_assert so it compiles on fussier compilers re int/ptr
2361 2004-04-08 Dick Porter <dick@ximian.com>
2364 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
2365 53992. Also rearrange the code so that the internal calls return
2366 an error value and exceptions are thrown from managed code.
2368 * icall.c: Add type info to the socket icalls.
2370 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2372 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
2375 2004-04-07 Martin Baulig <martin@ximian.com>
2377 * class.c (mono_class_from_generic_parameter): Don't default
2378 `klass->parent' to `mono_defaults.object_type'.
2380 2004-04-07 Martin Baulig <martin@ximian.com>
2382 * reflection.c (mono_reflection_initialize_generic_parameter): Set
2383 `param->pklass->reflection_info'.
2385 2004-04-07 Jackson Harper <jackson@ximian.com>
2387 * culture-info-tables.h: Fix date separator symbol.
2389 2004-04-07 Martin Baulig <martin@ximian.com>
2391 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
2392 from System.Type to System.MonoType.
2394 2004-04-07 Martin Baulig <martin@ximian.com>
2397 (MonoReflectionGenericParam): Added `has_reference_type' and
2398 `has_value_type' fields.
2400 * reflection.c (mono_image_get_generic_param_info): Encode the
2401 correct flags if we have the `class' or `struct' constraint.
2403 2004-04-07 Martin Baulig <martin@ximian.com>
2406 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
2408 2004-04-07 Jackson Harper <jackson@ximian.com>
2410 * appdomain.c: Revert extra patches, just wanted to bump the
2413 2004-04-07 Jackson Harper <jackson@ximian.com>
2415 * Makefile.am: Add culture-info private headers.
2416 * icall.c: Add new icalls for contructing locales.
2417 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
2418 * locales.h: Declare new culture info construction methods.
2419 * object.h: Add new fields used to avoid the CultureMap to
2421 * culture-info.h: Definition of structs used in the culture info
2423 * culture-info-tables.h: Autogenerated tables that contain culture
2424 info data. This file was generated with the locale-builder tool.
2425 * appdomain.c: Incement corlib version number.
2427 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
2429 * appdomain.c: (mono_runtime_init) move mono_thread_init
2430 to before mono_object_new calls so critical sections
2431 are initialized before use.
2433 2004-04-07 Martin Baulig <martin@ximian.com>
2436 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
2437 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
2438 (ves_icall_MonoGenericParam_initialize): Removed.
2439 (monogenericparam_icalls): Removed.
2440 (generictypeparambuilder_icalls): Added new table for
2441 System.Reflection.Emit.GenericTypeParameterBuilder.
2444 (mono_reflection_define_generic_parameter): Removed.
2445 (mono_reflection_initialize_generic_parameter): This is now called
2446 from GenericTypeParameterBuilder's .ctor.
2448 2004-04-06 Martin Baulig <martin@ximian.com>
2450 * class.c (mono_class_init): Don't inflate nested classes in a
2452 (mono_type_get_name_recurse): Include the generic arguments for
2453 generic instances and generic type declarations.
2454 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
2455 (_mono_class_get_instantiation_name): Removed.
2456 (mono_class_create_generic): Always use `gklass->name' as our name.
2458 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
2460 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
2461 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
2462 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
2463 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
2464 closed generic methods here.
2467 (mono_reflection_generic_inst_get_nested_types): Removed.
2468 (inflate_mono_method): Copy the generic parameters from the
2469 MonoMethodHeader into out MonoGenericMethod.
2471 2004-04-06 Martin Baulig <martin@ximian.com>
2474 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
2476 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
2478 * reflection.c (build_compressed_metadata): If we have any entries
2479 in the GenericParam, MethodSpec or GenericParamConstraint tables,
2480 set the header version to 1.1.
2482 2004-04-06 Martin Baulig <martin@ximian.com>
2484 * class.c (mono_class_init): If we're a generic instance,
2485 initialize our nested classes, too.
2486 (_mono_class_get_instantiation_name): Deal with the new `!%d'
2489 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2491 * process.c: quote the argument passed to the shell on windows.
2493 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
2495 * threads.c (mono_alloc_special_static_data): Allow this to be
2496 called during startup.
2498 2004-04-02 Martin Baulig <martin@ximian.com>
2501 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
2503 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
2505 * icall.c: Fix build.
2507 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
2509 * Makefile.am: Added security.c|h.
2510 * icall.c: Added icall for get_UserName;
2511 * security.c: New file for security related icalls. Added function
2512 get_UserName for System.Environment (fix #56144).
2513 * security.h: New. Header file for security.c
2515 2004-04-02 Dick Porter <dick@ximian.com>
2517 * icall.c: Deleted the icalls that were obsoleted some time ago
2518 by the ICU string code, and which were mixed into the icall
2519 rearranging. Fixes bug 55969.
2522 * string-icalls.c: Deleted the code that those icalls reference.
2524 2004-04-01 Martin Baulig <martin@ximian.com>
2526 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
2528 * class.c (mono_class_from_generic_parameter): Don't set
2529 TYPE_ATTRIBUTE_INTERFACE.
2530 (my_mono_class_from_generic_parameter): Likewise.
2532 2004-04-01 Martin Baulig <martin@ximian.com>
2534 * loader.c (find_method): Added an optional `MonoClass *ic'
2535 argument to search in a specific interface.
2536 (mono_get_method_constrained): New public function.
2538 2004-04-01 Martin Baulig <martin@ximian.com>
2540 * reflection.c (mono_image_get_generic_field_token): Use the
2541 `handleref' cache here.
2543 2004-04-01 Martin Baulig <martin@ximian.com>
2545 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
2547 * reflection.c (create_generic_typespec): Use the `typespec' hash
2548 here, not the `typeref' one.
2550 2004-04-01 Martin Baulig <martin@ximian.com>
2552 * class.c (mono_class_inflate_generic_type): Moved the
2553 functionality into a new static inflate_generic_type() which
2554 returns NULL if it didn't do anything. Only increment the
2555 `mono_stats.inflated_type_count' if we actually inflated
2557 (mono_class_get_full): Check the classes type to see whether we
2558 need to inflate it; also inflate MONO_TYPE_(M)VAR.
2560 2004-04-01 Jackson Harper <jackson@ximian.com>
2562 * reflection.c: Set culture for assembly references.
2564 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
2566 * reflection.[ch], icall.[ch], Fix support for pinning variables.
2568 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2571 (do_mono_assembly_open): the critical section also covers
2572 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
2574 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2577 (mono_manage_threads): abort the background threads when finishing.
2580 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2582 * gc.c: only close the done_event handle if there was no timeout.
2585 2004-03-30 Martin Baulig <martin@ximian.com>
2587 * icall.c (icall_entries): It's called "System.Activator", not
2588 "System.Activation".
2590 2004-03-30 Martin Baulig <martin@ximian.com>
2592 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
2593 (mono_class_create_from_typespec): Likewise.
2595 2004-03-30 Martin Baulig <martin@ximian.com>
2597 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
2598 `has_ctor_constraint' and `initialized'.
2600 2004-03-30 Martin Baulig <martin@ximian.com>
2602 * reflection.c (encode_new_constraint): New static function to add
2603 the constructor constraint attribute to a type parameter.
2604 (encode_constraints): Call encode_new_constraint() if necessary.
2607 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
2609 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
2611 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
2613 * reflection.c, icall.c: add support for pinning variables.
2615 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
2617 * marshal.c (mono_marshal_get_managed_wrapper):
2618 init bool local with zero rather than null.
2620 2004-03-29 Martin Baulig <martin@ximian.com>
2622 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
2623 the "official" behavior here.
2624 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
2626 2004-03-29 Martin Baulig <martin@ximian.com>
2628 * icall.c: Reflect latest API changes.
2630 2004-03-29 Martin Baulig <martin@ximian.com>
2632 * loader.c (mono_get_method_from_token): Also call
2633 mono_metadata_load_generic_params () for abstract and interface
2634 methods; replace the type arguments in the method signature with
2635 the ones which are loaded from the metadata.
2637 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
2639 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
2640 of the lock is not the current thread. MS.NET don't do it, in spite of
2641 what the documentation says. See bug #56157.
2643 2004-03-28 Martin Baulig <martin@ximian.com>
2645 * class.c (mono_class_init): Don't call init_properties() and
2646 init_events() for generic instances; set `prop->parent' when
2647 inflating properties.
2649 * reflection.c (mono_generic_inst_get_object): Call
2650 `mono_class_init (ginst->klass)'.
2651 (mono_type_get_object): Only create a MonoGenericInst if your
2652 generic type is a TypeBuilder.
2653 (do_mono_reflection_bind_generic_parameters): Only set
2654 `ginst->is_dynamic' if our generic type is a TypeBuilder.
2656 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
2658 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
2661 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2663 * icall.c: added Kill_internal icall.
2664 * process.[ch]: added Kill_internal icall.
2666 2004-03-25 Martin Baulig <martin@ximian.com>
2668 * class.h (MonoStats): Added `generic_instance_count',
2669 `inflated_method_count', `inflated_type_count' and
2670 `generics_metadata_size'.
2672 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2674 * reflection.c: no warnings now.
2676 2004-03-25 Martin Baulig <martin@ximian.com>
2678 * class.c (mono_class_get_full): New public function; does a
2679 mono_class_get(), but also takes a `MonoGenericContext *'.
2681 * loader.c (mono_field_from_memberref): Renamed to
2682 `field_from_memberref', made static and added `MonoGenericContext *'
2684 (mono_field_from_token): Added `MonoGenericInst *' argument.
2685 (method_from_memberef): Likewise.
2686 (mono_get_method_from_token): Likewise.
2687 (mono_get_method_full): New public function; does a
2688 mono_get_method(), but also takes a `MonoGenericContext *'.
2690 * verify.c (mono_method_verify): Get the method's generic context
2691 and pass it to mono_field_from_token(), mono_get_method_full() and
2692 mono_class_get_full().
2694 2004-03-25 Martin Baulig <martin@ximian.com>
2696 * class.c (mono_class_inflate_generic_type): Take a
2697 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
2698 `MonoGenericMethod *'.
2700 2004-03-25 Martin Baulig <martin@ximian.com>
2702 * loader.h (MonoMethodInflated): Store the MonoGenericContext
2703 instead of the MonoGenericMethod here.
2705 2004-03-25 Martin Baulig <martin@ximian.com>
2707 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
2708 each time we create a new MonoGenericInst, we also create a new
2709 context which points back to us.
2711 * class.c (inflate_method): Use `ginst->context' instead of
2712 creating a new context.
2714 * loader.c (method_from_memberref): Use
2715 `klass->generic_inst->context' instead of creating a new context.
2717 2004-03-25 Martin Baulig <martin@ximian.com>
2719 * class.h (MonoGenericContext): New struct.
2720 (MonoGenericMethod): Removed `generic_inst'.
2722 * class.c (mono_class_inflate_generic_method): Take a
2723 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
2725 2004-03-25 Martin Baulig <martin@ximian.com>
2727 * loader.h (MonoMethodInflated): New typedef.
2729 * metadata.h (MonoMethodSignature): Removed `gen_method', make
2730 `generic_param_count' consume just 30 bits, added `is_inflated'
2731 and `has_type_parameters' flags (one bit each).
2733 * class.c (mono_class_inflate_generic_method): Create a
2734 MonoMethodInflated instead of a MonoMethodNormal and set
2735 `is_inflated' in the method signature.
2737 * class.h (MonoGenericMethod): Removed `generic_method'.
2739 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
2741 * image.c: Make sure the name of a MonoImage is always an absolute path.
2742 This fixes bug #54415.
2744 2004-03-24 Martin Baulig <martin@ximian.com>
2746 * class.c (mono_class_setup_vtable): If we're a generic instance,
2747 use our generic type's vtable size.
2749 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
2751 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
2752 MONO_NO_UNLOAD env var as a temporary workaround for unloading
2755 2004-03-23 Martin Baulig <martin@ximian.com>
2757 * class.h (MonoDynamicGenericInst): Added `int count_events' and
2758 `MonoEvent *events'.
2760 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
2761 (typebuilder_icalls): Added "get_event_info"; calls
2762 mono_reflection_event_builder_get_event_info().
2764 * reflection.c (mono_reflection_generic_inst_initialize): Added
2765 `MonoArray *events'.
2766 (mono_reflection_event_builder_get_event_info): New function.
2768 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
2770 * object.h: add mono_type_initialization_init
2772 * object.c (mono_runtime_class_init):
2773 implement class constructor synchronization rules
2774 to cope with threading issues.
2775 add mono_type_initialization_init
2777 * appdomain.c (mono_runtime_init): call
2778 mono_type_initialization_init
2780 * class.h: removing initializing field from MonoVTable
2782 2004-03-23 Martin Baulig <martin@ximian.com>
2784 * class.c (my_mono_class_from_generic_parameter): Use
2785 `param->name' if it's not NULL.
2787 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
2789 * class.c: do not insert non-virtual methods in the vtable.
2790 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
2791 that means the method is non-virtual. This never would have
2794 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
2796 * profiler.c: Added lock for accessing coverage_hash.
2798 2004-03-22 Martin Baulig <martin@ximian.com>
2800 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
2801 `method->method->signature->generic_param_count != 0' to make it
2802 work for interface methods.
2804 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2806 * process.c: quote the string passed to the shell using g_shell_quote.
2808 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2811 (mono_threads_manage): don't remove the finalizer thread and self
2812 from the threads hash table so that mono_thread_manage can be called
2815 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2817 * process.c: quote the arguments when UseShellExecute is true. Fixes
2820 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2822 * threads.c: set mono_thread_detach as a cleanup routine for every
2823 thread. This way it's always executed upon thread termination, either
2824 aborted or finished normally. No more xsp hangs!
2826 2004-03-17 Martin Baulig <martin@ximian.com>
2828 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
2829 `int count_nested' and a `MonoType **nested'.
2831 * reflection.c (mono_reflection_bind_generic_parameters): Moved
2832 most of the functionality into a new static
2833 do_mono_reflection_bind_generic_parameters() and don't take a
2834 `MonoType *nested_in' argument any more. Don't compute nested
2836 (mono_reflection_generic_inst_get_nested_types): New public method
2837 to get nested types.
2839 * class.c (mono_class_create_generic): Set `klass->nested_in' if
2840 we're a nested class.
2842 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
2843 mono_reflection_generic_inst_get_nested_types() to compute the
2846 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
2848 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
2849 descriptive error message under windows.
2851 2004-03-17 Martin Baulig <martin@ximian.com>
2853 * class.c (dup_type): Added `const MonoType *original' argument;
2854 copy the attrs from the original type.
2856 2004-03-17 Martin Baulig <martin@ximian.com>
2858 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
2859 `m->generic_inst_cache' here.
2861 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
2863 * exception.h exception.c: Add stack_overflow_exception.
2865 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2868 (overlapped_callback): call SetEvent *after* invoking the callback.
2869 No need to call CloseHandle.
2871 2004-03-16 Martin Baulig <martin@ximian.com>
2873 * reflection.c (mono_image_get_fieldref_token): Take a
2874 `MonoReflectionField *' instead of a `MonoClassField *' and a
2875 `MonoClass *'; store the `MonoReflectionField *' in the hash.
2877 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2879 * appdomain.c: don't add the culture to the filename we're looking for
2880 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
2882 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2884 * locales.c: don't ignore symbols when doing case insensitive compares.
2885 Thanks Dick! Fixes bug #54046.
2887 * threads.c: surround 'threads' usage with enter/leave in
2890 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
2892 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
2893 implicitly marshalled as [Out]. Fixes #55450.
2895 (mono_marshal_get_runtime_invoke): Zero out the result if there is
2898 2004-03-16 Martin Baulig <martin@ximian.com>
2900 * class.c (mono_class_from_generic_parameter): Use the actual
2903 2004-03-16 Martin Baulig <martin@ximian.com>
2905 * reflection.c (type_get_signature_size): New static function.
2906 Compues the size of the type in a method signature.
2907 (method_get_signature_size): New static function; calls
2908 type_get_signature_size() to compute the actual size of the
2910 (method_encode_signature): Use method_get_signature_size() to get
2911 the signature's size rather than using `nparams * 10'.
2913 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2915 * file-io.h: define here WapiOverlapped on windows. I don't want the
2916 regular OVERLAPPED one.
2919 * threadpool.c: somehow, BindIoCompletionCallback is not found.
2920 Disabling AIO on windows.
2922 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2924 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
2927 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2929 * appdomain.c: upgraded corlib version.
2931 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
2932 and BeginWrite. Allow opening files for asynchrnous operations.
2934 * file-io.h: new struct that maps FileStreamAsyncResult.
2935 * icall.c: added new icalls.
2936 * process.[ch]: support setting child process environment variables
2937 and use the SHELL or COMSPEC when UseShellExecute is true.
2939 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
2940 callback for async. IO is here and also BindHandle.
2942 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
2945 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
2947 * reflection.c (create_custom_attr): Allow len == 0.
2949 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
2950 computation on big-endian machines.
2952 2004-03-13 Martin Baulig <martin@ximian.com>
2954 * class.h (MonoGenericInst): Added `int count_ifaces'.
2956 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
2957 `ginst->count_ifaces' instead `klass->interface_count' since we
2958 may get called before the vtable is created.
2960 * loader.c (mono_method_get_param_names): If we're a generic
2961 instance, return and don't initialize the class.
2963 * reflection.c (mono_reflection_setup_generic_class): Don't call
2964 ensure_runtime_vtable().
2965 (mono_reflection_bind_generic_parameters): Set
2966 `ginst->count_ifaces'.
2968 2004-03-11 Jackson Harper <jackson@ximian.com>
2972 * unicode.h: Remove unused System.Char icalls.
2974 2004-03-11 Miguel de Icaza <miguel@ximian.com>
2976 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
2977 code when we P/Invoke the first library in Windows.Forms, instead
2978 of when we first open the assembly.
2980 * assembly.c: Drop the lookup from here.
2982 2004-03-10 Martin Baulig <martin@ximian.com>
2984 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
2985 class for properties, fields and events. Finally fixes #54945.
2987 2004-03-10 Martin Baulig <martin@ximian.com>
2989 * metadata.c (mono_metadata_class_equal): New static function;
2990 checks whether two generic instances or two generic parameters are
2992 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
2995 2004-03-10 Martin Baulig <martin@ximian.com>
2997 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
2999 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
3000 argument and write it into the `reflection_info' field.
3003 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
3004 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
3006 2004-03-09 Jackson Harper <jackson@ximian.com>
3008 * char-conversions.h: use 8 bits for numeric data its all we need
3009 * icall.c: numeric data is only 8 bits now.
3011 2004-03-09 Martin Baulig <martin@ximian.com>
3013 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
3015 * class.c (init_properties, init_events): Initialize the new
3018 * reflection.c (typebuilder_setup_properties): Likewise.
3019 (typebuilder_setup_events): Likewise.
3021 * reflection.h (MonoEventInfo): Replaced `parent with
3022 `declaring_type' and `reflected_type'.
3024 * icall.c (ves_icall_get_property_info): Distinguish between
3025 declaring and reflected type.
3026 (ves_icall_get_event_info): Likewise.
3028 2004-03-09 Martin Baulig <martin@ximian.com>
3030 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
3031 (ves_icall_Type_GetField): Correctly set field->klass.
3033 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
3035 * loader.h: Fix warning.
3037 2004-03-08 Miguel de Icaza <miguel@ximian.com>
3039 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
3040 library routine if present. Notice that it will still continue
3041 executing even if its missing, for those working on the Gtk#
3042 edition of Windows.Forms.
3044 * assembly.c (do_mono_assembly_open): If loading the
3045 System.Windows.Forms call mono_loader_wini_init.
3047 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
3049 * class.h: Added MonoRemoteClass struct.
3050 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
3051 function for MonoStrings.
3052 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
3053 Added internal call for getting the proxy type.
3054 * marshal.c: Get the type of transparent proxies from its remote_class.
3055 Added methods that generate the IL for type checks and casts:
3056 mono_marshal_get_isinst, mono_marshal_get_castclass,
3057 mono_marshal_get_proxy_cancast.
3058 * marshal.h: Declaration of the previous new methods.
3059 * object.c: Added new moethods for creating and updating MonoRemoteClass
3060 instances: mono_remote_class, mono_upgrade_remote_class,
3061 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
3062 * verify.c: FIx transparent_proxy_fields layout.
3063 * appdomain.c: Bump corlib version.
3065 2004-03-04 Jackson Harper <jackson@ximian.com>
3067 * icall.c: Add icall to access char conversion tables.
3068 * char-conversions.h: Character conversion tables.
3069 * Makefile.am: Add char-conversions.h private header file.
3071 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
3073 * appdomain.c (unload_thread_main): Increase unloading timeout to
3074 10 sec as a temporary workaround for Nant problems.
3076 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
3078 * gc.c: Add checks for GC_enable and GC_disable.
3080 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
3081 (jaak@zd.com.pl). Fix memory corruption in String.Replace
3084 2004-02-27 Martin Baulig <martin@ximian.com>
3086 * reflection.c (mono_reflection_bind_generic_parameters): Take a
3087 `MonoReflectionType *' instead of a `MonoType *'.
3089 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
3091 * gc.c (run_finalize): Avoid finalizing the object representing the
3093 (finalizer_thread): Fix warning.
3095 2004-02-25 Martin Baulig <martin@ximian.com>
3097 * class.c (_mono_class_get_instantiation_name): Added `int offset'
3098 argument for nested types.
3099 (mono_class_create_generic): Added support for nested generictypes.
3101 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
3104 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
3106 * reflection.c (method_encode_signature): Increase the minimum
3107 value of `size' from 10 to 11.
3108 (mono_reflection_bind_generic_parameters): Take `int type_argc'
3109 and `MonoType **types' arguments instead of the `MonoArray
3110 *types'; added `MonoType *nested_in'. Recursively instantiate
3113 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
3115 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
3116 stack_overflow_ex members which are used by exception handling.
3118 * appdomain.c (mono_runtime_init): Initialize the new members.
3120 * gc.c (mono_gc_enable): New helper function.
3121 * gc.c (mono_gc_disable): New helper function.
3123 2004-02-23 Martin Baulig <martin@ximian.com>
3125 * icall.c: I must have been really stupid - make it actually work
3128 2004-02-23 Martin Baulig <martin@ximian.com>
3130 * loader.c (method_from_memberref): Only inflate the method if
3131 it's in another klass.
3133 2004-02-23 Martin Baulig <martin@ximian.com>
3135 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
3136 (mono_class_init): If we're a generic instance and an interface,
3137 compute `class->interface_id'; also create `class->interfaces'
3138 here and inflate them.
3140 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
3142 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
3144 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
3146 2004-02-15 Miguel de Icaza <miguel@ximian.com>
3148 * reflection.c (method_encode_code): Improved the error message
3149 generated by the exception.
3151 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3153 * icall.c: Martin did not do what he said in the ChangeLog for
3154 2004-02-18, but put back the changes for properties and events.
3155 Commenting those changes out again and adding comment to bug #54518.
3157 * process.c: removed warning.
3159 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
3161 * marshal.c (emit_struct_conv): Print an error message instead of
3162 asserting when a type does not have the StructLayout attribute.
3164 2004-02-20 Martin Baulig <martin@ximian.com>
3166 * reflection.c (mono_type_get_object): Also use the cache for
3168 (mono_reflection_bind_generic_parameters): Always compute
3171 2004-02-20 Martin Baulig <martin@ximian.com>
3173 * class.h (MonoGenericMethod): Removed `klass'.
3175 * class.c (mono_class_inflate_generic_method): Added `MonoClass
3178 2004-02-20 Martin Baulig <martin@ximian.com>
3180 * reflection.c (method_encode_methodspec): Actually use the
3181 uninflated signature for the memberref.
3183 2004-02-20 Martin Baulig <martin@ximian.com>
3185 * class.h (MonoGenericMethod): Removed `declaring'.
3187 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
3188 is NULL, compute it here.
3190 2004-02-20 Martin Baulig <martin@ximian.com>
3192 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
3194 * metadata.c (mono_metadata_generic_inst_hash): New method.
3195 (mono_metadata_generic_inst_equal): New method.
3197 * reflection.c (mono_reflection_bind_generic_parameters): Use the
3198 `klass->image->generic_inst_cache' cache to avoid creating
3199 duplicate MonoGenericInst's.
3201 * class.c (mono_class_inflate_generic_type): Use the cache.
3203 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
3205 * object.c: fixed gc descriptor calculation for embedded valuetypes.
3207 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3209 * icall.c: added Socket.WSAIoctl icall.
3211 * socket-io.[ch]: implemented
3212 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
3214 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
3216 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
3218 2004-02-18 Urs C Muff <umuff@quark.com>
3220 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
3221 this work on PPC and other big-endian architectures.
3223 * debug-mono-symfile.h: Prepended the names of all the `guint32'
3224 fields with an underscore to make sure they're only accessed by
3227 2004-02-18 Martin Baulig <martin@ximian.com>
3229 * icall.c: Put the klass->refclass changes back for methods and
3230 fields, but not for properties and events. We're currently not
3231 distinguishing between DeclaringType and ReflectedType for
3232 properties and events, that's what caused the regressions.
3234 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3237 (mono_async_result_new): the handle can be NULL.
3239 * threadpool.c: Use an event instead of a semaphore, don't initialize
3240 it until needed. This saves quite a few semaphores from being created
3241 when using the threadpool.
3243 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
3245 * object.c (mono_string_is_interned_lookup): Fix interning of long
3246 strings. Fixes #54473.
3248 * domain.c (ldstr_equal): Optimize if the two strings are equal.
3250 * icall.c: Revert the klass->refclass changes since they introduce
3251 regressions (bug #54518).
3253 2004-02-18 Martin Baulig <martin@ximian.com>
3255 * class.c (mono_class_init): If we're a generic instance and don't
3256 come from a TypeBuilder, inflate our members here.
3257 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
3258 (mono_class_create_generic): New public method.
3259 (mono_class_initialize_generic): Removed.
3260 (get_instantiation_name): Renamed to
3261 _mono_class_get_instantiation_name() and made it public.
3263 2004-02-18 Martin Baulig <martin@ximian.com>
3265 * class.c (mono_class_inflate_generic_type): Clear the new
3266 instance's `nginst->klass' when inflating a generic instance.
3267 (mono_class_is_subclass_of): Added (basic) support for generic
3270 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
3272 * appdomain.h, domain.c: use a MonoCodeManager instead of a
3273 MonoMempool to hold compiled native code.
3275 2004-02-17 Martin Baulig <martin@ximian.com>
3277 * class.h (MonoDynamicGenericInst): Added `count_properties' and
3280 * reflection.c (mono_reflection_generic_inst_initialize): Added
3281 `MonoArray *properties' argument.
3283 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
3285 2004-02-17 Martin Baulig <martin@ximian.com>
3287 * icall.c (ves_icall_Type_GetFields): Renamed to
3288 ves_icall_Type_GetFields_internal() and added a
3289 `MonoReflectionType *rtype' argument; pass it to
3290 mono_field_get_object() to set the field's "reflected" type.
3291 (ves_icall_Type_GetConstructors): Likewise.
3292 (ves_icall_Type_GetEvents): Likewise.
3293 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
3294 argument; pass it to mono_method_get_object() to set the method's
3297 2004-02-17 Martin Baulig <martin@ximian.com>
3299 * class.h (MonoDynamicGenericInst): New type.
3300 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
3302 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
3303 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
3304 (ves_icall_MonoGenericInst_GetFields): New interncall.
3306 * class.c (mono_class_from_generic): Don't call
3307 mono_class_initialize_generic() if this is a dynamic instance;
3308 ie. it's being created from a TypeBuilder.
3309 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
3310 `class->byval_arg.type'.
3312 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
3313 to `inflate_method' and made static.
3314 (mono_reflection_inflate_field): Removed.
3315 (mono_reflection_generic_inst_initialize): New public method.
3317 * reflection.h (MonoReflectionGenericInst): Removed `methods',
3318 `ctors' and `fields'; added `initialized'.
3320 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
3322 * debug-helpers.c (mono_method_full_name): Fix output for empty
3325 2004-02-12 Martin Baulig <martin@ximian.com>
3327 * class.h (MonoClassField): Added `MonoType *generic_type'.
3329 * reflection.c (mono_image_get_fieldref_token): Added support for
3330 instantiated generic types.
3331 (field_encode_inflated_field): Removed.
3332 (mono_image_get_inflated_field_token): Removed.
3333 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
3335 * reflection.h (MonoReflectionInflatedField): Removed.
3337 2004-02-12 Martin Baulig <martin@ximian.com>
3339 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
3340 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
3342 * reflection.c (mono_image_get_methodspec_token): Take a
3343 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
3344 (mono_image_create_token): Check whether we have a
3345 `method->signature->gen_method' and call
3346 mono_image_get_methodspec_token() if appropriate.
3347 (inflated_method_get_object): Removed.
3348 (mono_reflection_bind_generic_method_parameters): Return a
3349 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
3350 (mono_reflection_inflate_method_or_ctor): Likewise.
3352 * reflection.h (MonoReflectionInflatedMethod): Removed.
3354 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
3356 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
3357 for custom valuetype marshalling.
3359 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
3361 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3363 * icall.c: fixed WSAGetLastError_internal name.
3365 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
3367 * threads.c (mono_thread_attach): Allow this to be called multiple
3370 * threads.c (build_wait_tids): Do not wait for ourselves.
3372 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
3373 appdomain list is empty.
3375 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
3376 memory returned by mono_string_builder_to_utf16, since it points into
3377 managed memory. Thanks to Bernie Solomon for noticing this.
3379 * icall.c: Add AppDomainSetup icalls.
3381 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
3383 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
3386 * reflection.c (reflection_methodbuilder_to_mono_method): Save
3387 custom attributes to the method_aux struct. Also fix array indexes etc.
3389 * loader.c (mono_method_get_param_names): Make dynamic case work again.
3391 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
3393 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
3394 (both static and runtime) and reduce startup time.
3396 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
3398 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
3399 AsAny marshalling conversion instead of crashing.
3401 * marshal.c: Fix warnings.
3403 2004-02-09 Martin Baulig <martin@ximian.com>
3405 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
3407 * reflection.h (MonoReflectionInflatedMethod): Removed the
3408 `declaring' field, it's now in the unmanaged MonoGenericMethod.
3410 * reflection.c (method_encode_methodspec): Removed the `method'
3411 argument; we get it from `gmethod->declaring'.
3412 (inflated_method_get_object): Removed the `declaring' argument.
3414 2004-02-09 Martin Baulig <martin@ximian.com>
3416 * class.h (MonoGenericMethod): New type.
3417 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
3420 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
3421 a `MonoGenericMethod *gen_method' one.
3423 * class.c (mono_class_inflate_generic_type): Take an additional
3424 `MonoGenericMethod * argument. This is only non-NULL if we're
3425 inflating types for a generic method.
3426 (mono_class_inflate_generic_signature): Renamed to
3427 inflate_generic_signature() and made static; take a
3428 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3429 (inflate_generic_header): Take a `MonoGenericMethod *' argument
3430 instead of a `MonoGenericInst *' one.
3431 (mono_class_inflate_generic_method): Likewise.
3433 * reflection.c (encode_generic_method_sig): Take a
3434 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3435 (method_encode_methodspec): Likewise.
3436 (inflated_method_get_object): Likewise.
3438 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
3439 field with a `MonoGenericMethod *gmethod' one.
3441 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
3443 * class.h (mono_class_has_parent): add parens to expansion
3446 2004-02-08 Martin Baulig <martin@ximian.com>
3448 * image.h (MonoImage): Removed `generics_cache'.
3450 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
3451 instead of a `MonoType *' argument; removed the `inflate_methods'
3452 argument. Don't inflate methods here.
3454 * loader.c (find_method): If it's a generic instance, call
3455 mono_class_init() on the `sclass->generic_inst->generic_type'.
3457 * metadata.c (mono_type_size): Make this work on uninitialized
3458 generic instances; call it on the `ginst->generic_type's class.
3460 * reflection.c (mono_reflection_bind_generic_parameters): Call
3461 mono_class_from_generic() to create the `ginst->klass'.
3463 2004-02-08 Martin Baulig <martin@ximian.com>
3465 * class.h (MonoClass): Changed type of `generic_inst' from
3466 `MonoType *' to `MonoGenericInst *'.
3468 2004-02-08 Martin Baulig <martin@ximian.com>
3470 * icall.c (ves_icall_Type_BindGenericParameters): Just call
3471 mono_type_get_object(), this is now creating a `MonoGenericInst'
3472 for MONO_TYPE_GENERICINST.
3473 (ves_icall_MonoGenericInst_GetParentType): Likewise.
3474 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
3476 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
3477 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
3478 (inflated_method_get_object): Added `MonoClass *refclass' argument.
3479 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
3482 * reflection.h (MonoReflectionInflatedMethod): Removed
3483 `declaring_type' and `reflected_type'.
3485 2004-02-08 Martin Baulig <martin@ximian.com>
3487 * class.h (MonoGenericInst): Added `MonoType *parent' and
3488 `MonoType **ifaces'.
3490 * reflection.h (MonoReflectionGenericInst): Removed `klass',
3491 `parent' and `interfaces'.
3493 * reflection.c (mono_reflection_bind_generic_parameters): Take a
3494 `MonoType *' argument and return a `MonoType *'.
3497 (ves_icall_MonoGenericInst_GetParentType): New interncall.
3498 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
3500 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
3502 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
3503 valuetype marshalling.
3505 2004-02-06 Martin Baulig <martin@ximian.com>
3508 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
3509 (my_mono_class_from_generic_parameter): Likewise.
3511 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
3513 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
3514 contents of the symbol files lazily.
3516 * object.h (MonoThread): Add 'name' and 'name_len' fields.
3518 * threads.h threads.c icall.c: New icalls for getting and setting the
3521 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
3523 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
3524 Raise an exception when the domain is not found.
3526 2004-02-03 Martin Baulig <martin@ximian.com>
3528 * reflection.c (mono_image_get_methodspec_token): Use the
3529 uninflated signature; fixes gen-33.
3531 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
3533 * gc.c threads.c: Make the finalizer thread a normal managed thread so
3534 the finalizer code can use thread functionality.
3536 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
3537 the finalizer thread.
3539 * threads.c: Make some functions more robust.
3541 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
3543 * metadata.h: Add new marshalling conventions.
3545 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
3546 stringbuilder marshalling. Fixes #53700.
3548 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
3550 * reflection.c (mono_image_get_type_info): Save declarative security
3553 * reflection.c (mono_image_get_field_info): Handle uninitialized
3554 unmanaged fields as well.
3556 * appdomain.c: Bump corlib version.
3558 2004-02-01 Martin Baulig <martin@ximian.com>
3560 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
3561 method type arguments.
3563 2004-01-30 Duncan Mak <duncan@ximian.com>
3565 * marshal.h: Add prototype for
3566 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
3568 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
3571 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
3573 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
3574 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
3576 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
3578 * marshal.c (mono_marshal_get_native_wrapper): Add support for
3579 custom marshalling of valuetypes.
3581 * marshal.c: Fix some warnings.
3583 2004-01-29 Martin Baulig <martin@ximian.com>
3585 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
3586 for generic method parameters.
3588 * reflection.c (method_encode_methodspec): Write the uninflated
3589 signature into the methodspec table.
3590 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
3591 is always the uninflated method.
3592 (reflection_methodbuilder_to_mono_method): Copy the generic
3593 parameters from the MethodBuilder into `header->gen_params'.
3595 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
3597 * class.c (mono_class_from_generic_parameter): Fix warning.
3599 2004-01-27 Martin Baulig <martin@ximian.com>
3601 * class.c (mono_class_from_generic_parameter): Don't create
3602 `klass->methods' here.
3604 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
3606 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
3607 extension since it does not work with libraries named lib<FOO>.dll.so.
3609 2004-01-25 Martin Baulig <martin@ximian.com>
3611 * class.c (mono_class_inflate_generic_type): Added support for
3612 MONO_TYPE_GENERICINST.
3614 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
3615 inflate methods on open constructed types.
3617 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3619 * object.c: fire ProcessExit event in the root AppDomain after running
3620 Main. Fixes bug #53299.
3622 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
3624 * socket-io.c: include the new socket-wrappers.h header.
3625 Use the wrappers instead of the unix socket functions to make the code
3628 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
3630 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
3632 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3635 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
3637 * reflection.c (mono_image_create_pefile): Handle the case when the
3638 entry point is not a MethodBuilder.
3640 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3641 field to ReflectionMethod since it is not allways a builder.
3643 * reflection.c (type_get_fully_qualified_name): New helper function to
3644 return the fully qualified name of a type.
3646 * reflection.c (encode_marshal_blob): Always emit the fully qualified
3647 type name for custom marshallers.
3649 * reflection.c (mono_marshal_spec_from_builder): Ditto.
3651 * class.c (mono_class_setup_vtable): If a parent class already
3652 implements an interface, use the implementing methods from that class.
3655 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3657 * threadpool.c: just return instead of ExitThread to allow for thread
3660 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
3662 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
3663 when closing resource modules.
3665 * reflection.c (mono_image_create_pefile): Handle the case when the
3666 entry point is not a MethodBuilder.
3668 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3669 field to ReflectionMethod since it is not allways a builder.
3671 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
3673 * marshal.c (mono_marshal_get_managed_wrapper):
3674 mono_marshal_alloc takes native int so CONV_I
3677 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
3679 * reflection.c (fixup_cattrs): New function to fixup the methoddef
3680 tokens in the cattr table. Fixes #53108.
3682 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3684 * loader.c: don't trim ".dll" before looking up in the config file.
3685 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
3687 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
3689 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
3690 Return the module which contains the resource as well.
3691 (ves_icall_System_Reflection_Module_Close): New icall.
3693 * appdomain.c: Bump corlib version number.
3695 * image.c (mono_image_addref): New public function.
3697 * assembly.c: Call mono_image_addref.
3699 * reflection.c (mono_module_get_object): Increase reference count of
3702 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3705 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
3706 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
3707 proper exceptions on DllImport problems.
3709 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
3711 * class.c, metadata.c: eliminate CSIZE macro.
3713 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
3715 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
3716 * object.h: Added async_callback field in MonoAsyncResult.
3717 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
3718 * verify.c: Added async_callback in MonoAsyncResult layout.
3720 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
3722 * reflection.c (mono_reflection_get_custom_attrs): Add support
3725 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
3727 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
3729 (mono_marshal_method_from_wrapper): Add null pointer check.
3731 2004-01-16 Martin Baulig <martin@ximian.com>
3733 * debug-mono-symfile.h: Set version number to 36 and reflect
3734 latest symbol writer changes.
3736 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
3738 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
3739 multi-dimensional arrays.
3740 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
3741 (mono_class_from_mono_type): Use bounded_array_class_get.
3743 * class.c (mono_bounded_array_class_get): New function which takes
3744 a 'bounded' bool argument to distinguish vectors from one dimensional
3747 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
3748 bounded_array_class_get if the array has bounds.
3750 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3751 Search modules loaded using AssemblyBuilder:AddModule as well.
3753 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3755 * appdomain.c: increased corlib version.
3756 * filewatcher.c: removed g_print.
3758 (get_property_info): only allocate what is actually requested.
3759 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
3761 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3763 * Makefile.am: added filewatcher.[ch]
3764 * filewatcher.[ch]: FileSystemWatcher runtime support.
3765 * icall.c: added new FSW icalls.
3767 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
3769 * string-icalls.c: fix stringbuilder regression as suggested by
3770 Iain McCoy <iain@mccoy.id.au>.
3772 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
3774 * process.c (process_read_stringtable_block): Recognize '007f' as
3775 a language neutral stringtable block.
3777 2004-01-12 Patrik Torstensson
3779 * object.h (MonoStringBuilder) : Changed layout to support our
3780 new stringbuilder class.
3781 * marshal.c: Change marshalling to support the new layout of
3783 * appdomain.c: increased version number because new layout of
3786 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
3788 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
3789 assembly name as an string instead of an AssemblyName, since it is
3790 easier to extract info from it.
3792 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
3793 the culture subdirectories too. Fixes #52231.
3795 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3797 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
3798 It takes 2 new parameters with an optional name for the method to look
3799 for and case ignoring info.
3801 * threadpool.c: removed unused variable.
3803 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3805 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
3806 It takes 2 new parameters with an optional name for the property to look
3807 for and case ignoring info.
3810 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
3812 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
3815 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3818 * assembly.c: escape the uri before passing it to g_filename_from_uri.
3821 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
3823 * reflection.c: Add support for more than one unmanaged resource.
3825 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
3826 in field->def_value, as done in all other cases.
3828 * reflection.c (mono_reflection_get_custom_attrs): Add support for
3831 * reflection.c (mono_reflection_create_runtime_class): Remove
3832 errorneous assignment to klass->element_class, since it is already
3833 done in mono_reflection_setup_internal_class.
3835 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3837 * gc.c: added missing LeaveCriticalSection.
3838 * icall.c: indented a couple of lines.
3839 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
3840 if we call EndInvoke inside a callback. Fixes bug #52601.
3842 2004-01-07 Martin Baulig <martin@ximian.com>
3844 * mono-debug-debugger.h
3845 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
3847 2004-01-06 Miguel de Icaza <miguel@ximian.com>
3849 * appdomain.c: Use messages in NotImplementedException.
3851 * exception.c (mono_get_exception_not_implemented): Now this takes
3854 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
3855 exception instead of g_asserting an aborting when something is not
3858 Add some inline docs.
3860 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
3862 * reflection.h: Update after changes to object layout.
3864 * reflection.c: Implement saving of unmanaged aka win32 resources.
3866 * appdomain.c: Bump version number.
3868 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
3869 Handle missing domains gracefully.
3871 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
3873 * file-io.c : On Windows, there are much more invalid_path_chars.
3875 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
3877 * class.h, object.c: prepare for GetType () speedup.
3879 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
3881 * profiler.c: workaround for --profile null reference exception on
3882 cygwin. Patch by Patrik Torstensson.
3884 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
3886 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
3887 make work for unaligned access.
3889 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
3891 * class.c: small cleanup (class->fields [i] -> field).
3892 * image.c: check address of metadata is valid.
3894 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
3896 * assembly.h assembly.c (mono_assembly_loaded): New public function to
3897 search the list of loaded assemblies.
3899 * reflection.c (mono_reflection_type_from_name): Use
3900 mono_assembly_loaded instead of mono_image_loaded.
3902 * reflection.c: Fix warnings.
3904 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
3906 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
3907 is dynamic. This is needed since an assembly can contain both dynamic and
3910 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
3913 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
3915 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
3916 to store modules loaded using AddModule.
3918 * reflection.c (mono_image_fill_file_table): Generalize this so it works
3921 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
3923 * reflection.c (mono_image_fill_export_table_from_module): New function to
3924 fill out the EXPORTEDTYPES table from a module.
3926 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
3927 into a separate function. Also handle loaded non-dynamic modules.
3929 * reflection.c (mono_image_basic_init): Fix memory allocation.
3931 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3933 * assembly.c (mono_assembly_load_references): Make this public.
3935 2003-12-19 Martin Baulig <martin@ximian.com>
3937 * class.c (mono_class_initialize_generic): Made this static, take
3938 a `MonoGenericInst *' instead of a `MonoClass *'.
3939 (mono_class_from_generic): Call mono_class_initialize_generic()
3940 unless we're already initialized or being called from
3941 do_mono_metadata_parse_generic_inst().
3943 * class.h (MonoGenericInst): Added `initialized' and
3944 `init_pending' flags.
3946 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
3947 `mono_class_init (gklass)' or mono_class_initialize_generic()
3948 here; set `generic_inst->init_pending' while parsing the
3951 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
3953 * locales.c: include string.h for memxxx prototypes
3955 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
3957 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
3958 constructor when accessing literal fields.
3960 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
3962 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3964 * reflection.c (assembly_add_resource_manifest): New function to fill
3965 the MANIFESTRESOURCE table.
3967 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
3969 * reflection.h: Update to changes in class layout.
3971 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
3972 Reenable call to mono_runtime_is_shutting_down ().
3974 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
3975 determine if the runtime is shutting down.
3977 2003-12-16 Jackson Harper <jackson@ximian.com>
3979 * icall.c: comment out call to mono_runtime_is_shutting_down to
3982 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
3984 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
3985 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
3987 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
3989 * reflection.c: move definition of swap_with_size
3990 to before its first call
3992 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
3994 * appdomain.c (mono_runtime_is_shutting_down): New public function.
3996 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
3999 * object.c: Fix warnings.
4001 * icall.c (ves_icall_Type_Get...): Only consider inherited static
4002 members if FlattenHierarchy is set.
4004 * reflection.c (mono_image_add_decl_security): New function to emit
4005 declarative security.
4007 * reflection.h reflection.c: Add support for declarative security.
4009 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
4011 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
4013 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
4015 * appdomain.c verify.c: Moved corlib version checking into its own
4016 function in appdomain.c since it needs to create vtables etc.
4018 2003-12-13 Patrik Torstensson <p@rxc.se>
4020 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
4021 instead of unwrapped server.
4023 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
4025 * verify.c (check_corlib): Fix field index.
4027 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
4029 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
4032 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
4034 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
4035 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
4036 cope with sizeof(size_t) != sizeof(guint32).
4038 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4040 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
4043 2003-12-10 Mark Crichton <crichton@gimp.org>
4045 * icall.c: removed the GetNonZeroBytes. We now handle this case
4048 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
4050 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
4052 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
4055 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
4057 * verify.c (check_corlib): Handle the case when the version field is
4058 initialized by a static constructor.
4060 2003-12-08 Patrik Torstensson <p@rxc.se>
4062 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
4064 2003-12-08 Martin Baulig <martin@ximian.com>
4066 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
4067 a MonoReflectionGenericParameter, also take the parameter index
4068 and name as arguments.
4069 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
4070 (ves_icall_MonoGenericParam_initialize): New interncall.
4071 (ves_icall_Type_make_byref_type): New interncall.
4073 * reflection.h (MonoReflectionGenericParam): Derive from
4074 MonoReflectionType, not just from MonoObject. Added `refobj' and
4077 * reflection.c (mono_reflection_define_generic_parameter): Create
4078 and return a new MonoReflectionGenericParam; don't initialize the
4080 (mono_reflection_initialize_generic_parameter): New public method;
4081 initializes the constraints and creates the `param->pklass'.
4083 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
4085 * reflection.h reflection.c: Use the new fields 'num_types',
4086 'num_fields' and 'num_methods' to track the number of types etc.
4088 * verify.c (check_corlib): Check corlib version number.
4090 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
4092 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
4093 function works on all methods.
4095 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
4097 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
4098 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
4099 the custom_type_info flag of the transparent proxy.
4100 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
4101 objects that supports IRemotingTypeInfo.
4102 * object.h: Added custom_type_info field in transparent proxy.
4104 2003-12-06 Martin Baulig <martin@ximian.com>
4106 * class.c (mono_class_create_from_generic): Removed.
4107 (mono_class_from_generic): Check `ginst->klass' before doing
4108 anything else. This is important to fully support "recursive"
4111 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
4112 empty `generic_inst->klass' before doing anything else.
4114 2003-12-06 Dick Porter <dick@ximian.com>
4119 * locales.c: Use C structs to access class fields. Don't do a
4120 conversion between MonoString and UChar because both are
4121 platform-endian UTF-16. Compare now takes startindex and count
4122 parameters. Add a char overload for IndexOf. Speed up the
4123 invariant string IndexOf.
4125 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
4127 * Makefile.am (monosn_LDADD): Fix parallel build.
4129 2003-12-04 Martin Baulig <martin@ximian.com>
4132 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4133 (ves_icall_Type_make_array_type): New interncall.
4135 2003-12-04 Martin Baulig <martin@ximian.com>
4137 * locales.c: also change it in the !HAVE_ICU case.
4139 2003-12-04 Dick Porter <dick@ximian.com>
4142 * locales.c: construct_compareinfo is now in CompareInfo, not
4145 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
4147 * image.c (mono_image_load_file_for_image): Cache loaded images in the
4150 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
4153 * assembly.c (mono_assembly_load_references): Only load references
4156 * class.c (mono_class_from_name): Avoid linear search of the
4159 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
4161 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
4163 * image.h (MonoImage): Add 'field_cache' field.
4165 * loader.c (mono_field_from_token): Cache field lookups.
4167 * reflection.c (mono_module_get_object): Fix name property.
4169 * icall.c (ves_icall_get_enum_info): Update after changes to
4170 mono_metadata_get_constant_index ().
4172 * icall.c: Get rid of get_type_info icall, use a separate icall for
4173 each type property to avoid needless memory allocations. Fixes #51514.
4175 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
4176 to avoid needless binary searches.
4178 * class.c (class_compute_field_layout): Move the initialization of
4179 field->def_value to mono_class_vtable ().
4181 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
4184 * object.c (mono_object_allocate): Make it inline.
4186 * object.c (mono_object_allocate_spec): Make it inline.
4188 2003-12-02 Dick Porter <dick@ximian.com>
4190 * locales.c (create_NumberFormat): NumberFormatInfo construction.
4191 Patch by Mohammad DAMT (mdamt@cdl2000.com).
4193 2003-12-01 Dick Porter <dick@ximian.com>
4195 * threads.c: Fix signature and call in CreateMutex and
4198 2003-12-01 Dick Porter <dick@ximian.com>
4201 * locales.c: Implement string compares and searching
4203 * object.h: Add extra Thread field
4205 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
4207 * reflection.c (fixup_method): Add support for MonoCMethod.
4209 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
4211 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
4213 * reflection.c (assembly_name_to_aname): Allow extra characters in
4214 assembly names. Fixes #51468.
4216 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
4218 * exception.c (mono_exception_from_name_domain): New helper function.
4220 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
4221 exception object in the correct domain.
4223 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
4224 formatting + make a copy a the input data.
4226 * loader.c (mono_get_method_from_token): Methods which contain
4227 native code do not have entries in the ImplMap.
4229 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
4230 Thanks to Gonzalo for spotting this.
4232 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
4233 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
4235 * assembly.h (mono_assembly_load_from): Split the second part of
4236 assembly loading into a new public function.
4238 * exception.h (mono_get_exception_bad_image_format): New function.
4240 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
4242 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4243 Enumerate all modules inside a dynamic assembly. Fixes #51293.
4245 * icall.c: Add new icall for creating dynamic methods.
4247 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
4249 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
4251 * reflection.c (mono_reflection_create_dynamic_method): New icall to
4252 create a dynamic method.
4254 * reflection.c (resolve_object): New helper function.
4256 * reflection.c: Generalize ReflectionMethodBuilder and the functions
4257 which manipulate it so they can also work on dynamic methods.
4259 * reflection.c (reflection_method_builder_to_mono_method): Avoid
4260 creating the MonoReflectionMethodAux structure if it is not needed.
4262 * reflection.h verify.c: Update after changes to object layout.
4264 * reflection.c (method_builder_encode_signature): Fix compilation on
4267 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
4269 * appdomain.h: Added support for context static fields. Added static_data
4270 field to MonoAppContext and renamed thread_static_fields to a more
4271 generic special_static_fields in MonoAppDomain, since it can now contain
4272 context static fields.
4273 * domain.c: Updated hashtable name.
4274 * object.c: Replaced field_is_thread_static() for a more generic
4275 field_is_special_static() which also checks for context static attribute.
4276 In mono_class_vtable(), added support for static context fields.
4277 * threads.c: Changed methods that manage thread static fields to more
4278 generic methods so they can be reused both for thread and context static
4280 * threads.h: Declared some new methods.
4282 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
4284 * reflection.h: Update after changes to the managed types.
4286 * reflection.c (encode_custom_modifiers): New helper function.
4288 * reflection.c (method_encode_signature): Emit custom modifiers.
4290 * reflection.c (field_encode_signature): Emit custom modifiers.
4292 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
4294 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
4296 * icall.c (ves_icall_System_ValueType_Equals): New optimized
4299 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
4302 * object.c (mono_field_get_value_object): New function.
4304 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
4307 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
4309 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
4310 return a preallocated out-of-memory exception instance.
4312 * object.c (out_of_memory): Use the new function.
4314 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
4315 flag is before the custom modifiers. Fixes #49802.
4317 2003-11-16 Martin Baulig <martin@ximian.com>
4319 * class.c (mono_class_is_open_constructed_type): Implemented the
4320 MONO_TYPE_GENERICINST case.
4322 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
4324 * assembly.c (mono_assembly_fill_assembly_name): New function to
4325 fill out the MonoAssemblyName structure.
4326 (mono_assembly_open): Use the new function.
4328 * icall.c (fill_reflection_assembly_name): New helper function.
4330 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
4333 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
4335 2003-11-15 Martin Baulig <martin@ximian.com>
4337 * class.c (mono_class_is_open_constructed_type): New public
4338 function; checks whether a type is an open constructed type,
4339 ie. whether it still contains type parameters.
4340 (mono_class_inflate_generic_type): If we're a type parameter and
4341 the inflated type is also a MONO_TYPE_(M)VAR, return the original
4344 * class.h (MonoGenericInst): Added `guint32 is_open'.
4346 * loader.c (method_from_methodspec): Check whether we're an open
4347 or closed constructed type and set `ginst->is_open'.
4349 * reflection.c (mono_reflection_bind_generic_parameters): Check
4350 whether we're an open or closed constructed type and set
4352 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
4353 from open constructed types.
4355 2003-11-15 Martin Baulig <martin@ximian.com>
4357 * reflection.c (mono_reflection_bind_generic_parameters): If we're
4358 a generic instance (instead of a generic type declaration) with
4359 unbound generic parameters, bind them to our actual types.
4361 2003-11-14 Martin Baulig <martin@ximian.com>
4363 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
4365 * reflection.c (mono_reflection_bind_generic_parameters): If we're
4366 an interface type, populate `res->interfaces' with instantiated
4367 versions of all the interfaces we inherit.
4369 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
4371 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
4372 when MONO_PATH is set but doesn't contain the install dir.
4374 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4377 (ves_icall_Type_GetInterfaces): don't return an interface twice when
4378 it's also implemented in base classes. Fixes bug #50927.
4380 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
4382 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
4383 if this method is called from a finalizer. Fixes #50913.
4385 2003-11-12 Miguel de Icaza <miguel@ximian.com>
4387 * threads.c: Implement VolatileRead/VolatileWrite
4389 * icall.c: Add new icalls for VolatileRead/VolatileWrite
4391 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
4393 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
4394 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
4397 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
4398 from Peter Ross (pro@missioncriticalit.com).
4400 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
4402 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
4404 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
4406 * assembly.c (mono_assembly_load_references): Disable check because it
4407 triggers on older corlibs which lots of people have.
4409 2003-11-12 Jackson Harper <jackson@ximian.com>
4411 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
4412 load corlib.dll if mscorlib.dll is not found.
4413 * assembly.h: Remove corlib name define.
4416 * image.c: Change corlib name to mscorlib.
4418 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
4420 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
4422 2003-11-11 Miguel de Icaza <miguel@ximian.com>
4424 * appdomain.h: Added loader_optimization here to sync with the C#
4425 code, and add disallow_binding_redirects field.
4427 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
4429 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
4431 * reflection.c (mono_image_build_metadata): Fix crash on modules
4434 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
4436 * icall.c (ves_icall_get_method_info): Return callingConvention as
4439 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
4440 namespaces from the EXPORTEDTYPE table as well.
4442 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
4443 from all modules inside the assembly.
4445 2003-11-11 Martin Baulig <martin@ximian.com>
4447 * reflection.c (mono_reflection_bind_generic_parameters): Make
4448 this work for interfaces.
4450 2003-11-11 Martin Baulig <martin@ximian.com>
4452 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
4454 2003-11-11 Martin Baulig <martin@ximian.com>
4456 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
4457 "MonoInflatedMethod" and "MonoInflatedCtor".
4459 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
4461 * reflection.c (resolution_scope_from_image): Use the assembly table
4462 from the manifest module, since other modules don't have it.
4464 * debug-helpers.c (mono_type_full_name): New helper function.
4466 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
4468 * image.c (mono_image_load_file_for_image): New public function which
4469 is a replacement for the load_file_for_image in class.c.
4471 * assembly.c (mono_assembly_load_module): A wrapper for the function
4472 above which does assembly association and reference loading too.
4474 * class.c (mono_class_from_name): Call mono_assembly_load_module.
4476 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4478 * appdomain.c: not all of the attributes for the full assembly name
4479 are required and the order doesn't matter. Fixes bug #50787.
4481 2003-11-10 Dick Porter <dick@ximian.com>
4483 * locales.c: Use platform-endian UTF16
4485 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
4487 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4489 2003-11-10 Martin Baulig <martin@ximian.com>
4492 (mono_metadata_load_generic_params): Make this actually work.
4494 * reflection.c (mono_reflection_bind_generic_parameters): If our
4495 parent is a generic instance, pass all the `types' to it, no
4496 matter whether it has the same number of type parameters or not.
4498 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
4500 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4502 * assembly.c (mono_assembly_load_references): Move the image<->assembly
4503 assignment code to this function so it gets called recursively for all
4506 * image.c (load_modules): Remove the assembly assignment since it is
4507 now done by mono_assembly_load_references.
4509 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4510 Add 'module' argument.
4511 (mono_module_get_types): New helper function.
4512 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
4514 2003-11-08 Martin Baulig <martin@ximian.com>
4516 * class.c (mono_class_inflate_generic_method): Interface method
4517 don't have a header.
4519 * reflection.c (mono_image_get_methodspec_token): Take an
4520 additional `MonoGenericInst *' argument instead of reading it from
4521 the header; this is necessary to support interfaces.
4522 (mono_image_create_token): Pass the `MonoGenericInst *' from the
4523 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
4524 (inflated_method_get_object): Take an additional `MonoGenericInst *'
4527 * reflection.h (MonoReflectionInflatedMethod): Added
4528 `MonoGenericInst *ginst'.
4530 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
4532 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
4534 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
4536 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
4538 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
4541 (reflection_methodbuilder_from_method_builder):
4542 (reflection_methodbuilder_from_ctor_builder): New helper functions to
4543 initialize a ReflectionMethodBuilder structure.
4544 (mono_image_get_methodbuilder_token):
4545 (mono_image_get_ctorbuilder_token): New functions to emit memberref
4546 tokens which point to types in another module inside the same assembly.
4548 * reflection.c: Use the new helper functions.
4550 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
4552 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
4553 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
4555 * reflection.c (resolution_scope_from_image): Emit a moduleref if
4558 * reflection.c (mono_image_build_metadata): Emit metadata only for the
4559 current module. Emit the manifest only for the main module.
4561 * reflection.c (mono_image_create_token): Add assertion when a
4562 memberref needs to be created.
4564 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
4566 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
4567 larger buffer for the custom attribute blob. Fixes #50637.
4569 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4571 * threadpool.c: notify listener on async processing handles after
4572 invoking the async callback. Thanks to Zoltan.
4574 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
4576 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
4577 avoid code duplication.
4579 * reflection.h (MonoDynamicImage): New type which is currently unused,
4580 but will be used through the ref.emit code in place of
4581 MonoDynamicAssembly.
4583 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4586 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
4587 a MonoDynamicImage instead of just a MonoImage.
4589 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
4590 icalls to ModuleBuilder but keep their semantics, so they will work
4591 with moduleb->assemblyb. This will change later.
4593 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
4595 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4598 * reflection.c (mono_image_build_metadata): Avoid creation of a default
4599 main module, since it is now done by the managed code.
4601 2003-11-03 Martin Baulig <martin@ximian.com>
4603 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
4604 `ginst->klass' here.
4605 (method_encode_methodspec): Don't use the `ginst->generic_method's
4606 klass if it's a generic instance, use `ginst->klass' in this case.
4608 2003-11-03 Martin Baulig <martin@ximian.com>
4610 * reflection.c (mono_image_get_generic_method_param_info):
4611 Removed, use mono_image_get_generic_param_info() instead.
4612 (mono_image_get_type_info): Write the GenericParam table before
4613 the Method table. This is neccessary because in the GenericParam
4614 table, type parameters of the class (ie. '!0' etc.) must come
4615 before the ones from its generic methods (ie. '!!0' etc).
4617 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
4619 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
4621 2003-11-02 Martin Baulig <martin@ximian.com>
4623 * reflection.c (create_generic_typespec): Take a
4624 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
4625 the generic parameters from it.
4627 2003-11-02 Martin Baulig <martin@ximian.com>
4629 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
4630 instead of a `MonoClassField *' since we just need the type.
4631 (create_generic_typespec): New static function. Creates a
4632 TypeSpec token for a generic type declaration.
4633 (mono_image_get_generic_field_token): New static function.
4634 (mono_image_create_token): If we're a FieldBuilder in a generic
4635 type declaration, call mono_image_get_generic_field_token() to get
4638 2003-11-02 Martin Baulig <martin@ximian.com>
4641 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
4642 `MonoReflectionGenericInst *declaring_type' and
4643 `MonoReflectionGenericInst *reflected_type' fields.
4645 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
4646 `MonoReflectionGenericInst *declaring_type' and a
4647 `MonoReflectionGenericInst *reflected_type' argument instead of a
4648 single `MonoReflectionGenericInst *type' one. Set
4649 `res->declaring_type' and `res->reflected_type' from them.
4650 (mono_reflection_inflate_field): Likewise.
4652 2003-11-02 Martin Baulig <martin@ximian.com>
4654 * class.c (mono_class_setup_vtable): Don't store generic methods
4657 2003-11-02 Martin Baulig <martin@ximian.com>
4659 * reflection.h (MonoReflectionGenericInst): Added
4660 `MonoReflectionType *declaring_type'.
4662 * reflection.c (mono_reflection_bind_generic_parameters): Use
4663 `if (tb->parent)' instead of `klass->parent'.
4665 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
4667 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
4668 with an empty ASSEMBLY table.
4670 * reflection.c (mono_image_build_metadata): Avoid using the same loop
4671 variable in the inner and outer loops.
4673 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
4675 * metadata.h (mono_metadata_make_token): Put parentheses around macro
4678 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
4680 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
4681 icalls. Instead, do everything in managed code. This is needed since
4682 it is hard to restore the original domain etc. in unmanaged code in the
4683 presence of undeniable exceptions.
4685 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
4686 New icalls to push and pop appdomain refs.
4688 2003-10-31 Martin Baulig <martin@ximian.com>
4690 * class.c (inflate_generic_type): Renamed to
4691 mono_class_inflate_generic_type() and made it public.
4693 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
4696 * loader.c (mono_field_from_memberref): Also set the retklass for
4699 * fielder.c (mono_image_get_inflated_field_token): New static
4700 method; creates a metadata token for an inflated field.
4701 (mono_image_create_token, fixup_method): Added support for
4702 "MonoInflatedField".
4703 (fieldbuilder_to_mono_class_field): New static function.
4704 (mono_reflection_inflate_field): New public function.
4707 (MonoReflectionGenericInst): Added `MonoArray *fields'.
4708 (MonoReflectionInflatedField): New typedef.
4710 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
4712 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
4713 for Solaris and other platforms without s6_addr16
4715 2003-10-30 Martin Baulig <martin@ximian.com>
4717 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
4718 argument instead of two.
4719 (mono_class_inflate_generic_signature): Likewise.
4720 (inflate_generic_header): Likewise.
4721 (mono_class_inflate_generic_method): Likewise. In addition, if
4722 `ginst->klass' is set, it becomes the new `method->klass'.
4724 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
4727 * reflection.c (encode_generic_method_sig): Write a 0xa as the
4729 (method_encode_methodspec): If we have generic parameters, create
4730 a MethodSpec instead of a MethodRef.
4731 (fixup_method): Added support for "MonoInflatedMethod" and
4733 (mono_image_create_token): Added support for "MonoInflatedMethod"
4734 and "MonoInflatedCtor".
4735 (inflated_method_get_object): New static function; returns a
4736 managed "System.Reflection.MonoInflatedMethod" object.
4737 (mono_reflection_bind_generic_method_parameters): Return a
4738 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
4739 (mono_reflection_inflate_method_or_ctor): Likewise.
4740 (mono_image_get_generic_method_param_info): Initialize unused
4742 (mono_image_get_generic_param_info): Likewise.
4744 * reflection.h (MonoReflectionInflatedMethod): New public
4745 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
4746 "S.R.MonoInflatedCtor" classes.
4748 * loader.c (method_from_memberref): If we're a TypeSpec and it
4749 resolves to a generic instance, inflate the method.
4751 2003-10-28 Dick Porter <dick@ximian.com>
4753 * object.c (mono_runtime_run_main): Convert command-line arguments
4754 into utf8, falling back to the user's locale encoding to do so.
4756 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
4758 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
4761 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
4763 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
4764 up icalls at method definition time. Partially fixes #33569.
4766 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
4768 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
4769 marshalling of arrays. Fixes #50116.
4771 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
4773 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
4774 points to a vtable in the dying appdomain.
4776 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
4777 listeners into unmanaged code inside the lock.
4779 * object.c (mono_class_vtable): Turn off typed allocation in non-root
4780 domains and add some comments.
4782 2003-10-25 Martin Baulig <martin@ximian.com>
4784 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
4786 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
4788 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
4789 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
4790 currently parsing. Create the generic class and store it in
4791 `generic_inst->klass' before parsing the type arguments. This is
4792 required to support "recursive" definitions; see mcs/tests/gen-23.cs
4794 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
4795 to support recursive typespec entries.
4797 * class.c (mono_class_setup_parent): If our parent is a generic
4798 instance, we may get called before it has its name set.
4799 (mono_class_from_generic): Splitted into
4800 mono_class_create_from_generic() and mono_class_initialize_generic().
4802 2003-10-25 Martin Baulig <martin@ximian.com>
4804 * icall.c (ves_icall_Type_BindGenericParameters): Return a
4805 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
4806 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
4807 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
4809 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
4810 (create_typespec): Likewise.
4811 (mono_reflection_bind_generic_parameters): Return a
4812 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
4813 (mono_reflection_inflate_method_or_ctor): New public function.
4815 * reflection.h (MonoReflectionGenericInst): New typedef.
4817 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
4819 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
4820 inside the domain lock. Fixes #49993.
4822 * object.c (mono_class_vtable): When typed allocation is used,
4823 allocate vtables in the GC heap instead of in the mempool, since the
4824 vtables contain GC descriptors which are used by the collector even
4825 after the domain owning the mempool is unloaded.
4827 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
4829 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
4830 reflect what it does. Also invalidate mempools instead of freeing
4831 them if a define is set.
4833 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
4836 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
4837 hold the finalizable objects in this domain.
4839 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
4842 * appdomain.c (mono_domain_set): New function to set the current
4843 appdomain, but only if it is not being unloaded.
4845 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
4846 appdomain which is being unloaded.
4848 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
4849 unloading of the root appdomain.
4851 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
4852 icall to execute a method in another appdomain. Intended as a
4853 replacement for InternalSetDomain, which can confuse the code
4854 generation in the JIT.
4856 * appdomain.c (mono_domain_is_unloading): New function to determine
4857 whenever an appdomain is unloading.
4859 * appdomain.c (mono_domain_unload): New function to correctly unload
4862 * assembly.c (mono_assembly_load_references): Check that an assembly
4863 does not references itself.
4865 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
4866 domain manually, it asks the finalizer thread to do it, then waits for
4867 the result. Also added a timeout.
4869 * icall.c: Register the new icalls.
4871 * threads.h threads.c: Export the mono_gc_stop_world and
4872 mono_gc_start_world functions.
4874 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
4875 function to fill out the mempool with 0x2a.
4877 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
4879 * reflection.h (MonoReflectionMethodAux): New structure to store
4880 information which is rarely used, thus is not in the MonoMethod
4883 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
4886 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
4887 and marshalling info into the aux structure.
4889 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
4890 from the aux structure.
4892 * loader.c (mono_method_get_param_names): Retrieve the param names from
4895 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
4897 * exception.h exception.c: Add AppDomainUnloadedException && fix
4900 2003-10-21 Dick Porter <dick@ximian.com>
4903 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
4904 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
4906 2003-10-21 Martin Baulig <martin@ximian.com>
4908 * reflection.c (mono_reflection_bind_generic_parameters):
4909 `klass->parent' is NULL for interfaces.
4911 2003-10-21 Martin Baulig <martin@ximian.com>
4913 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4915 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
4917 * exception.c (mono_exception_from_name_msg): New helper function for
4918 creating exceptions and initializing their message field.
4920 * exception.c: Simplify functions using the new helper.
4922 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
4925 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
4926 mono_raise_exception, since otherwise gcc doesn't generate the function
4927 epilog for raise_exception, confusing the stack unwinding in the JIT.
4930 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
4931 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
4934 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4936 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
4939 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
4941 * icall.c: Removed GetUninitializedObject method because
4942 AllocateUninitializedClassInstance does the same.
4944 2003-10-18 Martin Baulig <martin@ximian.com>
4946 * class.c (inflate_generic_signature): Renamed to
4947 mono_class_inflate_generic_signature() and made it public.
4948 (my_mono_class_from_generic_parameter): New static function; if we
4949 don't already have the generic parameter's MonoClass, create a
4950 very simple one which is just used internally in the runtime and
4951 not passed back to managed code.
4953 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
4955 * metadata.h (MonoMethodSignature): Moved the
4956 `MonoGenericParam *gen_params' to the MonoMethodHeader.
4957 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
4959 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
4960 ves_icall_MonoMethod_GetGenericArguments(); this is now an
4961 interncall on the MonoMethod class, not on MethodInfo.
4962 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
4963 calling mono_reflection_bind_generic_method_parameters() directly.
4965 * loader.c (mono_method_get_signature): If this is a MethodSpec;
4966 return the already computed `method->signature'.
4967 (method_from_methodspec): New static function to load a method
4968 from a MethodSpec entry.
4969 (mono_get_method_from_token): Call the new method_from_methodspec()
4970 for MethodSpec tokens.
4971 (mono_get_method_from_token): If we're a generic method, load the
4974 * reflection.c (mono_image_get_memberref_token): Allow
4975 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
4977 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
4978 (mono_image_create_token): First check whether it's a generic
4979 method (so we'd need to create a MethodSpec), then do the other
4981 (mono_reflection_bind_generic_method_parameters): Return a
4982 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
4983 called directly from the interncall.
4985 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
4987 * reflection.c (load_public_key): Move loading of the public key
4990 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
4992 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
4995 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
4996 culture, hash_alg and public_key. Fixes #49555.
4998 2003-10-17 Martin Baulig <martin@ximian.com>
5000 * class.h (MonoGenericInst): Moved this declaration here and added
5001 `MonoMethod *generic_method'.
5004 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
5005 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
5007 * metadata.c (mono_metadata_type_equal): Two types of
5008 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
5009 index; ie. don't compare the address of the `MonoGenericParam'
5011 (mono_metadata_load_generic_params): Removed the `MonoMethod
5014 * metadata.h (MonoGenericInst): Moved declaration to class.h.
5015 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
5017 * reflection.c (method_encode_signature): Encode the number of
5019 (encode_generic_method_sig): New static function.
5020 (method_encode_methodspec): New static function; creates an entry
5021 in the MethodSpec table for a generic method.
5022 (mono_image_get_methodspec_token): New static function.
5023 (mono_image_create_token): Call mono_image_get_methodspec_token()
5024 for generic methods.
5025 (mono_reflection_bind_generic_method_parameters): New public
5026 function. Instantiates a generic method.
5028 2003-10-16 Martin Baulig <martin@ximian.com>
5030 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
5031 *gen_params' here from MonoMethodHeader.
5033 * metadata.c (mono_metadata_parse_method_signature): If we have
5034 generic parameters, initialize `method->gen_params' and then set
5035 the correct `type->data.generic_param' in all the parameters.
5037 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
5039 * threads.c (mono_threads_get_default_stacksize): New function to
5040 return the default stacksize.
5042 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
5043 termination of the finalizer thread, since the previous method had
5044 race conditions. Fixes #49628.
5046 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
5047 as for the other managed threads.
5049 2003-10-16 Martin Baulig <martin@ximian.com>
5051 * class.c (inflate_generic_signature): Copy `generic_param_count'
5054 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
5057 * metadata.c (mono_metadata_parse_method_signature): Actually set
5058 the `method->generic_param_count' here.
5059 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
5061 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
5063 * object.h: Add a new field to TypedRef to simplify the implementation
5064 of the REFANY opcodes in the JIT.
5066 * icall.c: Make use of the new field.
5068 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
5071 2003-10-15 Martin Baulig <martin@ximian.com>
5073 * class.c (mono_class_from_gen_param): Renamed to
5074 mono_class_from_generic_parameter() and moved most of the
5075 functionality from mono_reflection_define_generic_parameter()
5076 here; ie. we create a "real" class here.
5077 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
5078 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
5079 previously been called.
5081 * class.h (MonoGenericParam): Moved the declaration of this struct
5082 here from metadata.h and added `MonoMethod *method'.
5084 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
5087 * loader.c (mono_get_method_from_token): If we have any generic
5088 parameters, call mono_metadata_load_generic_params() to read them
5089 from the MONO_TABLE_GENERICPAR.
5091 * metadata.c (mono_metadata_load_generic_params): Added
5092 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
5094 * metadata.h (MonoMethodSignature): Replaced
5095 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
5096 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
5098 * reflection.c (mono_reflection_define_generic_parameter): Moved
5099 most of the functionality into the new
5100 mono_class_from_generic_parameter(); set the `method' field if
5101 we're a method parameter.
5103 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
5105 * marshal.c (emit_struct_conv): if native size is 0
5108 2003-10-14 Martin Baulig <martin@ximian.com>
5110 * icall.c: The generics API has changed in the spec since it was
5111 added to System.Type; these modifications make it match the spec
5113 (ves_icall_Type_GetGenericParameters): Renamed to
5114 `ves_icall_Type_GetGenericArguments'.
5115 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
5116 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
5117 `ves_icall_MonoType_get_HasGenericArguments'.
5118 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
5119 `ves_icall_MonoType_get_IsGenericParameter'.
5120 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
5121 this is no interncall anymore.
5122 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
5123 `ves_icall_TypeBuilder_get_IsGenericParameter'.
5125 2003-10-14 Martin Baulig <martin@ximian.com>
5127 * reflection.c (mono_reflection_bind_generic_parameters): Also
5128 inflate generic methods if we're reading the class from IL.
5130 2003-10-13 Martin Baulig <martin@ximian.com>
5132 * reflection.c (mono_reflection_define_generic_parameter): This
5133 method isn't called directly from the icall anymore; take a
5134 `MonoReflectionAssemblyBuilder *' so we can use this for type and
5135 method generic parameters.
5136 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
5137 (method_builder_encode_signature): Encode generic parameters.
5138 (mono_image_get_method_info): Write generic params to the
5139 MONO_TABLE_GENERICPARAM table.
5141 * reflection.h (MonoReflectionMethodBuilder): Added
5142 `MonoArray *generic_params'.
5144 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
5146 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
5147 wrapper for mono_reflection_define_generic_parameter().
5148 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
5150 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
5152 * marshal.h: Add missing function to fix build.
5154 * marshal.c (mono_marshal_get_native_wrapper): Add support for
5155 the SetLastError pinvoke attribute.
5157 * marshal.c (mono_marshal_set_last_error): New helper function called
5158 by the generated code.
5160 * marshal.c (mono_mb_emit_branch): New helper function.
5162 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
5164 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
5165 classes as parameters and return values of delegates. Fixes #29256.
5167 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
5169 * locales.c: use gint32 in non HAVE_ICU case
5171 2003-10-11 Martin Baulig <martin@ximian.com>
5173 * mono-debug.c (mono_debug_add_method): Added a workaround for
5176 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
5178 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
5179 delegates passed to native code must use the STDCALL calling
5180 convention. Fixes #35987.
5182 2003-10-10 Martin Baulig <martin@ximian.com>
5184 * class.c (inflate_generic_type): If we're inflating for a generic
5185 type instance (and not for a generic method), return
5186 MONO_TYPE_MVAR unchanged.
5188 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5190 * string-icalls.c: Join ignores null strings in the source array.
5191 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
5192 * threads.c: GetAvailableTheads is slightly more accurate.
5194 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
5196 * threads.h threads.c : add mono_threads_set_default_stacksize
5197 and pass default to CreateThread calls.
5199 2003-10-09 Dick Porter <dick@ximian.com>
5203 * locales.c: Internal calls for constructing CultureInfo and
5204 related objects from libicu (if its available.)
5206 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
5208 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
5210 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5212 * threadpool.c: added an argument to async_invoke_thread that is the
5213 item to process, pass the MonoAsyncResult to the thread start function
5214 when creating a new thread. This way we don't need to acquire any lock
5215 when we're creating a new thread. Readded a semaphore for faster
5216 response times (instead of that Sleep i added).
5218 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
5220 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
5221 get daylight change dates better on Windows, fix handling
5222 of platforms without tm_gmtoff.
5224 2003-10-06 Martin Baulig <martin@ximian.com>
5226 * class.c (inflate_generic_method): Renamed to
5227 mono_class_inflate_generic_method() and made public.
5228 (mono_class_init): Don't inflate the generic methods here.
5229 (mono_class_from_generic): Added `gboolean inflate_methods'
5230 argument. Inflate the methods here.
5232 * loader.c (mono_method_get_param_names): Ignore instances of
5233 generic types for the moment.
5235 * reflection.c (fixup_method): Added support for inflated methods.
5236 (mono_image_create_token): Use mono_image_get_methodref_token()
5237 for inflated methods.
5238 (mono_custom_attrs_from_param): Ignore instances of generic types
5240 (mono_reflection_bind_generic_parameters): New public function.
5241 Moved all the functionality from
5242 ves_icall_Type_BindGenericParameters() here and added support for
5244 (mono_reflection_define_generic_parameter): Initialize
5245 `klass->methods' here.
5247 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
5248 functionality into mono_reflection_define_generic_parameter().
5249 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
5250 TypeBuilder, return that TypeBuilder.
5252 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5254 * appdomain.c: removed mono_delegate_semaphore.
5257 (mono_thread_pool_add): moved hash table creation inside and the thread
5258 creation outside of the critical region.
5259 (mono_thread_pool_finish): removed obsolete code.
5260 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
5261 continue or exit the thread depending on the queue.
5263 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
5265 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
5266 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
5267 handle more bool marshalling options
5269 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
5271 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
5272 arrays of structs. Also add a more descriptive error message when
5273 a structure member is marshalled as LPArray.
5275 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
5277 * marshal.c (mono_marshal_get_native_wrapper): Add support for
5278 marshalling arrays of complex types. Fixes #29098. Also remove an
5279 usused and incomplete function.
5281 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
5283 * gc.c: report heap_size - free_bytes as total memory allocated
5286 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
5288 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
5289 fix timezone handling problems on Windows.
5291 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
5292 asserts when the year is outside the range handled by ms the functions.
5294 * class.c (setup_interface_offsets): If the class is an interface,
5295 fill out its interface_offsets slot.
5297 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5299 * threadpool.c: mark threadpool threads as background.
5301 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
5303 * decimal.c - define DECINLINE to nothing if not using GCC
5305 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
5307 * assembly.c: More refcount fixes.
5309 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5311 * string-icalls.c: if we're not trimming, return the same string.
5312 When not splitting, don't create a new string.
5314 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5317 (mono_image_open): increment the ref_count inside the critical section.
5319 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
5321 * image.c (mono_image_open): Fix reference counting bug.
5323 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
5325 * marshal.c (mono_marshal_type_size) struct alignment changed for
5326 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
5327 64bits. Avoid leak in mono_marshal_get_native_wrapper when
5328 mono_lookup_pinvoke_call throws.
5330 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
5332 * reflection.c (mono_reflection_parse_type): Fix #49114.
5334 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
5335 temporary workaround for cygwin header problem.
5337 * object.c (mono_object_isinst): Synchronize this with the code
5338 generated by the JIT for casts.
5340 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
5342 * reflection.c (encode_type): Fix #38332.
5344 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
5346 * marshal.c (mono_marshal_method_from_wrapper): New function to return
5347 the original method from the wrapper method.
5349 2003-09-25 Martin Baulig <martin@ximian.com>
5351 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
5352 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
5353 (ves_icall_Type_get_IsGenericInstance): New interncall.
5355 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
5357 * object.c: fix cast warning in big endian code.
5359 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
5361 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
5363 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5365 * assembly.c: don't call check_env from mono_assembly_load. It's
5366 already done once in mono_assemblies_init and may cause headaches when
5367 multiple threads are loading assemblies.
5369 2003-09-19 Martin Baulig <martin@ximian.com>
5371 * reflection.c (mono_reflection_define_generic_parameter): Don't
5372 allocate `klass->methods', set `klass->flags' to
5373 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
5375 2003-09-18 Martin Baulig <martin@ximian.com>
5377 * class.c (mono_class_init): Don't create `class->methods' if it's
5378 already initialized.
5380 * metadata.c (mono_metadata_load_generic_params): Make this
5383 * reflection.c (mono_reflection_define_generic_parameter): Set
5384 parent class and interfaces from the constraints.
5386 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
5387 to keep this struct in sync with the declaration in TypeBuilder.cs.
5389 2003-09-17 Martin Baulig <martin@ximian.com>
5391 * metadata.h (MonoType): Replaced the data's `int type_param'
5392 field with `MonoGenericParam *generic_param'.
5393 (MonoGenericParam): Added `MonoClass *klass'.
5395 * class.c (mono_class_from_gen_param): Removed the
5396 `MonoImage *image' and `int type_num' arguments.
5398 * metadata.c (mono_metadata_parse_generic_param): New static
5399 method; creates a MonoGenericParam which just contains the index.
5400 (do_mono_metadata_parse_type): Call
5401 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
5404 * reflection.c (mono_image_typedef_or_ref): Generic type
5405 parameters may be in the same assembly, but never use a typedef
5407 (mono_reflection_define_generic_parameter): We're now creating a
5408 "real" class for the type parameter; it's now safe to call
5409 mono_class_from_mono_type() on the class'es type, it'll do the
5412 2003-09-16 Martin Baulig <martin@ximian.com>
5414 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
5415 `symfile->range_entry_size' and `symfile->class_entry_size' here;
5416 the `symfile' data structure must be fully initialized before it
5417 gets added to the table.
5419 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
5421 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
5423 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
5424 class init trampolines.
5426 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
5428 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
5429 to the built-in profiler to turn off time and allocation profiling
5432 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
5434 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
5437 * debug-helpers.c (mono_method_full_name): Print the wrapper type
5438 in human readable form.
5440 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
5442 * reflection.c icall.c: Fixed warnings.
5444 * image.c (load_class_names): Use a temporary hash table to hold the
5445 namespaces in order to avoid doing many string comparisons.
5447 * image.h: Fix typo.
5449 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
5450 Pass NULL instead of g_direct_equal to the GHashTable constructor
5451 since the NULL case is short-circuited inside g_hash_table_lookup,
5452 leading to better performance.
5454 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
5455 obtain the first custom attribute for a given index. Depends on the
5456 CustomAttribute table being sorted by the parent field.
5458 * reflection.c (mono_custom_attrs_from_index): Use the new function
5459 for better performance.
5461 2003-09-07 Martin Baulig <martin@ximian.com>
5463 * class.c (mono_class_init): If we're a generic instance, inflate
5464 all our methods instead of loading them from the image.
5465 (mono_class_from_generic): Set `class->methods = gklass->methods'.
5467 2003-09-07 Martin Baulig <martin@ximian.com>
5469 * mono-debug-debugger.c: Added support for constructors.
5471 2003-09-06 Martin Baulig <martin@ximian.com>
5473 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
5476 * reflection.c (mono_reflection_setup_generic_class): Call
5477 ensure_runtime_vtable() to create the vtable.
5479 2003-09-05 Martin Baulig <martin@ximian.com>
5481 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
5484 2003-09-04 Martin Baulig <martin@ximian.com>
5486 * reflection.c (mono_reflection_define_generic_parameter): Generic
5487 parameters start with zero.
5489 2003-09-04 Martin Baulig <martin@ximian.com>
5491 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
5493 * reflection.h (MonoReflectionGenericParam): New typedef.
5494 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
5495 the generic parameters from the managed TypeBuilder.
5497 * reflection.c (mono_reflection_define_generic_parameter): New function.
5498 (mono_reflection_create_runtime_class): Encode generic parameters.
5499 (mono_reflection_setup_generic_class): New function; this is
5500 called after adding adding all generic params to the TypeBuilder.
5501 (encode_type): Added MONO_TYPE_VAR.
5503 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
5505 * class.h class.c (mono_class_needs_cctor_run): Moved this method
5508 * assembly.h assembly.c: Moved the AOT loading code into an assembly
5511 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
5513 * reflection.h reflection.c class.h class.c: Delete duplicate
5514 definition of mono_type_get_name () from reflection.c and export the
5517 * class.c: Class loading fixes from Bernie Solomon
5518 (bernard@ugsolutions.com).
5520 * reflection.c: Endianness fixes from Bernie Solomon
5521 (bernard@ugsolutions.com).
5523 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
5525 * assembly.h assembly.c: Define a file format version for AOT
5528 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
5530 * appdomain.h (MonoJitInfo): New field to determine whenever the
5531 code is domain neutral.
5533 2003-08-31 Miguel de Icaza <miguel@ximian.com>
5535 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
5537 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
5539 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
5540 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
5541 Avoid caching the result since strings must be domain specific. Fixes
5544 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
5546 * marshal.c (mono_marshal_init): Make this callable multiple times
5547 since it is hard to find a correct place to call it.
5549 * object.c (mono_runtime_class_init): Execute static constructors in
5550 the correct appdomain.
5552 * image.c (build_guid_table): Handle the case when multiple images have
5555 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5557 * icall.c: added a couple of icalls for System.Web.
5559 2003-08-28 Martin Baulig <martin@ximian.com>
5561 * icall.c (ves_icall_Type_BindGenericParameters): Use
5562 `klass->generic_inst' instead of `&klass->byval_arg' in the
5563 mono_type_get_object() call. The returned type must be
5564 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
5566 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
5570 * object.c (mono_class_proxy_vtable): Make it thread safe.
5572 * pedump.c: Fix warning.
5574 * object.c appdomain.h: Get rid of metadata_section.
5575 It is no longer needed and it was causing deadlocks with domain->lock.
5577 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
5579 2003-08-26 Martin Baulig <martin@ximian.com>
5581 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
5583 2003-08-26 Martin Baulig <martin@ximian.com>
5585 * pedump.c (main): Call mono_metadata_init(),
5586 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
5587 and mono_loader_init().
5589 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
5591 * loader.h: Add missing include to fix build.
5593 * image.h: mono_image_load_references is no more.
5595 * assembly.c: Reworked assembly loading to make it really thread safe.
5596 After these changes, the assembly returned by mono_assembly_open is
5597 fully initialized, i.e. all its references assemblies are loaded.
5599 * assembly.c (mono_image_load_references): Renamed to
5600 mono_assembly_load_references, and made private, since clients no
5601 longer need to call it.
5603 * class.c: Removed calls to mono_assembly_load_references, since it was
5604 a source of deadlocks.
5606 * loader.h loader.c class.h class.c: Protect data structures using a
5607 new lock, the loader lock.
5609 * class.c (mono_class_setup_vtable): Create temporary hash tables and
5610 GPtrArrays only when needed.
5612 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
5613 into empty structures by mcs. Fixes pinvoke7.cs.
5615 * domain.c (mono_init): Call a new initialization function.
5617 * appdomain.c (mono_runtime_init): Call the new initializer function
5618 of the marshal module.
5620 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
5621 inserted into empty structures by mcs. Fixes pinvoke7.cs.
5623 * marshal.h marshal.c: Added locks around the wrapper caches to make
5624 this module thread safe.
5626 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
5627 this argument. Fixes pinvoke1.exe.
5629 2003-08-25 Lluis Sanchez <lluis@ximian.com>
5631 * object.h: Added call_type field to MonoMethodMessage and the corresponding
5632 enumeration of values. Removed fields to store remote call output values in
5633 MonoAsyncResult. Not needed any more.
5634 * object.c: Initialize call_type and async_result fields in mono_message_init.
5635 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
5636 dispatching the message.
5637 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
5638 async call to finish. To do it use a message with EndInvoke call type.
5640 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
5642 * loader.h loader.c (mono_method_hash_marhal_info): New function which
5643 determines whenever a method has marshalling info.
5645 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5647 * assembly.c: fix the build on windows.
5649 2003-08-22 Lluis Sanchez <lluis@ximian.com>
5651 * object.cs: Fixed bug #47785.
5653 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
5655 * string-icalls.c (StringReplace): If their are no occurances of
5656 the old string found return a reference to the supplied
5657 string. This saves some memory and matches MS behavoir.
5659 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5661 * socket-io.c: fixed compilation for systems that define AF_INET6
5662 and don't define SOL_IP/SOL_IPV6.
5664 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
5666 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
5667 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
5669 * rawbuffer.c rawbuffer.h: Make this module thread safe.
5671 * domain.c: Make this module thread safe.
5673 * domain.c (mono_init): Call new initialization function.
5675 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
5676 reference types too. Fixes #38812.
5678 * image.c (mono_image_init): Fixed warnings.
5680 * class.c (mono_class_from_typeref): Handle assembly load failure
5683 * appdomain.c (add_assemblies_to_domain): Handle the case when
5684 the references of an assembly are not yet loaded.
5686 * metadata.c image.c assembly.c: Moved initialization of global
5687 variables to a separate function called at startup since lazy
5688 initialization of these variables is not thread safe.
5690 * image.c assembly.c: Made this module thread safe by adding locks in
5691 the appropriate places.
5693 * domain.c (mono_init): Call the new initialization functions of the
5696 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
5698 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
5699 make a direct call. It is proxy's work to make the call asynchronous.
5700 mono_delegate_end_invoke(): If the targe is a proxy, just collect
5702 * object.cs: mono_method_call_message_new(): read AsyncResult and
5703 state object from parameters list, if this info is requested.
5704 * object.h: Added fields to store remote call output values in
5705 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
5707 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5709 * object.h: add needed fields to MonoThread.
5710 * threads.c, threads.h: allow registering a function to cleanup data
5711 allocated per thread by the JIT.
5713 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5715 * loader.h: portability fix by Bernie Solomon
5716 * <bernard@ugsolutions.com>.
5718 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
5720 * reflection.h reflection.c (mono_param_get_objects): Changed this to
5721 return a MonoArray. This simplifies the code and also ensures that
5722 the cache allways contains an object reference as a value.
5724 * icall.c (ves_icall_get_parameter_info): Simplified using the new
5727 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5729 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
5730 fixes a problem with byte ordering when getting the address family for
5733 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
5735 * .cvsignore: Added monosn.
5737 * reflection.h reflection.c loader.c: Added support for parameter
5738 marshalling to dynamically created types. Fixes #47295.
5740 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
5742 * rand.c: remove useless warnings.
5744 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5746 * class.c: implemented ldtoken for methods and fieldrefs.
5748 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5750 * threadpool.c: when mono_async_invoke was called, no one took care of
5751 monitoring the queue. So if the method invoked took some time and we
5752 got new async invoke requests after 500 ms (the thread created waited
5753 that long in WaitForSingleObject), the new async invoke was not called
5754 until the previous one finished.
5756 This is fixed now. Thanks to Totte for helping with it.
5758 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5760 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
5762 2003-08-11 Martin Baulig <martin@ximian.com>
5764 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
5766 2003-08-06 Martin Baulig <martin@ximian.com>
5768 * mono-debug-debugger.c: Added support for static fields,
5769 properties and methods.
5771 2003-08-06 Martin Baulig <martin@ximian.com>
5773 * mono-debug-debugger.c: Don't store the MonoString's vtable to
5774 make this work for applications with multiple application domains.
5776 2003-08-04 Martin Baulig <martin@ximian.com>
5778 * mono-debug-debugger.c: Completely reworked the type support; the
5779 most important thing is that we're now just using one single
5780 `MonoType' instance per type.
5782 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
5784 * mono-endian.h, mono-endian.c, icall.c: Added icall
5785 ves_icall_System_Double_AssertEndianity to assert double word endianity
5786 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
5788 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5790 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
5791 support, icalls and fixes.
5793 2003-07-31 Miguel de Icaza <miguel@ximian.com>
5795 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
5796 classes that are a punctuation character in .NET is not the same a
5799 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5801 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
5803 2003-07-29 Miguel de Icaza <miguel@ximian.com>
5805 * icall.c: Add new MemCopy internalcall.
5806 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
5807 Simplified code; It is not necessary to handle all the cases here,
5808 as the C# code takes care of it. Only handle the case of the name
5809 resource embedded into the assembly.
5811 Changed signature to return the data pointer and the size of the
5814 2003-07-26 Miguel de Icaza <miguel@ximian.com>
5816 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
5817 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
5819 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
5821 * socket-io.c: ignore EINTR error in select.
5823 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
5825 * class.h, class.c: removed unused subclasses field in MonoClass.
5827 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
5829 * icall.c: improve fix of get_base_definition(). If the parent class
5830 doesn't have the mehod, look at the parent of the parent.
5831 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
5832 to check if a parameter is an in or out parameter
5833 (PARAM_ATTRIBUTE_IN is not set by default).
5834 mono_method_return_message_restore(): Use mono_class_value_size to
5835 get the size of a value type. mono_type_stack_size (parameterType)
5836 does not return the correct value if parameterType is byRef.
5837 mono_load_remote_field(), mono_load_remote_field_new(),
5838 mono_store_remote_field(), mono_store_remote_field_new():
5839 raise exception if the remote call returns an exception.
5841 2003-07-28 Martin Baulig <martin@ximian.com>
5843 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
5844 method. This is a wrapper around mono_runtime_invoke() which
5845 boxes the instance object if neccessary.
5847 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5849 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
5850 metadata.h, row-indexes.h, verify.c: first cut of generics support.
5852 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5854 * icall.c: disable mcs bug workaround.
5856 2003-07-21 Miguel de Icaza <miguel@ximian.com>
5858 * object.c (mono_runtime_class_init): Take the metadata_section
5859 mutex before obtaining the domain mutex.
5861 * appdomain.h: Added definition of metadata_section mutex here.
5863 * object.c: define metadata_mutex here.
5865 2003-07-24 Ravi Pratap <ravi@ximian.com>
5867 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
5870 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
5872 * reflection.c: Fix bug #46669
5874 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5879 * object.h: fill in the type name for TypeLoadException.
5881 2003-07-23 Ravi Pratap <ravi@ximian.com>
5883 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
5884 relationship between TypeBuilders while compiling corlib) and bug
5885 45993 (Array types returned from the runtime while compiling
5886 corlib were from the loaded corlib).
5888 2003-07-22 Martin Baulig <martin@ximian.com>
5890 * mono-debug-debugger.c: Reworked the type support a bit more;
5891 distinguish between types and classes.
5893 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
5895 * icall.c: add IsArrayImpl icall.
5897 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
5899 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
5900 initializing real_size only once. Also fix bug #46602.
5902 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
5904 * object.c: Renamed mono_metadata_section to metadata_section.
5906 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
5908 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
5909 empty array if the type is an array. Fixed.
5910 ves_icall_MonoMethod_get_base_definition: if the base method
5911 is abstract, get the MethodInfo from the list of methods of
5913 * reflection.c: ParameterInfo.PositionImpl should be zero-based
5914 and it was 1-based. Fixed in mono_param_get_objects.
5916 2003-07-20 Martin Baulig <martin@ximian.com>
5918 * mono-debug.h: Set version number to 31.
5919 (mono_debug_init): Added `MonoDomain *' argument.
5921 * mono-debug-debugger.c: Reworked the type support; explicitly
5922 tell the debugger about builtin types; pass the `klass' address to
5925 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
5927 * image.c: Allow new metadata tables to be loaded without a
5928 warning. Also update the warning message to give the new constant value.
5930 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
5932 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
5933 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
5934 array type representation changes.
5936 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5938 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
5939 on Environment.Exit () call.
5941 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5943 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
5944 requires a matching corlib.
5946 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
5948 * Changelog: My editor decided to add a CR to each line. Sorry about that.
5949 Committed again without the CRs.
5951 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
5953 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
5954 getting it from the "this" socket instance. Did not work
5955 if the socket is a subclass of Socket.
5956 Also fixed bug #35371.
5958 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5960 * metadata.c: fixed size for TypedByRef.
5961 * loader.c: when searching for a method, consider the vararg amrker.
5962 * unicode.c, decimal.c: constify some arrays.
5964 2003-07-15 Dick Porter <dick@ximian.com>
5966 * socket-io.c: Fixed compilation for gcc < 3.2.
5968 Fixed compilation for machines that don't have AF_INET6 (thanks to
5969 Bernie Solomon <bernard@ugsolutions.com> for that part.)
5971 Fixed compile warnings.
5973 Fixed formatting and line endings.
5975 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
5978 * socket-io.c: Added IPv6 support.
5980 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
5982 * class.c (mono_class_is_assignable_from): New function to implement
5983 the is_assignable_from logic. Used by mono_object_isinst,
5984 Type::IsAssignableFrom () and the interpreter.
5986 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
5987 Object, even interfaces.
5989 * object.c (mono_object_isinst): Implement in terms of
5992 * icall.c (ves_icall_type_is_assignable_from): New icall.
5994 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
5996 * domain.c (foreach_domain): fix compiler warning.
5998 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
6000 * image.c (load_metadata_ptrs): use g_strndup because strndup is
6001 not available on all plattforms
6003 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
6005 * image.h image.c: Store the metadata version string in MonoImage.
6006 * icall.c: New icall to retrieve the image version.
6007 * reflection.c (create_dynamic_image): Fill in the image version field
6008 * reflection.c (build_compressed_metadata): Use the image version
6009 from the image structure.
6011 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6013 * appdomain.c: modified comment.
6014 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
6015 That will be its last iteration when mono_gc_cleanup is called from
6016 mono_runtime_cleanup and before the domain is unloaded.
6020 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
6022 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
6025 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
6027 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
6028 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
6029 Bernie Solomon <bernard@ugsolutions.com>.
6031 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
6033 * object.c, object.h: provide mono_object_new_fast() for faster
6034 allocation in some special cases.
6036 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
6038 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
6039 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
6041 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
6043 * threadpool.c: fix leaks.
6045 2003-07-01 Dick Porter <dick@ximian.com>
6047 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
6048 using MonoGHashTables. Fixes threadpool bug posted to list.
6050 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
6052 * image.h, image.c: added support to load an assembly from a byte array.
6053 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
6054 assembly bundle support.
6056 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
6058 * threadpool.c (mono_thread_pool_add): keep a reference to the
6059 AsyncResult to prevent GC
6061 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
6063 * class.c: leak fix.
6065 2003-06-25 Dick Porter <dick@ximian.com>
6067 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
6068 for the async object, the WaitHandle object will close the handle.
6071 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
6073 * class.c: in mono_array_class_get (), lookup from the hash with the
6074 same type we insert: this works around a bug in
6075 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
6076 lluis. The real fix will have to wait for after the release.
6078 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6080 * icall.c: fix memory leak when getting type members.
6082 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
6084 * reflection.c: added more pubtoken special cases.
6086 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
6088 * class.c: handle field offset correctly when class size
6089 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
6091 2003-06-20 Martin Baulig <martin@ximian.com>
6093 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
6096 2003-06-20 Martin Baulig <martin@ximian.com>
6098 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
6100 2003-06-20 Martin Baulig <martin@ximian.com>
6102 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
6103 just distinguish between variables in registers and variables at
6104 an offset relative to a register.
6106 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6108 * icall.c: #ifdef out latest changes until mcs is fixed.
6110 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
6112 * icall.c: return members in metadata order.
6114 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
6116 * icall.c: avoid infinite loop in GetTimeZoneData.
6118 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
6120 * icall.c: added Marshal.Prelink/All icalls.
6122 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
6124 * object.c, object.h: fix warnings and do some overflow checking
6125 when creating arrays.
6127 2003-06-17 Dick Porter <dick@ximian.com>
6130 * file-io.c: File attributes need to be tweaked slightly when
6131 passed from the managed to the w32 world.
6133 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
6134 * profiler.h profiler-private.h profiler.c: Rework last patch
6135 based on suggestion by Paolo.
6137 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
6139 * profiler.h profiler-private.h profiler.c: Added infrastructure for
6140 instruction level coverage data collection.
6141 * profiler.h profiler.c (: Added new callback function which can be
6142 used by the profiler to limit which functions should have coverage
6144 * profiler.c (mono_profiler_load): Call g_module_build_path to
6145 generate the file name of the profiler library.
6147 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
6149 * profiler.c, profiler.h, profiler-private.h: added basic block
6150 coverage profiling API.
6152 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
6154 * reflection.c (mono_reflection_create_runtime_class): Add support
6155 for events in dynamically generated code.
6157 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
6160 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
6162 * icall.c: when getting timezone info, return reasonable values if we
6163 can't get the actual data.
6165 2003-06-14 Dick Porter <dick@ximian.com>
6167 * threads.c (start_wrapper): Remove the reference to the thread
6168 object in the TLS data, so the thread object can be finalized.
6169 This won't be reached if the thread threw an uncaught exception,
6170 so those thread handles will stay referenced :-( (This is due to
6171 missing support for scanning thread-specific data in the Boehm GC
6172 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
6174 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
6176 * reflection.c: ensure streams and tables are first allocated with
6177 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
6179 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
6181 * icall.c: fixed GetElementType for byrefs (bug# 44792).
6183 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
6185 * reflection.c (mono_reflection_create_runtime_class): Add support for
6186 properties to dynamically created classes.
6187 * reflection.c: Fix a few places where non-MonoObjects were inserted
6188 into the tokens hashtable.
6190 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6192 * object.c: some support to handle out of memory exceptions.
6194 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
6196 * marshal.c (mono_marshal_get_native_wrapper): support reference
6199 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
6201 * object.h, object.c: more portability stuff from Bernie Solomon.
6202 Unexport mono_object_allocate(). Added mono_object_unbox ().
6203 Set exitcode when an unhandled exception is thrown.
6205 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
6207 * marshal.c (mono_marshal_get_native_wrapper): use custom
6208 marshaler for return types.
6210 2003-06-10 Dick Porter <dick@ximian.com>
6212 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
6213 ip_mreq is available
6215 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
6217 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
6218 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
6219 by Bernie Solomon <bernard@ugsolutions.com>.
6221 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
6223 * gc.c (mono_gc_init): Avoid error message on shutdown when
6224 GC_DONT_GC=1 is used.
6226 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
6227 New icall to return the GUID of a module.
6229 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
6231 * class.c: ensure instance size always includes the parent's size
6232 even whem class size is set explicitly (fixes bug#44294).
6234 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
6236 * profiler.h, profiler.c: made the simple profiler thread-safe,
6237 get more accurate timing info. Allow the loading of an
6238 externally-developed profiler module.
6240 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
6242 * marshal.c (mono_marshal_get_native_wrapper): improved
6243 class/byref arguments.
6244 (mono_marshal_get_native_wrapper): better string marshaling support.
6246 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
6248 * class.c: ensure .pack and .size are handled correctly and
6249 simplified layout of static fields.
6251 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
6254 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
6256 * loader.c (mono_lookup_pinvoke_call): look for modules in the
6257 current directory (fix bug 44008)
6259 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
6261 * marshal.c (mono_marshal_get_native_wrapper): started support for
6263 (mono_delegate_to_ftnptr): consider marshalling specifications
6265 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
6267 * reflection.c, reflection.h: emit custom marshal info.
6269 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6271 * object.c: free the GError.
6272 * icall.c: added CloseEvent_internal.
6274 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
6277 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
6279 * loader.c (mono_method_get_signature): Add support for dynamic
6282 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
6284 * reflection.c: fixed bug #43905.
6286 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
6288 * class.c, domain.c, icall.c, metadata.h, object.h: support for
6289 handling TypedReference and ArgIterator.
6290 * loader.c, loader.h: added function to get signature at call site.
6292 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6294 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
6295 data readonly. Buglets and warning fixes. Some MethodSpec support.
6297 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
6299 * class.h, class.c, object.c: remove relative numbering support.
6301 2003-05-26 Miguel de Icaza <miguel@ximian.com>
6303 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
6304 free the string, until we get a chance to fix Gtk#
6306 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6308 * marshal.c: revert last patch.
6310 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
6312 * icall.c: updates for new mono_class_vtable() not calling
6313 the type constructor anymore.
6315 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
6317 * object.h, object.c: separate vtable creation from type
6318 initialization. Make running the .cctor thread safe.
6320 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
6322 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
6324 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
6326 * loader.c (mono_get_method): consider calling convention
6328 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
6330 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
6331 to return the invisible global type for a module.
6333 * reflection.c (mono_image_build_metadata): Emit global fields too.
6335 2003-05-20 Peter Williams <peterw@ximian.com>
6337 * loader.c (mono_lookup_internal_call): Add a few newlines.
6339 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
6341 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
6344 * appdomain.c (set_domain_search_path): Recalculate search path when
6345 AppDomainSetup.PrivateBinPath changes.
6347 * object.c (mono_class_compute_gc_descriptor): It turns out some
6348 parts of the class libs (like System.Thread) holds pointers to
6349 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
6350 to treat native int a pointer type here.
6352 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
6354 * appdomain.h, domain.c: add hashtable for jump target resolution.
6356 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
6358 * reflection.h reflection.c icall.c: Added new icalls
6359 GetManifestResourceInfoInternal, GetModulesInternal and support
6362 2003-05-16 Dick Porter <dick@ximian.com>
6366 * file-io.c: Implement System.IO.MonoIO::GetTempPath
6368 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
6370 * object.c: mono_store_remote_field: little fix to previous patch.
6372 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
6374 * class.c: add constructors to array classes.
6375 * icall.c: special case array construction for InternalInvoke (),
6377 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
6379 * class.h class.c reflection.c object.c: Added support for field
6380 defaults in dynamically generated classes.
6382 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
6384 * reflection.c: properly encode charset for ddlimport.
6386 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
6388 * threads.c: allow compiling without GC.
6390 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
6392 * appdomain.h, object.c, object.h, threads.c, threads.h: added
6393 handling of thread static data.
6395 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
6397 * reflection.h, reflection.c: added mono_custom_attrs_free ().
6399 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
6401 * class.c (mono_array_class_get): always set the serializable flags
6402 (mono_array_class_get): always set the SEALED attribute for array types
6404 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
6406 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
6407 attributes (fix for bug 42021).
6409 2003-05-12 Dick Porter <dick@ximian.com>
6411 * gc.c: Don't run finalizers when the finalizer thread is
6412 finishing up, because the default domain has already been
6415 2003-05-11 Miguel de Icaza <miguel@ximian.com>
6417 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
6418 value is null, we should throw an exception. This is slightly
6419 different than the other conventions used for the constructor.
6421 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6423 * socket-io.c: fixed windows build.
6425 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6427 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
6429 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
6431 * object.c (mono_string_new_wrapper): Compatibility fix for MS
6434 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
6436 * class.c (mono_class_layout_fields): Add experimental GC aware
6437 auto layout facility. Requires class library changes to work correctly.
6439 (mono_class_setup_vtable): Avoid overriding explicit interface
6440 method implementations. Fixes iface3.exe test.
6442 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
6444 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
6445 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
6447 * metadata.h: Add new type classification macro which determines
6448 whenever the type holds an object reference.
6450 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
6452 * marshal.c (mono_marshal_get_native_wrapper): cleanups
6454 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
6456 * gc.c (finalizer_thread): Work around a GC bug.
6458 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
6460 * marshal.c (emit_struct_conv): allow unions
6462 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
6464 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
6466 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
6468 2003-05-06 Martin Baulig <martin@ximian.com>
6470 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
6472 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6475 (Select_internal): allow NULLs, don't create arrays if not needed.
6476 Coupled with Socket.cs changes.
6479 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
6480 register a finalizer for it that will close the semaphore handle. This
6481 fixes the leak and make Lupus' test run with > 4080 loops.
6483 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
6485 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
6486 Jerome Laban (bug #42287)
6488 2003-05-02 Martin Baulig <martin@ximian.com>
6490 * debug-mono-symfile.h
6491 (MonoSymbolFile): Moved declaration into mono-debug.h.
6492 (MonoDebugMethodJitInfo): Likewise.
6493 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
6495 (_mono_debug_address_from_il_offset): Take a
6496 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
6499 (MonoDebugDomainData): New struct.
6500 (mono_debug_get_domain_data): New function.
6501 (mono_debug_add_method): Take an additional `MonoDomain *'
6503 (mono_debug_source_location_from_address): Likewise.
6504 (mono_debug_il_offset_from_address): Likewise.
6505 (mono_debug_address_from_il_offset): Likewise.
6507 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
6509 * reflection.c: one more check for null type in custom attrs.
6511 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6513 * reflection.c: avoid warning (comparison is always false due to limited
6514 range of data type).
6516 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6518 * icall.c: throw an exception in Type.GetField if the argument 'name'
6521 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
6523 * reflection.c: fixed handling of enums in named arguments to custom
6524 attributes (bug #42123).
6526 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
6528 * reflection.c: use the right array element type and handle
6529 a null for a Type argument, too.
6531 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
6533 * reflection.c: handle arrays as arguments to custom attributes.
6535 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
6537 * reflection.c: handle a string value in a custom attr
6538 ctor that takes an object.
6540 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
6542 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
6545 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
6547 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
6549 2003-04-27 Martin Baulig <martin@ximian.com>
6551 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
6552 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
6553 MONO_DEBUGGER_EVENT_BREAKPOINT.
6554 (mono_breakpoint_trampoline_code): Removed.
6555 (mono_debugger_event_handler): The last argument is now a
6557 (mono_debugger_insert_breakpoint_full): Removed the
6558 `use_trampoline' argument.
6559 (mono_debugger_method_has_breakpoint): Likewise.
6560 (mono_debugger_trampoline_breakpoint_callback): Renamed to
6561 mono_debugger_breakpoint_callback(); take the method and
6562 breakpoint number as arguments.
6564 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
6566 * metadata.c: fix off by one when loading parameters attributes.
6568 2003-04-24 Martin Baulig <martin@ximian.com>
6570 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
6572 2003-04-24 Martin Baulig <martin@ximian.com>
6574 * mono-debug-debugger.c: Moved all code which interacts with the
6577 * debug-mono-symfile.c: This code now just deals with the symbol
6578 file itself, the debugger code is now in mono-debug-debugger.c.
6580 2003-04-23 Martin Baulig <martin@ximian.com>
6582 * mono-debug.c (mono_debug_source_location_from_il_offset):
6583 New method; like mono_debug_source_location_from_address(), but
6584 takes an IL offset instead of a machine address.
6586 2003-04-23 Martin Baulig <martin@ximian.com>
6588 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
6589 `line' field; this is now computed by the debugger.
6591 2003-04-23 Martin Baulig <martin@ximian.com>
6593 * mono-debug.[ch]: New files. This is the new debugging interface.
6595 * mono-debug-debugger.[ch]: New files. Moved all code which
6596 interacts with the Mono Debugger here.
6598 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
6600 * domain.c (mono_init): initialize mono_defaults.monitor_class
6602 2003-04-21 Miguel de Icaza <miguel@ximian.com>
6604 * reflection.c (method_encode_code): Add a spicy exception to help
6605 future compiler authors.
6607 2003-04-21 Martin Baulig <martin@ximian.com>
6610 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6611 Make this work with relative pathnames; g_filename_to_uri() needs
6612 an absolute filename.
6614 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
6616 * icall.c: Track name changes in Object and ValueType.
6618 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
6620 * metadata.c (mono_type_stack_size): size should be a multiple of
6623 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6626 (internal_domain_finalize): moved into mono_domain_finalize. No need
6627 to create another thread because the finalizers will be run in the
6630 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
6631 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
6632 to be run (MS does this too).
6634 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
6636 * object.c (mono_class_compute_gc_descriptor): Update comment.
6638 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
6640 * image.h: Add synchronized wrapper cache.
6642 * image.c (do_mono_image_open): Initialize cache.
6644 * reflection.c (create_dynamic_mono_image): Initialize cache.
6646 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6648 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
6649 ves_icall_System_Buffer_ByteLengthInternal.
6651 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6653 * reflection.c: setup klass->nested_in earlier. Allow
6654 a dash in the assembly name.
6656 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
6658 * metadata.c (mono_type_to_unmanaged): dont access
6659 type->data.klass for MONO_TYPE_OBJECT
6660 (mono_type_to_unmanaged): consider System.Delegate class
6662 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
6664 * class.c: just setup supertypes in the proper place instead of
6665 initializing the full element class for arrays.
6667 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
6669 * class.c: ensure the element class of arrays is initialized.
6670 Setup the supertype info for array classes, too.
6672 2003-04-14 Miguel de Icaza <miguel@ximian.com>
6674 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
6676 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6678 * Makefile.am: re-added -m option when running cygpath. This way,
6679 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
6681 * mono-config.c: same codepath for locating mono config file for WIN32
6683 * assembly.c: if mono_assembly_setrootdir is called, don't override
6686 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6688 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
6689 MONO_ASSEMBLIES variable.
6691 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
6693 * icall.c: added Assembly::GetNamespaces() icall.
6695 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6697 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
6699 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
6701 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
6702 * object.c: fixed bug in the construction of vtable for proxies
6704 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
6706 * object.c (mono_array_new): Mark mono_array_new as an icall.
6708 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6710 * class.c: fixed test for public method when overriding interfaces.
6713 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6715 * appdomain.h, domain.c: added mono_domain_foreach() to
6716 be able to access the currently loaded appdomains.
6717 * object.c: make string interning work across sppdomains.
6718 Mark some functions for use as icalls.
6720 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
6722 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
6724 * reflection.h reflection.c: Allocate long living data using
6725 GC_MALLOC_ATOMIC so the collector does not need to scan it.
6727 * reflection.c: Double the allocation size in streams instead of
6728 increasing it, to prevent unneccesary copying on large assemblies.
6730 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
6731 creation if the assembly does not have the Run flag set.
6733 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
6735 * class.h: avoid the C++ keywords in header files (Jerome Laban
6736 spotted and fixed this).
6738 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6741 (mono_unhandled_exception): fill in the arguments for the
6742 UnhandledException event. Only trigger that event for the default
6743 domain (as MS does).
6745 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
6747 * object.c: Improve typed allocation stuff based on suggestions from
6748 Paolo. Also turn it on if the GC library supports it.
6750 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
6752 * object.c object.h class.h: Added experimental typed allocation
6753 facility using the interfaces in gc_gcj.h.
6755 * os/gc_wrapper.h: Added new include files.
6757 2003-04-03 Martin Baulig <martin@ximian.com>
6759 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
6760 which is not yet enabled by default.
6762 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
6764 (mono_gc_lock, mono_gc_unlock): New static functions.
6766 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
6767 functions; stop/start the world for the garbage collector. This
6768 is using the windows API; we need to complete the SuspendThread()/
6769 ResumeThread() implementation in the io-layer to make this work on Unix.
6770 (mono_gc_push_all_stacks): New public function; tells the garbage
6771 collector about the stack pointers from all managed threads.
6773 2003-04-03 Martin Baulig <martin@ximian.com>
6775 * object.h (MonoThread): Added `gpointer stack_ptr'.
6777 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
6779 2003-04-03 Martin Baulig <martin@ximian.com>
6781 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
6783 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
6785 * reflection.c (typebuilder_setup_fields): Initialize field.first and
6788 2003-04-02 Miguel de Icaza <miguel@ximian.com>
6790 * loader.c (mono_lookup_internal_call): Report the corlib that is
6793 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
6795 * icall.c (ves_icall_type_GetTypeCode): fixed check for
6796 System.DBNull (it's class not valuetype).
6798 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
6800 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
6801 if the array method was already assigned a token (fixes bug#40646).
6803 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
6805 * reflection.c (mono_reflection_get_type): Attempt type resolve even
6806 if no assembly is given.
6808 2003-04-01 Miguel de Icaza <miguel@ximian.com>
6810 * metadata.h: Added the new tables.
6812 * row-indexes.h: Added definitions for new tables.
6814 * metadata.c: Add schemas for new tables, and add support for
6815 computing the sizes of them.
6817 * class.c: Update for handling the new type cases.
6819 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
6821 * metadata.h (MONO_TYPE_IS_VOID): new macro
6823 2003-03-31 Martin Baulig <martin@ximian.com>
6825 * threads.h (MonoThreadCallbacks): Added `thread_created'.
6827 * threads.c (mono_thread_new_init): Call `thread_created' in the
6828 mono_thread_callbacks.
6830 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
6832 * loader.h: added marshalbyrefobject_class to mono_defaults
6833 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
6834 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
6835 generation of output parameters.
6836 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
6837 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
6838 contextbound and the target object belongs to the context of the caller.
6839 * object.h: added context and unwrapped_server variables in MonoRealProxy.
6840 * object.c: Implemented support for interfaces and abstract classes
6841 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
6842 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
6844 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
6846 * class.h class.c (mono_class_is_subclass_of): New function.
6848 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
6849 routines for most common case (calls from ArrayList::ToArray).
6851 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
6852 routine so programs which call Environment::Exit() can be profiled.
6854 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
6855 Added MONO_ARCH_SAVE_REGS.
6857 * icall.c (ves_icall_type_is_subtype_of): Use new function.
6859 2003-03-29 Miguel de Icaza <miguel@ximian.com>
6861 * blob.h: Add a couple of new MonoType types definitions.
6863 * tabledefs.h: Add a couple of new call convs.
6865 2003-03-27 Zoltan Varga <vargaz@freemail.h>
6867 * reflection.h (MonoReflectionDynamicAssembly): track changes in
6868 the layout of the class.
6870 * reflection.c (alloc_table): double the size on overflow to avoid
6871 unnecessary copying.
6873 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
6874 avoid filling out metadata tables and blobs. Also set mb->ilgen to
6875 null so it can be garbage collected.
6877 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
6879 * reflection.c (mono_reflection_get_type): Return the resolved type
6880 only if it is in the assembly we searched.
6882 * reflection.c (ensure_runtime_vtable): Initialize method slots.
6884 * class.c (mono_class_setup_vtable): Set the slot of the overriding
6887 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6890 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
6891 the right one is 'file:///blah', but MS allows it.
6893 (mono_assembly_open): allow 'file://blah'
6895 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
6897 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
6899 * socket-io.c: fixes bug #40310.
6901 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
6903 * reflection.c (mono_reflection_parse_type): handle deeply nested
6906 * reflection.c (mono_image_create_token): Use unique token values
6907 since they will be put into a hash table.
6909 * class.c (mono_class_setup_vtable): If a method occurs in more than
6910 one place in the vtable, and it gets overriden, then change the
6911 other occurances too.
6913 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
6914 object as return type.
6916 2003-03-22 Pedro MartÃnez Juliá <yoros@wanadoo.es>
6918 * icall.c: Deleted "ToString" implementation for double and float
6919 because they are full implemented in managed code.
6921 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6923 * reflection.c, reflection.h: implemented and exported functions
6924 to retrieve info about custom attributes.
6926 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6928 * appdomain.c: moved Uri handling to assembly.c
6929 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
6930 work when using a file Uri in *nix and windows.
6932 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
6933 GetReferencedAssemblies.
6935 2003-03-18 Dick Porter <dick@ximian.com>
6937 * icall.c: Rename a couple of internal calls
6939 * threads.c: Set the thread state to Stopped when a thread exits.
6942 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
6944 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
6947 * object.c (mono_class_vtable): fix warning.
6949 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
6951 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
6953 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
6955 (method_encode_clauses): Create exception info structures in the right
6957 (mono_reflection_setup_internal_class): Initialize supertypes field.
6959 * class.c object.c: Handle interfaces which implement other interfaces
6962 * class.h class.c: Move the supertypes array initialization code into
6963 a separate function so it can be used for dynamic types too. Also call
6964 it earlier, in mono_class_init(), since it can be used before the
6965 type is initialized.
6967 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6971 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
6976 * object.c: remove warnings.
6978 2003-03-13 Martin Baulig <martin@ximian.com>
6980 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
6981 (MonoDebugLexicalBlockEntry): New types.
6983 * debug-mono-symfile.c
6984 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
6986 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6988 * process.c: ret can be any non-zero value accroding to MS doc.
6990 2003-03-07 Miguel de Icaza <miguel@ximian.com>
6992 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
6993 fixing a warning for a miss-used prototype, would have cause
6994 random memory corruption.
6996 2003-03-07 Martin Baulig <martin@ximian.com>
6998 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
6999 getting really annoying ....
7001 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
7003 * reflection.c (fixup_method): added support for array methods.
7005 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
7007 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
7008 (pointed out by Michael Adams).
7010 2003-03-04 Dick Porter <dick@ximian.com>
7012 * icall.c: Temporarily reverted the Double and Single ToString()
7013 change, because it broke nunit.
7015 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
7017 * object.h, threads.h: make include files compatible with C++
7018 (patch by Jerome Laban <jlaban@wanadoo.fr>).
7020 2003-03-04 Pedro MartÃnez Juliá <yoros@wanadoo.es>
7022 * icall.c: Erased ToString helper functions for Double and Single.
7023 Now, that implementations ar all in managed code (Double and Single
7026 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
7028 * appdomain.c: Added method for initializing the default context of
7029 a domain. Added internal call for getting the default context.
7030 * appdomain.h: Added context variable in MonoDomain struct.
7031 * domain.c: mono_domain_set also sets the default context of the domain
7032 * icall.c: Mapped internal method InternalGetDefaultContext.
7033 * object.c: mono_object_get_virtual_method returns always a remoting
7034 wrapper if the object is a transparent proxy.
7035 mono_runtime_invoke_array: when creating an object by calling the
7036 constructor, if the created object is a proxy, then the constructor should
7037 be called using the a remoting wrapper.
7039 2003-03-03 Dick Porter <dick@ximian.com>
7041 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
7042 variable so it compiles on solaris. Problem spotted by
7043 Christopher Taylor <ct@cs.clemson.edu>
7045 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7048 (get_info_from_assembly_name): don't leak value.
7051 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
7054 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
7056 * assembly.c: export mono_image_load_references ().
7057 * class.c: handle function pointers. mono_class_from_name() now
7058 supports nested type names directly.
7060 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
7062 * reflection.h reflection.c: Encode already created dynamic methods
7063 and fields correctly as a DEF instead of a REF.
7065 * reflection.c: Get rid of the force_ref argument to
7066 mono_image_typedef_or_ref since it was wrong in the first place.
7068 * string-icalls.c: add error checking to string constructors according
7071 * reflection.c: Emit types in the order their TypeBuilders were
7072 created. Previously, a new table index was assigned to each type before
7073 the tables were emitted. This was wrong because the signature blob
7074 might already refer to a type by its original table index.
7076 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
7078 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
7081 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7083 * Makefile.am: make assemblies dir have \ instead of / on windows.
7085 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
7087 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
7088 iterate over the NESTEDCLASS table using a linear search since the
7089 table is not guaranteed to be sorted by the secondary key.
7091 * class.c (mono_class_create_from_typedef): fixed up call to
7092 mono_metadata_nesting_typedef.
7094 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
7096 * marshal.c (mono_string_to_byvalstr): clear the memory as
7097 suggested by Jerome Laban <jlaban@wanadoo.fr>
7099 2003-02-26 Dick Porter <dick@ximian.com>
7101 * process.c: Cope with padding in .rsrc blocks
7103 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
7105 * metadata.h: reverted the filter_len change, it breaks reflection
7107 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
7109 * metadata.h: added a new field to store the filter_len
7112 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
7114 * reflection.c: handle custom attributes for types and members
7115 created with Reflection.Emit (bug#38422).
7117 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
7119 * reflection.c: define RTSpecialName automatically for constructors for
7120 compatibility with MS.NET.
7122 * reflection.c (mono_reflection_create_runtime_class): initialize
7123 nested_in field of dynamically created classes.
7125 2003-02-22 Martin Baulig <martin@ximian.com>
7127 * debug-mono-symfile.h: Incremented version number.
7129 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
7131 * object.h icall.c process.c: fix warnings.
7133 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
7135 * appdomain.h appdomain.c:
7136 (mono_domain_try_type_resolve): split the
7137 name_or_tb argument into a name and a tb argument.
7138 (mono_domain_has_type_resolve): new function to check whenever the
7139 application has registered a TypeResolve event handler.
7141 * icall.c reflection.h reflection.c: move the type resolve logic into
7142 mono_reflection_get_type () so it will be invoked when
7143 Assembly::GetType () is called.
7146 (mono_reflection_get_type): renamed to get_type_internal.
7147 (mono_reflection_get_type): fixed type name generation so it works
7148 for nested types too.
7149 (mono_reflection_get_type): call has_type_resolve () to avoid the
7150 costly type name generation if there is no resolve event handler.
7152 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
7154 * class.c, image.c: load exported types from file references.
7156 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
7158 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
7159 used to cache the managed methods used to create proxies and make
7160 remote invocation of methods.
7161 * class.h: Added in MonoVTable a flag to indicate that a class needs
7162 to be remotely created.
7163 * object.c: Modified the method mono_class_vtable(). It now initializes
7164 the remote flag of the vtable. Modified mono_object_new_specific(),
7165 so now it checks the remote flag.
7166 * icall.c: Added a couple of internal methods, one for enabling instance
7167 creation interception for a type, and one for creating objects bypassing
7170 2003-02-18 Martin Baulig <martin@ximian.com>
7172 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
7173 New interncall to get a method's metadata token.
7175 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
7176 New interncall for the debugger.
7178 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
7180 * class.c (mono_class_setup_vtable): allocate supertype array
7182 2003-02-18 Martin Baulig <martin@ximian.com>
7184 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
7186 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7189 (assembly_name_to_aname): jump over unknown properties (i've found
7190 something like: 'type, assembly, version=xxx, custom=null, public...',
7191 so now will ignore custom=null and still get the rest of the values).
7193 2003-02-17 Dick Porter <dick@ximian.com>
7195 * threads.c: Have Thread.Start() wait for a semaphore to signal
7196 that the thread has set up all its local data. This fixes bug
7197 34323, where Abort() raced the new thread's TLS data.
7199 Also removes the handle_store() call from start_wrapper, because
7200 threads are now always created suspended and there is no longer a
7201 race between the parent and child threads to store the info.
7203 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
7205 * image.c: explain the #- heap issue in a message, hopefully
7206 avoiding FAQs on mono-list.
7208 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7211 (GetEntryAssembly): if the domain has not invoked
7212 AppDomain.ExecuteAssembly yet, return the assembly of the default
7215 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
7217 * class.c (mono_ldtoken): make it work in dynamic assemblies.
7219 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
7221 * metadata.c, reflection.c: simple speedup to type hash
7224 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
7226 * image.c, image.h, class.c, assembly.c: move module loading
7227 to MonoImage. When loading metadata, consider alignemnet from
7228 the start of metadata, not from the metadata address in memory.
7230 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
7232 * reflection.c (mono_reflection_get_custom_attrs): Added support for
7233 AssemblyBuilder objects. Factored out custom attribute creation into
7234 a separate function.
7235 (create_custom_attr): new function to create custom attributes.
7237 2003-02-12 Miguel de Icaza <miguel@ximian.com>
7239 * Makefile.am: Got tired of typing the full pathname to pedump.
7240 Until there is another option, am installing this.
7242 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
7244 * class.c (class_compute_field_layout): always set field->parent
7245 (mono_ldtoken): use mono_defaults.fieldhandle_class;
7247 2003-02-11 Dick Porter <dick@ximian.com>
7250 * monitor.c: Rewrote Monitor, making lock much faster and
7251 Pulse/Wait work as specified. Also uses much fewer handles, and only
7252 creates them as needed.
7254 * exception.c: Added SynchronizationLockException
7256 * threads.c: Deleted old Monitor implementation. The new one is
7259 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
7261 * class.c: handled TypedReference type code. Set the correct size for
7262 class data. Setup interface_offsets for interface classes, too.
7264 2003-02-09 Martin Baulig <martin@ximian.com>
7266 * debug-mono-symfile.h: Reflect latest symbol writer changes.
7268 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
7270 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
7271 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
7272 * object.c: fixed mono_object_get_virtual_method () for interfaces.
7273 * verify.c: check for code that runs after the end of the method.
7275 2003-02-08 Pedro MartÃnez Juliá <yoros@wanadoo.es>
7277 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
7278 "System.Math::Round2".
7279 * sysmath.h: Added Floor, Round and Round2 definitions.
7280 * sysmath.c: Modified certain functions that were not 100% compliant
7281 with MS.NET (math precision) and added the implementation of Floor,
7284 2003-02-07 Martin Baulig <martin@ximian.com>
7286 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
7288 2003-02-07 Martin Baulig <martin@ximian.com>
7290 * debug-mono-symfile.c: Reflected latest symwriter changes.
7291 (mono_debug_create_mono_symbol_file): Removed.
7292 (mono_debug_open_mono_symbol_file): Take an argument which
7293 specifies whether to create a dynamic symbol file.
7295 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
7297 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
7299 2003-02-05 Martin Baulig <martin@ximian.com>
7301 * reflection.c (mono_image_build_metadata): Make this public,
7302 protect it against being called multiple times, don't create
7303 resources and don't build the compressed metadata here.
7304 (mono_image_create_pefile): Do this here.
7307 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
7309 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7311 * socket-io.c: fixed bug #36322.
7313 2003-02-06 Piers Haken <piersh@friskit.com>
7317 * debug-mono-symfile.c:
7323 * socket-io.c: warning cleanups
7325 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
7327 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
7328 function. works like remoting invoke, but does a check for the Proxy first.
7330 2003-02-05 Miguel de Icaza <miguel@ximian.com>
7332 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
7334 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
7336 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
7338 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
7339 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
7341 * object.c (mono_store_remote_field_new): used by the new jit
7342 instead of mono_store_remote_field
7343 (mono_load_remote_field_new): used by the new jit
7344 instead of mono_load_remote_field
7346 2003-02-05 Patrik Torstensson
7348 * appdomain.c: changed unload to take the domain id instead
7351 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
7354 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7356 * appdomain.c: don't look for assemblies in ApplicationBase if
7357 PrivateBinPathProbe is set.
7359 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7361 * object.c: make the first argument in main_args contain the absolute
7362 path to the assembly. Fixes bug #37511.
7364 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7366 * icall.c: get correct UTC offset for countries not using daylight
7367 time saving. Fixes bug #30030.
7369 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7371 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
7372 and 1 are the family).
7374 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
7376 * icall.c (ves_icall_InternalExecute): removed wrong assertion
7378 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
7380 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
7382 * reflection.c: added support for SignatureHelper tokens, which is
7383 needed by the Calli opcode.
7385 * reflection.h: track changes to SignatureHelper class.
7387 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
7389 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7391 * appdomain.c: fixed loading assemblies from PrivateBinPath.
7393 2003-02-03 Patrik Torstensson
7394 * appdomain.[c|h], domain.c :
7395 - Added support for getting a domain via domain id
7396 - Support for setting and getting domain from System.AppDomain
7397 (used in cross appdomain channel)
7398 - Added support for get/set for a MonoAppContext on a thread
7399 (Context class in System.Runtime.Remoting.Contexts),
7400 - Removed hack in Get/SetData and ExecuteAssembly.
7402 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
7403 the managed world to get control when a proxy is created.
7405 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
7407 2003-02-03 Miguel de Icaza <miguel@ximian.com>
7410 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
7411 Populate the codebase field as well.
7413 2003-02-02 Martin Baulig <martin@ximian.com>
7415 * debug-mono-symfile.c
7416 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
7417 (mono_debug_symfile_add_method): Allow interncalls.
7419 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7421 * icall.c: throw parse exception if strtod fails or the string is empty.
7423 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
7425 * marshal.c: handle object type separately from defined
7428 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
7430 * marshal.c: handle NATIVE_LPSTR for strings when it's
7431 explicitly specified.
7433 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
7435 * reflection.c, reflection.h, icall.c: setup the reflection
7436 handle cache for ModuleBuilders and AssemblyBuilders.
7438 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
7440 * reflection.c (reflection_methodbuilder_to_mono_method): set
7443 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7445 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
7447 2003-01-29 Dick Porter <dick@ximian.com>
7449 * threads.c: No need for the fake_thread kludge now that Thread
7450 doesn't run a class constructor
7452 2003-01-29 Dick Porter <dick@ximian.com>
7454 * threads.c: Use g_direct_hash instead of the rather bogus
7457 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
7459 * marshal.c (mono_marshal_get_native_wrapper): add check for null
7461 (mono_marshal_get_struct_to_ptr): generate valid IL code
7462 (mono_marshal_get_ptr_to_struct): generate valid IL code
7463 (*): correctly set sig->pinvoke, we need to memdup the signature
7466 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
7468 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
7469 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
7471 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7473 * profiler.c: provide more callers information.
7475 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
7477 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
7479 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
7481 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
7483 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7485 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
7486 exception instead of going into an infinite loop on dates which it
7489 * string-icalls.c (ves_icall_System_String_get_Chars): raise
7490 out-of-range exception if needed.
7492 * class.c (mono_class_setup_vtable): allow a virtual method to provide
7493 an implementation for an interface method and to override an inherited
7494 method at the same time.
7495 Imagine a scenario when a virtual method is used to override a
7496 virtual abstract method in a parent class, and this same method
7497 provides an implementation for an method inherited from an interface.
7498 In this case, the interface resolution code will set im->slot, which
7499 means that the virtual method override pass will skip this method
7500 which means a pointer to the abstract method inherited from the parent
7501 will remain in the vtable of this non-abstract class.
7503 * class.c: (mono_class_setup_vtable): continue search for a real
7504 method if only an abstract method is found.
7506 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7508 * reflection.c: add size to encoding for ByValStr and ByValArray
7509 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
7511 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7513 * class.c (mono_class_setup_vtable): pass the override info as an
7516 * class.c (mono_class_setup_vtable): set the slot of overriding methods
7519 * reflection.c (ensure_runtime_vtable); add support for method
7522 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7524 * reflection.c (resolution_scope_from_image): Hack to work to work with
7527 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
7528 added a 'force_ref' argument to force this function to allways return
7529 a TypeRef. This is needed by mono_image_get_memberref_token ().
7531 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7533 * reflection.c (mono_image_get_type_info): interfaces really don't have
7536 * reflection.c (mono_image_basic_init): fill out missing fields of
7539 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
7540 dynamic assemblies. This is required so dynamic assemblies show up in
7541 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
7542 Type::GetType() etc. This is consistent with MS behaviour.
7544 * image.c image.h reflection.c: add newly created classes to the name
7545 cache so mono_class_get () will find them.
7547 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7549 First part of changes to get IKVM.NET running under mono.
7551 * appdomain.h, appdomain.c: added new function
7552 mono_domain_try_type_resolve() which will emit TypeResolve events.
7553 This function will call AppDomain::DoTypeResolve to do the actual work.
7555 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
7556 moved existing code dealing with dynamic tokens to a new function
7557 called mono_reflection_lookup_dynamic_token (). This function will
7558 raise TypeResolve events when appropriate. Since reflection.c is not
7559 part of libmetadata, a new hook function called
7560 mono_lookup_dynamic_token() is added to class.c which will call this.
7562 * assembly.h assembly.c: make the invoke_load_hook function public,
7563 so it can be called for dynamic assemblies.
7565 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
7567 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
7570 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
7571 MonoGHashTable, since it contains pointers to objects which the GC
7574 * assembly.c (search_loaded): remove unused variable.
7576 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
7578 * object.c: fixed issue exposed by gcc-generated IL programs
7579 that use RVA data for pointers.
7581 2003-01-25 Martin Baulig <martin@ximian.com>
7583 * threads.c (start_wrapper): Moved the initialization of
7584 `start_func' above the mono_new_thread_init() call to which we
7585 pass it as argument.
7587 2003-01-24 Martin Baulig <martin@ximian.com>
7589 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
7590 the MonoThread pointer.
7592 2003-01-21 Miguel de Icaza <miguel@ximian.com>
7594 * icall.c: Rename `PowImpl' to Pow.
7596 2003-01-23 Dick Porter <dick@ximian.com>
7598 * threads.c (start_wrapper): Create a Thread object if needed, so
7599 the Main() thread can do the class initialisation in a subthread
7600 that has been set up to allow managed code execution.
7602 Pass the thread ID instead of the MonoThread pointer to the thread
7603 start and attach callbacks. This change is required, because the
7604 jit thread start callback must be called _before_ the Thread
7605 object can be created.
7607 (mono_thread_init): Removed much object creation code that is no
7608 longer needed. No managed code is called from here now.
7610 * object.c (mono_runtime_exec_managed_code): Create a subthread
7611 for Main, and call back to the runtime to use it.
7612 Set the exit code when Main exits.
7614 * gc.c: Make sure domain finalisation happens in a subthread.
7615 Re-enable threaded GC, fixing bug 31333 (again).
7617 * environment.c: System.Environment internall calls (so far just
7618 ExitCode is here, the others are still in icall.c)
7620 * appdomain.c (mono_runtime_cleanup): All threads running managed
7621 code should have finished before mono_runtime_cleanup() is
7622 reached, so no need to clean up threads.
7624 2003-01-22 Martin Baulig <martin@ximian.com>
7626 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
7627 `gpointer func' arguments.
7628 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
7629 but added `MonoThread *thread' argument.
7630 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
7632 * threads.c (mono_new_thread_init): Added `gpointer func' argument
7633 and pass it to the mono_thread_start_cb callback.
7634 (mono_install_thread_callbacks): New public function to install a
7635 set of callbacks which are set by the debugger.
7636 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
7638 2003-01-22 Martin Baulig <martin@ximian.com>
7640 * Makefile.am: Install debug-mono-symfile.h.
7642 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
7644 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
7646 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
7648 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
7649 * class.c (mono_ptr_class_get): correctly set access levels of pointers
7650 (mono_array_class_get): correctly set access levels of arrays
7652 2003-01-20 Patrik Torstensson
7653 * image.h (MonoAssemblyName): changed major, minor, build, revision
7654 from signed to unsigned.
7656 2003-01-20 sean kasun <skasun@azstarnet.com>
7658 * reflection.c (load_cattr_value): Now this handles
7659 MONO_TYPE_SZARRAY. Fixes bug #35629
7661 2003-01-20 Miguel de Icaza <miguel@ximian.com>
7663 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
7666 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7668 * decimal.c: fixed bug #26056.
7670 2003-01-17 Martin Baulig <martin@ximian.com>
7672 * gc.c: Raise an ExecutionEngineException instead of using g_error().
7674 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7677 (mono_get_exception_type_initialization): new function.
7679 * object.c: throw a TypeInitializationException when an exception is
7680 thrown invoking the class constructor.
7682 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7684 * reflection.c: fixed attribute reading.
7686 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7689 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
7690 provided, look for the type in the calling assembly and then in
7691 mscorlib; if the assembly name is provided, only try that one.
7693 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
7695 * object.c: register the vtable before there is a chance it's
7696 queried again recursively.
7698 2003-01-13 Duncan Mak <duncan@ximian.com>
7700 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
7703 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
7705 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
7707 2003-01-11 Martin Baulig <martin@ximian.com>
7709 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
7710 this to 20 for the release.
7712 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
7714 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
7716 * loader.c (mono_method_get_marshal_info): bug fix
7718 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
7719 structures with explicit layout
7721 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7723 * profiler.c: made the output more readable (and sorted).
7724 Added caller information for the allocation profiler.
7726 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
7728 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
7730 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7732 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
7735 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
7737 * object.c, profiler.h, profiler.c, profiler-private.h:
7738 Added object allocation profiler.
7740 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
7742 * reflection.h, reflection.c: handle global methods.
7743 Compress blob entries.
7745 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
7747 * marshal.c: fix compilation.
7749 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
7751 * loader.c (mono_method_get_marshal_info): impl.
7753 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
7755 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7757 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
7758 for reference types.
7760 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
7762 * loader.c: fixed off by one error in loaded parameter names.
7764 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
7766 * marshal.c (mono_marshal_get_icall_wrapper): like
7767 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
7768 instead of a MonoMethod.
7770 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7772 * decimal.c: fixed bug #36537.
7774 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
7776 * marshal.c: throw a missing method exception if a
7777 P/Invoke method is not found.
7779 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7781 * icall.c: allow a null this for constructors.
7783 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
7785 * icall.c: raise the proper exceptions if the arguments to the
7786 internal Invoke are incorrect.
7788 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
7790 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
7792 2003-01-03 Martin Baulig <martin@ximian.com>
7794 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7796 2002-12-31 Martin Baulig <martin@ximian.com>
7798 * debug-mono-symfile.c: Completely rewrote the type section.
7799 Instead of using individual malloc()ed fields, we use one big
7800 continuous memory area and offsets into this area.
7801 See the comments in the source code for details.
7803 2002-12-30 Martin Baulig <martin@ximian.com>
7805 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
7807 2002-12-30 Martin Baulig <martin@ximian.com>
7809 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
7810 line number table in this data blob instead of using an external
7813 2002-12-28 Martin Baulig <martin@ximian.com>
7815 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7817 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
7819 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
7820 as a boxed return type.
7822 2002-12-21 Miguel de Icaza <miguel@ximian.com>
7825 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
7826 g_build_filename to properly get separators on the filename created.
7828 * object.h: Small change, introduce MonoMarshalByRefObject to
7829 track the layout of that structure in the C# universe as we make
7832 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
7834 * object.c: removed assert to allow static fields on interfaces.
7835 * loader.c: a TypeSpec may be used for any type, not just arrays.
7837 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
7839 * class.c, class.h: added mono_class_array_element_size ().
7840 Ignore static methods in interfaces.
7842 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7844 * threads.c: fixed the build under cygwin.
7846 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
7848 * reflection.c: handle nullref constants. Allocate keys for
7849 reflection handles with the GC.
7851 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7853 * threads.c, threads.h: added mono_thread_get_abort_signal()
7854 to get a suitable signal for thread abort.
7856 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7858 * metadata.c: fix handling of ExportedType table.
7860 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7862 * icall.c: added WriteWindowsDebugString internal call.
7864 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7866 * reflection.h: added fields to match C# implementation.
7868 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7870 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
7872 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
7874 * gc.h, gc-internal.h: Rename header for GC internal calls to
7875 gc-internal.h from gc.h as to not clash with Boehm GC having its
7876 header installed as <gc.h> in outside include paths.
7877 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
7878 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
7880 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7882 * icall.c: assign minor, build and revision in FillName.
7884 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
7886 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
7887 Added support for running code generated by Reflection.Emit.
7889 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7891 * appdomain.c: check for NULL argument in LoadFrom.
7893 2002-12-10 Dick Porter <dick@ximian.com>
7895 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
7897 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7899 * appdomain.c: fix buglet when building exe file name. Handle full
7900 assembly name (needed after latest changes to AssemblyName).
7902 (mono_image_close): free some hashtables.
7904 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
7906 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
7907 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
7908 on some systems (redhat 7.3)
7910 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
7912 * threads.c: delete the critical section of a sync block,
7913 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
7915 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
7917 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
7919 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7921 * appdomain.[ch]: handle the assembly preload event to try loading the
7922 assemblies using the paths we have in the current domain.
7924 * assembly.[ch]: created an assembly preload hook that is called to try
7925 loading the assembly by other means that the ones provided here.
7927 * domain.c: initialize the domain search path.
7929 From now on, assemblies (TODO: except corlib and System) are loaded
7930 according to these rules when using mono_assembly_load ():
7932 1. It tries to load the assembly from the ApplicationBase
7933 of the current domain appending .dll and .exe (TODO: have to
7934 try loading from name/name.dll and name/name.exe).
7936 2. It tries the search path specified in PrivateBinPath for the
7937 current domain (if any).
7939 3. Previous behavior.
7941 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
7943 * icall.c: implemented GetInterfaceMap() related icall.
7944 * domain.c, loader.h: load MethodInfo in mono_defaults.
7946 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
7948 * gc.c: disable the finalizer thread for now, untill all the issues
7949 with it are resolved.
7951 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7953 * string-icalls.c: handle embedded nulls in string ctor when the
7954 length is specified.
7956 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
7958 * class.c: look for explicit interface implementation in parent
7961 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
7963 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
7965 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
7967 * gc.c: protect handles with a critical section.
7969 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7972 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
7973 parameters. If no assembly specified, try getting the type from all
7974 the assemblies in the current domain, else, load the assembly and get
7977 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7979 * marshal.c: applied patch from Aleksey Demakov that fixes
7980 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
7982 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7984 * icall.c: fixed get_location.
7986 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
7988 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
7989 declarations to make it work with older gcc.
7991 * loader.c (mono_get_method): set signature->pinvoke for native calls
7993 2002-11-20 Dick Porter <dick@ximian.com>
7995 * threads.c (mono_thread_init): Set the main thread's handle
7997 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
7999 * gc.c: allow compilation without GC support. Changed to match the
8002 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8004 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
8006 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
8008 * reflection.c: set a public key token on the core assemblies.
8010 2002-11-18 Dick Porter <dick@ximian.com>
8012 * threads.c: Split out some thread initialisation so that other
8013 files can set the start callback function.
8015 * gc.c: Run finalisers in a separate thread, to avoid stack
8016 overflow. Fixes bug 31333.
8018 * appdomain.c: Set up GC finalisation thread.
8022 * domain.c: Use gc.h macros for GC_malloc
8024 2002-11-15 Dick Porter <dick@ximian.com>
8028 * appdomain.c: Removed mono_runtime_init_with_attach(),
8029 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
8030 merging the extra parameter with the existing function. Removed
8031 unneeded code in mono_thread_attach().
8033 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
8035 * image.c (mono_image_loaded_by_guid): a method to get loaded
8037 (load_metadata_ptrs): we store the guid as string.
8039 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
8041 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
8043 * metadata.c (mono_guid_to_string): imported method form Zoltan
8044 Varga (slightly modified)
8046 * assembly.c (mono_assembly_open): load precompiled code
8048 * loader.h (MonoMethod): we store the method token for use in the
8051 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8053 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
8054 the hook function called when an assembly is loaded.
8056 * domain.c: Modified file.
8057 (mono_domain_assembly_load): removed hash table insertion of assemblies.
8061 2002-11-07 Miguel de Icaza <miguel@ximian.com>
8063 * reflection.c: Map PEFileKind to the value expected by the WinNT
8066 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8068 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
8069 Read until the buffer is filled completely.
8071 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8073 * icall.c: implemented MonoType.InternalGetEvent ().
8075 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8077 * appdomain.c: implemented InitAppDomainSetup. Delayed
8078 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
8081 * assembly.c: base_dir is now an absolute path ending with
8084 * icall.c: modified get_location according to the above changes.
8086 * object.c: init AppDomain.SetupInformation for the default domain after
8087 we have the entry assembly.
8089 * domain.c: when unloading a domain, setup = NULL.
8091 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
8093 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
8095 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
8097 * object.h, object.c: introduced mono_object_get_virtual_method ()
8098 to lookup the method invoked on an object when a callvirt is done on
8100 * icall.c: make MethodInfo::Invoke() always do a virtual call.
8102 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8104 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
8105 current domain when loaded an assembly and failed to load it.
8107 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
8109 2002-10-31 Dick Porter <dick@ximian.com>
8113 * file-io.c: Return the error status in a parameter, as the
8114 GetLastError() value has long since been blown away if we try and
8115 look it up in a subsequent internal call invocation. Delete the
8116 GetLastError() internal call, because it's useless.
8118 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
8120 * class.[ch]: added cast_class to fix bug 29517
8122 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
8124 * marshal.c: create valid IL code in the filter clause:
8125 the new JIT is less forgiving:-)
8127 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8129 * icall.c: removed get_property internal call.
8131 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
8133 * appdomain.h domain.c: Added an ID to appdomains.
8135 * threads.c threads.h icall.c: Implement icall
8136 Thread:GetDomainID(), and remove unused icall
8137 CurrentThreadDomain_internal.
8139 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8141 * icall.c: Don't recurse through the base types in GetConstructor.
8144 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
8146 * mempool.h, mempool.c: added mono_mempool_empty() and
8147 mono_mempool_stats().
8149 2002-10-23 Dick Porter <dick@ximian.com>
8153 * icall.c: Added MonoIO.GetFileType internal call
8155 2002-10-17 Dick Porter <dick@ximian.com>
8157 * appdomain.c (mono_runtime_cleanup): Don't signal the async
8158 delegate semaphore before waiting for all threads to finish,
8159 because new threads can also call async delegates. Fixes bug
8162 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
8163 of 3 seconds, in case another async job is queued. (This part is
8164 needed because the bug fix reintroduced the 3s exit lag.) This
8165 makes the mono_runtime_shutdown flag superfluous.
8167 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
8169 * reflection.c: include ehader size in method section headers.
8170 Really check for suplicated modules entries.
8172 2002-10-17 Martin Baulig <martin@gnome.org>
8174 * debug-mono-symfile.c: Added back support for locals.
8176 2002-10-14 Martin Baulig <martin@gnome.org>
8178 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
8181 2002-10-14 Martin Baulig <martin@gnome.org>
8183 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
8184 mono_class_get() instead of looking in the class cache.
8186 2002-10-13 Martin Baulig <martin@gnome.org>
8188 * debug-mono-symfile.c: Set version number to 28, include the
8189 signature in method names.
8191 2002-10-13 Martin Baulig <martin@gnome.org>
8193 * debug-mono-symfile.h: Set version number to 27.
8195 2002-10-11 Martin Baulig <martin@gnome.org>
8197 * gc.c: Don't register/unregister NULL pointers as disappearing links.
8199 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8201 * metadata.c, metadata.h: added helper function to allocate signatures.
8203 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8205 * icall.c: added internal call to get the location of machine.config.
8207 2002-10-08 Martin Baulig <martin@gnome.org>
8209 * debug-mono-symfile.c: Ignore classes with a pending init for the
8212 2002-10-03 Dick Porter <dick@ximian.com>
8214 * threads.c: Freebsd pthread_t is a pointer
8216 2002-10-03 Dick Porter <dick@ximian.com>
8218 * socket-io.c: Implemented GetHostName_internal
8220 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8223 (mono_config_parse_file): don't leak the text.
8225 2002-10-02 Martin Baulig <martin@gnome.org>
8227 * debug-mono-symfile.c: Added support for methods.
8229 2002-10-01 Martin Baulig <martin@gnome.org>
8231 * debug-mono-symfile.c: Don't emit methods and line numbers for
8232 the dynamic symbol file, just write the type table. We can easily
8233 have an external helper program which creates a symbol file for an
8236 2002-10-01 Dick Porter <dick@ximian.com>
8238 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
8239 Only add the handle to the cleanup array when we're about to
8240 launch the thread. Bug 31425 deadlocked when the test was run on
8243 2002-10-01 Martin Baulig <martin@gnome.org>
8245 * debug-mono-symfile.c: Added support for properties.
8247 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8249 * reflection.c: unaligned store fix from Mark Crichton
8250 <crichton@gimp.org>.
8252 2002-09-27 Martin Baulig <martin@gnome.org>
8254 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
8257 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
8259 * assembly.h, assembly.c: use a sane API to hook into the assembly
8260 loading process instead of a useless special-purpouse hack
8261 (ngen needs a hook, too, for example).
8263 2002-09-27 Dick Porter <dick@ximian.com>
8265 * threads.c (mono_thread_init): Call GetCurrentProcess() so
8266 io-layer can set up some process handle info. Not needed on w32,
8267 but doesn't hurt either.
8269 * process.c: Pass the program name in the second parameter to
8270 CreateProcess, so the path is searched. Include the working
8271 directory. Implemented process name, process enumeration, and some
8272 process detail internal calls.
8274 * icall.c: Added internal calls for process lookup, and some
8277 2002-09-26 Martin Baulig <martin@gnome.org>
8279 * assembly.c (mono_install_open_assembly_hook): New global
8280 function to install a function to be invoked each time a new
8282 (mono_assembly_open): Run this callback function if set.
8284 * debug-mono-symfile.c: Put back line numbers for the dynamic
8285 symbol file and also record the .il file as source file. This
8286 allows us to install the temporary symbol file as `file.dbg' just
8287 like a compiler-generated one.
8289 2002-09-26 Nick Zigarovich <nick@chemlab.org>
8291 * Corrected typo in gc.c (BOHEM vs BOEHM).
8293 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8295 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
8296 GetProperties. Also avoid calling g_slist_length in GetProperties and
8299 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8301 * reflection.c: avoid unaligned stores (bug spotted by
8302 Mark Crichton <crichton@gimp.org>).
8304 2002-09-25 Martin Baulig <martin@gnome.org>
8306 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
8307 instead of guint64 for addresses and added prologue/epilogue info.
8309 2002-09-25 Martin Baulig <martin@gnome.org>
8311 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
8312 store line number info. For the dynamic symbol file, we only need
8313 to provide the JIT generated dynamic line number info for the dynamic
8316 2002-09-25 Martin Baulig <martin@gnome.org>
8318 * debug-mono-symfile.h: Incremented version number.
8320 2002-09-24 Martin Baulig <martin@gnome.org>
8322 * class.c (mono_debugger_class_init_func): New global function
8324 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
8327 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
8328 function. This is called via the mono_debugger_class_init_func
8329 hook to add all types to the dynamic type table.
8330 (ves_icall_MonoDebugger_GetType): New interncall to get a class
8331 from its metadata token.
8333 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
8334 New interncall for the debugger.
8336 2002-09-24 Nick Drochak <ndrochak@gol.com>
8338 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
8339 before using it in case it is null.
8341 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8343 * metadata.c: allow custom modifiers in local var signatures
8344 (bug spotted by Zoltan Varga).
8346 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8348 * class.c: deal with the <Module> class that may have a NULL vtable.
8351 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8353 * image.c, image.h: more strong name helpers.
8354 * monosn.c: more work: convert pem keys to cryptoapi format.
8356 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8358 * string-icalls.c: speedup IndexOf.
8360 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8362 * icall.c: updates from Zoltan.2.Varga@nokia.com.
8364 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8366 * icall.c: cleanup: use mono_object_domain ().
8368 2002-09-23 Martin Baulig <martin@gnome.org>
8370 * debug-mono-symfile.c: Improved type support.
8372 2002-09-22 Martin Baulig <martin@gnome.org>
8374 * debug-mono-symfile.c: Added support for reference types and strings.
8376 2002-09-22 Martin Baulig <martin@gnome.org>
8378 * debug-mono-symfile.c: Started to work on the type table.
8380 2002-09-21 Martin Baulig <martin@gnome.org>
8382 * debug-mono-symfile.c: Largely reworked the symbol table format.
8383 The symbol table is now incrementally updated each time a new
8384 method is added. We're now also using our own magic and version
8385 so that you don't need to recompile all your classes if the
8386 dynamic table changes.
8387 (mono_debug_update_mono_symbol_file): Removed.
8388 (mono_debug_symfile_add_method): New function to add a method.
8390 2002-09-21 Martin Baulig <martin@gnome.org>
8393 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
8396 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
8397 New interncall to get a method from its metadata token.
8399 2002-09-21 Martin Baulig <martin@gnome.org>
8401 * debug-mono-symfile.c: Create type table.
8403 2002-09-20 Martin Baulig <martin@gnome.org>
8405 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
8407 2002-09-20 Martin Baulig <martin@gnome.org>
8409 * debug-mono-symfile.c: Provide information about params and locals.
8411 2002-09-20 Martin Baulig <martin@gnome.org>
8413 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
8416 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
8417 interncall to get a method from its metadata token.
8419 2002-09-20 Martin Baulig <martin@gnome.org>
8421 * debug-mono-symfile.c: Added a few checks for method->header
8422 being non-NULL. This should never happen, but for the moment
8423 let's use a g_warning() rather than a g_assert().
8425 2002-09-19 Mark Crichton <crichton@gimp.org>
8427 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
8428 even if support for it isn't present. Added an #ifdef to fix this.
8430 * socket-io.c: Added checks back for Solaris support.
8432 2002-09-19 Martin Baulig <martin@gnome.org>
8434 * debug-mono-symfile.c (read_string, write_string): Reflect latest
8435 changes in the symbol file format.
8437 2002-09-18 Martin Baulig <martin@gnome.org>
8439 * debug-mono-symfile.c: Set version number to 21.
8441 2002-09-18 Dick Porter <dick@ximian.com>
8443 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
8444 on netbsd. Fixes bug 30051.
8446 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8449 (set_version_from_string): little fix.
8451 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8453 * monosn.c, Makefile.am: added strong name utility.
8454 * reflection.h, reflection.c: implemented delayed signing,
8455 locale, version and hash id assembly attributes.
8457 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8459 * loader.c, metadata.c: load param attributes in signatures.
8461 2002-09-16 Martin Baulig <martin@gnome.org>
8463 * debug-mono-symfile.c: Added string table with all method names.
8465 2002-09-14 Martin Baulig <martin@gnome.org>
8467 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
8470 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8472 * reflection.c: record the public key token of referenced assemblies.
8474 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8476 * image.c, image.h: added functions to get the strong name and the
8477 public key of an assembly.
8478 * pedump.c: use them.
8480 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
8482 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
8484 2002-09-12 Miguel de Icaza <miguel@ximian.com>
8486 * marshal.c (mono_marshal_get_managed_wrapper): Added
8489 2002-09-11 Martin Baulig <martin@gnome.org>
8491 * gc.c: Call GC_unregister_disappearing_link() on all links when
8492 finalizing them, this is necessary to aviod a crash in boehm's
8495 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8497 * gc.c: handle GetTarget for finalized objects spotted and fixed by
8500 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8502 * icall.c: implemented MonoType::Module.
8503 * reflection.c, reflection.h: mono_module_get_object () from
8504 Tomi Pakarinen <tomi.pakarinen@welho.com>.
8506 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8508 * icall.c: ignore overridden methods in GetMethods ().
8509 Fix for FieldInfo::SetValue().
8510 * object.c: handle float/double in runtime invoke.
8512 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8514 * object.c: allow a constructor to be called again on an object.
8516 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8518 * class.h, class.c: move field layout code to it's own function and
8519 export it. Get an interface id earlier. Move fields in MonoClass
8520 so they are more cache friendly and align the bitfields.
8521 * loader.c: temporary handle get_param_names() for a runtime method.
8522 * reflection.c, reflection.h: more code to handle runtime creation of
8525 2002-09-09 Martin Baulig <martin@gnome.org>
8527 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
8528 signature with the pinvoke field being set for the actual call.
8530 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8532 * icall.c: removed some unused icalls. Start of map of glib charsets
8533 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
8535 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8537 * debug-helpers.c: break infinite loop (found and fixed by
8538 Holger Arnold <harnold@gmx.de>).
8540 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8542 * icall.c: target may be null in create_delegate.
8544 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8546 * marshal.c: handle a boolean return type.
8548 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8550 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
8552 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8554 * gc.c: fix weakreferences.
8556 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
8558 * icall.c: added icall to get default codepage.
8560 2002-09-03 Dick Porter <dick@ximian.com>
8563 * threads.c: Use MonoThread instead of MonoObject where
8566 Store running thread objects in a hash table, so that we have all
8567 the info to hand when waiting for them to finish
8568 (means we don't need OpenThread() any more, so mingw builds should
8569 be fully functional again.)
8572 * object.h: Added thread ID to MonoThread
8574 2002-09-03 Martin Baulig <martin@gnome.org>
8576 * icall.c (System.Reflection.Assembly::get_location): New interncall.
8578 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8580 * icall.c: fixed leak in get_temp_path. Thanks lupus.
8582 2002-09-03 Martin Baulig <martin@gnome.org>
8584 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
8585 argument to store the end address of the disassembled instruction.
8587 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
8588 here from debug-symfile.h.
8589 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
8590 JIT into this struct.
8591 (MonoSymbolFile): Added `char *image_file' field.
8592 (MonoDebugGetMethodFunc): Removed.
8593 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
8594 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
8595 (mono_debug_find_method): New method.
8597 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
8598 create a full symbol file.
8599 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
8600 and static symbol files.
8601 (mono_debug_find_method): The symbol file keeps an internal method hash,
8602 call this to get a MonoDebugMethodInfo from a MonoMethod.
8604 * debug-symfile.[ch]: Removed.
8606 2002-08-29 Miguel de Icaza <miguel@ximian.com>
8608 * image.c (do_mono_image_open): Remove linker version check.
8610 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
8612 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
8613 wrappers for instance methods.
8615 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8617 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
8619 2002-08-28 Dick Porter <dick@ximian.com>
8621 * Makefile.am: Export HOST_CC for w32 builds
8623 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8625 * file-io.c process.c: MonoString are null terminated, no
8626 need for mono_string_to_utf16() anymore.
8628 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8630 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
8632 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
8634 * icall.c, reflection.h: speedup System.MonoType.
8636 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8638 * reflection.c: allow null as the value of a string argument in
8639 custom attributes constructors.
8641 2002-08-27 Martin Baulig <martin@gnome.org>
8643 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
8644 `trampoline_address' field.
8646 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
8648 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
8649 check (fixes bug #29486)
8651 2002-08-27 Martin Baulig <martin@gnome.org>
8653 * debug-mono-symfile.c: Changed the file format in a way that allows us
8654 open it read-only and to use a specially malloced area for all the
8655 dynamic data. We can now also generate a symbol file on-the-fly if we're
8656 debugging IL code and there is no MCS generated symbol file for it.
8658 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8660 * object.c: added a define for a good string and array
8661 creation speedup (not enabled by default because we need to deal with
8664 2002-08-26 Martin Baulig <martin@gnome.org>
8666 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
8667 function to create a dynamic symbol file. This is used by the
8668 debugger to create a symbol file for IL code on-the-fly.
8670 2002-08-26 Martin Baulig <martin@gnome.org>
8672 * loader.c (mono_lookup_pinvoke_call): Include the error message
8673 from g_module_error() in the error message.
8675 2002-08-24 Martin Baulig <martin@gnome.org>
8677 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
8678 function to update the symbol file. The symbol file is mmap()ed
8679 writable, but private. This allows us to install the symbol file
8680 together with the assembly.
8682 2002-08-24 Martin Baulig <martin@gnome.org>
8684 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
8685 but they can read the new symbol file format which mcs is now creating.
8687 * debug-symfile.c (mono_debug_find_source_location): Moved to
8688 debug-mono-symfile.c; this is now operating on the new symbol file.
8690 2002-08-23 Martin Baulig <martin@gnome.org>
8692 * debug-helpers.c (mono_method_desc_from_method): New function to get
8693 a MonoMethodDesc from a MonoMethod.
8695 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8697 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
8698 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
8700 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
8702 * string-icalls.[ch]: make helper methods static.
8704 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8706 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
8707 types to it and to SetValueInternal.
8709 * object.c: Moved handle_enum label to its proper place. This was the
8712 This time i compiled mcs and gtk-sharp and they both work.
8714 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8716 * icall.c: reverted partially my previous patch until
8717 object.c:set_value handles enums correcly.
8719 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8722 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
8723 (ves_icall_System_Environment_get_MachineName): removed warning when
8724 compiling under cygwin.
8726 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8728 * object.c: fixed field_get_value() for reference types.
8730 2002-08-22 Dick Porter <dick@ximian.com>
8732 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
8733 Don't free a buffer while it's still needed. Patch from Jonathan
8734 Liger <Jonathan.liger@wanadoo.fr>
8736 2002-08-21 Miguel de Icaza <miguel@ximian.com>
8738 * icall.c (ves_icall_System_Environment_get_Platform): Add new
8741 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
8743 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
8744 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
8746 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
8747 we call unmanaged code which throws exceptions.
8749 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8751 * appdomain.h: added per-domain entry_assembly.
8752 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
8754 * icall.c: Assembly::GetEntryAssembly icall.
8755 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
8756 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
8758 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8760 * appdomain.h, gc.c: added mono_domain_finalize ().
8762 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8765 (mono_print_unhandled_exception): changed g_warning by g_printerr
8766 because g_log has a 1024 characters limit (yeah, i got a big stack
8767 trace). Don't print exception name, that should be in ToString
8770 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8772 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
8773 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
8775 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8778 (mono_print_unhandled_exception): after previous commit, i realized
8779 that MS calls ToString on the exception. I changed this function to
8780 do that. This way we get stack_trace for free.
8782 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8785 (mono_print_unhandled_exception): invoke Message property instead of
8786 getting 'message' field from Exception. Don't allocate memory for
8787 'trace' and 'message' if not needed.
8789 2002-08-18 Dick Porter <dick@ximian.com>
8791 * unicode.c: Fix asserts to match Encoder.cs checks
8793 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8795 * marshal.c: fix unaligned store issue and a few wrong
8796 opcode argument types.
8798 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8800 * icall.c: added GetUninitializedObjectInternal internal call.
8802 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
8804 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
8805 to the right domain.
8807 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
8809 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
8811 * class.c (class_compute_field_layout): set blittable to false for Strings
8813 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
8815 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8817 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
8818 first chunk of code to create types at runtime. Code to
8819 handle ReflectedType/DeclaringType. Make reflection handles
8822 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
8824 * class.c: set correct name in arrays.
8826 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
8828 * appdomain.c (mono_domain_transfer_object): make it work with
8829 valuetypes. bug fixes.
8831 2002-08-12 Dick Porter <dick@ximian.com>
8833 * object.h: Rename some parameters to avoid c++ keywords (Patch
8834 from Joseph Wenninger <kde@jowenn.at>)
8836 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
8838 * icall.c: added icall to implement Assembly.GetFile*.
8840 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8842 * reflection.h, reflection.c: code to embed managed resources.
8844 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8846 * class.c: move all the type size stuff into
8847 class_compute_field_layout().
8849 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8851 * class.c: ensure enums have always the correct instance size.
8852 * unicode.c: remove wrong assert.
8854 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8856 * assembly.c: fix mem corruption issue.
8857 * image.h, image.c: added mono_image_get_resource () to access
8859 * icall.c: implemented Assembly.EntryPoint property and some
8860 Managed Resources related internalcalls.
8863 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8865 * image.c, image.h: impemented mono_image_get_entry_point ().
8866 * appdomain.c: use mono_image_get_entry_point.
8868 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8870 * reflection.c: support the object type argument when loading
8873 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
8875 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
8876 String as return type.
8878 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
8880 * reflection.c: fix encoding of named args for custom attrs to match
8881 the ms implementation. Read them back when instantiating custom
8884 2002-08-02 Radek Doulik <rodo@ximian.com>
8886 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
8887 by Dietmar as quick fix
8888 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
8889 16 as stack size, used on more places as quick fix before Dietmar
8890 will fix it properly
8892 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8894 * object.h, object.c: added accessors for fields and properties.
8896 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8898 * class.c, class.h: made mono_class_get_field_from_name ()
8899 loop on parent types.
8900 Added mono_class_get_property_from_name ().
8902 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8904 * class.c, class.h: move the code to setup the type vtable in its own
8905 function so that it can be reused also for types created at runtime.
8906 Eliminate the "class" identifier from the header file.
8907 * reflection.c: setup the vtable for enums so that we can create
8908 objects for use in SetConstant ().
8910 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
8912 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
8913 instead of the delegate itself as this pointer (bug #28383)
8915 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
8917 * marshal.c (mono_marshal_get_managed_wrapper): added return type
8920 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8922 * loader.c: don't set the pinvoke bit on icalls.
8924 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
8926 * debug-helpers.c (mono_method_full_name): only print a number to
8927 indicate wrapper type (so that the output is more readable in traces).
8929 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
8931 * class.c (mono_class_init): include method override patch from Paolo
8933 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
8935 * icall.c: fixed GetTypeCode().
8937 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
8939 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
8940 use real delegate invoke function to make it work with multicast
8941 delegates (fix bug# 28291).
8943 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8945 * object.c: load constant strings.
8947 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8949 * reflection.c: no magic numbers.
8950 * tabledefs.h: security action enum.
8952 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8954 * assembly.c: fix possible memory corruption.
8956 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8958 * reflection.h, reflection.c: added support for linking resources.
8959 * verify.c: check we have an updated corlib.
8961 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
8963 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
8965 (mono_marshal_string_array): null terminate unmanaged string arrays.
8966 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
8968 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8970 * icall.c: Type.GetType () can now return also types from the
8973 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8975 * loader.h, loader.c: stack walking support.
8976 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
8979 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
8981 * marshal.c: added optimisations for blittable types
8983 * class.c (mono_array_class_get): do not set blittable attribute on arrays
8984 (mono_class_setup_mono_type): set blittable attribute for single
8987 * marshal.c (mono_string_utf8_to_builder): impl.
8988 (mono_string_builder_to_utf8): impl.
8989 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
8991 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
8993 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
8994 (mono_marshal_get_managed_wrapper): impl. byref types
8996 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8999 (search_method): don't display debug message.
9001 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
9003 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
9005 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
9007 * appdomain.c: set the missing filename when throwing exception.
9009 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
9011 * metadata.c (mono_type_size): code cleanup
9012 (mono_type_stack_size): removed some test code
9014 2002-07-21 Miguel de Icaza <miguel@ximian.com>
9016 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
9017 mono_get_exception_file_not_found now.
9019 * exception.c (mono_exception_from_name_two_strings): New version
9020 that will call a constructor with two string arguments.
9021 (mono_get_exception_file_not_found): New helper routine, used to
9022 report file-not-found errors.
9024 2002-07-20 Dick Porter <dick@ximian.com>
9027 * process.c: Pass file handles to CreateProcess
9031 * file-io.c: Implemented CreatePipe
9033 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
9035 * metadata.c (mono_get_param_info): set alignment for value types
9037 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9039 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
9040 Constify mono_domain_assembly_open().
9041 * loader.c: handle null namespace in icalls.
9043 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
9045 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
9046 (emit_str_to_ptr_conv): marshal object as structs
9048 * metadata.c (mono_type_to_unmanaged): marshal object as structs
9050 * marshal.c (mono_marshal_get_runtime_invoke): support value types
9052 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
9054 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
9055 (mono_marshal_get_native_wrapper): we an now return value types
9057 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9059 * verify.c: more checks implemented.
9061 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
9063 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
9065 (mono_marshal_get_native_wrapper): allow byref arguments
9066 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
9067 impl. PtrToStringXXX methods
9068 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
9069 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
9070 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
9071 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
9072 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
9074 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9076 * reflection.c: fix buglet in parsing an assembly name.
9078 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
9080 * marshal.c (emit_ptr_to_str_conv): first impl.
9082 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9084 * object.c, class.h: cache the vtable in the class as suggested by
9085 vargaz@freemail.hu (Zoltan Varga).
9087 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9089 * class.h, loader.c: added mono_field_from_token().
9090 * verify.c: first cut of type checking code.
9092 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
9094 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
9096 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
9098 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
9100 (mono_marshal_get_remoting_invoke): impl.
9101 (mono_delegate_begin_invoke): impl.
9102 (mono_mb_emit_save_args): impl.
9103 (mono_delegate_end_invoke): impl.
9104 (mono_marshal_get_delegate_begin_invoke):
9105 (mono_marshal_get_delegate_end_invoke):
9106 (mono_marshal_get_delegate_invoke): generate a special name for
9107 those methods (including the signature) and associate them whith
9110 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
9113 (mono_reflection_type_from_name): now it has a MonoImage parameter
9114 which is used as the default image to search the type in. If the image
9115 is NULL or getting the type from it fails, it defaults to corlib.
9117 * icall.c: changed 1 call to mono_reflection_type_from_name to match
9120 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9122 * reflection.c: update the parameter table index.
9124 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
9126 * domain.c: don't include the mark byte in the string hash.
9128 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
9130 * icall.cs: icall for Type.GetTypeCode ().
9131 * verify: a couple of fixes and disabled local initialization checks.
9133 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
9135 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
9137 * debug-helpers.c (mono_method_full_name): print the type of the
9140 * metadata.c (mono_signature_hash): a hash function for signatures
9141 (mono_signature_hash): better hash algorithm
9143 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
9145 * debug-helpers.c (mono_method_full_name): this can now generate
9146 method names with signatures
9148 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
9149 method dont have this pointers.
9151 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9153 * reflection.c: fixup typebuilder tokens.
9154 * image.c: fix buglet.
9155 * marshal.h: remove whitespace.
9156 * metadata.h, metadata.c: reinstate code that was removed.
9157 * verify.c: handle catch directives and fix another couple of bugs.
9159 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
9161 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
9162 (mono_marshal_get_native_wrapper): make it comp. with the old code
9163 (mono_marshal_get_native_wrapper): support boolean
9164 (mono_marshal_get_managed_wrapper): support more types
9166 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
9168 * class.c (class_compute_field_layout): compute class->blittable attribute.
9170 2002-07-09 Dick Porter <dick@ximian.com>
9172 * threads.c: Make the thread cleaning up cope with threads that
9175 2002-07-08 Radek Doulik <rodo@ximian.com>
9177 * reflection.c (method_encode_code): use non-translated values to
9178 compute finally_start, this fixes exception handling on ppc, yay!
9180 * decimal.h (struct signscale): fix endianess
9182 2002-07-07 Radek Doulik <rodo@ximian.com>
9184 * reflection.c: swap box_val and not val
9186 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
9188 * reflection.c, reflection.h: handle full assembly info in type name.
9189 Handle Type arguments when loading custom attributes.
9190 * icall.c: updated to use new mono_reflection_type_from_name () method.
9192 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9195 (method_from_memberref): also print assembly name when method not found.
9197 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9200 (ves_icall_TypeGetProperties): fixed bug #27473.
9202 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9204 * reflection.c: display image name and token when cannot find the
9205 .ctor for an attribute.
9207 2002-07-05 Martin Baulig <martin@gnome.org>
9209 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
9211 2002-07-04 Dick Porter <dick@ximian.com>
9213 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
9214 compile on mingw. This will cause mingw builds to not wait for
9215 subthreads to terminate after the main thread does. I've lodged a
9216 bug with the mingw developers for them to wrap OpenThread().
9218 2002-07-03 Dick Porter <dick@ximian.com>
9220 * threads.c: Store thread IDs instead of handles, because
9221 GetCurrentThread() returns a pseudohandle and therefore stores
9222 useless values. mono_thread_cleanup() continues checking the
9223 array of threads until it is empty, to cope with subthreads
9224 spawning new threads after the main thread has finished.
9228 * profiler-private.h: Pass the thread ID to thread profiler
9229 functions, instead of a handle
9231 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9233 * verify.c: fixes to make it more usable.
9234 * pedump.c: added --verify code to verify IL code in an assembly.
9236 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9238 * reflection.c: turn errors into warnings to allow compiling corlib.
9240 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
9242 * reflection.c: add special cases to compile corlib.
9244 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9246 * reflection.c: handle properties with only a set method.
9248 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9250 * opcodes.h: add enum with opcodes in opval order.
9252 2002-07-01 Dick Porter <dick@ximian.com>
9255 * object.c (mono_runtime_run_main): Removed unneeded argument
9257 2002-06-28 Martin Baulig <martin@gnome.org>
9259 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
9261 2002-06-27 Dick Porter <dick@ximian.com>
9263 * threads.c: Store the handle in both the parent thread and in the
9264 subthread, to minimise the time between starting a new thread and
9267 2002-06-26 Dick Porter <dick@ximian.com>
9269 * appdomain.c (mono_runtime_cleanup): Close the socket library
9270 after all the threads have finished, not before
9272 2002-06-26 Martin Baulig <martin@gnome.org>
9274 * debug-symfile.c (mono_debug_find_source_location): Added
9275 `guint32 *line_number' argument. If it's not NULL, store the line number
9276 there and return the file name without the line number.
9278 2002-06-25 Dick Porter <dick@ximian.com>
9282 * process.c: Process forking and other support functions
9284 2002-06-25 Dick Porter <dick@ximian.com>
9286 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
9287 things dont happen when the image is closed.
9288 (mono_image_lookup_resource): Walk the resource section looking
9289 for a particular entry
9291 * cil-coff.h: PE resource section decoding
9293 2002-06-25 Dick Porter <dick@ximian.com>
9297 (mono_assembly_foreach): Accessor functions to walk the list of
9299 (mono_assembly_set_main):
9300 (mono_assembly_get_main): Process methods need to know which
9301 assembly is the "main" one
9303 * object.c (mono_runtime_run_main): Record the main assembly
9305 * debug-helpers.c: Fix typo
9307 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
9309 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
9310 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
9312 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9314 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
9316 2002-06-21 Miguel de Icaza <miguel@ximian.com>
9318 * image.c (do_mono_image_open): Initialize reference count,
9319 otherwise we leak the MonoImage.
9321 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
9323 * reflection.c: small tweak to handle self-hosting.
9325 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
9327 * reflection.c: fix type name parse code.
9329 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9331 * reflection.c: break out of the loop.
9332 * image.c: special case corlib.
9334 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9336 * reflection.c: add all the custom attrs at the end to ensure the
9337 ctors have been properly initialized when the attributes are defined
9338 in the current assembly.
9340 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9342 * reflection.c: handle correctly multiple-nested types.
9344 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
9346 * row-indexes.h: fix typos.
9347 * reflection.c: adjust for typos and fix method_def_or_ref
9348 encoding in MethodImpl table.
9350 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9352 * reflection.c: fix entry point patching (thanks Serge!).
9354 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
9356 * verify.c: add check for System.Exception
9358 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
9360 * image.c, class.c: minifix for code just c&p'ed.
9361 * reflection.c: warning fix.
9362 * object.h, loader.h, domain.c: load also StringBuilder.
9364 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9366 * marshal.h, marshal.c: some support code to handle complex marshaling.
9368 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9370 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
9371 Better signatures with vtable error dump.
9373 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
9375 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
9377 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
9379 * icall.c (ves_icall_Type_GetField): impl.
9381 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9383 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
9384 to retrieve a marshal description blob for a field or param.
9386 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
9388 * reflection.h, reflection.c: change order of nested type emission
9389 to avoid table corruption. The NestedTypes table is sorted.
9390 * icall.c: change order of GetConstructor results to workaround mcs bug.
9392 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9394 * reflection.h, reflection.c: handle field and param marshal
9397 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9399 * icall.c, marshal.c marshal.h: more Marshal class implementation.
9401 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9403 * reflection.c: fix call convention.
9405 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9407 * reflection.h, reflection.c: mono_image_get_memberref_token()
9408 takes a type instead of a class, now. Added
9409 mono_image_get_array_token() to create tokens for the special
9410 multi-dim array methods.
9412 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9414 * assembly.c: handle modules (no assembly table). Split
9415 loading references in its own function.
9416 * class.c: handle moduleref resolution scope.
9417 * image.c, image.h: cache module name in image.
9419 2002-06-07 Martin Baulig <martin@gnome.org>
9421 * reflection.c (mono_image_get_type_info): Only add a class layout entry
9422 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
9424 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9426 * icall.c: more signature fixes that used uint instead of int.
9428 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9430 * reflection.c: fixed signature of field refs.
9432 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9434 * class.c, reflection.c: handle typerefs of nested types
9435 (both on read and when writing files).
9437 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
9439 * icall.c: fix method signatures that tried to workaround the previous
9442 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9444 * debug-helpers.c: fix typo.
9446 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9448 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
9449 rewrote the PE/COFF writing code (our programs are understood by the
9452 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
9454 * gc.c, gc.h, icall.c: weakreference support.
9456 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9458 * Makefile.am, mono-config.c: use $(sysconfdir).
9460 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9462 * icall.c: changed default precision of Double.ToString() to 15.
9463 Fixed memory leak. Unified with Single.ToString.
9465 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
9467 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
9469 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
9471 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
9472 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
9473 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
9476 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9478 * debug-symfile.c, sysmath.c: yet more compilation fixes.
9480 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9482 * reflection.c, socket-io.c: more compilation fixes.
9484 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9486 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
9487 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
9488 unicode.c: warning and compiler compatibility fixes.
9490 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9492 * class.h, metadata.c: fixed warnings/compilation errors.
9494 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9496 * Makefile.am, mono-config.c, mono-config.h: configuration file
9498 * loader.c, loader.h: make Dll mapping configurable at runtime in the
9499 config file. Export methods to insert and lookup mappings.
9501 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
9503 * reflection.c: handle types and boxed objects in custom attr
9506 2002-05-30 Martin Baulig <martin@gnome.org>
9509 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
9511 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
9513 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
9514 to lookup the implmap row for a P/Invoke method.
9515 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
9516 P/Invoke method from the runtime on an as needed basis.
9518 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
9520 * metadata.c (mono_metadata_parse_signature): impl.
9522 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9524 * class.c: handle .pack directive.
9526 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
9528 * object.c: initialize static fields with RVA data.
9530 2002-05-25 Martin Baulig <martin@gnome.org>
9533 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
9535 2002-05-24 Martin Baulig <martin@gnome.org>
9538 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
9539 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
9540 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
9542 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9544 * object.c: special case string ctros in invoke.
9545 * gc.c: silly whitespace changes.
9547 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
9549 * threadpool.[ch]: impl. a threadpool that can
9550 be used by mint and mono.
9552 2002-05-22 Martin Baulig <martin@gnome.org>
9554 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
9555 The first argument is now a `MonoReflectionModuleBuilder *', the return
9556 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
9557 `methods' field to get the method builder. The `token' argument is the
9560 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
9561 invalid characters instead of g_assert_not_reached()ing. This seems
9562 to be the behaviour of mscorlib.
9564 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
9566 * object.c (mono_runtime_invoke_array): applied patch from Rachel
9567 Hestilow to fix bug #25104
9569 2002-05-21 Martin Baulig <martin@gnome.org>
9571 * debug-symfile.c (mono_debug_find_source_location): New function.
9572 Looks up an IL offset in the line number table and returns the source
9573 location as a string.
9575 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9578 (mono_double_ToStringImpl): changed %f by %g until we have something
9581 2002-05-21 Nick Drochak <ndrochak@gol.com>
9583 * icall.c : Use different name for Math.Pow's icall. Needed to check
9584 parameters first in C#.
9586 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9588 * icall.c, reflection.h: added icall to get info about an event.
9590 2002-05-20 Radek Doulik <rodo@ximian.com>
9592 * object.c (mono_value_box): don't use memcpy for boxing on BIG
9594 (mono_value_box): don't use memcpy for small sizes on
9595 architectures with unaligned access
9597 2002-05-20 Martin Baulig <martin@gnome.org>
9599 * reflection.c (mono_reflection_setup_internal_class): Don't crash
9600 if `tb->parent == NULL'.
9601 (mono_reflection_create_internal_class): New function. This is
9602 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
9605 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
9608 2002-05-19 Martin Baulig <martin@gnome.org>
9610 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
9611 argument to get the length, don't default to the array length.
9613 2002-05-18 Miguel de Icaza <miguel@ximian.com>
9615 * assembly.c (mono_assembly_setrootdir): New function used to
9616 override the MONO_ASSEMBLIES directory.
9618 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9620 * icall.c: ValueType_GetHashCode() initialize local var.
9622 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9624 * reflection.c: sort custom attributes table.
9626 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9628 * reflection.c: support named args in custom attributes (write support).
9630 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
9632 * reflection.c: fix finally position calculation.
9634 2002-05-15 Radek Doulik <rodo@ximian.com>
9636 * reflection.c: fixed endianess at many places
9638 * icall.c (ves_icall_InitializeArray): comment out debug msg
9640 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
9642 * object.c (mono_unhandled_exception): new function to handle
9643 unhandled exceptions.
9644 (mono_unhandled_exception): call the UnhandledException event.
9645 (mono_runtime_delegate_invoke): impl.
9647 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
9649 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
9650 returns the RVA, not the direct pointer to the data. Handle the case
9651 when the class size is fixed.
9653 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
9655 * reflection.c: fix some endianess issues.
9657 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
9659 * object.c (mono_runtime_invoke): is now able to catch exceptions.
9661 * threads.c (mono_thread_init): added a callback which is invoked
9664 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
9666 * icall.c: make GetHashCode return non-negative values.
9668 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
9670 * object.c, icall.c, gc.c: revert to address-based hashcode.
9672 2002-05-13 Miguel de Icaza <miguel@ximian.com>
9674 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
9676 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9678 * icall.c, class.c: special case <Module>.
9680 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
9682 * icall.c: fix bug in GetNow().
9684 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
9686 * object.c (mono_runtime_class_init): make sure that we call all
9687 static class constructors.
9689 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9691 * reflection.c: sort methodsemantics table.
9693 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
9695 * reflection.h, reflection.c: honour init locals setting.
9697 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
9699 * icall.c: copied Double ToStringImpl for Single ToStringImpl
9701 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9703 * reflection.c: support ContructorBuilders in attribute blob creation.
9705 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9707 * reflection.c: some changes to build a binary that can be run
9708 directly in windows.
9710 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9712 * loader.c: print a big message when an icall can't be found.
9714 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9716 * string-icalls.c: fix bug 24248.
9718 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
9720 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
9721 icall.c, reflection.h: separate assembly loading by pathname and by
9722 assembly name. Use the MONO_PATH env var to search for assemblies.
9724 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9726 * assembly.c, image.h: add some support for assemblies
9727 with multiple modules.
9728 * class.c, class.h: export mono_class_from_typeref().
9729 * loader.c: remove duplicated code and use mono_class_from_typeref(),
9732 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9734 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
9735 documentation says (the ECMA one is correct).
9737 2002-05-02 Dick Porter <dick@ximian.com>
9739 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
9740 Don't name the synchronisation mutex.
9742 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
9745 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
9746 Make the prototypes match.
9747 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
9751 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
9752 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
9753 all systems have tm.tm_zone, so use strftime() with %Z to print
9754 the timezone abreviation into a temp string.
9756 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
9757 rather than mono_array_addr() on a MonoString on Big Endian
9760 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
9762 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
9765 2002-04-30 Dick Porter <dick@ximian.com>
9767 * socket-io.c: Cope with SOCKET being an integer rather than a
9770 * threads.c: Added Thread_free_internal, to deal with thread
9771 handle cleanup. Moved calls to handle_store() and handle_remove()
9772 to start_wrapper(), so each can only be called once. Allocate
9773 synchronisation blocks with GC_malloc(), and use GC finalisation
9774 to close the handles.
9776 * icall.c: added System.Threading.Thread::Thread_free_internal
9778 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9780 * icall.c: support Environment.Exit, CommandLineArgs().
9782 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9784 * object.c, object.h: added mono_runtime_run_main () and
9785 mono_runtime_get_main_args () for use in System.Environment.
9787 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9789 * gc.c: fix thinko, enable actual finalization since the jit is now
9792 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9794 * gc.c, object.c: take into account that an object may be offset wrt the address
9795 returned by GC_malloc().
9797 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
9799 * image.c: handle files without entries in the assembly table (modules).
9801 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
9803 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
9804 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
9805 allowed to be null when it's System.Object class setup.
9807 2002-04-27 Martin Baulig <martin@gnome.org>
9809 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
9810 if `tb->parent == NULL' rather than crashing.
9812 2002-04-28 Nick Drochak <ndrochak@gol.com>
9814 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
9815 calling acos() where asin() should have been called.
9817 2002-04-26 Martin Baulig <martin@gnome.org>
9819 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
9820 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
9821 there's a subdirectory called `System', but we don't want to read that
9822 subdirectory as an assembly.
9824 2002-04-25 Martin Baulig <martin@gnome.org>
9826 * debug-symfile.c: Reflect latest MonoString changes.
9828 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9830 * rand.c, rand.h: instance method icalls need to have an explicit
9831 this pointer as first argument in the C implementation.
9833 2002-04-25 Nick Drochak <ndrochak@gol.com>
9835 * icall.c: Fix typo in map for GetNonZeroBytes
9837 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
9839 * string-icalls.c : String does now passes unit tests without any
9840 errors, the following changes has been made:
9842 Implemented replace methods.
9843 Renaming of methods to (try) follow the standard.
9844 Fixed compare ordinal
9845 Made all memory allocated directly to function instead of via icall function.
9846 Small performance fix in is_in_array function
9848 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
9850 c (mono_string_Internal_ctor_charp_int_int):
9851 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
9852 sindex < 0, throw ArgumentOutOfRangeException instead of
9853 ArgumentNullException.
9855 Added new check for length == 0, however
9856 I need to make it return String.Empty from the C code.
9858 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
9859 that calculate the length for us here.
9861 (mono_string_Internal_ctor_sbytep_int_int): Replaced
9862 mono_string_new_utf16 with mono_string_new, since value is utf8.
9864 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9866 * object.c: register the object for finalization if needed.
9867 Allocate one more char in the string for the terminating 0 char.
9869 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9871 * class.c, class.h, image.c: check if a type implemenst a destructor.
9872 Use the proper key for array class lookups.
9873 * icall.c: register the icalls in the System.GC class.
9874 * gc.c, gc.h: GC-related functions and icalls.
9876 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9880 * unicode.c: free some strings gotten from mono_string_to_utf8 and
9881 changed a couple of free () by g_free ().
9883 * decimal.c: one-liner in the comments for decimal2string ().
9885 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
9887 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
9889 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
9891 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
9892 * object.c (mono_runtime_invoke_array) : handle null in params
9894 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
9896 * string-icalls.c: fixed bug in split (one off bug)
9898 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
9900 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
9901 * icalls.c: added String::Equals as internal method
9903 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
9905 * threads.c: fixed bug in the double interlocked functions
9907 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
9909 * threads.c: implemented all of the new interlocked icalls.
9910 * string-icalls.c: fix a bug in insert.
9911 * icalls.c: added the icalls for interlocked, removed old string functions.
9913 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9915 * loader.c: fix off-by-one error when reading argument names.
9917 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9919 * profiler.c: win32 counter implementation (untested).
9920 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
9921 (the latter needs testing and more complete impl. from win32 folks).
9923 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
9925 * object.c: mono_array_new_full workaround mono_array_class_get
9928 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9930 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
9931 * object.h (mono_string_chars): Changed casting type.
9933 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9935 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
9936 method signatures to use gunichar2 instead of gint16.
9938 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
9940 * object.h, object.c: domain-specific versions of mono_object_new and
9943 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
9945 * object.c: changed String layout
9947 * string-icalls.c (mono_string_Internal_ctor_chara): added
9948 internal string constructors.
9950 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
9952 * threads.c: pass 'this' to the thread start routine.
9954 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9956 * string-icalls.c: fix IndexOf and LastIndexOf. Now
9957 InternalCompareStr don't call twice mono_string_cmp_char for the last
9958 character. Improved performance in mono_string_cmp_char.
9960 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9962 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
9963 code into its own library: libmonoruntime.
9965 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
9967 * object.h, object.c: changed array format so that szarrays do not
9968 require a bounds structure.
9969 * icall.c, appdomain.c: support for new szarray format.
9971 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9973 * metadata.c: compare also the retuns type when comparing signatures:
9974 we didn't do this as an optimization since really overloaded methods
9975 must differ also in the arguments, but this doesn't work with
9976 low-level IL code (or when using explicit conversion operators: see
9977 bug#23498 for an example).
9979 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9981 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
9983 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
9985 * icall.c: make MonoType::GetElementType its own icall.
9987 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9989 * icall.c: remove MonoMethod_get_Name().
9990 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
9993 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9995 * string-icalls.c: optimized a few methods.
9997 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9999 * icall.c: added all new string internal calls
10000 * string-icalls.c: added, new string internal call implementation.
10001 * object.c: added mono_string_new_size for allocating a string a size
10003 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
10005 * object.c (mono_object_isinst): use the same code as in the
10006 optimized x86 version.
10008 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
10010 * profiler.c: TSC-based timer code (faster and more accurate).
10011 Not hooked up in configure, yet (set USE_X86TSC to 1).
10013 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
10015 * profiler.c, profiler.h: track time spent compiling methods.
10016 * threads.c: track thread creation/destruction.
10018 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
10020 * profiler.c, profiler.h, profiler-private.h: profiling interface
10021 and sample implementation. Moved here so that it can be used also by
10024 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
10026 * reflection.c, reflection.h: keep types and other handles separate in
10027 the hash tables for referred tokens. Add guid for modules.
10029 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
10031 * assembly.c: fix bugs found with valgrind.
10032 * metadata.h, metadata.c: added mono_metadata_guid_heap().
10034 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
10036 * threads: added icall support for getting current domain for
10039 2002-04-13 Martin Baulig <martin@gnome.org>
10041 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
10042 (MonoDebugVarInfo): Added `index' field for register based addresses.
10043 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
10044 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
10045 `MonoDebugVarInfo *params' and `guint32 this_offset' with
10046 `MonoDebugVarInfo *this_var'.
10048 * debug-symfile.c (relocate_variable): New static function to write
10049 a location description for a local variable or method parameter.
10051 2002-04-12 Martin Baulig <martin@gnome.org>
10053 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
10054 stack offset and begin/end scope address of a local variable.
10055 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
10056 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
10057 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
10059 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
10060 Added new relocation types for start/end scope of a local variable.
10062 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
10064 * object.h: add mono_object_domain() macro.
10065 * reflection.c: handle typespecs.
10066 * icall.c: MonoMethod::get_Name() implementation.
10068 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
10070 * icall.c: String::GetHashCode() icall implementation.
10072 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
10074 * icall.c: String::IndexOfAny icall.
10075 * object.c, object.h: make array->max_length more useful.
10076 Intrduced mono_object_class() and mono_string_length() macros.
10078 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10080 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
10081 instead of g_unichar_isdigit.
10083 2002-04-11 Nick Drochak <ndrochak@gol.com>
10085 * icall.c: Implement a simple Double.ToString().
10087 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
10089 * appdomain.h: only io-layer.h is supposed to be included.
10090 * icall.c: explicitly import environ. Fix warning.
10092 2002-04-10 Nick Drochak <ndrochak@gol.com>
10094 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
10095 return true even if it's not Daylight Savings time.
10096 Only return false for the case where the function isn't
10097 implemented for a plaform (read Windows).
10099 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
10101 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
10104 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
10106 * mempool.c (mono_mempool_alloc): only use g_malloc when
10107 absolutely necessary.
10109 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
10111 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
10113 * class.c (mono_class_vtable): use domain mempool to allocate vtable
10114 (mono_class_proxy_vtable): use domain mempool
10116 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
10118 * appdomain.h, appdomain.c: split initialization that requires the
10119 execution engine support into mono_runtime_init().
10121 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
10123 * class.c (mono_class_init): don't include vtable inside MonoClass
10124 to save some memory, gather some statistics.
10125 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
10127 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
10129 * icall.c: internalcall implementation for ValueType.Equals().
10131 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
10133 * object.c (mono_message_init): moved
10134 (mono_runtime_exec_main): new arch. independent impl.
10135 (mono_runtime_invoke_array): new method - like
10136 mono_runtime_invoke, but you can pass an array of objects.
10137 (mono_remoting_invoke): new arch. independent impl.
10138 (mono_message_invoke): new arch. independent impl.
10139 (mono_runtime_class_init): new arch. independent impl.
10140 (mono_runtime_object_init): new arch. independent impl.
10142 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
10144 * metadata.c, object.c, reflection.c: documented the exported
10147 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
10149 * icall.c: simpler code to pass the assembly builder data to corlib.
10150 Implement GetNestedTypes() internalcall.
10152 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
10154 * class.c: warn if a type can't be loaded.
10156 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
10158 * image.h: typedef MonoImageOpenStatus
10159 * types.h: removed unused file
10161 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
10163 * icall.c: Enum_ToObject accepts enum value arguments.
10165 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
10167 * class.c: move initialization of properties, events and nested
10168 classes, so that they happen for interfaces, too.
10170 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
10172 * icall.c: cleanup some ugly casts in Array_SetValue*.
10174 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
10176 * icall.c: the values array fro enums is of the correct type, now.
10177 Implement (correctly) getFullName instead of assQualifiedName for
10179 * reflection.h, reflection.c: added mono_type_get_name ().
10181 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
10183 * assembly.c, image.h: for each MonoImage, record from wich assembly
10185 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
10186 Make Type.Assembly work.
10188 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
10190 * debug-symfile.h: use char* instead of gpointer to avoid
10193 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
10195 * icall.c (ves_icall_InternalExecute): impl. FielSetter
10196 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
10198 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
10200 * icall.c (mono_message_init): impl. (code cleanup)
10201 (ves_icall_InternalExecute): impl. FieldGetter
10203 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
10204 defined we call all (non-static)methods through the vtable.
10206 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
10208 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
10209 finalizer even though the memory is still referenced (and the chunk of
10210 memory is not freed).
10212 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
10214 * assembly.c: fix brokeness.
10216 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
10218 * class.c: kill some warnings. Check explicit interface method
10219 implementation also without considering the namespace.
10220 Load also literal strings in static class data.
10222 2002-03-29 Miguel de Icaza <miguel@ximian.com>
10224 * assembly.c (default_assembly_name_resolver): Kill memory leak.
10225 (default_assembly_name_resolver): Make the resolver take the
10226 "base" directory where the assembly was originally defined, so we
10227 can load DLLs that are in the same directory as the assembly that
10228 is being referenced.
10230 2002-03-28 Dick Porter <dick@ximian.com>
10236 * unicode.c: Warning cleanups
10238 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
10240 * object.h, reflection.h: use the correct type instead of MonoObject.
10242 2002-03-28 Martin Baulig <martin@gnome.org>
10244 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
10245 (mono_debug_update_symbol_file): Initialize classes if necessary.
10247 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
10249 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
10250 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
10252 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
10254 * assembly.h: fix function prototype.
10255 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
10256 * mono-endian.h: use const cast.
10258 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
10260 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
10262 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
10264 * loader.c: don't assert when a typeref can't be loaded, give
10265 a chance to the runtime to trow an exception instead.
10266 * loader.h: fix warning.
10268 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
10270 * class.c (mono_class_proxy_vtable): added proxy support
10272 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
10274 * icall.c: removed last of PAL calls, added System.Environment
10275 * file-io.h, file-io.c: MonoIO implementation
10276 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
10278 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
10280 * appdomain.c: do not use the byte marker in ldstr table lookup.
10281 * debug-helpers.c: allow two ':' to separate class and method name.
10282 * object.c: allocate arrays bounds with the GC, too.
10283 * verify: add a few more checks.
10285 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
10287 * reflection.c: output also literal strings. Allocate parameter data
10288 with GC_malloc() (thanks, Martin, for catching this!).
10290 2002-03-26 Martin Baulig <martin@gnome.org>
10292 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
10293 include the `this' offset in the `param_offsets'.
10295 2002-03-25 Martin Baulig <martin@gnome.org>
10297 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
10298 mono_debug_get_class() function to get the classes. Added new
10299 relocation types for arrays and strings.
10300 (mono_debug_get_class): New static function to search in all
10301 referenced assemblies for a metadata token.
10303 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
10305 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10307 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
10308 hold gc-allocated objects. Make the string heap a stream like the
10309 others. Removed duplicated code when writing stream info.
10310 Added asserts to catch possible buffer overflows. Set the sorted map
10311 for tables that need sorting. Added some documentation.
10313 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
10315 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
10316 for interned strings and vtables.
10318 2002-03-24 Martin Baulig <martin@gnome.org>
10320 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
10321 it in the array since it was created with g_slist_prepend().
10323 2002-03-24 Martin Baulig <martin@gnome.org>
10325 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
10326 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
10327 (mono_debug_method_from_token): Renamed to
10328 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
10329 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
10331 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
10334 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
10336 2002-03-24 Martin Baulig <martin@gnome.org>
10338 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
10339 (mono_debug_method_from_token): New func.
10341 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
10342 New interncall, calls mono_debug_local_type_from_signature().
10343 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
10344 calls mono_debug_method_from_token().
10346 2002-03-23 Martin Baulig <martin@gnome.org>
10348 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
10349 specifies the number of bytes to be converted, not the array size.
10350 Return the number of chars, not the number of bytes.
10351 (ves_icall_iconv_get_chars): The `byteCount' argument
10352 specifies the number of bytes to be converted, not the array size.
10354 2002-03-23 Martin Baulig <martin@gnome.org>
10356 * reflection.h (MonoReflectionSigHelper): New type.
10358 * reflection.c (mono_reflection_sighelper_get_signature_local),
10359 (mono_reflection_sighelper_get_signature_local): New functions.
10361 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
10362 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
10365 2002-03-23 Martin Baulig <martin@gnome.org>
10367 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
10368 is_writeable is set.
10369 (mono_raw_buffer_update): New function to write the modified map
10372 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
10374 * debug-symfile.c (mono_debug_update_symbol_file): Call
10375 mono_raw_buffer_update() when done writing.
10377 2002-03-23 Martin Baulig <martin@gnome.org>
10379 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
10381 * debug-symfile.c: Added support for arguments and local variables.
10383 2002-03-23 Dick Porter <dick@ximian.com>
10385 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
10386 protected by ifdefs, hence breaking the w32 build.
10388 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10390 * object.c: implement is_interned() the right way.
10392 2002-03-21 Martin Baulig <martin@gnome.org>
10394 * debug-symfile.[ch]: New files to handle debugging information
10395 files. There's also support to dynamically update these symbol
10396 files to include machine dependent information.
10398 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
10400 * threads.c (mono_thread_create): new function to create thread
10403 2002-03-20 Martin Baulig <martin@gnome.org>
10405 * icall.c (ves_icall_InternalInvoke): Create a new object if the
10406 method is a constructor.
10407 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
10408 points to ves_icall_InternalInvoke().
10410 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
10412 * file-io.c: Flush shouldn't throw exceptions.
10414 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
10416 * file-io.c: FileStream flush support; FileSetLength now
10417 restores file pointer.
10419 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10421 * class.c: set image for pointer classes.
10423 2002/03/19 Nick Drochak <ndrochak@gol.com>
10425 * sysmath.c: Forgot one.
10427 2002-03-18 Miguel de Icaza <miguel@ximian.com>
10429 * sysmath.c: Avoid redefining existing names.
10431 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
10433 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
10434 handled by runtime as icall rather than dllimport from libm.so
10435 * file-io.c, file-io.h: fixed handle argument type.
10437 2002-03-18 Dick Porter <dick@ximian.com>
10439 * reflection.c (mono_image_get_type_info): rename interface to
10440 iface, because of "#define interface struct" on windows.
10442 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
10444 * class.c, class.h: rename and export mono_ptr_class_get().
10445 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
10446 * reflection.c, reflection.h, icall.c: better/saner type name
10447 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
10450 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
10452 * class.c (mono_class_init): removed hardcoded GHC_SLOT
10454 * icall.c (ves_icall_InternalInvoke): impl.
10456 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10458 * reflection.c: output the interface map table, too.
10460 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
10462 * class.c (class_compute_field_layout): separate computation of
10463 static field layout
10465 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
10467 * icall.c: added System.Buffer support.
10468 * file-io.c: moved file icalls from PAL to FileStream.
10470 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
10472 * icall.c (ves_icall_System_Object_GetHashCode): impl.
10474 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
10476 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
10478 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10480 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
10482 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10484 * debug-helpers.{c,h}: moved here from monograph some useful functions
10485 to locate a method by name/signature in a class or image. Included
10486 also a small and flexible IL disassembler.
10488 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10490 * reflection.c: fixup tokens in methods with small header size, too.
10492 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
10494 * object.c (mono_string_to_utf8): remove assert(!error), instead
10497 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
10499 * icall.c: update to the new mono_Array_class_get interface.
10501 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10503 * appdomain.c, object.c: Boehm-GC enable.
10504 * icall.c: make get_data_chunk() support split data requests.
10505 Ensure a class is initialized in more cases. Return only the first
10506 property found in GetProperties() or the compiler gets confused.
10507 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
10508 * reflection.h, reflection.c: add fixup mechanism for field and method
10509 tokens. Initialize assembly->typeref in a single place. Output
10510 properties after events. Support custom attributes for events, too.
10511 Typo fix for paramter custom attrs.
10513 2002-03-07 Martin Baulig <martin@gnome.org>
10515 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
10517 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
10519 * class.c (mono_array_class_get): fix. for multi. dim. arrays
10521 2002-03-06 Martin Baulig <martin@gnome.org>
10523 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
10524 non-zero lower bounds. See testcases #F10-#F13.
10526 2002-03-05 Martin Baulig <martin@gnome.org>
10528 * exception.c (mono_get_exception_argument_out_of_range): New exception.
10530 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
10531 ves_icall_System_Array_GetValue(), only calculate the absolute array position
10533 (ves_icall_System_Array_SetValue): Likewise.
10534 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
10535 as argument and does the actual work. This function is used when copying a
10536 multi-dimensional array.
10537 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
10538 now do all the widening conversions of value types.
10539 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
10541 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10543 * class.c: remove some magic numbers and use the smbolic names,
10544 instead. Added init_events() to load event info at class init time.
10545 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
10546 and mono_metadata_methods_from_event().
10547 * reflection.h, reflection.c: added support for writing out the evnets
10548 related information.
10550 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
10552 * reflection.h, icall.c: use a different method (GetInterfaces)
10553 to gather interface info and add isbyref, isprimitive and
10554 ispointer to the ves_icall_get_type_info() return value.
10556 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10558 * class.h: stared adding support for events.
10559 * icall.c: split find_members implementation. Added debug icall to get
10560 the address of an object.
10561 * reflection.c: handle TypeBuilders in mono_type_get_object().
10563 2002-03-01 Martin Baulig <martin@gnome.org>
10565 * icall.c (ves_icall_System_Array_GetLength): This must throw an
10566 ArgumentOutOfRangeException(), not an ArgumentException().
10567 (ves_icall_System_Array_GetLowerBound): Likewise.
10568 (ves_icall_System_Array_GetValue): Improved argument checking.
10569 (ves_icall_System_Array_SetValue): Improved argument checking.
10571 2002-03-01 Martin Baulig <martin@gnome.org>
10573 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
10574 called with invalid arguments rather than just dying with g_assert().
10575 (ves_icall_System_Array_SetValue): Likewise.
10576 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
10577 raise a NotImplementedException instead.
10578 (ves_icall_System_Array_GetLength): Added argument checking.
10579 (ves_icall_System_Array_GetLowerBound): Added argument checking.
10581 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
10583 * object.h (mono_assert): new macros mono_assert and
10584 mono_assert_not_reached
10586 2002-02-28 Martin Baulig <martin@gnome.org>
10588 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
10589 and "System::String::IsInterned" to "System::String::_IsInterned".
10591 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
10593 * icall.c: remove hacks for typebuilder. Added icall to create a
10594 modified type from a tybebuilder.
10595 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
10596 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
10597 to create a backing MonoClass for a TypeBuilder.
10599 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10601 * class.c, class.h: more refactoring of class init.
10602 Export mono_class_setup_mono_type() and mono_class_setup_parent().
10604 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
10606 * marshal.c, marshal.h: start of marshaling interface.
10608 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10610 * icall.c: fix order in assembly qualified name icall.
10612 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10614 * class.c: do not free str, since we store it in the hash table.
10615 * reflection.h: add label field to MonoILExceptionInfo.
10616 * reflection.c: handle references to more than one assembly. Handle
10617 case when there isn't a module created in the assembly.
10619 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
10621 * class.c: Fix typo. Start refactoring of class init code.
10623 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
10625 * appdomain.c: exit with 1 on error.
10626 * class.c: we already have the name in MonoClassField.
10627 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
10628 MonoStreamHeader instead of an offset of image->raw_metadata.
10630 2002-02-26 Miguel de Icaza <miguel@ximian.com>
10632 * appdomain.c (mono_init): Be even more descriptive about the error.
10634 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
10636 * appdomain.c: give the user an informative message when corlib can't
10639 2002-02-26 Martin Baulig <martin@gnome.org>
10641 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
10642 New icall to get the time zone data.
10644 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10646 * reflection.c: set virtual and raw size of section correctly.
10647 * threads.c: transfer domain information to newly created threads.
10649 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10651 * class.c: when instancing a class in a domain, load the default
10652 vaules for static fields from the constant table. Fix System.Enum to
10654 * icall.c: implement Object::GetType() internalcall. Implemented
10655 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
10656 Fixed checking of binding flags in find_members().
10657 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
10658 * reflection.c: handle enumerations when writing to the constant
10659 table. Use a different object cache for types.
10662 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
10664 * object.c (mono_object_isinst): fix for arrays
10666 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
10668 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10670 * object.c: don't use mprotect () and fix intern pool hash table
10671 lookup for big endian systems.
10673 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10675 * icall.c: change type_is_subtype_of () signature.
10677 2002-02-21 Mark Crichton <crichton@gimp.org>
10679 * rand.c, rand.h: Added random number generator for
10680 System.Security.Cryptography classes.
10682 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
10684 * icall.c: Added System.Security.Cryptography calls.
10686 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10688 * class.c, icall.c, metadata.c: better support for pointer types.
10689 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
10690 * reflection.c: Add support for getting custom attrs for properties
10691 and simplify some code.
10693 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10695 * icall.c: change getToken () and add custom attribute GetBlob()helper
10697 * reflection.h: add custom attrs array to the reflection builder structures.
10698 * reflection.c: encode and emit custom attributes for all the relevant
10699 reflection objects. Cache fieldref and methodref tokens. Change
10700 mono_image_create_token() interface to take a MonoDynamicAssembly.
10701 More complete custom attributes decoder. Load custom attributes for
10702 Assembly, Field, Method and Constructor objects, too. Make the
10703 returned array an Attribute[] one, not object[]. Added
10704 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
10705 custom attribute constructor.
10707 2002-02-20 Dick Porter <dick@ximian.com>
10711 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
10712 problem code out for now).
10714 2002-02-19 Radek Doulik <rodo@ximian.com>
10716 * object.c (mono_ldstr): use hash table to avoid multiple swapping
10718 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
10720 * icall.c: register the GetCustomAttributes method.
10721 * object.c, object.h: add mono_string_new_len ().
10722 * reflection.h, reflection.c: added mono_runtime_invoke(),
10723 mono_install_runtime_invoke(). Added
10724 mono_reflection_get_custom_attrs () to load custom attributes and
10725 create the attribute objects.
10727 2002-02-19 Dick Porter <dick@ximian.com>
10728 * threads-dummy-types.c:
10729 * threads-dummy-types.h:
10732 * threads-pthread-types.c:
10733 * threads-pthread-types.h:
10734 * threads-pthread.c:
10735 * threads-pthread.h: Deleted obsolete files
10737 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
10739 * class.c (mono_class_vtable): runtime init the class when we
10740 allocate static class data.
10742 * icall.c (ves_icall_System_Array_SetValue): check for null values.
10744 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
10745 and String - but we will need generic marshalling support in the
10747 (mono_init): set the domain name in a ms compatible way
10749 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
10752 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
10754 * object.c (mono_array_clone): use alloca() instead of g_malloc
10757 * appdomain.c (mono_domain_unload): impl.
10759 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10761 * appdomain.c, object.c: fix intern pool implementation.
10762 * class.c: fix alignment code.
10764 2002-02-16 Radek Doulik <rodo@ximian.com>
10766 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
10767 and s2 > s1, just copy lower bytes to be compatible with little
10768 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
10769 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
10771 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
10772 force big_endian to be 1 for big endian machines
10773 (ves_icall_iconv_new_decoder): ditto
10775 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
10777 * socket-io.c (convert_sockopt_level_and_name): If the system
10778 doesn't define SOL_IP or SOL_TCP, get them by hand using
10779 getprotobyname() and caching the values (because this could be a
10781 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
10782 Use the appropriate struct when the system does support it. Ie,
10783 not all systems have struct ip_mreqn so use struct ip_mreq when
10786 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
10788 * reflection.c: handle finally clauses.
10790 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
10792 * socket-io.c: use g_snprintf() instead of snprintf.
10794 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
10796 * reflection.c (mono_param_get_objects): Cast second argument to
10797 mono_method_get_param_names to a const char** to silence the
10800 * appdomain.c (mono_domain_assembly_open): Put parens around the
10801 truth statement in the for-loop.
10803 * unicode.c (iconv_convert): Got rid of a compiler warning about
10804 int i being unused when the system has a new iconv.
10805 (iconv_get_length): Same.
10807 * image.c (load_class_names): Cast the second argument to
10808 g_hash_table_insert() to char* to hush compiler warnings about the
10810 (mono_image_open): Same here.
10812 * socket-io.c: Don't conditionally include sys/filio.h or
10813 sys/sockio.h here anymore since we now get them from
10814 io-layer/io-layer.h
10815 (inet_pton): If the system doesn't support inet_aton, implement
10816 using inet_addr and also #define INADDR_NONE if it isn't defined
10819 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10821 * metadata.c, metadata.h: added function to get packing and size info
10823 * reflection.h, reflection.c: handle field RVA data. Save info about
10824 the table layout if needed. Assign typedef indexes to all the types
10825 before dumping the info about them to avoid forward reference problems.
10827 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
10829 * socket-io.c (convert_sockopt_level_and_name): ifdef
10830 SO_ACCEPTCONN because it is not defined on my system (old debian)
10832 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10834 * opcode.c: use stddef.h to get NULL.
10836 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
10838 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
10839 for FIONBIO, FIONREAD and SIOCATMARK.
10840 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
10841 define INADDR_NONE and besides, inet_addr() is deprecated and
10842 should not be used. Use inet_pton() instead - it also has the
10843 added bonus that it can easily handle IPv6 addresses as well.
10844 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
10846 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10848 * decimal.c: remove _MSC_VER conditional.
10850 2002-02-13 Dick Porter <dick@ximian.com>
10853 * icall.c: Internal calls for Blocking, Select, Shutdown,
10854 GetSocketOption and SetSocketOption
10856 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10858 * assembly.cs: better resolver: use it instead of some kludgy
10861 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
10863 * reflection.c: the best way to speed-up the compiler is to avoid
10866 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
10868 * class.c (mono_class_vtable): changed the object layout
10869 (obj->vtable->class).
10870 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
10872 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10874 * assembly.c: look for assemblies in the assembly dir, too.
10876 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10878 * class.c: fix thinko in mono_class_from_type().
10880 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10882 * exception.h, exception.c: added TypeLoadException.
10883 * object.h, object.c: added mono_array_clone ().
10884 * icall.c: handle throwOnError in AssemblyGetType().
10885 Added Array.Clone().
10886 * opcode.h, opcode.c: use a single value for the opcode val.
10887 Compile fix for non-gcc compilers.
10889 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
10891 * opcodes.c, opcodes.h: export interesting info about opcodes.
10893 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
10895 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
10898 * class.c (class_compute_field_layout): set element_class for enums
10899 (mono_class_create_from_typedef): set element_class for normal classes
10901 * icall.c (ves_icall_System_Enum_get_value): impl.
10903 * class.c (mono_class_create_from_typedef): do not set valuetype
10904 flag for System.ValueType and System.Enum
10906 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
10908 * unicode.c (iconv_convert): fix big endian problem.
10910 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10912 * class.c: add asserts if we are ever going to scribble over memory.
10913 * socket-io.c: not all systems have AF_IRDA defined.
10915 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
10917 * class.c (class_compute_field_layout): do not consider static
10918 fields to compute alignment
10920 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
10922 * appdomain.c (mono_appdomain_get): impl.
10923 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
10925 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10927 * icall.c: ignore "file://" prefix when loading an assembly.
10929 2002-01-23 Dick Porter <dick@ximian.com>
10933 * Makefile.am: Added socket support
10935 2002-01-23 Miguel de Icaza <miguel@ximian.com>
10937 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
10938 code back. This should return the assemblies that are loaded by
10939 the runtime on behalf of an application domain.
10941 The current implementation is still broken, it just returns every
10942 assembly loaded, but until we get real applications domain this
10945 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
10947 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
10950 2002-01-23 Miguel de Icaza <miguel@ximian.com>
10952 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
10953 the mono_class_from_name lookup.
10954 (ves_icall_get_parameter_info): ditto.
10955 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
10957 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
10959 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10961 * class.c: load also nested classes on class init.
10962 System.ValueType instance methods gets passed boxed
10963 values, unless methods in derived classed that get a pointer to the
10965 * icall.c: use better name parsing code in GetType().
10966 * image.c, image.h: add mono_image_loaded ().
10967 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
10968 * reflection.c, reflection.h: added mono_reflection_parse_type().
10970 2002-01-22 Veronica De Santis <veron78@interfree.it>
10972 * icall.c : Added mapping of internal calls for Manual and Auto reset events
10973 * threads.c : Added the implementation of internal calls for events
10974 * threads.h : Added prototypes of internal calls for events
10976 2002-01-21 Radek Doulik <rodo@ximian.com>
10978 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
10980 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
10982 * class.c (mono_class_init): set min_align to 1 (instead of 0)
10983 (mono_class_value_size): use min_align
10985 2002-01-20 Dick Porter <dick@ximian.com>
10988 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
10989 so it compiles on w32.
10991 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
10993 * metadata.c (mono_type_stack_size): impl.
10995 * class.c (mono_class_get_field): impl. memberref token
10997 2002-01-16 Veronica De Santis <veron78@@interfree.it>
10999 * icall.h : Added the internal calls mapping for CreateMutex_internal
11000 and ReleaseMutex_internal.
11001 * threads.h : Added the prototype of mutexes internal calls.
11002 * threads.c : Added the implementations of mutexes internal calls.
11004 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
11006 * metaparse.h: removed unused file.
11007 * reflection.c, reflection.h: added stream_data_align () function
11008 to align data in streams and keep stream aligned. Add support for
11009 exception support in method headers.
11011 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
11013 * unicode.c: make iconv_convert () return the number of bytess written
11014 in the output buffer.
11016 2002-01-15 Dick Porter <dick@ximian.com>
11017 * threads.c: Make the runtime's idea of infinite timeouts coincide
11018 with the class library's
11020 Fix a particularly egregious bug in mono_thread_cleanup(). That
11021 code was so utterly bogus it must have been written on a Monday.
11023 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
11025 * reflection.h: add subtypes field to TypeBuilder.
11026 * reflection.c: encode constants for literal fields.
11027 Handle subtypes. Fix user string token (and add a zero byte)
11030 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
11032 * class.c (mono_class_init): bug fix: assign slot numbers for
11035 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
11037 * reflection.c: don't try to output a code RVA for abstract methods.
11038 Small fixes for method header format. Output parameter info to the
11039 ParamDef table. Save method overriding info to MethodImpl table.
11040 Fix property support. Allow typedef.extends to be a type in the
11042 * verify.c: fix off-by-one error.
11044 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
11046 * class.c: fix mono_class_from_mono_type () for szarray types.
11047 Remove unused cache check in mono_class_from_type_spec().
11048 * icall.c: *type_from_name () functions handle simple arrays and byref.
11049 * reflection.c: handle byref and szarray types. Handle methods without
11050 body (gets P/Invoke compilation working). Handle types and fields in
11052 * reflection.h: add rank to MonoTypeInfo.
11054 2002-01-10 Dick Porter <dick@ximian.com>
11056 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
11059 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
11061 * icall.c: initialize class in type_from_handle ().
11062 Loop also in parent classes for get_method ().
11063 * reflection.c: properly encode class and valuetype types.
11064 Start on encoding TypeBuilder types. Handle fieldrefs.
11065 Use correct length when registering a user string.
11066 Handle ConstructorBuilder and MonoMethod in get_token ().
11067 Make mono_type_get_object () aware of cached types.
11068 * object.c: back out change to mono_string_new ().
11070 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
11071 * object.c: mono_string_new should return a NULL when the string
11072 passed in is NULL -- not try to deference it.
11074 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
11076 * icall.c: hack to make IsSubType work for TypeBuilders.
11077 * reflection.c: emit constructors before methods.
11078 Retrieve param names in mono_param_get_objects().
11080 2002/01/05 Nick Drochak <ndrochak@gol.com>
11082 * Makefile.am: fix list of headers and sources so automake 1.5
11083 doesn't complain. Removed \# at end of list.
11085 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
11087 * reflection.c: get token for a method ref. Set return type of
11088 constructor to void.
11089 * loader.c: debug message.
11090 * class.c: typo fix.
11092 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
11094 * icall.c: fix array init with rank > 1. FindMembers
11095 loops in parent class as well.
11096 * image.c: do not insert nested types in name cache.
11097 * reflection.c: warning fix.
11098 * reflection.h: add override method (for interface impl).
11100 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
11102 * metadata.c: fix customattr decoding.
11104 2001-12-21 Miguel de Icaza <miguel@ximian.com>
11106 * rawbuffer.cs: Added native Win32 implementation, avoids using
11107 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
11109 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
11111 * class.c: make the low-level routines handle the cache.
11113 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
11115 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
11117 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
11119 * class.c: fix mono_array_element_size() for objects.
11120 * class.h, class.c: add properties to MonoClass and load them
11122 * icall.c: check with isinst() when assigning a value to an array
11123 instead of requiring the classes to match exactly.
11124 Implemented icall for System.Type::GetType().
11125 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
11126 enums. Handle bindingflags when looking for methods and fields.
11127 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
11128 and mono_metadata_methods_from_property().
11129 * reflection.h, reflection.c: added structures for propreties,
11130 parameters and enums. Implemented mono_property_get_object() and
11131 mono_param_get_objects().
11133 2001-12-18 Dick Porter <dick@ximian.com>
11135 * file-io.c: Use mono_string_to_utf16() instead of
11136 mono_string_chars()
11138 * object.c: Added mono_string_to_utf16(), which copies the non
11139 NULL-terminated MonoString into a new double-null-terminated
11142 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
11144 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
11146 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
11148 * file-io.c: raise exceptions if handle is invalid.
11150 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
11152 * assembly.c: yet another check for mscorlib.
11153 * class.c, class.h: load nesting info for classes.
11154 * icall.c: many new functions to support the Reflection classes.
11155 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
11156 * reflection.h, reflection.c: mono_image_create_token(),
11157 mono_assembly_get_object(), mono_type_get_object(),
11158 mono_method_get_object(), mono_field_get_object(): methods to return
11159 objects that parallel the C representation of assemblies, types,
11162 2001-12-11 Dick Porter <dick@ximian.com>
11165 * file-io.c: Internal calls for file IO.
11167 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
11169 * tabledefs.h: missing FileAttributes.
11170 * verify.h, verify.c: use is_valid_string () to simplify and check for
11171 valid strings more correctly. Fix warnings and speeling.
11172 Check more tables: Filed, File, ModuleRef, StandAloneSig.
11173 Check code: branches, maxstack, method calls.
11175 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
11177 * object.c (mono_object_allocate): removed static, so that the jit
11178 can allocate value types.
11180 * icall.c (ves_icall_System_DateTime_GetNow): impl.
11182 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
11184 * class.c: init enum types right away and register the
11185 token->MonoClass map in mono_class_create_from_typedef ().
11186 * verify.h, verify.c: first cut of the verifier.
11187 * pedump.c: add --verify switch to verify metadata tables.
11188 * tabledefs.h: add some missing enums.
11190 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
11192 * class.c (mono_install_runtime_class_init): impl.
11193 (mono_class_init): renamed mono_class_metadata_init to
11194 mono_class_init, also removed the metadata_inited flag
11196 * object.c (mono_object_isinst): use faster algorithm
11198 2001-11-30 Radek Doulik <rodo@ximian.com>
11200 * mono-endian.h: reverted last change
11201 added function prototypes
11203 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
11204 add mono-endian.c back
11206 * mono-endian.c: returned back, as Paolo pointed out, it's needed
11207 for unaligned access, I've mistaked it with endianess. I am
11209 (mono_read16): fix reverted endianess
11210 (mono_read64): ditto
11211 (mono_read32): ditto
11213 2001-11-30 Dick Porter <dick@ximian.com>
11215 * exception.c: Implement mono_exception_from_name()
11217 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
11219 * metadata.h, metadata.c: remove params_size and locals_size and their
11220 calculation from the metadata code: they are only usefult to the
11223 2001-11-29 Radek Doulik <rodo@ximian.com>
11225 * object.c (mono_ldstr): swap bytes here, it's probably not the
11226 best place, but works for me now, I'll redo it once I know mono
11227 better, also note that I add PROT_WRITE and don't reset back, also
11228 note that it's only affects big endians, so x86 should be OK
11230 * mono-endian.h (read16): use just glib macros for both endians
11232 * mono-endian.c: removed as glib macros are used in in
11233 mono-endian.h so we don't need to care about endianess for read
11234 macros as glib does that for us already
11236 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
11238 * class.h, class.h: take minimum alignment into consideration so
11239 that the fields of a class remain aligned also when in an array.
11241 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
11243 * loader.h, loader.c: add mono_method_get_param_names().
11244 * class.c: 0-init class fields.
11246 2001-11-26 Dick Porter <dick@ximian.com>
11250 * threads.c: New file that handles System.Threading on all platforms
11253 * object.h: Remove the synchronisation struct from MonoObject,
11254 replace it with a pointer that gets initialised on demand
11256 * Makefile.am: Replace all the system-specific threading code with
11257 a single file that uses the new wrapper library
11259 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
11261 * class.c, class.h: add mono_install_trampoline() so that the runtime
11262 can register a function to create a trampoline: removes the ugly
11263 requirement that a runtime needed to export arch_create_jit_trampoline.
11264 * object.h, object.c: added mono_install_handler() so that the runtime
11265 can install an handler for exceptions generated in C code (with
11266 mono_raise_exception()). Added C struct for System.Delegate.
11267 * pedump.c: removed arch_create_jit_trampoline.
11268 * reflection.c: some cleanups to allow registering user strings and
11269 later getting a token for methodrefs and fieldrefs before the assembly
11271 * row-indexes.h: updates and fixes from the new ECMA specs.
11273 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
11275 * class.h, class.c: add enum_basetype field to MonoClass.
11276 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
11277 to get index in the constant table reated to a field, param or
11279 * reflection.h, reflection.c: handle constructors. Set public-key and
11280 version number of the built assembly to 0.
11281 * row-indexes.h: update from new ECMA spec.
11283 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
11285 * class.h, class.c: add a max_interface_id to MonoClass.
11286 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
11287 since it's used to do that. Added mono_type_type_from_obj().
11288 Make GetType() return NULL instead of segfaulting if the type was not
11289 found. Handle simple arrays in assQualifiedName.
11290 * object.h: add a struct to represent an Exception.
11291 * reflection.c: output call convention in method signature.
11292 Add code to support P/Invoke methods and fixed offsets for fields.
11294 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
11296 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
11298 * icall.c: use mono_array_addr instead of array->vector: fixes the
11299 reflection image writing.
11300 * reflection.c: init call convention byte to 0 in method signature.
11301 Encode the property signature. Don't output property-related methods
11302 twice. Really process the properties for a type (don't cast a field to
11303 a property, my mom always told me that).
11304 Fix 64 bit issues in pointer alignment in a different and more
11307 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
11309 * loader.h: Removed type class from MonoDefaults, added monotype
11311 * loader.c: Loaded MonoType, removed loading of Type
11313 * icall.c (my_mono_new_object): Now returns a System.MonoType,
11314 and fills in System.Type._impl with a RuntimeTypeHandle rather
11315 than the actual MonoClass *
11317 (ves_icall_type_from_handle): change from type_class to
11320 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
11323 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
11326 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
11328 (ves_icall_System_Reflection_Assembly_GetType): implemented
11330 (ves_icall_System_MonoType_assQualifiedName): implemented
11332 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
11334 2001-11-09 Miguel de Icaza <miguel@ximian.com>
11336 * assembly.c (mono_assembly_open): Implement a cache for the
11339 (mono_assembly_close): only destroy the assembly when the last
11342 2001-11-09 Dick Porter <dick@ximian.com>
11344 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
11346 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
11348 * class.c (mono_class_metadata_init): bug fix: compute the right slot
11350 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
11352 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
11353 from Martin Weindel.
11354 * object.h: add mono_string_chars ().
11356 2001-11-07 Miguel de Icaza <miguel@ximian.com>
11358 * reflection.c (build_compressed_metadata): Eliminates warnings
11359 and uses 64-bit clean code.
11361 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
11362 (mono_type_equal): Change signature to eliminate warnings.
11364 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
11366 * icall.c, loader.c: remove the internalcall array constructors.
11367 Changes to match the new MonoArray structure.
11368 * object.h, object.c: an array object doesn't allocate an extra
11369 vector. Add mono_array_new_full () to create jagged arrays easily.
11371 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
11373 * metadata.h, metadata.c: add mono_metadata_field_info () to
11374 retreive all the info about a field from vairous tables.
11375 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
11376 * class.h, class.c: augment MonoClassField with more info.
11377 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
11378 policy and load a field's RVA if needed.
11380 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
11382 * class.c (mono_class_metadata_init): create a trampoline for all
11383 virtual functions instead of actually compiling them.
11385 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
11387 * class.h, class.c: include name in MonoClassField.
11388 * class.c: fix fundamental type of System.Object and System.String.
11389 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
11391 * icall.c: remove internalcalls for the Reflection stuff that is now
11393 * loader.c: mono_field_from_memberref () implementation.
11394 * mono-endian.c: thinko (s/struct/union/g).
11395 * object.c, object.h: make the mono_string_* prototypes actually use
11396 MonoString instead of MonoObject.
11397 * reflection.c, reflection.h: updates for changes in the reflection
11398 code in corlib: we use C structures that map to the actual C# classes.
11399 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
11400 fat method header if needed and use the info from the ILGenerator for
11401 methods. Handle fields in types. Misc fixes.
11403 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
11405 * class.c (mono_class_metadata_init): bug fix: always allocate
11406 space for static class data
11408 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
11410 * class.c (mono_compute_relative_numbering): use relative
11411 numbering to support fast runtime type checks.
11413 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
11415 * class.c (mono_class_create_from_typeref): added debugging output
11416 to print class name when MonoDummy is returned instead of real class
11418 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
11420 * class.c (mono_class_metadata_init): interface offset table now
11421 contains pointers into the vtable - this is more efficient for the jit
11423 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
11425 * class.c (mono_class_metadata_init): use a temporary vtable (the
11426 old algorithm only worked for the interpreter, but not for the jit)
11428 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
11430 * loader.c (method_from_memberref): use mono_class_get to get the
11431 class of an array instead of using System.Array directly.
11432 (mono_get_method): also add MEMBERREF methods to the method cache
11433 which usefull for arrays.
11435 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
11437 * pedump.c (arch_compile_method): added to compute vtable entry
11439 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
11440 number of interfaces.
11442 * class.h: merged MonoArrayClass into MonoClass
11444 * class.c (mono_class_create_from_typedef): compute the vtable size and
11445 allocate space to include the vtable inside MonoClass
11446 (mono_class_metadata_init): initialize the vtable
11448 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
11450 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
11451 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
11452 * image.c: endian fixes by Laurent Rioux.
11453 * object.h, object.c: rename MonoStringObject to MonoString and
11454 MonoArrayObject to MonoArray. Change some function names to conform to
11455 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
11456 guint16* as first argument, so don't use char*.
11457 Provide macros to do the interesting things on arrays in a portable way.
11458 * threads-pthread.c: updates for the API changes and #include <sched.h>
11459 (required for sched_yield()).
11460 * icall.c: updates for the API changes above.
11461 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
11462 platforms that need them.
11464 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11466 * class.c: set the correct type for all the fundamental
11467 type when loading the class.
11469 2001-10-05 Dick Porter <dick@ximian.com>
11471 * threads-pthread.c (pthread_mutex_timedlock): Simple
11472 compatibility version for C libraries that lack this call.
11474 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11476 * class.c: MonoTypes stored in MonoClass are stored as
11477 fundamental MonoTypes when the class represents a
11478 fundamental type (System.Int32, ...).
11479 The TypeHandle return by ldtoken is a MonoType*.
11480 * icall.c: ves_icall_get_data_chunk () write out all the
11481 PE/COFF stuff. Implement ves_icall_define_method (),
11482 ves_icall_set_method_body (), ves_icall_type_from_handle ().
11483 * image.c: properly skip unknown streams.
11484 * loader.h, loader.c: add type_class to mono_defaults.
11485 * metadata.c, metadata.h: export compute_size () as
11486 mono_metadata_compute_size () with a better interface.
11487 Typo and C&P fixes.
11488 * pedump.c: don't try to print the entry point RVA if there is no entry point.
11489 * reflection.c, reflection.h: many cleanups, fixes, output method
11490 signatures and headers, typedef and typeref info, compress the metadata
11491 tables, output all the heap streams, cli header etc.
11492 * row-indexes.h: typo fixes.
11494 2001-10-04 Dick Porter <dick@ximian.com>
11496 * object.h: Add a synchronisation mutex struct to MonoObject
11498 * object.c (mono_new_object): Initialise the object
11499 synchronisation mutexes
11501 * icall.c: System.Threading.Monitor internal calls
11503 * threads-pthread.h:
11504 * threads-pthread.c: System.Threading.Monitor internal calls
11506 * threads-types.h: New file, includes the system-specific thread
11509 * threads-pthread-types.h:
11510 * threads-pthread-types.c: New files, handle pthread-specific
11511 synchronisation types
11513 * threads-dummy-types.h:
11514 * threads-dummy-types.c: New files of dummy support for
11515 thread-specific types
11519 * pedump.c: include mono-endian.h not endian.h
11521 * Makefile.am: More threads files.
11522 Name mono-endian.h not endian.h
11524 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
11526 * Makefile.am, reflection.h, reflection.c: move here the reflection related
11527 stuff and implement a few more bits.
11528 * icall.c: a field needs to be dereferenced twice. Do not use the same
11529 name for two variables in the same scope.
11530 * image.c, image.h: cleanups.
11532 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
11534 * class.c (mono_class_metadata_init): bug fix: compute the right size
11536 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
11538 * icall.c: implemented some of the Reflection internalcalls.
11539 * image.c, image.h: start writing out the PE/COFF image.
11540 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
11541 that does the reverse than decode_blob_size ().
11542 * object.c: use mono_metadata_encode_value (). Move here
11543 temporary implementation of mono_string_to_utf8 ().
11544 * rawbuffer.c: make malloc_map static.
11546 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11548 * metadata.c: fix type comparison for arrays.
11549 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
11550 Added a couple of new classes to monodefaults.
11551 * icall.c: added a couple of Reflection-related internalcalls.
11552 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
11553 Added a byval_arg MonoType to MonoClass.
11555 2001-09-28 Dick Porter <dick@ximian.com>
11558 * threads-pthread.h:
11559 * threads-pthread.c: Implemented internal calls for
11560 LocalDataStoreSlot operations. Applied mutexes around all shared
11561 data. Reworked the thread creation and Start() operations to
11562 avoid a race condition.
11565 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
11567 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
11569 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
11571 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
11573 * class.c, loader.c: warn and return NULL instead of erroring out.
11574 * icall.c: added System.AppDomain::getCurDomain().
11575 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
11577 2001-09-25 Dick Porter <dick@ximian.com>
11579 * threads-pthread.h:
11580 * threads-pthread.c: Implemented timed thread joining and added
11581 System.Threading.Thread::Join_internal internal call
11583 * icall.c: Added System.Threading.Thread::Join_internal internal call
11586 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
11588 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
11590 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
11591 mono_string_intern () to implement the semantics of the ldstr opcode
11592 and the interning of System.Strings.
11593 * icall.c: provide hooks to make String::IsIntern and String::Intern
11596 2001-09-23 Dick Porter <dick@ximian.com>
11599 * threads-dummy.h: New files of dummy threading routines
11601 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
11602 support code based on system specifics
11604 Rename PTHREAD_LIBS to THREAD_LIBS
11606 2001-09-23 Dick Porter <dick@ximian.com>
11608 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
11609 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
11611 (mono_thread_init): Set up a Thread object instance to return when
11612 the main thread calls Thread.CurrentThread
11613 (mono_thread_cleanup): Wait for all subthreads to exit
11615 * icall.c: New internal calls for System.Threading.Thread::Sleep
11616 (including Schedule) and CurrentThread
11618 * threads.h: New file, to insulate thread-specific stuff from the
11621 2001-09-21 Dick Porter <dick@ximian.com>
11623 * threads-pthread.h:
11624 * threads-pthread.c: New file, for handling pthreads-style
11625 threading support. Start() now starts a new thread and executes
11626 the ThreadStart delegate instance.
11628 * icall.c: Added the internalcall for
11629 System.Threading.Thread::Start_internal
11631 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
11633 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
11635 * loader.c: work around the different signatures for delegates
11636 constructors csc generates in compiled code vs the ones compiled in mscorlib.
11638 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11640 * class.h, class.c: add mono_class_get_field_from_name ().
11641 * *: Fix C comments and other ANSI C issues.
11643 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
11645 * endian.h, assembly.c: fix some endianness issues.
11647 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
11649 * loader.h, load.c: add delegate_class to mono_defaults.
11650 Handle runtime provided methods in mono_get_method ().
11652 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
11654 * loader.c (mono_get_method): use pinvoke for internal call
11656 * icall.c: use pinvoke for internal call
11658 * loader.c (method_from_memberref): set the method name
11660 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
11662 * metadata.c: help the compiler generate better code for
11663 mono_class_from_mono_type ().
11665 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
11667 * class.c (mono_class_metadata_init): delayed computing of the
11668 class size to mono_class_metadata_init ()
11670 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
11672 * class.c, class.h: add an interfaces member to MonoClass.
11673 * image.c, image.h: add assembly_name field to MonoImage
11674 from the assembly table.
11675 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
11677 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11679 * class.c: Handle Array in mono_class_from_mono_type ().
11680 * metadata.c, pedump.c: some endian fixes.
11682 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11684 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
11685 * metadata.c: fix small problem introduced with the latest commit.
11687 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
11689 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
11690 We don't need a MonoMetadata pointer anymore to compare signatures in
11691 mono_metadata_signature_equal (), update callers.
11692 Reduced memory usage an number of allocations for MonoMethodHeader and
11693 MonoMethodSignature.
11695 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
11697 * metadata.c: added compare for szarray.
11699 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
11701 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
11702 and add a couple more types to it and mono_defaults. Give an hint on
11703 classes that need implementing in our corlib and are referenced
11706 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
11708 * class.h, class.c: keep track if a class is also an Enum.
11709 * loader.c: Implement a couple more types for use in libffi
11710 marshalling. Gives better diagnostics when failing to dlopen
11711 a library. Set method->klass for P/Invoke methods, too.
11713 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
11715 * class.c, class.h: add a MonoType this_arg to MonoClass that
11716 represents a pointer to an object of the class' type that
11717 can be used by the interpreter and later the type cache.
11718 Add best guess alignment info for valuetype objects.
11720 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
11722 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
11723 into MonoType: one less level of indirection and allocation and
11724 simplifies quite a bit of code. Added cache for MonoTypes that are
11725 used frequently, so that we don't need to allocate them all the time.
11727 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
11729 * class.c (mono_class_create_from_typedef): System.Enum is also a
11730 value type, although it does not derive from System.ValueType
11731 (maybe a bug in the ms compiler?)
11733 * metadata.c (mono_type_size): return the right size for value types
11735 * loader.c (mono_get_method): only initialize method header if not abstract
11737 * class.c (mono_class_from_mono_type): use mono_default values.
11739 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
11741 * *: use MonoClass pointers instead of <type_tokens>
11743 * class.h: new flag: metadata_inited.
11745 * class.c (mono_class_metadata_init): impl.
11746 (mono_class_instance_size): impl.
11747 (mono_class_data_size): impl.
11749 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11751 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
11752 MonoClass now has the name and name_space fields.
11753 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
11754 mono_get_method () takes and optional MonoClass as argument.
11755 Removed mono_typedef_from_name() and added mono_class_token_from_name()
11756 instead that takes advantage of a map from class names to typedef
11757 tokens in MonoImage.
11759 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
11761 * metadata.c: zero is not a valid alignment boundary.
11762 Merge MONO_TYPE_VOID in default decoding code.
11764 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
11766 * image.h: merged MonoMetadata into MonoImage
11768 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
11769 identify the type of elements.
11771 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
11773 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
11774 * cil-coff.h: split MonoMSDOSHeader and add size info.
11775 * image.c: add some consistency checks.
11776 * metadata.c: fix row size computation: one programmer
11777 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
11778 add explanation for the locator routine.
11779 Fix decoding of size in method header.
11781 2001-08-20 Miguel de Icaza <miguel@ximian.com>
11783 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
11784 (g_concat_dir_and_file): Bring g_concat_dir_and_file
11785 function from gnome-libs. This uses the right path separator
11786 based on the OS, and also works around a bug in some systems where
11787 a double slash is not allowed.
11788 (default_assembly_name_resolver): Use g_concat_dir_and_file
11789 (mono_assembly_open): ditto.
11791 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
11793 * metadata.c (mono_metadata_signature_equal): impl.
11795 * *: void is now a realy MonoType (instead of using NULL)
11797 * metadata.c (do_mono_metadata_parse_type): use
11798 mono_metadata_parse_type to parse void value.
11800 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
11802 * metadata.c, metadata.h: in the signature and method header store
11803 only the space required for holding the loca vars and incoming arguments.
11805 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
11807 * metadata.c (do_mono_metadata_parse_type): treat void like any
11808 other type (instead of assigning NULL);
11810 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
11812 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
11814 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
11816 * image.c (do_mono_image_open): added a cache for arrays.
11818 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11820 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
11821 decode a single column from a row in a metadata table and changes
11822 to take advantage of it in the typedef locator (gives a nice speed up).
11823 Store offset info for function params.
11825 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
11827 * image.h (MONO_IMAGE_IS_CORLIB): removed
11829 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
11831 * assembly.c: how could mono_assembly_close () had ever worked?
11832 * metadata.c, metadata.h: provide offset info for local vars.
11833 Implement mono_type_size () to take care of alignment as well
11834 as size (it was mono_field_type_size in cli/class.c before).
11836 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
11838 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
11840 * assembly.h (CORLIB_NAME): set to corlib.dll
11842 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
11844 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11846 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
11847 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
11848 tokentype.h: massive namespace cleanup.
11850 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11852 * metadata.h, metadata.c: decode exception clauses when parsing method header.
11854 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
11856 * metadata.c (mono_metadata_free_type): added check for type !=
11857 NULL (void) before calling mono_metadata_free_type()
11859 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
11861 * metadata.h, row_indexes.h: added header with enumerations to use
11862 to index in the columns from tables in metadata and to decode coded
11863 tokens: we should start using this instead of embedding magic numbers
11866 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
11868 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
11869 Move metadata_t info from cli_image_info_t to MonoImage, where
11870 it's easily accessible. Changed all the uses accordingly.
11871 Added the method and class caches to MonoImage.
11872 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
11873 and mono_metadata_decode_value () signature to be more consistent
11874 with the other parse functions (and simplify code). Taken advantage
11875 of zero-length array allocation with GCC. Removed reduntant (and
11876 wrong) MonoFieldType struct and use MonoParam instead. Changed
11877 mono_metadata_parse_field_type () to use common code for parsing.
11878 Added mono_metadata_typedef_from_field () and
11879 mono_metadata_typedef_from_method () to lookup a typedef index from a
11880 field or method token.
11881 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
11883 2001-07-23 Miguel de Icaza <miguel@ximian.com>
11885 * metadata.c (mono_metadata_parse_field_type): Implement.
11886 (do_mono_metadata_parse_type): Split engine from
11887 mono_metadata_parse_type, so that we can create smaller structures
11888 for things that just have one pointer to the MonoType (look at
11891 2001-07-20 Miguel de Icaza <miguel@ximian.com>
11893 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
11894 as Jan Gray found out, it is incorrect.
11896 2001-07-18 Miguel de Icaza <miguel@ximian.com>
11898 * assembly.c: Implement asssembly loading. This loads an image
11899 and loads all the referenced assemblies. Come to think of it, we
11900 could always do lazy loading of the assemblies.
11902 * image.c (mono_image_open): Keep loaded images in a hashtable.
11904 * image.h (MonoImage): Add reference count.
11906 2001-07-17 Miguel de Icaza <miguel@ximian.com>
11908 * assembly.c (mono_assembly_open): Keep track of the file name in
11909 case the assembly has no ASSEMBLY table.
11911 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
11914 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
11916 * metadata.c, metadata.h: decode local vars in method header
11917 parse function. Change callers accordingly.
11919 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
11921 * metadata.h, cil-coff.h: protect against multiple inclusion.
11922 Added some new structures to hold information decoded from metadata:
11923 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
11924 and relevant decoding/free functions.
11925 * metadata.c: implement decoding functions. Add warning for out of bounds
11926 index in mono_metadata_locate(). Implement mono_get_method () to retreive
11927 all the info about a method signature and invocation. Remove check on
11928 uninitialized local var in parse_mh() and fix memory leak.
11930 2001-07-12 Miguel de Icaza <miguel@ximian.com>
11932 * metadata.h: More macros.
11934 * tokentype.h: New file.
11936 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
11938 * assembly.c: added a consistency check and initialize
11939 some structures with g_new0().
11940 * metadata.c: fixed a couple more bugs in table size computation
11941 and add other checks for out-of bound access to metadata.
11943 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
11945 * metatada.c: fix bugs computing table sizes. Spew a
11946 warning when index in string heap is out of bounds.
11948 2001-07-04 Miguel de Icaza <miguel@ximian.com>
11950 * metadata.h: Add a couple of macros to manipulate tokens.
11952 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11954 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
11955 cli_section_tables).
11957 2001-07-01 Miguel de Icaza <miguel@ximian.com>
11959 * metadata.c (mono_metadata_user_string): New function, provides
11960 access to the UserString heap.
11962 2001-06-27 Miguel de Icaza <miguel@ximian.com>
11964 * metadata.c: Add inline documentation.
11966 2001-06-26 Miguel de Icaza <miguel@ximian.com>
11968 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
11971 2001-06-22 Miguel de Icaza <miguel@ximian.com>
11973 * typeattr.h: New file, TypeAttribute flags.
11975 2001-06-21 Miguel de Icaza <miguel@ximian.com>
11977 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
11978 mono_assembly_ensure_section): Section loading code.
11979 (load_section_tables): Load the sections.
11981 * mono/metadata/metadata.c (mono_metadata_locate_token,
11982 mono_metadata_locate): Functions to locate the information
11983 definition given a token or a table and an index.
11984 (mono_metadata_compute_table_bases): New.
11985 (compute_size): New function to compute the sizes of the various
11988 * mono/metadata/metadata.h: Finish listing the different index
11991 * mono/metadata/pedump.c: Improve to dump new information.
11993 2001-06-19 Miguel de Icaza <miguel@ximian.com>
11995 * mono/metadata/metadata.c: Entered all the tables matching
11998 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2