1 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
3 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
5 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7 * icall.c: Optimize Buffer.BlockCopy.
9 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
12 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
13 quote). Changed them to "MMMM yyyy".
15 2004-05-12 Miguel de Icaza <miguel@ximian.com>
18 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
20 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
22 * reflection.h: Updated after changes to managed structures.
24 * appdomain.c: Bump corlib version.
26 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
31 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33 * Makefile.am: link to ../os/libmonoos.la on windows.
36 -If MONO_DEBUG, warn about non-existing directories in
38 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
39 compile time variable.
40 -Removed init_default_path and call mono_set_rootdir from
41 libmonoos.a instead (windows only).
43 * assembly.h: declare mono_assembly_getrootdir().
46 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
48 * loader.c: s/getenv/g_getenv/
50 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
52 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
54 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
56 * metadata.h: Add new marshalling conversions.
58 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
61 * reflection.c (mono_reflection_get_type): Lookup the type in all
62 modules of a multi-module assembly. Fixes #58291.
64 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
66 * threads.c: Before aborting a background, set the StopRequested
67 state. This avoids throwing the Abort exception.
68 In mono_thread_manage, don't continue with the shutdown until all
69 aborted threads have actually stopped.
71 2004-05-10 Jackson Harper <jackson@ximian.com>
73 * locales.c: Remove the modifier from culture names.
75 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
77 * Makefile.am: monosn is not installed any more. It has been deprecated
80 2004-05-07 Jackson Harper <jackson@ximian.com>
83 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
84 Fix array construction, add bailout if the length is 0.
86 2004-05-07 Dick Porter <dick@ximian.com>
88 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
89 machine doesn't have a DNS entry. Patch by Urs Muff
90 (umuff@quark.com), fixes bug 57928.
92 2004-05-06 Jackson Harper <jackson@ximian.com>
94 * reflection.c: Handle null PublicTokens properly. alloc mem for
95 assembly names culture so we dont crash when freeing it.
97 2004-05-06 Jackson Harper <jackson@ximian.com>
99 * assembly.c: Check the usergac when loading with partial names.
101 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
103 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
104 does nothing for now (not required for Linux/Windows) but the class
105 library can call it (and a newer or modified runtime could need it).
106 * icall.c: Registred icall.
108 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
110 * loader.c: prints a message on module loading error we set MONO_DEBUG
111 environment variable.
113 2004-05-05 Jackson Harper <jackson@ximian.com>
115 * appdomain.c: Handle PublicKeyToken=null properly.
117 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
119 * environment.c|h: Added icall ves_icall_System_Environment_
120 GetOSVersionString to get the current OS version as a string.
121 * icall.c: Registred icall.
123 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
125 * object.c: in mono_object_get_virtual_method(), take into account that
126 non-virtual methods don't have a slot in the vtable. Check needed when
127 the object is a proxy.
129 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
131 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
132 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
134 * object.c (mono_class_compute_gc_descriptor): Fix warning.
136 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
137 passed when a valuetype is expected.
139 * object.c (mono_unhandled_exception): Only set the exit code if the
140 exception happens in the main thread. Fixes thread5.exe.
142 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
143 invalid names. Fixes #58047.
145 2004-05-03 Jackson Harper <jackson@ximian.com>
147 * assembly.c: This line was committed accidently and is unneeded.
149 2004-05-03 Jackson Harper <jackson@ximian.com>
151 * icall.c: Add new icall for Assembly::LoadWithPartialName
152 * assembly.c/.h: new function that probes the GAC to load partial
153 assembly names by Paolo Molaro.
155 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
157 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
158 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
159 (type_get_fully_qualified_name): Added PublicKeyToken when building a
162 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
164 * appdomain.c: fixed check for 'neutral' culture and removed warning.
165 * reflection.c: fix bug when parsing a full type name and Version is not
166 the last thing in the string.
168 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
170 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
171 crashes when it is freed.
173 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
175 * assembly.c: print the compat warning to stderr.
177 2004-05-01 Miguel de Icaza <miguel@ximian.com>
179 * assembly.c (mono_assembly_load_references): Add a compatibility
180 hack to run old applications that might be still referencing the
181 3300-based assemblies, only do this for System.xxx.
183 2004-05-01 Jackson Harper <jackson@ximian.com>
185 * appdomain.c: If the culture is neutral we set it to "".
187 2004-04-29 Jackson Harper <jackson@ximian.com>
189 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
191 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
193 * string-icalls.c: added low overhead function for copying chars
194 * icall.c: added needed icall for the above function
196 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
198 * icall.c: fix return value of get_global_assembly_cache. Implemented
199 Environment.GetLogicalDrives.
201 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
203 * rand.c: try and talk to egd or prngd
204 for random bytes if opening devices fail.
206 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
208 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
209 alignment for the type using the native alignment of its members
210 instead of using klass->min_align.
212 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
214 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
217 * socket-io.c: added check for sys/aio.h.
219 2004-04-28 Dick Porter <dick@ximian.com>
221 * threads.c: Don't abort a thread thats already aborting, when
222 terminating everything.
224 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
226 * icall.c: added 2 new async calls for Socket.
228 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
231 * threadpool.c: removed unused variable.
233 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
235 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
237 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
239 * locales.c: put back string_invariant_tolower () and
240 string_invariant_toupper ().
242 2004-04-26 David Waite <mass@akuma.org>
247 * unicode.h: remove comma from end of enumeration declarations
249 2004-04-26 David Waite <mass@akuma.org>
251 * debug-mono-symfile.h:
254 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
257 2004-04-26 Jackson Harper <jackson@ximian.com>
259 * appdomain.c: Increment version number.
261 2004-04-26 Jackson Harper <jackson@ximian.com>
263 * appdomain.c: Set assembly references public token value when
264 PublicKeyToken is specified, not the hash_value. Free public token
265 values when free assembly name data. Previously the public key
266 token was hex decoded, however we are using hex encoded public key
267 tokens, so this is not neccasary.
268 * assembly.c: Lookup assemblies in the gac if their public token
269 value is set. Add function to allow enabling user gac
270 lookups. Specify whether or not the assembly was loaded from the
271 GAC. Compare full assembly names when checking the cache for
272 assemblies (Temporarily disabled see comment in code). Remove
273 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
274 specifies trace-loader they get extra info to stdout on the
275 loading of assemblies.
276 * image.h: Add a field for an assembly references public token
277 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
278 whether an assembly has been loaded from the GAC.
279 * image.c: Remove a corlib -> mscorlib name mapping.
280 * loader.h: Add function to enable/disable the user gac.
281 * mono-config.c: Check if the usergac is enabled in the config
283 * icall.c: New icall to determine whether or not an assembly has
284 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
285 * tabldefs.h: Add constant for assemblyref flag that specifies a
286 full public key is used instead of a public token.
287 * reflection.c: Remove mscorlib -> corlib mappings. Set
288 PublicTokenValue instead of hash value. This value is a hex
289 string so it does not need to be expanded.
291 2004-04-26 Martin Baulig <martin@ximian.com>
293 * mono-debug-debugger.c (mono_debugger_initialize): Set
294 `mono_debugger_initialized' before calling mono_debug_lock().
296 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
298 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
299 InternalToUpper/InternalToLower.
300 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
301 removed invariant culture shortcut. This is now done in managed code.
302 * locales.c: (string_invariant_toupper/tolower) removed.
304 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
306 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
307 Added Poll internal call.
309 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
310 call for Poll. Select was too heavy for polling a single socket.
312 * threadpool.[ch]: added mono_threadpool_cleanup.
313 * threads.c: use it. Don't use Thread_Abort on windows.
315 2004-04-23 Martin Baulig <martin@ximian.com>
317 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
319 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
321 * icall.c: Registred new icalls for key pair protection and added an
322 icall for Environment.GetFolderPath on Windows.
323 * security.c|h: Added new icalls for key pair protection.
325 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
327 * socket-io.c: don't display the non-supported family warning for known
328 families. Now this is not displayed on windows when checking support
331 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
333 * class.c: don't display the layout warning for static fields.
335 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
337 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
338 * locales.c, locales.h: Added new icalls for culture-specific
339 Char.ToLower and Char.ToUpper.
341 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
343 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
346 2004-04-20 Martin Baulig <martin@ximian.com>
348 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
349 of the type name before passing it to mono_reflection_type_from_name().
351 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
353 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
354 encodings here. Fixes #56965.
356 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
358 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
359 fix test on strstr result not that I can see anything that
360 relies on the result.
362 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
364 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
367 * marshal.c (mono_marshal_get_string_encoding): New helper function.
369 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
370 function to determine which marshalling to use for strings. Fixes
373 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
375 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
377 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
379 * icall.c: #include mono-config.h
381 2004-04-15 Jackson Harper <jackson@ximian.com>
383 * culture-info-tables.h: Fix date formats for en-US culture.
385 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
387 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
388 ThreadPool.SetMinThreads.
389 * threadpool.c: Implemented ThreadPool.GetMinThreads and
390 ThreadPool.SetMinThreads.
392 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
394 * mono-config.c: also load the .config file in the directory
395 where the assembly was found.
397 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
399 * assembly.c: load per-assembly config files.
400 * icall.c: decrapified code to get the config dir and moved to
402 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
403 per-assembly config files. When doing a dll map lookup give precedence
404 to the per-assembly data.
406 2004-04-14 Martin Baulig <martin@ximian.com>
408 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
409 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
410 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
412 * mono-debugger-debugger.c: While the debugger is locked, remember
413 whether the symbol tables have changes and send one single
414 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
416 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
418 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
420 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
423 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
424 account when marshalling string arrays. Fixes #56965.
426 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
428 * icall.c: Add new icalls mapping for security.
429 * security.c|h: Add internal calls for WindowsIdentity,
430 WindowsImpersonationContext and WindowsPrincipal.
432 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
434 * class.c: Added comment to ensure the System.MonoDummy class
435 is removed when no longer necessary
437 2004-04-13 Miguel de Icaza <miguel@ximian.com>
439 * appdomain.c: Pass arguments to the bootstraping exceptions to
440 minimize JITed methods at boot
442 * metadata.c (mono_exception_from_name_two_strings): Allow for the
443 second string to be null.
445 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
446 Change the protocol to minimize the JIT methods at startup. Now
447 it Returns the internal codepage, if the value of "int_code_page"
448 is 1 at entry, and we can not compute a suitable code page
449 number, returns the code page as a string.
451 2004-04-13 Jackson Harper <jackson@ximian.com>
453 * culture-info-tables.h: Fix number of decimal digits for all
456 2004-04-13 Jackson Harper <jackson@ximian.com>
458 * icall.c: Clairfy out of sync error message. It is not always
459 your corlib that is out of sync.
461 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
463 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
464 properties when only the set accessor is overriden. Fixes #55874.
466 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
468 * assembly.c (mono_assembly_load_references): Make this thread safe.
471 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
473 * monosn.c: Add missing initialization calls.
475 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
478 ves_icall_System_Globalization_CultureInfo_construct_number_format
479 Fix g_assert so it compiles on fussier compilers re int/ptr
482 2004-04-08 Dick Porter <dick@ximian.com>
485 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
486 53992. Also rearrange the code so that the internal calls return
487 an error value and exceptions are thrown from managed code.
489 * icall.c: Add type info to the socket icalls.
491 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
493 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
496 2004-04-07 Martin Baulig <martin@ximian.com>
498 * class.c (mono_class_from_generic_parameter): Don't default
499 `klass->parent' to `mono_defaults.object_type'.
501 2004-04-07 Martin Baulig <martin@ximian.com>
503 * reflection.c (mono_reflection_initialize_generic_parameter): Set
504 `param->pklass->reflection_info'.
506 2004-04-07 Jackson Harper <jackson@ximian.com>
508 * culture-info-tables.h: Fix date separator symbol.
510 2004-04-07 Martin Baulig <martin@ximian.com>
512 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
513 from System.Type to System.MonoType.
515 2004-04-07 Martin Baulig <martin@ximian.com>
518 (MonoReflectionGenericParam): Added `has_reference_type' and
519 `has_value_type' fields.
521 * reflection.c (mono_image_get_generic_param_info): Encode the
522 correct flags if we have the `class' or `struct' constraint.
524 2004-04-07 Martin Baulig <martin@ximian.com>
527 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
529 2004-04-07 Jackson Harper <jackson@ximian.com>
531 * appdomain.c: Revert extra patches, just wanted to bump the
534 2004-04-07 Jackson Harper <jackson@ximian.com>
536 * Makefile.am: Add culture-info private headers.
537 * icall.c: Add new icalls for contructing locales.
538 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
539 * locales.h: Declare new culture info construction methods.
540 * object.h: Add new fields used to avoid the CultureMap to
542 * culture-info.h: Definition of structs used in the culture info
544 * culture-info-tables.h: Autogenerated tables that contain culture
545 info data. This file was generated with the locale-builder tool.
546 * appdomain.c: Incement corlib version number.
548 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
550 * appdomain.c: (mono_runtime_init) move mono_thread_init
551 to before mono_object_new calls so critical sections
552 are initialized before use.
554 2004-04-07 Martin Baulig <martin@ximian.com>
557 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
558 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
559 (ves_icall_MonoGenericParam_initialize): Removed.
560 (monogenericparam_icalls): Removed.
561 (generictypeparambuilder_icalls): Added new table for
562 System.Reflection.Emit.GenericTypeParameterBuilder.
565 (mono_reflection_define_generic_parameter): Removed.
566 (mono_reflection_initialize_generic_parameter): This is now called
567 from GenericTypeParameterBuilder's .ctor.
569 2004-04-06 Martin Baulig <martin@ximian.com>
571 * class.c (mono_class_init): Don't inflate nested classes in a
573 (mono_type_get_name_recurse): Include the generic arguments for
574 generic instances and generic type declarations.
575 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
576 (_mono_class_get_instantiation_name): Removed.
577 (mono_class_create_generic): Always use `gklass->name' as our name.
579 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
581 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
582 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
583 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
584 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
585 closed generic methods here.
588 (mono_reflection_generic_inst_get_nested_types): Removed.
589 (inflate_mono_method): Copy the generic parameters from the
590 MonoMethodHeader into out MonoGenericMethod.
592 2004-04-06 Martin Baulig <martin@ximian.com>
595 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
597 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
599 * reflection.c (build_compressed_metadata): If we have any entries
600 in the GenericParam, MethodSpec or GenericParamConstraint tables,
601 set the header version to 1.1.
603 2004-04-06 Martin Baulig <martin@ximian.com>
605 * class.c (mono_class_init): If we're a generic instance,
606 initialize our nested classes, too.
607 (_mono_class_get_instantiation_name): Deal with the new `!%d'
610 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
612 * process.c: quote the argument passed to the shell on windows.
614 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
616 * threads.c (mono_alloc_special_static_data): Allow this to be
617 called during startup.
619 2004-04-02 Martin Baulig <martin@ximian.com>
622 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
624 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
626 * icall.c: Fix build.
628 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
630 * Makefile.am: Added security.c|h.
631 * icall.c: Added icall for get_UserName;
632 * security.c: New file for security related icalls. Added function
633 get_UserName for System.Environment (fix #56144).
634 * security.h: New. Header file for security.c
636 2004-04-02 Dick Porter <dick@ximian.com>
638 * icall.c: Deleted the icalls that were obsoleted some time ago
639 by the ICU string code, and which were mixed into the icall
640 rearranging. Fixes bug 55969.
643 * string-icalls.c: Deleted the code that those icalls reference.
645 2004-04-01 Martin Baulig <martin@ximian.com>
647 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
649 * class.c (mono_class_from_generic_parameter): Don't set
650 TYPE_ATTRIBUTE_INTERFACE.
651 (my_mono_class_from_generic_parameter): Likewise.
653 2004-04-01 Martin Baulig <martin@ximian.com>
655 * loader.c (find_method): Added an optional `MonoClass *ic'
656 argument to search in a specific interface.
657 (mono_get_method_constrained): New public function.
659 2004-04-01 Martin Baulig <martin@ximian.com>
661 * reflection.c (mono_image_get_generic_field_token): Use the
662 `handleref' cache here.
664 2004-04-01 Martin Baulig <martin@ximian.com>
666 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
668 * reflection.c (create_generic_typespec): Use the `typespec' hash
669 here, not the `typeref' one.
671 2004-04-01 Martin Baulig <martin@ximian.com>
673 * class.c (mono_class_inflate_generic_type): Moved the
674 functionality into a new static inflate_generic_type() which
675 returns NULL if it didn't do anything. Only increment the
676 `mono_stats.inflated_type_count' if we actually inflated
678 (mono_class_get_full): Check the classes type to see whether we
679 need to inflate it; also inflate MONO_TYPE_(M)VAR.
681 2004-04-01 Jackson Harper <jackson@ximian.com>
683 * reflection.c: Set culture for assembly references.
685 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
687 * reflection.[ch], icall.[ch], Fix support for pinning variables.
689 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
692 (do_mono_assembly_open): the critical section also covers
693 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
695 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
698 (mono_manage_threads): abort the background threads when finishing.
701 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
703 * gc.c: only close the done_event handle if there was no timeout.
706 2004-03-30 Martin Baulig <martin@ximian.com>
708 * icall.c (icall_entries): It's called "System.Activator", not
711 2004-03-30 Martin Baulig <martin@ximian.com>
713 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
714 (mono_class_create_from_typespec): Likewise.
716 2004-03-30 Martin Baulig <martin@ximian.com>
718 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
719 `has_ctor_constraint' and `initialized'.
721 2004-03-30 Martin Baulig <martin@ximian.com>
723 * reflection.c (encode_new_constraint): New static function to add
724 the constructor constraint attribute to a type parameter.
725 (encode_constraints): Call encode_new_constraint() if necessary.
728 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
730 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
732 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
734 * reflection.c, icall.c: add support for pinning variables.
736 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
738 * marshal.c (mono_marshal_get_managed_wrapper):
739 init bool local with zero rather than null.
741 2004-03-29 Martin Baulig <martin@ximian.com>
743 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
744 the "official" behavior here.
745 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
747 2004-03-29 Martin Baulig <martin@ximian.com>
749 * icall.c: Reflect latest API changes.
751 2004-03-29 Martin Baulig <martin@ximian.com>
753 * loader.c (mono_get_method_from_token): Also call
754 mono_metadata_load_generic_params () for abstract and interface
755 methods; replace the type arguments in the method signature with
756 the ones which are loaded from the metadata.
758 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
760 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
761 of the lock is not the current thread. MS.NET don't do it, in spite of
762 what the documentation says. See bug #56157.
764 2004-03-28 Martin Baulig <martin@ximian.com>
766 * class.c (mono_class_init): Don't call init_properties() and
767 init_events() for generic instances; set `prop->parent' when
768 inflating properties.
770 * reflection.c (mono_generic_inst_get_object): Call
771 `mono_class_init (ginst->klass)'.
772 (mono_type_get_object): Only create a MonoGenericInst if your
773 generic type is a TypeBuilder.
774 (do_mono_reflection_bind_generic_parameters): Only set
775 `ginst->is_dynamic' if our generic type is a TypeBuilder.
777 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
779 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
782 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
784 * icall.c: added Kill_internal icall.
785 * process.[ch]: added Kill_internal icall.
787 2004-03-25 Martin Baulig <martin@ximian.com>
789 * class.h (MonoStats): Added `generic_instance_count',
790 `inflated_method_count', `inflated_type_count' and
791 `generics_metadata_size'.
793 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
795 * reflection.c: no warnings now.
797 2004-03-25 Martin Baulig <martin@ximian.com>
799 * class.c (mono_class_get_full): New public function; does a
800 mono_class_get(), but also takes a `MonoGenericContext *'.
802 * loader.c (mono_field_from_memberref): Renamed to
803 `field_from_memberref', made static and added `MonoGenericContext *'
805 (mono_field_from_token): Added `MonoGenericInst *' argument.
806 (method_from_memberef): Likewise.
807 (mono_get_method_from_token): Likewise.
808 (mono_get_method_full): New public function; does a
809 mono_get_method(), but also takes a `MonoGenericContext *'.
811 * verify.c (mono_method_verify): Get the method's generic context
812 and pass it to mono_field_from_token(), mono_get_method_full() and
813 mono_class_get_full().
815 2004-03-25 Martin Baulig <martin@ximian.com>
817 * class.c (mono_class_inflate_generic_type): Take a
818 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
819 `MonoGenericMethod *'.
821 2004-03-25 Martin Baulig <martin@ximian.com>
823 * loader.h (MonoMethodInflated): Store the MonoGenericContext
824 instead of the MonoGenericMethod here.
826 2004-03-25 Martin Baulig <martin@ximian.com>
828 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
829 each time we create a new MonoGenericInst, we also create a new
830 context which points back to us.
832 * class.c (inflate_method): Use `ginst->context' instead of
833 creating a new context.
835 * loader.c (method_from_memberref): Use
836 `klass->generic_inst->context' instead of creating a new context.
838 2004-03-25 Martin Baulig <martin@ximian.com>
840 * class.h (MonoGenericContext): New struct.
841 (MonoGenericMethod): Removed `generic_inst'.
843 * class.c (mono_class_inflate_generic_method): Take a
844 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
846 2004-03-25 Martin Baulig <martin@ximian.com>
848 * loader.h (MonoMethodInflated): New typedef.
850 * metadata.h (MonoMethodSignature): Removed `gen_method', make
851 `generic_param_count' consume just 30 bits, added `is_inflated'
852 and `has_type_parameters' flags (one bit each).
854 * class.c (mono_class_inflate_generic_method): Create a
855 MonoMethodInflated instead of a MonoMethodNormal and set
856 `is_inflated' in the method signature.
858 * class.h (MonoGenericMethod): Removed `generic_method'.
860 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
862 * image.c: Make sure the name of a MonoImage is always an absolute path.
863 This fixes bug #54415.
865 2004-03-24 Martin Baulig <martin@ximian.com>
867 * class.c (mono_class_setup_vtable): If we're a generic instance,
868 use our generic type's vtable size.
870 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
872 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
873 MONO_NO_UNLOAD env var as a temporary workaround for unloading
876 2004-03-23 Martin Baulig <martin@ximian.com>
878 * class.h (MonoDynamicGenericInst): Added `int count_events' and
881 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
882 (typebuilder_icalls): Added "get_event_info"; calls
883 mono_reflection_event_builder_get_event_info().
885 * reflection.c (mono_reflection_generic_inst_initialize): Added
887 (mono_reflection_event_builder_get_event_info): New function.
889 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
891 * object.h: add mono_type_initialization_init
893 * object.c (mono_runtime_class_init):
894 implement class constructor synchronization rules
895 to cope with threading issues.
896 add mono_type_initialization_init
898 * appdomain.c (mono_runtime_init): call
899 mono_type_initialization_init
901 * class.h: removing initializing field from MonoVTable
903 2004-03-23 Martin Baulig <martin@ximian.com>
905 * class.c (my_mono_class_from_generic_parameter): Use
906 `param->name' if it's not NULL.
908 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
910 * class.c: do not insert non-virtual methods in the vtable.
911 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
912 that means the method is non-virtual. This never would have
915 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
917 * profiler.c: Added lock for accessing coverage_hash.
919 2004-03-22 Martin Baulig <martin@ximian.com>
921 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
922 `method->method->signature->generic_param_count != 0' to make it
923 work for interface methods.
925 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
927 * process.c: quote the string passed to the shell using g_shell_quote.
929 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
932 (mono_threads_manage): don't remove the finalizer thread and self
933 from the threads hash table so that mono_thread_manage can be called
936 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
938 * process.c: quote the arguments when UseShellExecute is true. Fixes
941 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
943 * threads.c: set mono_thread_detach as a cleanup routine for every
944 thread. This way it's always executed upon thread termination, either
945 aborted or finished normally. No more xsp hangs!
947 2004-03-17 Martin Baulig <martin@ximian.com>
949 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
950 `int count_nested' and a `MonoType **nested'.
952 * reflection.c (mono_reflection_bind_generic_parameters): Moved
953 most of the functionality into a new static
954 do_mono_reflection_bind_generic_parameters() and don't take a
955 `MonoType *nested_in' argument any more. Don't compute nested
957 (mono_reflection_generic_inst_get_nested_types): New public method
960 * class.c (mono_class_create_generic): Set `klass->nested_in' if
961 we're a nested class.
963 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
964 mono_reflection_generic_inst_get_nested_types() to compute the
967 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
969 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
970 descriptive error message under windows.
972 2004-03-17 Martin Baulig <martin@ximian.com>
974 * class.c (dup_type): Added `const MonoType *original' argument;
975 copy the attrs from the original type.
977 2004-03-17 Martin Baulig <martin@ximian.com>
979 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
980 `m->generic_inst_cache' here.
982 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
984 * exception.h exception.c: Add stack_overflow_exception.
986 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
989 (overlapped_callback): call SetEvent *after* invoking the callback.
990 No need to call CloseHandle.
992 2004-03-16 Martin Baulig <martin@ximian.com>
994 * reflection.c (mono_image_get_fieldref_token): Take a
995 `MonoReflectionField *' instead of a `MonoClassField *' and a
996 `MonoClass *'; store the `MonoReflectionField *' in the hash.
998 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1000 * appdomain.c: don't add the culture to the filename we're looking for
1001 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
1003 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1005 * locales.c: don't ignore symbols when doing case insensitive compares.
1006 Thanks Dick! Fixes bug #54046.
1008 * threads.c: surround 'threads' usage with enter/leave in
1011 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
1013 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
1014 implicitly marshalled as [Out]. Fixes #55450.
1016 (mono_marshal_get_runtime_invoke): Zero out the result if there is
1019 2004-03-16 Martin Baulig <martin@ximian.com>
1021 * class.c (mono_class_from_generic_parameter): Use the actual
1024 2004-03-16 Martin Baulig <martin@ximian.com>
1026 * reflection.c (type_get_signature_size): New static function.
1027 Compues the size of the type in a method signature.
1028 (method_get_signature_size): New static function; calls
1029 type_get_signature_size() to compute the actual size of the
1031 (method_encode_signature): Use method_get_signature_size() to get
1032 the signature's size rather than using `nparams * 10'.
1034 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1036 * file-io.h: define here WapiOverlapped on windows. I don't want the
1037 regular OVERLAPPED one.
1040 * threadpool.c: somehow, BindIoCompletionCallback is not found.
1041 Disabling AIO on windows.
1043 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1045 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
1048 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1050 * appdomain.c: upgraded corlib version.
1052 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
1053 and BeginWrite. Allow opening files for asynchrnous operations.
1055 * file-io.h: new struct that maps FileStreamAsyncResult.
1056 * icall.c: added new icalls.
1057 * process.[ch]: support setting child process environment variables
1058 and use the SHELL or COMSPEC when UseShellExecute is true.
1060 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
1061 callback for async. IO is here and also BindHandle.
1063 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
1066 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
1068 * reflection.c (create_custom_attr): Allow len == 0.
1070 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
1071 computation on big-endian machines.
1073 2004-03-13 Martin Baulig <martin@ximian.com>
1075 * class.h (MonoGenericInst): Added `int count_ifaces'.
1077 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
1078 `ginst->count_ifaces' instead `klass->interface_count' since we
1079 may get called before the vtable is created.
1081 * loader.c (mono_method_get_param_names): If we're a generic
1082 instance, return and don't initialize the class.
1084 * reflection.c (mono_reflection_setup_generic_class): Don't call
1085 ensure_runtime_vtable().
1086 (mono_reflection_bind_generic_parameters): Set
1087 `ginst->count_ifaces'.
1089 2004-03-11 Jackson Harper <jackson@ximian.com>
1093 * unicode.h: Remove unused System.Char icalls.
1095 2004-03-11 Miguel de Icaza <miguel@ximian.com>
1097 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
1098 code when we P/Invoke the first library in Windows.Forms, instead
1099 of when we first open the assembly.
1101 * assembly.c: Drop the lookup from here.
1103 2004-03-10 Martin Baulig <martin@ximian.com>
1105 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
1106 class for properties, fields and events. Finally fixes #54945.
1108 2004-03-10 Martin Baulig <martin@ximian.com>
1110 * metadata.c (mono_metadata_class_equal): New static function;
1111 checks whether two generic instances or two generic parameters are
1113 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
1116 2004-03-10 Martin Baulig <martin@ximian.com>
1118 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
1120 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
1121 argument and write it into the `reflection_info' field.
1124 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
1125 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
1127 2004-03-09 Jackson Harper <jackson@ximian.com>
1129 * char-conversions.h: use 8 bits for numeric data its all we need
1130 * icall.c: numeric data is only 8 bits now.
1132 2004-03-09 Martin Baulig <martin@ximian.com>
1134 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
1136 * class.c (init_properties, init_events): Initialize the new
1139 * reflection.c (typebuilder_setup_properties): Likewise.
1140 (typebuilder_setup_events): Likewise.
1142 * reflection.h (MonoEventInfo): Replaced `parent with
1143 `declaring_type' and `reflected_type'.
1145 * icall.c (ves_icall_get_property_info): Distinguish between
1146 declaring and reflected type.
1147 (ves_icall_get_event_info): Likewise.
1149 2004-03-09 Martin Baulig <martin@ximian.com>
1151 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
1152 (ves_icall_Type_GetField): Correctly set field->klass.
1154 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
1156 * loader.h: Fix warning.
1158 2004-03-08 Miguel de Icaza <miguel@ximian.com>
1160 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
1161 library routine if present. Notice that it will still continue
1162 executing even if its missing, for those working on the Gtk#
1163 edition of Windows.Forms.
1165 * assembly.c (do_mono_assembly_open): If loading the
1166 System.Windows.Forms call mono_loader_wini_init.
1168 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
1170 * class.h: Added MonoRemoteClass struct.
1171 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
1172 function for MonoStrings.
1173 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
1174 Added internal call for getting the proxy type.
1175 * marshal.c: Get the type of transparent proxies from its remote_class.
1176 Added methods that generate the IL for type checks and casts:
1177 mono_marshal_get_isinst, mono_marshal_get_castclass,
1178 mono_marshal_get_proxy_cancast.
1179 * marshal.h: Declaration of the previous new methods.
1180 * object.c: Added new moethods for creating and updating MonoRemoteClass
1181 instances: mono_remote_class, mono_upgrade_remote_class,
1182 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
1183 * verify.c: FIx transparent_proxy_fields layout.
1184 * appdomain.c: Bump corlib version.
1186 2004-03-04 Jackson Harper <jackson@ximian.com>
1188 * icall.c: Add icall to access char conversion tables.
1189 * char-conversions.h: Character conversion tables.
1190 * Makefile.am: Add char-conversions.h private header file.
1192 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
1194 * appdomain.c (unload_thread_main): Increase unloading timeout to
1195 10 sec as a temporary workaround for Nant problems.
1197 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
1199 * gc.c: Add checks for GC_enable and GC_disable.
1201 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
1202 (jaak@zd.com.pl). Fix memory corruption in String.Replace
1205 2004-02-27 Martin Baulig <martin@ximian.com>
1207 * reflection.c (mono_reflection_bind_generic_parameters): Take a
1208 `MonoReflectionType *' instead of a `MonoType *'.
1210 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
1212 * gc.c (run_finalize): Avoid finalizing the object representing the
1214 (finalizer_thread): Fix warning.
1216 2004-02-25 Martin Baulig <martin@ximian.com>
1218 * class.c (_mono_class_get_instantiation_name): Added `int offset'
1219 argument for nested types.
1220 (mono_class_create_generic): Added support for nested generictypes.
1222 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
1225 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
1227 * reflection.c (method_encode_signature): Increase the minimum
1228 value of `size' from 10 to 11.
1229 (mono_reflection_bind_generic_parameters): Take `int type_argc'
1230 and `MonoType **types' arguments instead of the `MonoArray
1231 *types'; added `MonoType *nested_in'. Recursively instantiate
1234 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
1236 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
1237 stack_overflow_ex members which are used by exception handling.
1239 * appdomain.c (mono_runtime_init): Initialize the new members.
1241 * gc.c (mono_gc_enable): New helper function.
1242 * gc.c (mono_gc_disable): New helper function.
1244 2004-02-23 Martin Baulig <martin@ximian.com>
1246 * icall.c: I must have been really stupid - make it actually work
1249 2004-02-23 Martin Baulig <martin@ximian.com>
1251 * loader.c (method_from_memberref): Only inflate the method if
1252 it's in another klass.
1254 2004-02-23 Martin Baulig <martin@ximian.com>
1256 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
1257 (mono_class_init): If we're a generic instance and an interface,
1258 compute `class->interface_id'; also create `class->interfaces'
1259 here and inflate them.
1261 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
1263 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
1265 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
1267 2004-02-15 Miguel de Icaza <miguel@ximian.com>
1269 * reflection.c (method_encode_code): Improved the error message
1270 generated by the exception.
1272 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1274 * icall.c: Martin did not do what he said in the ChangeLog for
1275 2004-02-18, but put back the changes for properties and events.
1276 Commenting those changes out again and adding comment to bug #54518.
1278 * process.c: removed warning.
1280 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
1282 * marshal.c (emit_struct_conv): Print an error message instead of
1283 asserting when a type does not have the StructLayout attribute.
1285 2004-02-20 Martin Baulig <martin@ximian.com>
1287 * reflection.c (mono_type_get_object): Also use the cache for
1289 (mono_reflection_bind_generic_parameters): Always compute
1292 2004-02-20 Martin Baulig <martin@ximian.com>
1294 * class.h (MonoGenericMethod): Removed `klass'.
1296 * class.c (mono_class_inflate_generic_method): Added `MonoClass
1299 2004-02-20 Martin Baulig <martin@ximian.com>
1301 * reflection.c (method_encode_methodspec): Actually use the
1302 uninflated signature for the memberref.
1304 2004-02-20 Martin Baulig <martin@ximian.com>
1306 * class.h (MonoGenericMethod): Removed `declaring'.
1308 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
1309 is NULL, compute it here.
1311 2004-02-20 Martin Baulig <martin@ximian.com>
1313 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
1315 * metadata.c (mono_metadata_generic_inst_hash): New method.
1316 (mono_metadata_generic_inst_equal): New method.
1318 * reflection.c (mono_reflection_bind_generic_parameters): Use the
1319 `klass->image->generic_inst_cache' cache to avoid creating
1320 duplicate MonoGenericInst's.
1322 * class.c (mono_class_inflate_generic_type): Use the cache.
1324 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
1326 * object.c: fixed gc descriptor calculation for embedded valuetypes.
1328 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1330 * icall.c: added Socket.WSAIoctl icall.
1332 * socket-io.[ch]: implemented
1333 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
1335 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
1337 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
1339 2004-02-18 Urs C Muff <umuff@quark.com>
1341 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
1342 this work on PPC and other big-endian architectures.
1344 * debug-mono-symfile.h: Prepended the names of all the `guint32'
1345 fields with an underscore to make sure they're only accessed by
1348 2004-02-18 Martin Baulig <martin@ximian.com>
1350 * icall.c: Put the klass->refclass changes back for methods and
1351 fields, but not for properties and events. We're currently not
1352 distinguishing between DeclaringType and ReflectedType for
1353 properties and events, that's what caused the regressions.
1355 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1358 (mono_async_result_new): the handle can be NULL.
1360 * threadpool.c: Use an event instead of a semaphore, don't initialize
1361 it until needed. This saves quite a few semaphores from being created
1362 when using the threadpool.
1364 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
1366 * object.c (mono_string_is_interned_lookup): Fix interning of long
1367 strings. Fixes #54473.
1369 * domain.c (ldstr_equal): Optimize if the two strings are equal.
1371 * icall.c: Revert the klass->refclass changes since they introduce
1372 regressions (bug #54518).
1374 2004-02-18 Martin Baulig <martin@ximian.com>
1376 * class.c (mono_class_init): If we're a generic instance and don't
1377 come from a TypeBuilder, inflate our members here.
1378 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
1379 (mono_class_create_generic): New public method.
1380 (mono_class_initialize_generic): Removed.
1381 (get_instantiation_name): Renamed to
1382 _mono_class_get_instantiation_name() and made it public.
1384 2004-02-18 Martin Baulig <martin@ximian.com>
1386 * class.c (mono_class_inflate_generic_type): Clear the new
1387 instance's `nginst->klass' when inflating a generic instance.
1388 (mono_class_is_subclass_of): Added (basic) support for generic
1391 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
1393 * appdomain.h, domain.c: use a MonoCodeManager instead of a
1394 MonoMempool to hold compiled native code.
1396 2004-02-17 Martin Baulig <martin@ximian.com>
1398 * class.h (MonoDynamicGenericInst): Added `count_properties' and
1401 * reflection.c (mono_reflection_generic_inst_initialize): Added
1402 `MonoArray *properties' argument.
1404 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
1406 2004-02-17 Martin Baulig <martin@ximian.com>
1408 * icall.c (ves_icall_Type_GetFields): Renamed to
1409 ves_icall_Type_GetFields_internal() and added a
1410 `MonoReflectionType *rtype' argument; pass it to
1411 mono_field_get_object() to set the field's "reflected" type.
1412 (ves_icall_Type_GetConstructors): Likewise.
1413 (ves_icall_Type_GetEvents): Likewise.
1414 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
1415 argument; pass it to mono_method_get_object() to set the method's
1418 2004-02-17 Martin Baulig <martin@ximian.com>
1420 * class.h (MonoDynamicGenericInst): New type.
1421 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
1423 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
1424 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
1425 (ves_icall_MonoGenericInst_GetFields): New interncall.
1427 * class.c (mono_class_from_generic): Don't call
1428 mono_class_initialize_generic() if this is a dynamic instance;
1429 ie. it's being created from a TypeBuilder.
1430 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
1431 `class->byval_arg.type'.
1433 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
1434 to `inflate_method' and made static.
1435 (mono_reflection_inflate_field): Removed.
1436 (mono_reflection_generic_inst_initialize): New public method.
1438 * reflection.h (MonoReflectionGenericInst): Removed `methods',
1439 `ctors' and `fields'; added `initialized'.
1441 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
1443 * debug-helpers.c (mono_method_full_name): Fix output for empty
1446 2004-02-12 Martin Baulig <martin@ximian.com>
1448 * class.h (MonoClassField): Added `MonoType *generic_type'.
1450 * reflection.c (mono_image_get_fieldref_token): Added support for
1451 instantiated generic types.
1452 (field_encode_inflated_field): Removed.
1453 (mono_image_get_inflated_field_token): Removed.
1454 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
1456 * reflection.h (MonoReflectionInflatedField): Removed.
1458 2004-02-12 Martin Baulig <martin@ximian.com>
1460 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
1461 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
1463 * reflection.c (mono_image_get_methodspec_token): Take a
1464 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
1465 (mono_image_create_token): Check whether we have a
1466 `method->signature->gen_method' and call
1467 mono_image_get_methodspec_token() if appropriate.
1468 (inflated_method_get_object): Removed.
1469 (mono_reflection_bind_generic_method_parameters): Return a
1470 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
1471 (mono_reflection_inflate_method_or_ctor): Likewise.
1473 * reflection.h (MonoReflectionInflatedMethod): Removed.
1475 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
1477 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
1478 for custom valuetype marshalling.
1480 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
1482 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1484 * icall.c: fixed WSAGetLastError_internal name.
1486 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
1488 * threads.c (mono_thread_attach): Allow this to be called multiple
1491 * threads.c (build_wait_tids): Do not wait for ourselves.
1493 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
1494 appdomain list is empty.
1496 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
1497 memory returned by mono_string_builder_to_utf16, since it points into
1498 managed memory. Thanks to Bernie Solomon for noticing this.
1500 * icall.c: Add AppDomainSetup icalls.
1502 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
1504 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
1507 * reflection.c (reflection_methodbuilder_to_mono_method): Save
1508 custom attributes to the method_aux struct. Also fix array indexes etc.
1510 * loader.c (mono_method_get_param_names): Make dynamic case work again.
1512 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
1514 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
1515 (both static and runtime) and reduce startup time.
1517 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
1519 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
1520 AsAny marshalling conversion instead of crashing.
1522 * marshal.c: Fix warnings.
1524 2004-02-09 Martin Baulig <martin@ximian.com>
1526 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
1528 * reflection.h (MonoReflectionInflatedMethod): Removed the
1529 `declaring' field, it's now in the unmanaged MonoGenericMethod.
1531 * reflection.c (method_encode_methodspec): Removed the `method'
1532 argument; we get it from `gmethod->declaring'.
1533 (inflated_method_get_object): Removed the `declaring' argument.
1535 2004-02-09 Martin Baulig <martin@ximian.com>
1537 * class.h (MonoGenericMethod): New type.
1538 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
1541 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
1542 a `MonoGenericMethod *gen_method' one.
1544 * class.c (mono_class_inflate_generic_type): Take an additional
1545 `MonoGenericMethod * argument. This is only non-NULL if we're
1546 inflating types for a generic method.
1547 (mono_class_inflate_generic_signature): Renamed to
1548 inflate_generic_signature() and made static; take a
1549 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
1550 (inflate_generic_header): Take a `MonoGenericMethod *' argument
1551 instead of a `MonoGenericInst *' one.
1552 (mono_class_inflate_generic_method): Likewise.
1554 * reflection.c (encode_generic_method_sig): Take a
1555 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
1556 (method_encode_methodspec): Likewise.
1557 (inflated_method_get_object): Likewise.
1559 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
1560 field with a `MonoGenericMethod *gmethod' one.
1562 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
1564 * class.h (mono_class_has_parent): add parens to expansion
1567 2004-02-08 Martin Baulig <martin@ximian.com>
1569 * image.h (MonoImage): Removed `generics_cache'.
1571 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
1572 instead of a `MonoType *' argument; removed the `inflate_methods'
1573 argument. Don't inflate methods here.
1575 * loader.c (find_method): If it's a generic instance, call
1576 mono_class_init() on the `sclass->generic_inst->generic_type'.
1578 * metadata.c (mono_type_size): Make this work on uninitialized
1579 generic instances; call it on the `ginst->generic_type's class.
1581 * reflection.c (mono_reflection_bind_generic_parameters): Call
1582 mono_class_from_generic() to create the `ginst->klass'.
1584 2004-02-08 Martin Baulig <martin@ximian.com>
1586 * class.h (MonoClass): Changed type of `generic_inst' from
1587 `MonoType *' to `MonoGenericInst *'.
1589 2004-02-08 Martin Baulig <martin@ximian.com>
1591 * icall.c (ves_icall_Type_BindGenericParameters): Just call
1592 mono_type_get_object(), this is now creating a `MonoGenericInst'
1593 for MONO_TYPE_GENERICINST.
1594 (ves_icall_MonoGenericInst_GetParentType): Likewise.
1595 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
1597 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
1598 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
1599 (inflated_method_get_object): Added `MonoClass *refclass' argument.
1600 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
1603 * reflection.h (MonoReflectionInflatedMethod): Removed
1604 `declaring_type' and `reflected_type'.
1606 2004-02-08 Martin Baulig <martin@ximian.com>
1608 * class.h (MonoGenericInst): Added `MonoType *parent' and
1609 `MonoType **ifaces'.
1611 * reflection.h (MonoReflectionGenericInst): Removed `klass',
1612 `parent' and `interfaces'.
1614 * reflection.c (mono_reflection_bind_generic_parameters): Take a
1615 `MonoType *' argument and return a `MonoType *'.
1618 (ves_icall_MonoGenericInst_GetParentType): New interncall.
1619 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
1621 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
1623 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
1624 valuetype marshalling.
1626 2004-02-06 Martin Baulig <martin@ximian.com>
1629 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
1630 (my_mono_class_from_generic_parameter): Likewise.
1632 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
1634 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
1635 contents of the symbol files lazily.
1637 * object.h (MonoThread): Add 'name' and 'name_len' fields.
1639 * threads.h threads.c icall.c: New icalls for getting and setting the
1642 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
1644 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
1645 Raise an exception when the domain is not found.
1647 2004-02-03 Martin Baulig <martin@ximian.com>
1649 * reflection.c (mono_image_get_methodspec_token): Use the
1650 uninflated signature; fixes gen-33.
1652 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
1654 * gc.c threads.c: Make the finalizer thread a normal managed thread so
1655 the finalizer code can use thread functionality.
1657 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
1658 the finalizer thread.
1660 * threads.c: Make some functions more robust.
1662 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
1664 * metadata.h: Add new marshalling conventions.
1666 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
1667 stringbuilder marshalling. Fixes #53700.
1669 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
1671 * reflection.c (mono_image_get_type_info): Save declarative security
1674 * reflection.c (mono_image_get_field_info): Handle uninitialized
1675 unmanaged fields as well.
1677 * appdomain.c: Bump corlib version.
1679 2004-02-01 Martin Baulig <martin@ximian.com>
1681 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
1682 method type arguments.
1684 2004-01-30 Duncan Mak <duncan@ximian.com>
1686 * marshal.h: Add prototype for
1687 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
1689 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
1692 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
1694 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
1695 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
1697 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
1699 * marshal.c (mono_marshal_get_native_wrapper): Add support for
1700 custom marshalling of valuetypes.
1702 * marshal.c: Fix some warnings.
1704 2004-01-29 Martin Baulig <martin@ximian.com>
1706 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
1707 for generic method parameters.
1709 * reflection.c (method_encode_methodspec): Write the uninflated
1710 signature into the methodspec table.
1711 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
1712 is always the uninflated method.
1713 (reflection_methodbuilder_to_mono_method): Copy the generic
1714 parameters from the MethodBuilder into `header->gen_params'.
1716 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
1718 * class.c (mono_class_from_generic_parameter): Fix warning.
1720 2004-01-27 Martin Baulig <martin@ximian.com>
1722 * class.c (mono_class_from_generic_parameter): Don't create
1723 `klass->methods' here.
1725 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
1727 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
1728 extension since it does not work with libraries named lib<FOO>.dll.so.
1730 2004-01-25 Martin Baulig <martin@ximian.com>
1732 * class.c (mono_class_inflate_generic_type): Added support for
1733 MONO_TYPE_GENERICINST.
1735 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
1736 inflate methods on open constructed types.
1738 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1740 * object.c: fire ProcessExit event in the root AppDomain after running
1741 Main. Fixes bug #53299.
1743 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
1745 * socket-io.c: include the new socket-wrappers.h header.
1746 Use the wrappers instead of the unix socket functions to make the code
1749 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
1751 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
1753 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
1756 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
1758 * reflection.c (mono_image_create_pefile): Handle the case when the
1759 entry point is not a MethodBuilder.
1761 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
1762 field to ReflectionMethod since it is not allways a builder.
1764 * reflection.c (type_get_fully_qualified_name): New helper function to
1765 return the fully qualified name of a type.
1767 * reflection.c (encode_marshal_blob): Always emit the fully qualified
1768 type name for custom marshallers.
1770 * reflection.c (mono_marshal_spec_from_builder): Ditto.
1772 * class.c (mono_class_setup_vtable): If a parent class already
1773 implements an interface, use the implementing methods from that class.
1776 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1778 * threadpool.c: just return instead of ExitThread to allow for thread
1781 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
1783 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
1784 when closing resource modules.
1786 * reflection.c (mono_image_create_pefile): Handle the case when the
1787 entry point is not a MethodBuilder.
1789 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
1790 field to ReflectionMethod since it is not allways a builder.
1792 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
1794 * marshal.c (mono_marshal_get_managed_wrapper):
1795 mono_marshal_alloc takes native int so CONV_I
1798 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
1800 * reflection.c (fixup_cattrs): New function to fixup the methoddef
1801 tokens in the cattr table. Fixes #53108.
1803 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1805 * loader.c: don't trim ".dll" before looking up in the config file.
1806 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
1808 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
1810 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
1811 Return the module which contains the resource as well.
1812 (ves_icall_System_Reflection_Module_Close): New icall.
1814 * appdomain.c: Bump corlib version number.
1816 * image.c (mono_image_addref): New public function.
1818 * assembly.c: Call mono_image_addref.
1820 * reflection.c (mono_module_get_object): Increase reference count of
1823 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
1826 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
1827 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
1828 proper exceptions on DllImport problems.
1830 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
1832 * class.c, metadata.c: eliminate CSIZE macro.
1834 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
1836 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
1837 * object.h: Added async_callback field in MonoAsyncResult.
1838 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
1839 * verify.c: Added async_callback in MonoAsyncResult layout.
1841 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
1843 * reflection.c (mono_reflection_get_custom_attrs): Add support
1846 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
1848 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
1850 (mono_marshal_method_from_wrapper): Add null pointer check.
1852 2004-01-16 Martin Baulig <martin@ximian.com>
1854 * debug-mono-symfile.h: Set version number to 36 and reflect
1855 latest symbol writer changes.
1857 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
1859 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
1860 multi-dimensional arrays.
1861 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
1862 (mono_class_from_mono_type): Use bounded_array_class_get.
1864 * class.c (mono_bounded_array_class_get): New function which takes
1865 a 'bounded' bool argument to distinguish vectors from one dimensional
1868 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
1869 bounded_array_class_get if the array has bounds.
1871 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1872 Search modules loaded using AssemblyBuilder:AddModule as well.
1874 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1876 * appdomain.c: increased corlib version.
1877 * filewatcher.c: removed g_print.
1879 (get_property_info): only allocate what is actually requested.
1880 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
1882 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1884 * Makefile.am: added filewatcher.[ch]
1885 * filewatcher.[ch]: FileSystemWatcher runtime support.
1886 * icall.c: added new FSW icalls.
1888 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
1890 * string-icalls.c: fix stringbuilder regression as suggested by
1891 Iain McCoy <iain@mccoy.id.au>.
1893 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
1895 * process.c (process_read_stringtable_block): Recognize '007f' as
1896 a language neutral stringtable block.
1898 2004-01-12 Patrik Torstensson
1900 * object.h (MonoStringBuilder) : Changed layout to support our
1901 new stringbuilder class.
1902 * marshal.c: Change marshalling to support the new layout of
1904 * appdomain.c: increased version number because new layout of
1907 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
1909 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
1910 assembly name as an string instead of an AssemblyName, since it is
1911 easier to extract info from it.
1913 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
1914 the culture subdirectories too. Fixes #52231.
1916 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1918 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
1919 It takes 2 new parameters with an optional name for the method to look
1920 for and case ignoring info.
1922 * threadpool.c: removed unused variable.
1924 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1926 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
1927 It takes 2 new parameters with an optional name for the property to look
1928 for and case ignoring info.
1931 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
1933 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
1936 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1939 * assembly.c: escape the uri before passing it to g_filename_from_uri.
1942 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
1944 * reflection.c: Add support for more than one unmanaged resource.
1946 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
1947 in field->def_value, as done in all other cases.
1949 * reflection.c (mono_reflection_get_custom_attrs): Add support for
1952 * reflection.c (mono_reflection_create_runtime_class): Remove
1953 errorneous assignment to klass->element_class, since it is already
1954 done in mono_reflection_setup_internal_class.
1956 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1958 * gc.c: added missing LeaveCriticalSection.
1959 * icall.c: indented a couple of lines.
1960 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
1961 if we call EndInvoke inside a callback. Fixes bug #52601.
1963 2004-01-07 Martin Baulig <martin@ximian.com>
1965 * mono-debug-debugger.h
1966 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
1968 2004-01-06 Miguel de Icaza <miguel@ximian.com>
1970 * appdomain.c: Use messages in NotImplementedException.
1972 * exception.c (mono_get_exception_not_implemented): Now this takes
1975 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
1976 exception instead of g_asserting an aborting when something is not
1979 Add some inline docs.
1981 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
1983 * reflection.h: Update after changes to object layout.
1985 * reflection.c: Implement saving of unmanaged aka win32 resources.
1987 * appdomain.c: Bump version number.
1989 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
1990 Handle missing domains gracefully.
1992 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
1994 * file-io.c : On Windows, there are much more invalid_path_chars.
1996 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
1998 * class.h, object.c: prepare for GetType () speedup.
2000 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
2002 * profiler.c: workaround for --profile null reference exception on
2003 cygwin. Patch by Patrik Torstensson.
2005 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
2007 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
2008 make work for unaligned access.
2010 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
2012 * class.c: small cleanup (class->fields [i] -> field).
2013 * image.c: check address of metadata is valid.
2015 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
2017 * assembly.h assembly.c (mono_assembly_loaded): New public function to
2018 search the list of loaded assemblies.
2020 * reflection.c (mono_reflection_type_from_name): Use
2021 mono_assembly_loaded instead of mono_image_loaded.
2023 * reflection.c: Fix warnings.
2025 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
2027 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
2028 is dynamic. This is needed since an assembly can contain both dynamic and
2031 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
2034 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
2036 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
2037 to store modules loaded using AddModule.
2039 * reflection.c (mono_image_fill_file_table): Generalize this so it works
2042 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
2044 * reflection.c (mono_image_fill_export_table_from_module): New function to
2045 fill out the EXPORTEDTYPES table from a module.
2047 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
2048 into a separate function. Also handle loaded non-dynamic modules.
2050 * reflection.c (mono_image_basic_init): Fix memory allocation.
2052 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2054 * assembly.c (mono_assembly_load_references): Make this public.
2056 2003-12-19 Martin Baulig <martin@ximian.com>
2058 * class.c (mono_class_initialize_generic): Made this static, take
2059 a `MonoGenericInst *' instead of a `MonoClass *'.
2060 (mono_class_from_generic): Call mono_class_initialize_generic()
2061 unless we're already initialized or being called from
2062 do_mono_metadata_parse_generic_inst().
2064 * class.h (MonoGenericInst): Added `initialized' and
2065 `init_pending' flags.
2067 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
2068 `mono_class_init (gklass)' or mono_class_initialize_generic()
2069 here; set `generic_inst->init_pending' while parsing the
2072 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
2074 * locales.c: include string.h for memxxx prototypes
2076 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
2078 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
2079 constructor when accessing literal fields.
2081 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
2083 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2085 * reflection.c (assembly_add_resource_manifest): New function to fill
2086 the MANIFESTRESOURCE table.
2088 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
2090 * reflection.h: Update to changes in class layout.
2092 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
2093 Reenable call to mono_runtime_is_shutting_down ().
2095 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
2096 determine if the runtime is shutting down.
2098 2003-12-16 Jackson Harper <jackson@ximian.com>
2100 * icall.c: comment out call to mono_runtime_is_shutting_down to
2103 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
2105 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
2106 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
2108 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
2110 * reflection.c: move definition of swap_with_size
2111 to before its first call
2113 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
2115 * appdomain.c (mono_runtime_is_shutting_down): New public function.
2117 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
2120 * object.c: Fix warnings.
2122 * icall.c (ves_icall_Type_Get...): Only consider inherited static
2123 members if FlattenHierarchy is set.
2125 * reflection.c (mono_image_add_decl_security): New function to emit
2126 declarative security.
2128 * reflection.h reflection.c: Add support for declarative security.
2130 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
2132 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
2134 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
2136 * appdomain.c verify.c: Moved corlib version checking into its own
2137 function in appdomain.c since it needs to create vtables etc.
2139 2003-12-13 Patrik Torstensson <p@rxc.se>
2141 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
2142 instead of unwrapped server.
2144 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
2146 * verify.c (check_corlib): Fix field index.
2148 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
2150 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
2153 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
2155 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
2156 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
2157 cope with sizeof(size_t) != sizeof(guint32).
2159 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2161 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
2164 2003-12-10 Mark Crichton <crichton@gimp.org>
2166 * icall.c: removed the GetNonZeroBytes. We now handle this case
2169 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
2171 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
2173 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
2176 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
2178 * verify.c (check_corlib): Handle the case when the version field is
2179 initialized by a static constructor.
2181 2003-12-08 Patrik Torstensson <p@rxc.se>
2183 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
2185 2003-12-08 Martin Baulig <martin@ximian.com>
2187 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
2188 a MonoReflectionGenericParameter, also take the parameter index
2189 and name as arguments.
2190 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
2191 (ves_icall_MonoGenericParam_initialize): New interncall.
2192 (ves_icall_Type_make_byref_type): New interncall.
2194 * reflection.h (MonoReflectionGenericParam): Derive from
2195 MonoReflectionType, not just from MonoObject. Added `refobj' and
2198 * reflection.c (mono_reflection_define_generic_parameter): Create
2199 and return a new MonoReflectionGenericParam; don't initialize the
2201 (mono_reflection_initialize_generic_parameter): New public method;
2202 initializes the constraints and creates the `param->pklass'.
2204 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
2206 * reflection.h reflection.c: Use the new fields 'num_types',
2207 'num_fields' and 'num_methods' to track the number of types etc.
2209 * verify.c (check_corlib): Check corlib version number.
2211 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
2213 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
2214 function works on all methods.
2216 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
2218 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
2219 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
2220 the custom_type_info flag of the transparent proxy.
2221 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
2222 objects that supports IRemotingTypeInfo.
2223 * object.h: Added custom_type_info field in transparent proxy.
2225 2003-12-06 Martin Baulig <martin@ximian.com>
2227 * class.c (mono_class_create_from_generic): Removed.
2228 (mono_class_from_generic): Check `ginst->klass' before doing
2229 anything else. This is important to fully support "recursive"
2232 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
2233 empty `generic_inst->klass' before doing anything else.
2235 2003-12-06 Dick Porter <dick@ximian.com>
2240 * locales.c: Use C structs to access class fields. Don't do a
2241 conversion between MonoString and UChar because both are
2242 platform-endian UTF-16. Compare now takes startindex and count
2243 parameters. Add a char overload for IndexOf. Speed up the
2244 invariant string IndexOf.
2246 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
2248 * Makefile.am (monosn_LDADD): Fix parallel build.
2250 2003-12-04 Martin Baulig <martin@ximian.com>
2253 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
2254 (ves_icall_Type_make_array_type): New interncall.
2256 2003-12-04 Martin Baulig <martin@ximian.com>
2258 * locales.c: also change it in the !HAVE_ICU case.
2260 2003-12-04 Dick Porter <dick@ximian.com>
2263 * locales.c: construct_compareinfo is now in CompareInfo, not
2266 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
2268 * image.c (mono_image_load_file_for_image): Cache loaded images in the
2271 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
2274 * assembly.c (mono_assembly_load_references): Only load references
2277 * class.c (mono_class_from_name): Avoid linear search of the
2280 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
2282 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
2284 * image.h (MonoImage): Add 'field_cache' field.
2286 * loader.c (mono_field_from_token): Cache field lookups.
2288 * reflection.c (mono_module_get_object): Fix name property.
2290 * icall.c (ves_icall_get_enum_info): Update after changes to
2291 mono_metadata_get_constant_index ().
2293 * icall.c: Get rid of get_type_info icall, use a separate icall for
2294 each type property to avoid needless memory allocations. Fixes #51514.
2296 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
2297 to avoid needless binary searches.
2299 * class.c (class_compute_field_layout): Move the initialization of
2300 field->def_value to mono_class_vtable ().
2302 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
2305 * object.c (mono_object_allocate): Make it inline.
2307 * object.c (mono_object_allocate_spec): Make it inline.
2309 2003-12-02 Dick Porter <dick@ximian.com>
2311 * locales.c (create_NumberFormat): NumberFormatInfo construction.
2312 Patch by Mohammad DAMT (mdamt@cdl2000.com).
2314 2003-12-01 Dick Porter <dick@ximian.com>
2316 * threads.c: Fix signature and call in CreateMutex and
2319 2003-12-01 Dick Porter <dick@ximian.com>
2322 * locales.c: Implement string compares and searching
2324 * object.h: Add extra Thread field
2326 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
2328 * reflection.c (fixup_method): Add support for MonoCMethod.
2330 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
2332 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
2334 * reflection.c (assembly_name_to_aname): Allow extra characters in
2335 assembly names. Fixes #51468.
2337 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
2339 * exception.c (mono_exception_from_name_domain): New helper function.
2341 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
2342 exception object in the correct domain.
2344 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
2345 formatting + make a copy a the input data.
2347 * loader.c (mono_get_method_from_token): Methods which contain
2348 native code do not have entries in the ImplMap.
2350 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
2351 Thanks to Gonzalo for spotting this.
2353 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
2354 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
2356 * assembly.h (mono_assembly_load_from): Split the second part of
2357 assembly loading into a new public function.
2359 * exception.h (mono_get_exception_bad_image_format): New function.
2361 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
2363 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2364 Enumerate all modules inside a dynamic assembly. Fixes #51293.
2366 * icall.c: Add new icall for creating dynamic methods.
2368 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
2370 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
2372 * reflection.c (mono_reflection_create_dynamic_method): New icall to
2373 create a dynamic method.
2375 * reflection.c (resolve_object): New helper function.
2377 * reflection.c: Generalize ReflectionMethodBuilder and the functions
2378 which manipulate it so they can also work on dynamic methods.
2380 * reflection.c (reflection_method_builder_to_mono_method): Avoid
2381 creating the MonoReflectionMethodAux structure if it is not needed.
2383 * reflection.h verify.c: Update after changes to object layout.
2385 * reflection.c (method_builder_encode_signature): Fix compilation on
2388 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
2390 * appdomain.h: Added support for context static fields. Added static_data
2391 field to MonoAppContext and renamed thread_static_fields to a more
2392 generic special_static_fields in MonoAppDomain, since it can now contain
2393 context static fields.
2394 * domain.c: Updated hashtable name.
2395 * object.c: Replaced field_is_thread_static() for a more generic
2396 field_is_special_static() which also checks for context static attribute.
2397 In mono_class_vtable(), added support for static context fields.
2398 * threads.c: Changed methods that manage thread static fields to more
2399 generic methods so they can be reused both for thread and context static
2401 * threads.h: Declared some new methods.
2403 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
2405 * reflection.h: Update after changes to the managed types.
2407 * reflection.c (encode_custom_modifiers): New helper function.
2409 * reflection.c (method_encode_signature): Emit custom modifiers.
2411 * reflection.c (field_encode_signature): Emit custom modifiers.
2413 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
2415 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
2417 * icall.c (ves_icall_System_ValueType_Equals): New optimized
2420 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
2423 * object.c (mono_field_get_value_object): New function.
2425 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
2428 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
2430 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
2431 return a preallocated out-of-memory exception instance.
2433 * object.c (out_of_memory): Use the new function.
2435 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
2436 flag is before the custom modifiers. Fixes #49802.
2438 2003-11-16 Martin Baulig <martin@ximian.com>
2440 * class.c (mono_class_is_open_constructed_type): Implemented the
2441 MONO_TYPE_GENERICINST case.
2443 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
2445 * assembly.c (mono_assembly_fill_assembly_name): New function to
2446 fill out the MonoAssemblyName structure.
2447 (mono_assembly_open): Use the new function.
2449 * icall.c (fill_reflection_assembly_name): New helper function.
2451 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
2454 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
2456 2003-11-15 Martin Baulig <martin@ximian.com>
2458 * class.c (mono_class_is_open_constructed_type): New public
2459 function; checks whether a type is an open constructed type,
2460 ie. whether it still contains type parameters.
2461 (mono_class_inflate_generic_type): If we're a type parameter and
2462 the inflated type is also a MONO_TYPE_(M)VAR, return the original
2465 * class.h (MonoGenericInst): Added `guint32 is_open'.
2467 * loader.c (method_from_methodspec): Check whether we're an open
2468 or closed constructed type and set `ginst->is_open'.
2470 * reflection.c (mono_reflection_bind_generic_parameters): Check
2471 whether we're an open or closed constructed type and set
2473 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
2474 from open constructed types.
2476 2003-11-15 Martin Baulig <martin@ximian.com>
2478 * reflection.c (mono_reflection_bind_generic_parameters): If we're
2479 a generic instance (instead of a generic type declaration) with
2480 unbound generic parameters, bind them to our actual types.
2482 2003-11-14 Martin Baulig <martin@ximian.com>
2484 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
2486 * reflection.c (mono_reflection_bind_generic_parameters): If we're
2487 an interface type, populate `res->interfaces' with instantiated
2488 versions of all the interfaces we inherit.
2490 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
2492 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
2493 when MONO_PATH is set but doesn't contain the install dir.
2495 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2498 (ves_icall_Type_GetInterfaces): don't return an interface twice when
2499 it's also implemented in base classes. Fixes bug #50927.
2501 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
2503 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
2504 if this method is called from a finalizer. Fixes #50913.
2506 2003-11-12 Miguel de Icaza <miguel@ximian.com>
2508 * threads.c: Implement VolatileRead/VolatileWrite
2510 * icall.c: Add new icalls for VolatileRead/VolatileWrite
2512 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
2514 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
2515 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
2518 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
2519 from Peter Ross (pro@missioncriticalit.com).
2521 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
2523 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
2525 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
2527 * assembly.c (mono_assembly_load_references): Disable check because it
2528 triggers on older corlibs which lots of people have.
2530 2003-11-12 Jackson Harper <jackson@ximian.com>
2532 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
2533 load corlib.dll if mscorlib.dll is not found.
2534 * assembly.h: Remove corlib name define.
2537 * image.c: Change corlib name to mscorlib.
2539 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
2541 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
2543 2003-11-11 Miguel de Icaza <miguel@ximian.com>
2545 * appdomain.h: Added loader_optimization here to sync with the C#
2546 code, and add disallow_binding_redirects field.
2548 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
2550 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
2552 * reflection.c (mono_image_build_metadata): Fix crash on modules
2555 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
2557 * icall.c (ves_icall_get_method_info): Return callingConvention as
2560 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
2561 namespaces from the EXPORTEDTYPE table as well.
2563 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
2564 from all modules inside the assembly.
2566 2003-11-11 Martin Baulig <martin@ximian.com>
2568 * reflection.c (mono_reflection_bind_generic_parameters): Make
2569 this work for interfaces.
2571 2003-11-11 Martin Baulig <martin@ximian.com>
2573 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
2575 2003-11-11 Martin Baulig <martin@ximian.com>
2577 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
2578 "MonoInflatedMethod" and "MonoInflatedCtor".
2580 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
2582 * reflection.c (resolution_scope_from_image): Use the assembly table
2583 from the manifest module, since other modules don't have it.
2585 * debug-helpers.c (mono_type_full_name): New helper function.
2587 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
2589 * image.c (mono_image_load_file_for_image): New public function which
2590 is a replacement for the load_file_for_image in class.c.
2592 * assembly.c (mono_assembly_load_module): A wrapper for the function
2593 above which does assembly association and reference loading too.
2595 * class.c (mono_class_from_name): Call mono_assembly_load_module.
2597 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2599 * appdomain.c: not all of the attributes for the full assembly name
2600 are required and the order doesn't matter. Fixes bug #50787.
2602 2003-11-10 Dick Porter <dick@ximian.com>
2604 * locales.c: Use platform-endian UTF16
2606 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
2608 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
2610 2003-11-10 Martin Baulig <martin@ximian.com>
2613 (mono_metadata_load_generic_params): Make this actually work.
2615 * reflection.c (mono_reflection_bind_generic_parameters): If our
2616 parent is a generic instance, pass all the `types' to it, no
2617 matter whether it has the same number of type parameters or not.
2619 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
2621 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
2623 * assembly.c (mono_assembly_load_references): Move the image<->assembly
2624 assignment code to this function so it gets called recursively for all
2627 * image.c (load_modules): Remove the assembly assignment since it is
2628 now done by mono_assembly_load_references.
2630 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2631 Add 'module' argument.
2632 (mono_module_get_types): New helper function.
2633 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
2635 2003-11-08 Martin Baulig <martin@ximian.com>
2637 * class.c (mono_class_inflate_generic_method): Interface method
2638 don't have a header.
2640 * reflection.c (mono_image_get_methodspec_token): Take an
2641 additional `MonoGenericInst *' argument instead of reading it from
2642 the header; this is necessary to support interfaces.
2643 (mono_image_create_token): Pass the `MonoGenericInst *' from the
2644 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
2645 (inflated_method_get_object): Take an additional `MonoGenericInst *'
2648 * reflection.h (MonoReflectionInflatedMethod): Added
2649 `MonoGenericInst *ginst'.
2651 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
2653 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
2655 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
2657 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
2659 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
2662 (reflection_methodbuilder_from_method_builder):
2663 (reflection_methodbuilder_from_ctor_builder): New helper functions to
2664 initialize a ReflectionMethodBuilder structure.
2665 (mono_image_get_methodbuilder_token):
2666 (mono_image_get_ctorbuilder_token): New functions to emit memberref
2667 tokens which point to types in another module inside the same assembly.
2669 * reflection.c: Use the new helper functions.
2671 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
2673 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
2674 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
2676 * reflection.c (resolution_scope_from_image): Emit a moduleref if
2679 * reflection.c (mono_image_build_metadata): Emit metadata only for the
2680 current module. Emit the manifest only for the main module.
2682 * reflection.c (mono_image_create_token): Add assertion when a
2683 memberref needs to be created.
2685 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
2687 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
2688 larger buffer for the custom attribute blob. Fixes #50637.
2690 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2692 * threadpool.c: notify listener on async processing handles after
2693 invoking the async callback. Thanks to Zoltan.
2695 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
2697 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
2698 avoid code duplication.
2700 * reflection.h (MonoDynamicImage): New type which is currently unused,
2701 but will be used through the ref.emit code in place of
2702 MonoDynamicAssembly.
2704 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
2707 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
2708 a MonoDynamicImage instead of just a MonoImage.
2710 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
2711 icalls to ModuleBuilder but keep their semantics, so they will work
2712 with moduleb->assemblyb. This will change later.
2714 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
2716 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
2719 * reflection.c (mono_image_build_metadata): Avoid creation of a default
2720 main module, since it is now done by the managed code.
2722 2003-11-03 Martin Baulig <martin@ximian.com>
2724 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
2725 `ginst->klass' here.
2726 (method_encode_methodspec): Don't use the `ginst->generic_method's
2727 klass if it's a generic instance, use `ginst->klass' in this case.
2729 2003-11-03 Martin Baulig <martin@ximian.com>
2731 * reflection.c (mono_image_get_generic_method_param_info):
2732 Removed, use mono_image_get_generic_param_info() instead.
2733 (mono_image_get_type_info): Write the GenericParam table before
2734 the Method table. This is neccessary because in the GenericParam
2735 table, type parameters of the class (ie. '!0' etc.) must come
2736 before the ones from its generic methods (ie. '!!0' etc).
2738 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
2740 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
2742 2003-11-02 Martin Baulig <martin@ximian.com>
2744 * reflection.c (create_generic_typespec): Take a
2745 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
2746 the generic parameters from it.
2748 2003-11-02 Martin Baulig <martin@ximian.com>
2750 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
2751 instead of a `MonoClassField *' since we just need the type.
2752 (create_generic_typespec): New static function. Creates a
2753 TypeSpec token for a generic type declaration.
2754 (mono_image_get_generic_field_token): New static function.
2755 (mono_image_create_token): If we're a FieldBuilder in a generic
2756 type declaration, call mono_image_get_generic_field_token() to get
2759 2003-11-02 Martin Baulig <martin@ximian.com>
2762 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
2763 `MonoReflectionGenericInst *declaring_type' and
2764 `MonoReflectionGenericInst *reflected_type' fields.
2766 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
2767 `MonoReflectionGenericInst *declaring_type' and a
2768 `MonoReflectionGenericInst *reflected_type' argument instead of a
2769 single `MonoReflectionGenericInst *type' one. Set
2770 `res->declaring_type' and `res->reflected_type' from them.
2771 (mono_reflection_inflate_field): Likewise.
2773 2003-11-02 Martin Baulig <martin@ximian.com>
2775 * class.c (mono_class_setup_vtable): Don't store generic methods
2778 2003-11-02 Martin Baulig <martin@ximian.com>
2780 * reflection.h (MonoReflectionGenericInst): Added
2781 `MonoReflectionType *declaring_type'.
2783 * reflection.c (mono_reflection_bind_generic_parameters): Use
2784 `if (tb->parent)' instead of `klass->parent'.
2786 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
2788 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
2789 with an empty ASSEMBLY table.
2791 * reflection.c (mono_image_build_metadata): Avoid using the same loop
2792 variable in the inner and outer loops.
2794 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
2796 * metadata.h (mono_metadata_make_token): Put parentheses around macro
2799 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
2801 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
2802 icalls. Instead, do everything in managed code. This is needed since
2803 it is hard to restore the original domain etc. in unmanaged code in the
2804 presence of undeniable exceptions.
2806 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
2807 New icalls to push and pop appdomain refs.
2809 2003-10-31 Martin Baulig <martin@ximian.com>
2811 * class.c (inflate_generic_type): Renamed to
2812 mono_class_inflate_generic_type() and made it public.
2814 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
2817 * loader.c (mono_field_from_memberref): Also set the retklass for
2820 * fielder.c (mono_image_get_inflated_field_token): New static
2821 method; creates a metadata token for an inflated field.
2822 (mono_image_create_token, fixup_method): Added support for
2823 "MonoInflatedField".
2824 (fieldbuilder_to_mono_class_field): New static function.
2825 (mono_reflection_inflate_field): New public function.
2828 (MonoReflectionGenericInst): Added `MonoArray *fields'.
2829 (MonoReflectionInflatedField): New typedef.
2831 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
2833 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
2834 for Solaris and other platforms without s6_addr16
2836 2003-10-30 Martin Baulig <martin@ximian.com>
2838 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
2839 argument instead of two.
2840 (mono_class_inflate_generic_signature): Likewise.
2841 (inflate_generic_header): Likewise.
2842 (mono_class_inflate_generic_method): Likewise. In addition, if
2843 `ginst->klass' is set, it becomes the new `method->klass'.
2845 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
2848 * reflection.c (encode_generic_method_sig): Write a 0xa as the
2850 (method_encode_methodspec): If we have generic parameters, create
2851 a MethodSpec instead of a MethodRef.
2852 (fixup_method): Added support for "MonoInflatedMethod" and
2854 (mono_image_create_token): Added support for "MonoInflatedMethod"
2855 and "MonoInflatedCtor".
2856 (inflated_method_get_object): New static function; returns a
2857 managed "System.Reflection.MonoInflatedMethod" object.
2858 (mono_reflection_bind_generic_method_parameters): Return a
2859 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
2860 (mono_reflection_inflate_method_or_ctor): Likewise.
2861 (mono_image_get_generic_method_param_info): Initialize unused
2863 (mono_image_get_generic_param_info): Likewise.
2865 * reflection.h (MonoReflectionInflatedMethod): New public
2866 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
2867 "S.R.MonoInflatedCtor" classes.
2869 * loader.c (method_from_memberref): If we're a TypeSpec and it
2870 resolves to a generic instance, inflate the method.
2872 2003-10-28 Dick Porter <dick@ximian.com>
2874 * object.c (mono_runtime_run_main): Convert command-line arguments
2875 into utf8, falling back to the user's locale encoding to do so.
2877 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
2879 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
2882 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
2884 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
2885 up icalls at method definition time. Partially fixes #33569.
2887 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
2889 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
2890 marshalling of arrays. Fixes #50116.
2892 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
2894 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
2895 points to a vtable in the dying appdomain.
2897 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
2898 listeners into unmanaged code inside the lock.
2900 * object.c (mono_class_vtable): Turn off typed allocation in non-root
2901 domains and add some comments.
2903 2003-10-25 Martin Baulig <martin@ximian.com>
2905 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
2907 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
2909 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
2910 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
2911 currently parsing. Create the generic class and store it in
2912 `generic_inst->klass' before parsing the type arguments. This is
2913 required to support "recursive" definitions; see mcs/tests/gen-23.cs
2915 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
2916 to support recursive typespec entries.
2918 * class.c (mono_class_setup_parent): If our parent is a generic
2919 instance, we may get called before it has its name set.
2920 (mono_class_from_generic): Splitted into
2921 mono_class_create_from_generic() and mono_class_initialize_generic().
2923 2003-10-25 Martin Baulig <martin@ximian.com>
2925 * icall.c (ves_icall_Type_BindGenericParameters): Return a
2926 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
2927 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
2928 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
2930 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
2931 (create_typespec): Likewise.
2932 (mono_reflection_bind_generic_parameters): Return a
2933 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
2934 (mono_reflection_inflate_method_or_ctor): New public function.
2936 * reflection.h (MonoReflectionGenericInst): New typedef.
2938 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
2940 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
2941 inside the domain lock. Fixes #49993.
2943 * object.c (mono_class_vtable): When typed allocation is used,
2944 allocate vtables in the GC heap instead of in the mempool, since the
2945 vtables contain GC descriptors which are used by the collector even
2946 after the domain owning the mempool is unloaded.
2948 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
2950 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
2951 reflect what it does. Also invalidate mempools instead of freeing
2952 them if a define is set.
2954 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
2957 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
2958 hold the finalizable objects in this domain.
2960 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
2963 * appdomain.c (mono_domain_set): New function to set the current
2964 appdomain, but only if it is not being unloaded.
2966 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
2967 appdomain which is being unloaded.
2969 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
2970 unloading of the root appdomain.
2972 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
2973 icall to execute a method in another appdomain. Intended as a
2974 replacement for InternalSetDomain, which can confuse the code
2975 generation in the JIT.
2977 * appdomain.c (mono_domain_is_unloading): New function to determine
2978 whenever an appdomain is unloading.
2980 * appdomain.c (mono_domain_unload): New function to correctly unload
2983 * assembly.c (mono_assembly_load_references): Check that an assembly
2984 does not references itself.
2986 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
2987 domain manually, it asks the finalizer thread to do it, then waits for
2988 the result. Also added a timeout.
2990 * icall.c: Register the new icalls.
2992 * threads.h threads.c: Export the mono_gc_stop_world and
2993 mono_gc_start_world functions.
2995 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
2996 function to fill out the mempool with 0x2a.
2998 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
3000 * reflection.h (MonoReflectionMethodAux): New structure to store
3001 information which is rarely used, thus is not in the MonoMethod
3004 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
3007 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
3008 and marshalling info into the aux structure.
3010 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
3011 from the aux structure.
3013 * loader.c (mono_method_get_param_names): Retrieve the param names from
3016 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
3018 * exception.h exception.c: Add AppDomainUnloadedException && fix
3021 2003-10-21 Dick Porter <dick@ximian.com>
3024 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
3025 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
3027 2003-10-21 Martin Baulig <martin@ximian.com>
3029 * reflection.c (mono_reflection_bind_generic_parameters):
3030 `klass->parent' is NULL for interfaces.
3032 2003-10-21 Martin Baulig <martin@ximian.com>
3034 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3036 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
3038 * exception.c (mono_exception_from_name_msg): New helper function for
3039 creating exceptions and initializing their message field.
3041 * exception.c: Simplify functions using the new helper.
3043 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
3046 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
3047 mono_raise_exception, since otherwise gcc doesn't generate the function
3048 epilog for raise_exception, confusing the stack unwinding in the JIT.
3051 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
3052 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
3055 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3057 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
3060 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
3062 * icall.c: Removed GetUninitializedObject method because
3063 AllocateUninitializedClassInstance does the same.
3065 2003-10-18 Martin Baulig <martin@ximian.com>
3067 * class.c (inflate_generic_signature): Renamed to
3068 mono_class_inflate_generic_signature() and made it public.
3069 (my_mono_class_from_generic_parameter): New static function; if we
3070 don't already have the generic parameter's MonoClass, create a
3071 very simple one which is just used internally in the runtime and
3072 not passed back to managed code.
3074 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
3076 * metadata.h (MonoMethodSignature): Moved the
3077 `MonoGenericParam *gen_params' to the MonoMethodHeader.
3078 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
3080 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
3081 ves_icall_MonoMethod_GetGenericArguments(); this is now an
3082 interncall on the MonoMethod class, not on MethodInfo.
3083 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
3084 calling mono_reflection_bind_generic_method_parameters() directly.
3086 * loader.c (mono_method_get_signature): If this is a MethodSpec;
3087 return the already computed `method->signature'.
3088 (method_from_methodspec): New static function to load a method
3089 from a MethodSpec entry.
3090 (mono_get_method_from_token): Call the new method_from_methodspec()
3091 for MethodSpec tokens.
3092 (mono_get_method_from_token): If we're a generic method, load the
3095 * reflection.c (mono_image_get_memberref_token): Allow
3096 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
3098 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
3099 (mono_image_create_token): First check whether it's a generic
3100 method (so we'd need to create a MethodSpec), then do the other
3102 (mono_reflection_bind_generic_method_parameters): Return a
3103 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
3104 called directly from the interncall.
3106 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
3108 * reflection.c (load_public_key): Move loading of the public key
3111 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
3113 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
3116 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
3117 culture, hash_alg and public_key. Fixes #49555.
3119 2003-10-17 Martin Baulig <martin@ximian.com>
3121 * class.h (MonoGenericInst): Moved this declaration here and added
3122 `MonoMethod *generic_method'.
3125 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
3126 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
3128 * metadata.c (mono_metadata_type_equal): Two types of
3129 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
3130 index; ie. don't compare the address of the `MonoGenericParam'
3132 (mono_metadata_load_generic_params): Removed the `MonoMethod
3135 * metadata.h (MonoGenericInst): Moved declaration to class.h.
3136 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
3138 * reflection.c (method_encode_signature): Encode the number of
3140 (encode_generic_method_sig): New static function.
3141 (method_encode_methodspec): New static function; creates an entry
3142 in the MethodSpec table for a generic method.
3143 (mono_image_get_methodspec_token): New static function.
3144 (mono_image_create_token): Call mono_image_get_methodspec_token()
3145 for generic methods.
3146 (mono_reflection_bind_generic_method_parameters): New public
3147 function. Instantiates a generic method.
3149 2003-10-16 Martin Baulig <martin@ximian.com>
3151 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
3152 *gen_params' here from MonoMethodHeader.
3154 * metadata.c (mono_metadata_parse_method_signature): If we have
3155 generic parameters, initialize `method->gen_params' and then set
3156 the correct `type->data.generic_param' in all the parameters.
3158 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
3160 * threads.c (mono_threads_get_default_stacksize): New function to
3161 return the default stacksize.
3163 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
3164 termination of the finalizer thread, since the previous method had
3165 race conditions. Fixes #49628.
3167 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
3168 as for the other managed threads.
3170 2003-10-16 Martin Baulig <martin@ximian.com>
3172 * class.c (inflate_generic_signature): Copy `generic_param_count'
3175 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
3178 * metadata.c (mono_metadata_parse_method_signature): Actually set
3179 the `method->generic_param_count' here.
3180 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
3182 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
3184 * object.h: Add a new field to TypedRef to simplify the implementation
3185 of the REFANY opcodes in the JIT.
3187 * icall.c: Make use of the new field.
3189 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
3192 2003-10-15 Martin Baulig <martin@ximian.com>
3194 * class.c (mono_class_from_gen_param): Renamed to
3195 mono_class_from_generic_parameter() and moved most of the
3196 functionality from mono_reflection_define_generic_parameter()
3197 here; ie. we create a "real" class here.
3198 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
3199 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
3200 previously been called.
3202 * class.h (MonoGenericParam): Moved the declaration of this struct
3203 here from metadata.h and added `MonoMethod *method'.
3205 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
3208 * loader.c (mono_get_method_from_token): If we have any generic
3209 parameters, call mono_metadata_load_generic_params() to read them
3210 from the MONO_TABLE_GENERICPAR.
3212 * metadata.c (mono_metadata_load_generic_params): Added
3213 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
3215 * metadata.h (MonoMethodSignature): Replaced
3216 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
3217 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
3219 * reflection.c (mono_reflection_define_generic_parameter): Moved
3220 most of the functionality into the new
3221 mono_class_from_generic_parameter(); set the `method' field if
3222 we're a method parameter.
3224 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
3226 * marshal.c (emit_struct_conv): if native size is 0
3229 2003-10-14 Martin Baulig <martin@ximian.com>
3231 * icall.c: The generics API has changed in the spec since it was
3232 added to System.Type; these modifications make it match the spec
3234 (ves_icall_Type_GetGenericParameters): Renamed to
3235 `ves_icall_Type_GetGenericArguments'.
3236 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
3237 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
3238 `ves_icall_MonoType_get_HasGenericArguments'.
3239 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
3240 `ves_icall_MonoType_get_IsGenericParameter'.
3241 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
3242 this is no interncall anymore.
3243 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
3244 `ves_icall_TypeBuilder_get_IsGenericParameter'.
3246 2003-10-14 Martin Baulig <martin@ximian.com>
3248 * reflection.c (mono_reflection_bind_generic_parameters): Also
3249 inflate generic methods if we're reading the class from IL.
3251 2003-10-13 Martin Baulig <martin@ximian.com>
3253 * reflection.c (mono_reflection_define_generic_parameter): This
3254 method isn't called directly from the icall anymore; take a
3255 `MonoReflectionAssemblyBuilder *' so we can use this for type and
3256 method generic parameters.
3257 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
3258 (method_builder_encode_signature): Encode generic parameters.
3259 (mono_image_get_method_info): Write generic params to the
3260 MONO_TABLE_GENERICPARAM table.
3262 * reflection.h (MonoReflectionMethodBuilder): Added
3263 `MonoArray *generic_params'.
3265 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
3267 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
3268 wrapper for mono_reflection_define_generic_parameter().
3269 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
3271 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
3273 * marshal.h: Add missing function to fix build.
3275 * marshal.c (mono_marshal_get_native_wrapper): Add support for
3276 the SetLastError pinvoke attribute.
3278 * marshal.c (mono_marshal_set_last_error): New helper function called
3279 by the generated code.
3281 * marshal.c (mono_mb_emit_branch): New helper function.
3283 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
3285 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
3286 classes as parameters and return values of delegates. Fixes #29256.
3288 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
3290 * locales.c: use gint32 in non HAVE_ICU case
3292 2003-10-11 Martin Baulig <martin@ximian.com>
3294 * mono-debug.c (mono_debug_add_method): Added a workaround for
3297 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
3299 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
3300 delegates passed to native code must use the STDCALL calling
3301 convention. Fixes #35987.
3303 2003-10-10 Martin Baulig <martin@ximian.com>
3305 * class.c (inflate_generic_type): If we're inflating for a generic
3306 type instance (and not for a generic method), return
3307 MONO_TYPE_MVAR unchanged.
3309 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3311 * string-icalls.c: Join ignores null strings in the source array.
3312 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
3313 * threads.c: GetAvailableTheads is slightly more accurate.
3315 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
3317 * threads.h threads.c : add mono_threads_set_default_stacksize
3318 and pass default to CreateThread calls.
3320 2003-10-09 Dick Porter <dick@ximian.com>
3324 * locales.c: Internal calls for constructing CultureInfo and
3325 related objects from libicu (if its available.)
3327 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
3329 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
3331 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3333 * threadpool.c: added an argument to async_invoke_thread that is the
3334 item to process, pass the MonoAsyncResult to the thread start function
3335 when creating a new thread. This way we don't need to acquire any lock
3336 when we're creating a new thread. Readded a semaphore for faster
3337 response times (instead of that Sleep i added).
3339 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
3341 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
3342 get daylight change dates better on Windows, fix handling
3343 of platforms without tm_gmtoff.
3345 2003-10-06 Martin Baulig <martin@ximian.com>
3347 * class.c (inflate_generic_method): Renamed to
3348 mono_class_inflate_generic_method() and made public.
3349 (mono_class_init): Don't inflate the generic methods here.
3350 (mono_class_from_generic): Added `gboolean inflate_methods'
3351 argument. Inflate the methods here.
3353 * loader.c (mono_method_get_param_names): Ignore instances of
3354 generic types for the moment.
3356 * reflection.c (fixup_method): Added support for inflated methods.
3357 (mono_image_create_token): Use mono_image_get_methodref_token()
3358 for inflated methods.
3359 (mono_custom_attrs_from_param): Ignore instances of generic types
3361 (mono_reflection_bind_generic_parameters): New public function.
3362 Moved all the functionality from
3363 ves_icall_Type_BindGenericParameters() here and added support for
3365 (mono_reflection_define_generic_parameter): Initialize
3366 `klass->methods' here.
3368 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
3369 functionality into mono_reflection_define_generic_parameter().
3370 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
3371 TypeBuilder, return that TypeBuilder.
3373 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3375 * appdomain.c: removed mono_delegate_semaphore.
3378 (mono_thread_pool_add): moved hash table creation inside and the thread
3379 creation outside of the critical region.
3380 (mono_thread_pool_finish): removed obsolete code.
3381 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
3382 continue or exit the thread depending on the queue.
3384 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
3386 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
3387 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
3388 handle more bool marshalling options
3390 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
3392 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
3393 arrays of structs. Also add a more descriptive error message when
3394 a structure member is marshalled as LPArray.
3396 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
3398 * marshal.c (mono_marshal_get_native_wrapper): Add support for
3399 marshalling arrays of complex types. Fixes #29098. Also remove an
3400 usused and incomplete function.
3402 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
3404 * gc.c: report heap_size - free_bytes as total memory allocated
3407 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
3409 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
3410 fix timezone handling problems on Windows.
3412 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
3413 asserts when the year is outside the range handled by ms the functions.
3415 * class.c (setup_interface_offsets): If the class is an interface,
3416 fill out its interface_offsets slot.
3418 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3420 * threadpool.c: mark threadpool threads as background.
3422 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
3424 * decimal.c - define DECINLINE to nothing if not using GCC
3426 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
3428 * assembly.c: More refcount fixes.
3430 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3432 * string-icalls.c: if we're not trimming, return the same string.
3433 When not splitting, don't create a new string.
3435 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3438 (mono_image_open): increment the ref_count inside the critical section.
3440 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
3442 * image.c (mono_image_open): Fix reference counting bug.
3444 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
3446 * marshal.c (mono_marshal_type_size) struct alignment changed for
3447 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
3448 64bits. Avoid leak in mono_marshal_get_native_wrapper when
3449 mono_lookup_pinvoke_call throws.
3451 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
3453 * reflection.c (mono_reflection_parse_type): Fix #49114.
3455 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
3456 temporary workaround for cygwin header problem.
3458 * object.c (mono_object_isinst): Synchronize this with the code
3459 generated by the JIT for casts.
3461 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
3463 * reflection.c (encode_type): Fix #38332.
3465 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
3467 * marshal.c (mono_marshal_method_from_wrapper): New function to return
3468 the original method from the wrapper method.
3470 2003-09-25 Martin Baulig <martin@ximian.com>
3472 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
3473 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
3474 (ves_icall_Type_get_IsGenericInstance): New interncall.
3476 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
3478 * object.c: fix cast warning in big endian code.
3480 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
3482 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
3484 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3486 * assembly.c: don't call check_env from mono_assembly_load. It's
3487 already done once in mono_assemblies_init and may cause headaches when
3488 multiple threads are loading assemblies.
3490 2003-09-19 Martin Baulig <martin@ximian.com>
3492 * reflection.c (mono_reflection_define_generic_parameter): Don't
3493 allocate `klass->methods', set `klass->flags' to
3494 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
3496 2003-09-18 Martin Baulig <martin@ximian.com>
3498 * class.c (mono_class_init): Don't create `class->methods' if it's
3499 already initialized.
3501 * metadata.c (mono_metadata_load_generic_params): Make this
3504 * reflection.c (mono_reflection_define_generic_parameter): Set
3505 parent class and interfaces from the constraints.
3507 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
3508 to keep this struct in sync with the declaration in TypeBuilder.cs.
3510 2003-09-17 Martin Baulig <martin@ximian.com>
3512 * metadata.h (MonoType): Replaced the data's `int type_param'
3513 field with `MonoGenericParam *generic_param'.
3514 (MonoGenericParam): Added `MonoClass *klass'.
3516 * class.c (mono_class_from_gen_param): Removed the
3517 `MonoImage *image' and `int type_num' arguments.
3519 * metadata.c (mono_metadata_parse_generic_param): New static
3520 method; creates a MonoGenericParam which just contains the index.
3521 (do_mono_metadata_parse_type): Call
3522 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
3525 * reflection.c (mono_image_typedef_or_ref): Generic type
3526 parameters may be in the same assembly, but never use a typedef
3528 (mono_reflection_define_generic_parameter): We're now creating a
3529 "real" class for the type parameter; it's now safe to call
3530 mono_class_from_mono_type() on the class'es type, it'll do the
3533 2003-09-16 Martin Baulig <martin@ximian.com>
3535 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
3536 `symfile->range_entry_size' and `symfile->class_entry_size' here;
3537 the `symfile' data structure must be fully initialized before it
3538 gets added to the table.
3540 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
3542 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
3544 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
3545 class init trampolines.
3547 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
3549 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
3550 to the built-in profiler to turn off time and allocation profiling
3553 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
3555 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
3558 * debug-helpers.c (mono_method_full_name): Print the wrapper type
3559 in human readable form.
3561 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
3563 * reflection.c icall.c: Fixed warnings.
3565 * image.c (load_class_names): Use a temporary hash table to hold the
3566 namespaces in order to avoid doing many string comparisons.
3568 * image.h: Fix typo.
3570 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
3571 Pass NULL instead of g_direct_equal to the GHashTable constructor
3572 since the NULL case is short-circuited inside g_hash_table_lookup,
3573 leading to better performance.
3575 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
3576 obtain the first custom attribute for a given index. Depends on the
3577 CustomAttribute table being sorted by the parent field.
3579 * reflection.c (mono_custom_attrs_from_index): Use the new function
3580 for better performance.
3582 2003-09-07 Martin Baulig <martin@ximian.com>
3584 * class.c (mono_class_init): If we're a generic instance, inflate
3585 all our methods instead of loading them from the image.
3586 (mono_class_from_generic): Set `class->methods = gklass->methods'.
3588 2003-09-07 Martin Baulig <martin@ximian.com>
3590 * mono-debug-debugger.c: Added support for constructors.
3592 2003-09-06 Martin Baulig <martin@ximian.com>
3594 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
3597 * reflection.c (mono_reflection_setup_generic_class): Call
3598 ensure_runtime_vtable() to create the vtable.
3600 2003-09-05 Martin Baulig <martin@ximian.com>
3602 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
3605 2003-09-04 Martin Baulig <martin@ximian.com>
3607 * reflection.c (mono_reflection_define_generic_parameter): Generic
3608 parameters start with zero.
3610 2003-09-04 Martin Baulig <martin@ximian.com>
3612 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3614 * reflection.h (MonoReflectionGenericParam): New typedef.
3615 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
3616 the generic parameters from the managed TypeBuilder.
3618 * reflection.c (mono_reflection_define_generic_parameter): New function.
3619 (mono_reflection_create_runtime_class): Encode generic parameters.
3620 (mono_reflection_setup_generic_class): New function; this is
3621 called after adding adding all generic params to the TypeBuilder.
3622 (encode_type): Added MONO_TYPE_VAR.
3624 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
3626 * class.h class.c (mono_class_needs_cctor_run): Moved this method
3629 * assembly.h assembly.c: Moved the AOT loading code into an assembly
3632 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
3634 * reflection.h reflection.c class.h class.c: Delete duplicate
3635 definition of mono_type_get_name () from reflection.c and export the
3638 * class.c: Class loading fixes from Bernie Solomon
3639 (bernard@ugsolutions.com).
3641 * reflection.c: Endianness fixes from Bernie Solomon
3642 (bernard@ugsolutions.com).
3644 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
3646 * assembly.h assembly.c: Define a file format version for AOT
3649 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
3651 * appdomain.h (MonoJitInfo): New field to determine whenever the
3652 code is domain neutral.
3654 2003-08-31 Miguel de Icaza <miguel@ximian.com>
3656 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
3658 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
3660 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
3661 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
3662 Avoid caching the result since strings must be domain specific. Fixes
3665 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
3667 * marshal.c (mono_marshal_init): Make this callable multiple times
3668 since it is hard to find a correct place to call it.
3670 * object.c (mono_runtime_class_init): Execute static constructors in
3671 the correct appdomain.
3673 * image.c (build_guid_table): Handle the case when multiple images have
3676 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3678 * icall.c: added a couple of icalls for System.Web.
3680 2003-08-28 Martin Baulig <martin@ximian.com>
3682 * icall.c (ves_icall_Type_BindGenericParameters): Use
3683 `klass->generic_inst' instead of `&klass->byval_arg' in the
3684 mono_type_get_object() call. The returned type must be
3685 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
3687 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
3691 * object.c (mono_class_proxy_vtable): Make it thread safe.
3693 * pedump.c: Fix warning.
3695 * object.c appdomain.h: Get rid of metadata_section.
3696 It is no longer needed and it was causing deadlocks with domain->lock.
3698 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
3700 2003-08-26 Martin Baulig <martin@ximian.com>
3702 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
3704 2003-08-26 Martin Baulig <martin@ximian.com>
3706 * pedump.c (main): Call mono_metadata_init(),
3707 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
3708 and mono_loader_init().
3710 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
3712 * loader.h: Add missing include to fix build.
3714 * image.h: mono_image_load_references is no more.
3716 * assembly.c: Reworked assembly loading to make it really thread safe.
3717 After these changes, the assembly returned by mono_assembly_open is
3718 fully initialized, i.e. all its references assemblies are loaded.
3720 * assembly.c (mono_image_load_references): Renamed to
3721 mono_assembly_load_references, and made private, since clients no
3722 longer need to call it.
3724 * class.c: Removed calls to mono_assembly_load_references, since it was
3725 a source of deadlocks.
3727 * loader.h loader.c class.h class.c: Protect data structures using a
3728 new lock, the loader lock.
3730 * class.c (mono_class_setup_vtable): Create temporary hash tables and
3731 GPtrArrays only when needed.
3733 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
3734 into empty structures by mcs. Fixes pinvoke7.cs.
3736 * domain.c (mono_init): Call a new initialization function.
3738 * appdomain.c (mono_runtime_init): Call the new initializer function
3739 of the marshal module.
3741 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
3742 inserted into empty structures by mcs. Fixes pinvoke7.cs.
3744 * marshal.h marshal.c: Added locks around the wrapper caches to make
3745 this module thread safe.
3747 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
3748 this argument. Fixes pinvoke1.exe.
3750 2003-08-25 Lluis Sanchez <lluis@ximian.com>
3752 * object.h: Added call_type field to MonoMethodMessage and the corresponding
3753 enumeration of values. Removed fields to store remote call output values in
3754 MonoAsyncResult. Not needed any more.
3755 * object.c: Initialize call_type and async_result fields in mono_message_init.
3756 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
3757 dispatching the message.
3758 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
3759 async call to finish. To do it use a message with EndInvoke call type.
3761 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
3763 * loader.h loader.c (mono_method_hash_marhal_info): New function which
3764 determines whenever a method has marshalling info.
3766 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3768 * assembly.c: fix the build on windows.
3770 2003-08-22 Lluis Sanchez <lluis@ximian.com>
3772 * object.cs: Fixed bug #47785.
3774 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
3776 * string-icalls.c (StringReplace): If their are no occurances of
3777 the old string found return a reference to the supplied
3778 string. This saves some memory and matches MS behavoir.
3780 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3782 * socket-io.c: fixed compilation for systems that define AF_INET6
3783 and don't define SOL_IP/SOL_IPV6.
3785 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
3787 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
3788 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
3790 * rawbuffer.c rawbuffer.h: Make this module thread safe.
3792 * domain.c: Make this module thread safe.
3794 * domain.c (mono_init): Call new initialization function.
3796 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
3797 reference types too. Fixes #38812.
3799 * image.c (mono_image_init): Fixed warnings.
3801 * class.c (mono_class_from_typeref): Handle assembly load failure
3804 * appdomain.c (add_assemblies_to_domain): Handle the case when
3805 the references of an assembly are not yet loaded.
3807 * metadata.c image.c assembly.c: Moved initialization of global
3808 variables to a separate function called at startup since lazy
3809 initialization of these variables is not thread safe.
3811 * image.c assembly.c: Made this module thread safe by adding locks in
3812 the appropriate places.
3814 * domain.c (mono_init): Call the new initialization functions of the
3817 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
3819 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
3820 make a direct call. It is proxy's work to make the call asynchronous.
3821 mono_delegate_end_invoke(): If the targe is a proxy, just collect
3823 * object.cs: mono_method_call_message_new(): read AsyncResult and
3824 state object from parameters list, if this info is requested.
3825 * object.h: Added fields to store remote call output values in
3826 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
3828 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
3830 * object.h: add needed fields to MonoThread.
3831 * threads.c, threads.h: allow registering a function to cleanup data
3832 allocated per thread by the JIT.
3834 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3836 * loader.h: portability fix by Bernie Solomon
3837 * <bernard@ugsolutions.com>.
3839 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
3841 * reflection.h reflection.c (mono_param_get_objects): Changed this to
3842 return a MonoArray. This simplifies the code and also ensures that
3843 the cache allways contains an object reference as a value.
3845 * icall.c (ves_icall_get_parameter_info): Simplified using the new
3848 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3850 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
3851 fixes a problem with byte ordering when getting the address family for
3854 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
3856 * .cvsignore: Added monosn.
3858 * reflection.h reflection.c loader.c: Added support for parameter
3859 marshalling to dynamically created types. Fixes #47295.
3861 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
3863 * rand.c: remove useless warnings.
3865 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
3867 * class.c: implemented ldtoken for methods and fieldrefs.
3869 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3871 * threadpool.c: when mono_async_invoke was called, no one took care of
3872 monitoring the queue. So if the method invoked took some time and we
3873 got new async invoke requests after 500 ms (the thread created waited
3874 that long in WaitForSingleObject), the new async invoke was not called
3875 until the previous one finished.
3877 This is fixed now. Thanks to Totte for helping with it.
3879 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3881 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
3883 2003-08-11 Martin Baulig <martin@ximian.com>
3885 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
3887 2003-08-06 Martin Baulig <martin@ximian.com>
3889 * mono-debug-debugger.c: Added support for static fields,
3890 properties and methods.
3892 2003-08-06 Martin Baulig <martin@ximian.com>
3894 * mono-debug-debugger.c: Don't store the MonoString's vtable to
3895 make this work for applications with multiple application domains.
3897 2003-08-04 Martin Baulig <martin@ximian.com>
3899 * mono-debug-debugger.c: Completely reworked the type support; the
3900 most important thing is that we're now just using one single
3901 `MonoType' instance per type.
3903 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
3905 * mono-endian.h, mono-endian.c, icall.c: Added icall
3906 ves_icall_System_Double_AssertEndianity to assert double word endianity
3907 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
3909 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3911 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
3912 support, icalls and fixes.
3914 2003-07-31 Miguel de Icaza <miguel@ximian.com>
3916 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
3917 classes that are a punctuation character in .NET is not the same a
3920 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3922 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
3924 2003-07-29 Miguel de Icaza <miguel@ximian.com>
3926 * icall.c: Add new MemCopy internalcall.
3927 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
3928 Simplified code; It is not necessary to handle all the cases here,
3929 as the C# code takes care of it. Only handle the case of the name
3930 resource embedded into the assembly.
3932 Changed signature to return the data pointer and the size of the
3935 2003-07-26 Miguel de Icaza <miguel@ximian.com>
3937 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
3938 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
3940 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
3942 * socket-io.c: ignore EINTR error in select.
3944 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
3946 * class.h, class.c: removed unused subclasses field in MonoClass.
3948 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
3950 * icall.c: improve fix of get_base_definition(). If the parent class
3951 doesn't have the mehod, look at the parent of the parent.
3952 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
3953 to check if a parameter is an in or out parameter
3954 (PARAM_ATTRIBUTE_IN is not set by default).
3955 mono_method_return_message_restore(): Use mono_class_value_size to
3956 get the size of a value type. mono_type_stack_size (parameterType)
3957 does not return the correct value if parameterType is byRef.
3958 mono_load_remote_field(), mono_load_remote_field_new(),
3959 mono_store_remote_field(), mono_store_remote_field_new():
3960 raise exception if the remote call returns an exception.
3962 2003-07-28 Martin Baulig <martin@ximian.com>
3964 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
3965 method. This is a wrapper around mono_runtime_invoke() which
3966 boxes the instance object if neccessary.
3968 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3970 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
3971 metadata.h, row-indexes.h, verify.c: first cut of generics support.
3973 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
3975 * icall.c: disable mcs bug workaround.
3977 2003-07-21 Miguel de Icaza <miguel@ximian.com>
3979 * object.c (mono_runtime_class_init): Take the metadata_section
3980 mutex before obtaining the domain mutex.
3982 * appdomain.h: Added definition of metadata_section mutex here.
3984 * object.c: define metadata_mutex here.
3986 2003-07-24 Ravi Pratap <ravi@ximian.com>
3988 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
3991 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
3993 * reflection.c: Fix bug #46669
3995 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4000 * object.h: fill in the type name for TypeLoadException.
4002 2003-07-23 Ravi Pratap <ravi@ximian.com>
4004 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
4005 relationship between TypeBuilders while compiling corlib) and bug
4006 45993 (Array types returned from the runtime while compiling
4007 corlib were from the loaded corlib).
4009 2003-07-22 Martin Baulig <martin@ximian.com>
4011 * mono-debug-debugger.c: Reworked the type support a bit more;
4012 distinguish between types and classes.
4014 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
4016 * icall.c: add IsArrayImpl icall.
4018 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
4020 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
4021 initializing real_size only once. Also fix bug #46602.
4023 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
4025 * object.c: Renamed mono_metadata_section to metadata_section.
4027 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
4029 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
4030 empty array if the type is an array. Fixed.
4031 ves_icall_MonoMethod_get_base_definition: if the base method
4032 is abstract, get the MethodInfo from the list of methods of
4034 * reflection.c: ParameterInfo.PositionImpl should be zero-based
4035 and it was 1-based. Fixed in mono_param_get_objects.
4037 2003-07-20 Martin Baulig <martin@ximian.com>
4039 * mono-debug.h: Set version number to 31.
4040 (mono_debug_init): Added `MonoDomain *' argument.
4042 * mono-debug-debugger.c: Reworked the type support; explicitly
4043 tell the debugger about builtin types; pass the `klass' address to
4046 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
4048 * image.c: Allow new metadata tables to be loaded without a
4049 warning. Also update the warning message to give the new constant value.
4051 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
4053 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
4054 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
4055 array type representation changes.
4057 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
4059 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
4060 on Environment.Exit () call.
4062 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
4064 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
4065 requires a matching corlib.
4067 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
4069 * Changelog: My editor decided to add a CR to each line. Sorry about that.
4070 Committed again without the CRs.
4072 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
4074 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
4075 getting it from the "this" socket instance. Did not work
4076 if the socket is a subclass of Socket.
4077 Also fixed bug #35371.
4079 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
4081 * metadata.c: fixed size for TypedByRef.
4082 * loader.c: when searching for a method, consider the vararg amrker.
4083 * unicode.c, decimal.c: constify some arrays.
4085 2003-07-15 Dick Porter <dick@ximian.com>
4087 * socket-io.c: Fixed compilation for gcc < 3.2.
4089 Fixed compilation for machines that don't have AF_INET6 (thanks to
4090 Bernie Solomon <bernard@ugsolutions.com> for that part.)
4092 Fixed compile warnings.
4094 Fixed formatting and line endings.
4096 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
4099 * socket-io.c: Added IPv6 support.
4101 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
4103 * class.c (mono_class_is_assignable_from): New function to implement
4104 the is_assignable_from logic. Used by mono_object_isinst,
4105 Type::IsAssignableFrom () and the interpreter.
4107 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
4108 Object, even interfaces.
4110 * object.c (mono_object_isinst): Implement in terms of
4113 * icall.c (ves_icall_type_is_assignable_from): New icall.
4115 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
4117 * domain.c (foreach_domain): fix compiler warning.
4119 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
4121 * image.c (load_metadata_ptrs): use g_strndup because strndup is
4122 not available on all plattforms
4124 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
4126 * image.h image.c: Store the metadata version string in MonoImage.
4127 * icall.c: New icall to retrieve the image version.
4128 * reflection.c (create_dynamic_image): Fill in the image version field
4129 * reflection.c (build_compressed_metadata): Use the image version
4130 from the image structure.
4132 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4134 * appdomain.c: modified comment.
4135 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
4136 That will be its last iteration when mono_gc_cleanup is called from
4137 mono_runtime_cleanup and before the domain is unloaded.
4141 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
4143 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
4146 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
4148 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
4149 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
4150 Bernie Solomon <bernard@ugsolutions.com>.
4152 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
4154 * object.c, object.h: provide mono_object_new_fast() for faster
4155 allocation in some special cases.
4157 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
4159 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
4160 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
4162 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
4164 * threadpool.c: fix leaks.
4166 2003-07-01 Dick Porter <dick@ximian.com>
4168 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
4169 using MonoGHashTables. Fixes threadpool bug posted to list.
4171 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
4173 * image.h, image.c: added support to load an assembly from a byte array.
4174 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
4175 assembly bundle support.
4177 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
4179 * threadpool.c (mono_thread_pool_add): keep a reference to the
4180 AsyncResult to prevent GC
4182 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
4184 * class.c: leak fix.
4186 2003-06-25 Dick Porter <dick@ximian.com>
4188 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
4189 for the async object, the WaitHandle object will close the handle.
4192 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
4194 * class.c: in mono_array_class_get (), lookup from the hash with the
4195 same type we insert: this works around a bug in
4196 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
4197 lluis. The real fix will have to wait for after the release.
4199 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
4201 * icall.c: fix memory leak when getting type members.
4203 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
4205 * reflection.c: added more pubtoken special cases.
4207 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
4209 * class.c: handle field offset correctly when class size
4210 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
4212 2003-06-20 Martin Baulig <martin@ximian.com>
4214 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
4217 2003-06-20 Martin Baulig <martin@ximian.com>
4219 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
4221 2003-06-20 Martin Baulig <martin@ximian.com>
4223 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
4224 just distinguish between variables in registers and variables at
4225 an offset relative to a register.
4227 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4229 * icall.c: #ifdef out latest changes until mcs is fixed.
4231 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
4233 * icall.c: return members in metadata order.
4235 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
4237 * icall.c: avoid infinite loop in GetTimeZoneData.
4239 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
4241 * icall.c: added Marshal.Prelink/All icalls.
4243 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
4245 * object.c, object.h: fix warnings and do some overflow checking
4246 when creating arrays.
4248 2003-06-17 Dick Porter <dick@ximian.com>
4251 * file-io.c: File attributes need to be tweaked slightly when
4252 passed from the managed to the w32 world.
4254 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
4255 * profiler.h profiler-private.h profiler.c: Rework last patch
4256 based on suggestion by Paolo.
4258 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
4260 * profiler.h profiler-private.h profiler.c: Added infrastructure for
4261 instruction level coverage data collection.
4262 * profiler.h profiler.c (: Added new callback function which can be
4263 used by the profiler to limit which functions should have coverage
4265 * profiler.c (mono_profiler_load): Call g_module_build_path to
4266 generate the file name of the profiler library.
4268 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
4270 * profiler.c, profiler.h, profiler-private.h: added basic block
4271 coverage profiling API.
4273 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
4275 * reflection.c (mono_reflection_create_runtime_class): Add support
4276 for events in dynamically generated code.
4278 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
4281 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
4283 * icall.c: when getting timezone info, return reasonable values if we
4284 can't get the actual data.
4286 2003-06-14 Dick Porter <dick@ximian.com>
4288 * threads.c (start_wrapper): Remove the reference to the thread
4289 object in the TLS data, so the thread object can be finalized.
4290 This won't be reached if the thread threw an uncaught exception,
4291 so those thread handles will stay referenced :-( (This is due to
4292 missing support for scanning thread-specific data in the Boehm GC
4293 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
4295 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
4297 * reflection.c: ensure streams and tables are first allocated with
4298 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
4300 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
4302 * icall.c: fixed GetElementType for byrefs (bug# 44792).
4304 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
4306 * reflection.c (mono_reflection_create_runtime_class): Add support for
4307 properties to dynamically created classes.
4308 * reflection.c: Fix a few places where non-MonoObjects were inserted
4309 into the tokens hashtable.
4311 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4313 * object.c: some support to handle out of memory exceptions.
4315 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
4317 * marshal.c (mono_marshal_get_native_wrapper): support reference
4320 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
4322 * object.h, object.c: more portability stuff from Bernie Solomon.
4323 Unexport mono_object_allocate(). Added mono_object_unbox ().
4324 Set exitcode when an unhandled exception is thrown.
4326 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
4328 * marshal.c (mono_marshal_get_native_wrapper): use custom
4329 marshaler for return types.
4331 2003-06-10 Dick Porter <dick@ximian.com>
4333 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
4334 ip_mreq is available
4336 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
4338 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
4339 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
4340 by Bernie Solomon <bernard@ugsolutions.com>.
4342 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
4344 * gc.c (mono_gc_init): Avoid error message on shutdown when
4345 GC_DONT_GC=1 is used.
4347 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
4348 New icall to return the GUID of a module.
4350 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
4352 * class.c: ensure instance size always includes the parent's size
4353 even whem class size is set explicitly (fixes bug#44294).
4355 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
4357 * profiler.h, profiler.c: made the simple profiler thread-safe,
4358 get more accurate timing info. Allow the loading of an
4359 externally-developed profiler module.
4361 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
4363 * marshal.c (mono_marshal_get_native_wrapper): improved
4364 class/byref arguments.
4365 (mono_marshal_get_native_wrapper): better string marshaling support.
4367 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
4369 * class.c: ensure .pack and .size are handled correctly and
4370 simplified layout of static fields.
4372 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
4375 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
4377 * loader.c (mono_lookup_pinvoke_call): look for modules in the
4378 current directory (fix bug 44008)
4380 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
4382 * marshal.c (mono_marshal_get_native_wrapper): started support for
4384 (mono_delegate_to_ftnptr): consider marshalling specifications
4386 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
4388 * reflection.c, reflection.h: emit custom marshal info.
4390 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4392 * object.c: free the GError.
4393 * icall.c: added CloseEvent_internal.
4395 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
4398 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
4400 * loader.c (mono_method_get_signature): Add support for dynamic
4403 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
4405 * reflection.c: fixed bug #43905.
4407 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
4409 * class.c, domain.c, icall.c, metadata.h, object.h: support for
4410 handling TypedReference and ArgIterator.
4411 * loader.c, loader.h: added function to get signature at call site.
4413 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4415 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
4416 data readonly. Buglets and warning fixes. Some MethodSpec support.
4418 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
4420 * class.h, class.c, object.c: remove relative numbering support.
4422 2003-05-26 Miguel de Icaza <miguel@ximian.com>
4424 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
4425 free the string, until we get a chance to fix Gtk#
4427 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4429 * marshal.c: revert last patch.
4431 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
4433 * icall.c: updates for new mono_class_vtable() not calling
4434 the type constructor anymore.
4436 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
4438 * object.h, object.c: separate vtable creation from type
4439 initialization. Make running the .cctor thread safe.
4441 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
4443 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
4445 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
4447 * loader.c (mono_get_method): consider calling convention
4449 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
4451 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
4452 to return the invisible global type for a module.
4454 * reflection.c (mono_image_build_metadata): Emit global fields too.
4456 2003-05-20 Peter Williams <peterw@ximian.com>
4458 * loader.c (mono_lookup_internal_call): Add a few newlines.
4460 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
4462 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
4465 * appdomain.c (set_domain_search_path): Recalculate search path when
4466 AppDomainSetup.PrivateBinPath changes.
4468 * object.c (mono_class_compute_gc_descriptor): It turns out some
4469 parts of the class libs (like System.Thread) holds pointers to
4470 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
4471 to treat native int a pointer type here.
4473 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
4475 * appdomain.h, domain.c: add hashtable for jump target resolution.
4477 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
4479 * reflection.h reflection.c icall.c: Added new icalls
4480 GetManifestResourceInfoInternal, GetModulesInternal and support
4483 2003-05-16 Dick Porter <dick@ximian.com>
4487 * file-io.c: Implement System.IO.MonoIO::GetTempPath
4489 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
4491 * object.c: mono_store_remote_field: little fix to previous patch.
4493 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
4495 * class.c: add constructors to array classes.
4496 * icall.c: special case array construction for InternalInvoke (),
4498 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
4500 * class.h class.c reflection.c object.c: Added support for field
4501 defaults in dynamically generated classes.
4503 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
4505 * reflection.c: properly encode charset for ddlimport.
4507 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
4509 * threads.c: allow compiling without GC.
4511 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
4513 * appdomain.h, object.c, object.h, threads.c, threads.h: added
4514 handling of thread static data.
4516 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
4518 * reflection.h, reflection.c: added mono_custom_attrs_free ().
4520 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
4522 * class.c (mono_array_class_get): always set the serializable flags
4523 (mono_array_class_get): always set the SEALED attribute for array types
4525 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
4527 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
4528 attributes (fix for bug 42021).
4530 2003-05-12 Dick Porter <dick@ximian.com>
4532 * gc.c: Don't run finalizers when the finalizer thread is
4533 finishing up, because the default domain has already been
4536 2003-05-11 Miguel de Icaza <miguel@ximian.com>
4538 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
4539 value is null, we should throw an exception. This is slightly
4540 different than the other conventions used for the constructor.
4542 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4544 * socket-io.c: fixed windows build.
4546 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4548 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
4550 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
4552 * object.c (mono_string_new_wrapper): Compatibility fix for MS
4555 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
4557 * class.c (mono_class_layout_fields): Add experimental GC aware
4558 auto layout facility. Requires class library changes to work correctly.
4560 (mono_class_setup_vtable): Avoid overriding explicit interface
4561 method implementations. Fixes iface3.exe test.
4563 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
4565 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
4566 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
4568 * metadata.h: Add new type classification macro which determines
4569 whenever the type holds an object reference.
4571 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
4573 * marshal.c (mono_marshal_get_native_wrapper): cleanups
4575 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
4577 * gc.c (finalizer_thread): Work around a GC bug.
4579 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
4581 * marshal.c (emit_struct_conv): allow unions
4583 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
4585 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
4587 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
4589 2003-05-06 Martin Baulig <martin@ximian.com>
4591 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
4593 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4596 (Select_internal): allow NULLs, don't create arrays if not needed.
4597 Coupled with Socket.cs changes.
4600 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
4601 register a finalizer for it that will close the semaphore handle. This
4602 fixes the leak and make Lupus' test run with > 4080 loops.
4604 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
4606 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
4607 Jerome Laban (bug #42287)
4609 2003-05-02 Martin Baulig <martin@ximian.com>
4611 * debug-mono-symfile.h
4612 (MonoSymbolFile): Moved declaration into mono-debug.h.
4613 (MonoDebugMethodJitInfo): Likewise.
4614 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
4616 (_mono_debug_address_from_il_offset): Take a
4617 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
4620 (MonoDebugDomainData): New struct.
4621 (mono_debug_get_domain_data): New function.
4622 (mono_debug_add_method): Take an additional `MonoDomain *'
4624 (mono_debug_source_location_from_address): Likewise.
4625 (mono_debug_il_offset_from_address): Likewise.
4626 (mono_debug_address_from_il_offset): Likewise.
4628 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
4630 * reflection.c: one more check for null type in custom attrs.
4632 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4634 * reflection.c: avoid warning (comparison is always false due to limited
4635 range of data type).
4637 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4639 * icall.c: throw an exception in Type.GetField if the argument 'name'
4642 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
4644 * reflection.c: fixed handling of enums in named arguments to custom
4645 attributes (bug #42123).
4647 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
4649 * reflection.c: use the right array element type and handle
4650 a null for a Type argument, too.
4652 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
4654 * reflection.c: handle arrays as arguments to custom attributes.
4656 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
4658 * reflection.c: handle a string value in a custom attr
4659 ctor that takes an object.
4661 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
4663 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
4666 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
4668 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
4670 2003-04-27 Martin Baulig <martin@ximian.com>
4672 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
4673 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
4674 MONO_DEBUGGER_EVENT_BREAKPOINT.
4675 (mono_breakpoint_trampoline_code): Removed.
4676 (mono_debugger_event_handler): The last argument is now a
4678 (mono_debugger_insert_breakpoint_full): Removed the
4679 `use_trampoline' argument.
4680 (mono_debugger_method_has_breakpoint): Likewise.
4681 (mono_debugger_trampoline_breakpoint_callback): Renamed to
4682 mono_debugger_breakpoint_callback(); take the method and
4683 breakpoint number as arguments.
4685 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
4687 * metadata.c: fix off by one when loading parameters attributes.
4689 2003-04-24 Martin Baulig <martin@ximian.com>
4691 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
4693 2003-04-24 Martin Baulig <martin@ximian.com>
4695 * mono-debug-debugger.c: Moved all code which interacts with the
4698 * debug-mono-symfile.c: This code now just deals with the symbol
4699 file itself, the debugger code is now in mono-debug-debugger.c.
4701 2003-04-23 Martin Baulig <martin@ximian.com>
4703 * mono-debug.c (mono_debug_source_location_from_il_offset):
4704 New method; like mono_debug_source_location_from_address(), but
4705 takes an IL offset instead of a machine address.
4707 2003-04-23 Martin Baulig <martin@ximian.com>
4709 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
4710 `line' field; this is now computed by the debugger.
4712 2003-04-23 Martin Baulig <martin@ximian.com>
4714 * mono-debug.[ch]: New files. This is the new debugging interface.
4716 * mono-debug-debugger.[ch]: New files. Moved all code which
4717 interacts with the Mono Debugger here.
4719 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
4721 * domain.c (mono_init): initialize mono_defaults.monitor_class
4723 2003-04-21 Miguel de Icaza <miguel@ximian.com>
4725 * reflection.c (method_encode_code): Add a spicy exception to help
4726 future compiler authors.
4728 2003-04-21 Martin Baulig <martin@ximian.com>
4731 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
4732 Make this work with relative pathnames; g_filename_to_uri() needs
4733 an absolute filename.
4735 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
4737 * icall.c: Track name changes in Object and ValueType.
4739 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
4741 * metadata.c (mono_type_stack_size): size should be a multiple of
4744 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4747 (internal_domain_finalize): moved into mono_domain_finalize. No need
4748 to create another thread because the finalizers will be run in the
4751 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
4752 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
4753 to be run (MS does this too).
4755 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
4757 * object.c (mono_class_compute_gc_descriptor): Update comment.
4759 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
4761 * image.h: Add synchronized wrapper cache.
4763 * image.c (do_mono_image_open): Initialize cache.
4765 * reflection.c (create_dynamic_mono_image): Initialize cache.
4767 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4769 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
4770 ves_icall_System_Buffer_ByteLengthInternal.
4772 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4774 * reflection.c: setup klass->nested_in earlier. Allow
4775 a dash in the assembly name.
4777 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
4779 * metadata.c (mono_type_to_unmanaged): dont access
4780 type->data.klass for MONO_TYPE_OBJECT
4781 (mono_type_to_unmanaged): consider System.Delegate class
4783 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
4785 * class.c: just setup supertypes in the proper place instead of
4786 initializing the full element class for arrays.
4788 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
4790 * class.c: ensure the element class of arrays is initialized.
4791 Setup the supertype info for array classes, too.
4793 2003-04-14 Miguel de Icaza <miguel@ximian.com>
4795 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
4797 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4799 * Makefile.am: re-added -m option when running cygpath. This way,
4800 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
4802 * mono-config.c: same codepath for locating mono config file for WIN32
4804 * assembly.c: if mono_assembly_setrootdir is called, don't override
4807 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4809 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
4810 MONO_ASSEMBLIES variable.
4812 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
4814 * icall.c: added Assembly::GetNamespaces() icall.
4816 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4818 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
4820 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
4822 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
4823 * object.c: fixed bug in the construction of vtable for proxies
4825 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
4827 * object.c (mono_array_new): Mark mono_array_new as an icall.
4829 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4831 * class.c: fixed test for public method when overriding interfaces.
4834 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
4836 * appdomain.h, domain.c: added mono_domain_foreach() to
4837 be able to access the currently loaded appdomains.
4838 * object.c: make string interning work across sppdomains.
4839 Mark some functions for use as icalls.
4841 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
4843 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
4845 * reflection.h reflection.c: Allocate long living data using
4846 GC_MALLOC_ATOMIC so the collector does not need to scan it.
4848 * reflection.c: Double the allocation size in streams instead of
4849 increasing it, to prevent unneccesary copying on large assemblies.
4851 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
4852 creation if the assembly does not have the Run flag set.
4854 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
4856 * class.h: avoid the C++ keywords in header files (Jerome Laban
4857 spotted and fixed this).
4859 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4862 (mono_unhandled_exception): fill in the arguments for the
4863 UnhandledException event. Only trigger that event for the default
4864 domain (as MS does).
4866 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
4868 * object.c: Improve typed allocation stuff based on suggestions from
4869 Paolo. Also turn it on if the GC library supports it.
4871 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
4873 * object.c object.h class.h: Added experimental typed allocation
4874 facility using the interfaces in gc_gcj.h.
4876 * os/gc_wrapper.h: Added new include files.
4878 2003-04-03 Martin Baulig <martin@ximian.com>
4880 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
4881 which is not yet enabled by default.
4883 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
4885 (mono_gc_lock, mono_gc_unlock): New static functions.
4887 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
4888 functions; stop/start the world for the garbage collector. This
4889 is using the windows API; we need to complete the SuspendThread()/
4890 ResumeThread() implementation in the io-layer to make this work on Unix.
4891 (mono_gc_push_all_stacks): New public function; tells the garbage
4892 collector about the stack pointers from all managed threads.
4894 2003-04-03 Martin Baulig <martin@ximian.com>
4896 * object.h (MonoThread): Added `gpointer stack_ptr'.
4898 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
4900 2003-04-03 Martin Baulig <martin@ximian.com>
4902 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
4904 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
4906 * reflection.c (typebuilder_setup_fields): Initialize field.first and
4909 2003-04-02 Miguel de Icaza <miguel@ximian.com>
4911 * loader.c (mono_lookup_internal_call): Report the corlib that is
4914 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
4916 * icall.c (ves_icall_type_GetTypeCode): fixed check for
4917 System.DBNull (it's class not valuetype).
4919 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
4921 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
4922 if the array method was already assigned a token (fixes bug#40646).
4924 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
4926 * reflection.c (mono_reflection_get_type): Attempt type resolve even
4927 if no assembly is given.
4929 2003-04-01 Miguel de Icaza <miguel@ximian.com>
4931 * metadata.h: Added the new tables.
4933 * row-indexes.h: Added definitions for new tables.
4935 * metadata.c: Add schemas for new tables, and add support for
4936 computing the sizes of them.
4938 * class.c: Update for handling the new type cases.
4940 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
4942 * metadata.h (MONO_TYPE_IS_VOID): new macro
4944 2003-03-31 Martin Baulig <martin@ximian.com>
4946 * threads.h (MonoThreadCallbacks): Added `thread_created'.
4948 * threads.c (mono_thread_new_init): Call `thread_created' in the
4949 mono_thread_callbacks.
4951 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
4953 * loader.h: added marshalbyrefobject_class to mono_defaults
4954 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
4955 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
4956 generation of output parameters.
4957 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
4958 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
4959 contextbound and the target object belongs to the context of the caller.
4960 * object.h: added context and unwrapped_server variables in MonoRealProxy.
4961 * object.c: Implemented support for interfaces and abstract classes
4962 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
4963 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
4965 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
4967 * class.h class.c (mono_class_is_subclass_of): New function.
4969 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
4970 routines for most common case (calls from ArrayList::ToArray).
4972 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
4973 routine so programs which call Environment::Exit() can be profiled.
4975 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
4976 Added MONO_ARCH_SAVE_REGS.
4978 * icall.c (ves_icall_type_is_subtype_of): Use new function.
4980 2003-03-29 Miguel de Icaza <miguel@ximian.com>
4982 * blob.h: Add a couple of new MonoType types definitions.
4984 * tabledefs.h: Add a couple of new call convs.
4986 2003-03-27 Zoltan Varga <vargaz@freemail.h>
4988 * reflection.h (MonoReflectionDynamicAssembly): track changes in
4989 the layout of the class.
4991 * reflection.c (alloc_table): double the size on overflow to avoid
4992 unnecessary copying.
4994 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
4995 avoid filling out metadata tables and blobs. Also set mb->ilgen to
4996 null so it can be garbage collected.
4998 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
5000 * reflection.c (mono_reflection_get_type): Return the resolved type
5001 only if it is in the assembly we searched.
5003 * reflection.c (ensure_runtime_vtable): Initialize method slots.
5005 * class.c (mono_class_setup_vtable): Set the slot of the overriding
5008 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5011 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
5012 the right one is 'file:///blah', but MS allows it.
5014 (mono_assembly_open): allow 'file://blah'
5016 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
5018 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
5020 * socket-io.c: fixes bug #40310.
5022 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
5024 * reflection.c (mono_reflection_parse_type): handle deeply nested
5027 * reflection.c (mono_image_create_token): Use unique token values
5028 since they will be put into a hash table.
5030 * class.c (mono_class_setup_vtable): If a method occurs in more than
5031 one place in the vtable, and it gets overriden, then change the
5032 other occurances too.
5034 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
5035 object as return type.
5037 2003-03-22 Pedro MartÃnez Juliá <yoros@wanadoo.es>
5039 * icall.c: Deleted "ToString" implementation for double and float
5040 because they are full implemented in managed code.
5042 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
5044 * reflection.c, reflection.h: implemented and exported functions
5045 to retrieve info about custom attributes.
5047 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5049 * appdomain.c: moved Uri handling to assembly.c
5050 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
5051 work when using a file Uri in *nix and windows.
5053 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
5054 GetReferencedAssemblies.
5056 2003-03-18 Dick Porter <dick@ximian.com>
5058 * icall.c: Rename a couple of internal calls
5060 * threads.c: Set the thread state to Stopped when a thread exits.
5063 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
5065 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
5068 * object.c (mono_class_vtable): fix warning.
5070 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
5072 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
5074 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
5076 (method_encode_clauses): Create exception info structures in the right
5078 (mono_reflection_setup_internal_class): Initialize supertypes field.
5080 * class.c object.c: Handle interfaces which implement other interfaces
5083 * class.h class.c: Move the supertypes array initialization code into
5084 a separate function so it can be used for dynamic types too. Also call
5085 it earlier, in mono_class_init(), since it can be used before the
5086 type is initialized.
5088 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5092 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
5097 * object.c: remove warnings.
5099 2003-03-13 Martin Baulig <martin@ximian.com>
5101 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
5102 (MonoDebugLexicalBlockEntry): New types.
5104 * debug-mono-symfile.c
5105 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
5107 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5109 * process.c: ret can be any non-zero value accroding to MS doc.
5111 2003-03-07 Miguel de Icaza <miguel@ximian.com>
5113 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
5114 fixing a warning for a miss-used prototype, would have cause
5115 random memory corruption.
5117 2003-03-07 Martin Baulig <martin@ximian.com>
5119 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
5120 getting really annoying ....
5122 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
5124 * reflection.c (fixup_method): added support for array methods.
5126 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
5128 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
5129 (pointed out by Michael Adams).
5131 2003-03-04 Dick Porter <dick@ximian.com>
5133 * icall.c: Temporarily reverted the Double and Single ToString()
5134 change, because it broke nunit.
5136 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
5138 * object.h, threads.h: make include files compatible with C++
5139 (patch by Jerome Laban <jlaban@wanadoo.fr>).
5141 2003-03-04 Pedro MartÃnez Juliá <yoros@wanadoo.es>
5143 * icall.c: Erased ToString helper functions for Double and Single.
5144 Now, that implementations ar all in managed code (Double and Single
5147 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
5149 * appdomain.c: Added method for initializing the default context of
5150 a domain. Added internal call for getting the default context.
5151 * appdomain.h: Added context variable in MonoDomain struct.
5152 * domain.c: mono_domain_set also sets the default context of the domain
5153 * icall.c: Mapped internal method InternalGetDefaultContext.
5154 * object.c: mono_object_get_virtual_method returns always a remoting
5155 wrapper if the object is a transparent proxy.
5156 mono_runtime_invoke_array: when creating an object by calling the
5157 constructor, if the created object is a proxy, then the constructor should
5158 be called using the a remoting wrapper.
5160 2003-03-03 Dick Porter <dick@ximian.com>
5162 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
5163 variable so it compiles on solaris. Problem spotted by
5164 Christopher Taylor <ct@cs.clemson.edu>
5166 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5169 (get_info_from_assembly_name): don't leak value.
5172 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
5175 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
5177 * assembly.c: export mono_image_load_references ().
5178 * class.c: handle function pointers. mono_class_from_name() now
5179 supports nested type names directly.
5181 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
5183 * reflection.h reflection.c: Encode already created dynamic methods
5184 and fields correctly as a DEF instead of a REF.
5186 * reflection.c: Get rid of the force_ref argument to
5187 mono_image_typedef_or_ref since it was wrong in the first place.
5189 * string-icalls.c: add error checking to string constructors according
5192 * reflection.c: Emit types in the order their TypeBuilders were
5193 created. Previously, a new table index was assigned to each type before
5194 the tables were emitted. This was wrong because the signature blob
5195 might already refer to a type by its original table index.
5197 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
5199 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
5202 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5204 * Makefile.am: make assemblies dir have \ instead of / on windows.
5206 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
5208 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
5209 iterate over the NESTEDCLASS table using a linear search since the
5210 table is not guaranteed to be sorted by the secondary key.
5212 * class.c (mono_class_create_from_typedef): fixed up call to
5213 mono_metadata_nesting_typedef.
5215 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
5217 * marshal.c (mono_string_to_byvalstr): clear the memory as
5218 suggested by Jerome Laban <jlaban@wanadoo.fr>
5220 2003-02-26 Dick Porter <dick@ximian.com>
5222 * process.c: Cope with padding in .rsrc blocks
5224 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
5226 * metadata.h: reverted the filter_len change, it breaks reflection
5228 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
5230 * metadata.h: added a new field to store the filter_len
5233 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
5235 * reflection.c: handle custom attributes for types and members
5236 created with Reflection.Emit (bug#38422).
5238 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
5240 * reflection.c: define RTSpecialName automatically for constructors for
5241 compatibility with MS.NET.
5243 * reflection.c (mono_reflection_create_runtime_class): initialize
5244 nested_in field of dynamically created classes.
5246 2003-02-22 Martin Baulig <martin@ximian.com>
5248 * debug-mono-symfile.h: Incremented version number.
5250 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
5252 * object.h icall.c process.c: fix warnings.
5254 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
5256 * appdomain.h appdomain.c:
5257 (mono_domain_try_type_resolve): split the
5258 name_or_tb argument into a name and a tb argument.
5259 (mono_domain_has_type_resolve): new function to check whenever the
5260 application has registered a TypeResolve event handler.
5262 * icall.c reflection.h reflection.c: move the type resolve logic into
5263 mono_reflection_get_type () so it will be invoked when
5264 Assembly::GetType () is called.
5267 (mono_reflection_get_type): renamed to get_type_internal.
5268 (mono_reflection_get_type): fixed type name generation so it works
5269 for nested types too.
5270 (mono_reflection_get_type): call has_type_resolve () to avoid the
5271 costly type name generation if there is no resolve event handler.
5273 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
5275 * class.c, image.c: load exported types from file references.
5277 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
5279 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
5280 used to cache the managed methods used to create proxies and make
5281 remote invocation of methods.
5282 * class.h: Added in MonoVTable a flag to indicate that a class needs
5283 to be remotely created.
5284 * object.c: Modified the method mono_class_vtable(). It now initializes
5285 the remote flag of the vtable. Modified mono_object_new_specific(),
5286 so now it checks the remote flag.
5287 * icall.c: Added a couple of internal methods, one for enabling instance
5288 creation interception for a type, and one for creating objects bypassing
5291 2003-02-18 Martin Baulig <martin@ximian.com>
5293 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
5294 New interncall to get a method's metadata token.
5296 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
5297 New interncall for the debugger.
5299 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
5301 * class.c (mono_class_setup_vtable): allocate supertype array
5303 2003-02-18 Martin Baulig <martin@ximian.com>
5305 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
5307 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5310 (assembly_name_to_aname): jump over unknown properties (i've found
5311 something like: 'type, assembly, version=xxx, custom=null, public...',
5312 so now will ignore custom=null and still get the rest of the values).
5314 2003-02-17 Dick Porter <dick@ximian.com>
5316 * threads.c: Have Thread.Start() wait for a semaphore to signal
5317 that the thread has set up all its local data. This fixes bug
5318 34323, where Abort() raced the new thread's TLS data.
5320 Also removes the handle_store() call from start_wrapper, because
5321 threads are now always created suspended and there is no longer a
5322 race between the parent and child threads to store the info.
5324 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
5326 * image.c: explain the #- heap issue in a message, hopefully
5327 avoiding FAQs on mono-list.
5329 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5332 (GetEntryAssembly): if the domain has not invoked
5333 AppDomain.ExecuteAssembly yet, return the assembly of the default
5336 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
5338 * class.c (mono_ldtoken): make it work in dynamic assemblies.
5340 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
5342 * metadata.c, reflection.c: simple speedup to type hash
5345 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
5347 * image.c, image.h, class.c, assembly.c: move module loading
5348 to MonoImage. When loading metadata, consider alignemnet from
5349 the start of metadata, not from the metadata address in memory.
5351 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
5353 * reflection.c (mono_reflection_get_custom_attrs): Added support for
5354 AssemblyBuilder objects. Factored out custom attribute creation into
5355 a separate function.
5356 (create_custom_attr): new function to create custom attributes.
5358 2003-02-12 Miguel de Icaza <miguel@ximian.com>
5360 * Makefile.am: Got tired of typing the full pathname to pedump.
5361 Until there is another option, am installing this.
5363 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
5365 * class.c (class_compute_field_layout): always set field->parent
5366 (mono_ldtoken): use mono_defaults.fieldhandle_class;
5368 2003-02-11 Dick Porter <dick@ximian.com>
5371 * monitor.c: Rewrote Monitor, making lock much faster and
5372 Pulse/Wait work as specified. Also uses much fewer handles, and only
5373 creates them as needed.
5375 * exception.c: Added SynchronizationLockException
5377 * threads.c: Deleted old Monitor implementation. The new one is
5380 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
5382 * class.c: handled TypedReference type code. Set the correct size for
5383 class data. Setup interface_offsets for interface classes, too.
5385 2003-02-09 Martin Baulig <martin@ximian.com>
5387 * debug-mono-symfile.h: Reflect latest symbol writer changes.
5389 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
5391 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
5392 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
5393 * object.c: fixed mono_object_get_virtual_method () for interfaces.
5394 * verify.c: check for code that runs after the end of the method.
5396 2003-02-08 Pedro MartÃnez Juliá <yoros@wanadoo.es>
5398 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
5399 "System.Math::Round2".
5400 * sysmath.h: Added Floor, Round and Round2 definitions.
5401 * sysmath.c: Modified certain functions that were not 100% compliant
5402 with MS.NET (math precision) and added the implementation of Floor,
5405 2003-02-07 Martin Baulig <martin@ximian.com>
5407 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
5409 2003-02-07 Martin Baulig <martin@ximian.com>
5411 * debug-mono-symfile.c: Reflected latest symwriter changes.
5412 (mono_debug_create_mono_symbol_file): Removed.
5413 (mono_debug_open_mono_symbol_file): Take an argument which
5414 specifies whether to create a dynamic symbol file.
5416 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
5418 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
5420 2003-02-05 Martin Baulig <martin@ximian.com>
5422 * reflection.c (mono_image_build_metadata): Make this public,
5423 protect it against being called multiple times, don't create
5424 resources and don't build the compressed metadata here.
5425 (mono_image_create_pefile): Do this here.
5428 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
5430 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5432 * socket-io.c: fixed bug #36322.
5434 2003-02-06 Piers Haken <piersh@friskit.com>
5438 * debug-mono-symfile.c:
5444 * socket-io.c: warning cleanups
5446 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
5448 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
5449 function. works like remoting invoke, but does a check for the Proxy first.
5451 2003-02-05 Miguel de Icaza <miguel@ximian.com>
5453 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
5455 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
5457 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
5459 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
5460 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
5462 * object.c (mono_store_remote_field_new): used by the new jit
5463 instead of mono_store_remote_field
5464 (mono_load_remote_field_new): used by the new jit
5465 instead of mono_load_remote_field
5467 2003-02-05 Patrik Torstensson
5469 * appdomain.c: changed unload to take the domain id instead
5472 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
5475 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5477 * appdomain.c: don't look for assemblies in ApplicationBase if
5478 PrivateBinPathProbe is set.
5480 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5482 * object.c: make the first argument in main_args contain the absolute
5483 path to the assembly. Fixes bug #37511.
5485 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5487 * icall.c: get correct UTC offset for countries not using daylight
5488 time saving. Fixes bug #30030.
5490 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5492 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
5493 and 1 are the family).
5495 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
5497 * icall.c (ves_icall_InternalExecute): removed wrong assertion
5499 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
5501 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
5503 * reflection.c: added support for SignatureHelper tokens, which is
5504 needed by the Calli opcode.
5506 * reflection.h: track changes to SignatureHelper class.
5508 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
5510 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5512 * appdomain.c: fixed loading assemblies from PrivateBinPath.
5514 2003-02-03 Patrik Torstensson
5515 * appdomain.[c|h], domain.c :
5516 - Added support for getting a domain via domain id
5517 - Support for setting and getting domain from System.AppDomain
5518 (used in cross appdomain channel)
5519 - Added support for get/set for a MonoAppContext on a thread
5520 (Context class in System.Runtime.Remoting.Contexts),
5521 - Removed hack in Get/SetData and ExecuteAssembly.
5523 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
5524 the managed world to get control when a proxy is created.
5526 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
5528 2003-02-03 Miguel de Icaza <miguel@ximian.com>
5531 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
5532 Populate the codebase field as well.
5534 2003-02-02 Martin Baulig <martin@ximian.com>
5536 * debug-mono-symfile.c
5537 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
5538 (mono_debug_symfile_add_method): Allow interncalls.
5540 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5542 * icall.c: throw parse exception if strtod fails or the string is empty.
5544 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
5546 * marshal.c: handle object type separately from defined
5549 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
5551 * marshal.c: handle NATIVE_LPSTR for strings when it's
5552 explicitly specified.
5554 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
5556 * reflection.c, reflection.h, icall.c: setup the reflection
5557 handle cache for ModuleBuilders and AssemblyBuilders.
5559 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
5561 * reflection.c (reflection_methodbuilder_to_mono_method): set
5564 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5566 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
5568 2003-01-29 Dick Porter <dick@ximian.com>
5570 * threads.c: No need for the fake_thread kludge now that Thread
5571 doesn't run a class constructor
5573 2003-01-29 Dick Porter <dick@ximian.com>
5575 * threads.c: Use g_direct_hash instead of the rather bogus
5578 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
5580 * marshal.c (mono_marshal_get_native_wrapper): add check for null
5582 (mono_marshal_get_struct_to_ptr): generate valid IL code
5583 (mono_marshal_get_ptr_to_struct): generate valid IL code
5584 (*): correctly set sig->pinvoke, we need to memdup the signature
5587 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
5589 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
5590 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
5592 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
5594 * profiler.c: provide more callers information.
5596 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
5598 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
5600 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
5602 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
5604 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5606 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
5607 exception instead of going into an infinite loop on dates which it
5610 * string-icalls.c (ves_icall_System_String_get_Chars): raise
5611 out-of-range exception if needed.
5613 * class.c (mono_class_setup_vtable): allow a virtual method to provide
5614 an implementation for an interface method and to override an inherited
5615 method at the same time.
5616 Imagine a scenario when a virtual method is used to override a
5617 virtual abstract method in a parent class, and this same method
5618 provides an implementation for an method inherited from an interface.
5619 In this case, the interface resolution code will set im->slot, which
5620 means that the virtual method override pass will skip this method
5621 which means a pointer to the abstract method inherited from the parent
5622 will remain in the vtable of this non-abstract class.
5624 * class.c: (mono_class_setup_vtable): continue search for a real
5625 method if only an abstract method is found.
5627 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
5629 * reflection.c: add size to encoding for ByValStr and ByValArray
5630 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
5632 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5634 * class.c (mono_class_setup_vtable): pass the override info as an
5637 * class.c (mono_class_setup_vtable): set the slot of overriding methods
5640 * reflection.c (ensure_runtime_vtable); add support for method
5643 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5645 * reflection.c (resolution_scope_from_image): Hack to work to work with
5648 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
5649 added a 'force_ref' argument to force this function to allways return
5650 a TypeRef. This is needed by mono_image_get_memberref_token ().
5652 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5654 * reflection.c (mono_image_get_type_info): interfaces really don't have
5657 * reflection.c (mono_image_basic_init): fill out missing fields of
5660 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
5661 dynamic assemblies. This is required so dynamic assemblies show up in
5662 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
5663 Type::GetType() etc. This is consistent with MS behaviour.
5665 * image.c image.h reflection.c: add newly created classes to the name
5666 cache so mono_class_get () will find them.
5668 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5670 First part of changes to get IKVM.NET running under mono.
5672 * appdomain.h, appdomain.c: added new function
5673 mono_domain_try_type_resolve() which will emit TypeResolve events.
5674 This function will call AppDomain::DoTypeResolve to do the actual work.
5676 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
5677 moved existing code dealing with dynamic tokens to a new function
5678 called mono_reflection_lookup_dynamic_token (). This function will
5679 raise TypeResolve events when appropriate. Since reflection.c is not
5680 part of libmetadata, a new hook function called
5681 mono_lookup_dynamic_token() is added to class.c which will call this.
5683 * assembly.h assembly.c: make the invoke_load_hook function public,
5684 so it can be called for dynamic assemblies.
5686 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
5688 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
5691 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
5692 MonoGHashTable, since it contains pointers to objects which the GC
5695 * assembly.c (search_loaded): remove unused variable.
5697 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
5699 * object.c: fixed issue exposed by gcc-generated IL programs
5700 that use RVA data for pointers.
5702 2003-01-25 Martin Baulig <martin@ximian.com>
5704 * threads.c (start_wrapper): Moved the initialization of
5705 `start_func' above the mono_new_thread_init() call to which we
5706 pass it as argument.
5708 2003-01-24 Martin Baulig <martin@ximian.com>
5710 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
5711 the MonoThread pointer.
5713 2003-01-21 Miguel de Icaza <miguel@ximian.com>
5715 * icall.c: Rename `PowImpl' to Pow.
5717 2003-01-23 Dick Porter <dick@ximian.com>
5719 * threads.c (start_wrapper): Create a Thread object if needed, so
5720 the Main() thread can do the class initialisation in a subthread
5721 that has been set up to allow managed code execution.
5723 Pass the thread ID instead of the MonoThread pointer to the thread
5724 start and attach callbacks. This change is required, because the
5725 jit thread start callback must be called _before_ the Thread
5726 object can be created.
5728 (mono_thread_init): Removed much object creation code that is no
5729 longer needed. No managed code is called from here now.
5731 * object.c (mono_runtime_exec_managed_code): Create a subthread
5732 for Main, and call back to the runtime to use it.
5733 Set the exit code when Main exits.
5735 * gc.c: Make sure domain finalisation happens in a subthread.
5736 Re-enable threaded GC, fixing bug 31333 (again).
5738 * environment.c: System.Environment internall calls (so far just
5739 ExitCode is here, the others are still in icall.c)
5741 * appdomain.c (mono_runtime_cleanup): All threads running managed
5742 code should have finished before mono_runtime_cleanup() is
5743 reached, so no need to clean up threads.
5745 2003-01-22 Martin Baulig <martin@ximian.com>
5747 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
5748 `gpointer func' arguments.
5749 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
5750 but added `MonoThread *thread' argument.
5751 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
5753 * threads.c (mono_new_thread_init): Added `gpointer func' argument
5754 and pass it to the mono_thread_start_cb callback.
5755 (mono_install_thread_callbacks): New public function to install a
5756 set of callbacks which are set by the debugger.
5757 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
5759 2003-01-22 Martin Baulig <martin@ximian.com>
5761 * Makefile.am: Install debug-mono-symfile.h.
5763 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
5765 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
5767 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
5769 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
5770 * class.c (mono_ptr_class_get): correctly set access levels of pointers
5771 (mono_array_class_get): correctly set access levels of arrays
5773 2003-01-20 Patrik Torstensson
5774 * image.h (MonoAssemblyName): changed major, minor, build, revision
5775 from signed to unsigned.
5777 2003-01-20 sean kasun <skasun@azstarnet.com>
5779 * reflection.c (load_cattr_value): Now this handles
5780 MONO_TYPE_SZARRAY. Fixes bug #35629
5782 2003-01-20 Miguel de Icaza <miguel@ximian.com>
5784 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
5787 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5789 * decimal.c: fixed bug #26056.
5791 2003-01-17 Martin Baulig <martin@ximian.com>
5793 * gc.c: Raise an ExecutionEngineException instead of using g_error().
5795 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5798 (mono_get_exception_type_initialization): new function.
5800 * object.c: throw a TypeInitializationException when an exception is
5801 thrown invoking the class constructor.
5803 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5805 * reflection.c: fixed attribute reading.
5807 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5810 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
5811 provided, look for the type in the calling assembly and then in
5812 mscorlib; if the assembly name is provided, only try that one.
5814 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
5816 * object.c: register the vtable before there is a chance it's
5817 queried again recursively.
5819 2003-01-13 Duncan Mak <duncan@ximian.com>
5821 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
5824 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
5826 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
5828 2003-01-11 Martin Baulig <martin@ximian.com>
5830 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
5831 this to 20 for the release.
5833 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
5835 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
5837 * loader.c (mono_method_get_marshal_info): bug fix
5839 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
5840 structures with explicit layout
5842 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
5844 * profiler.c: made the output more readable (and sorted).
5845 Added caller information for the allocation profiler.
5847 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
5849 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
5851 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5853 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
5856 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
5858 * object.c, profiler.h, profiler.c, profiler-private.h:
5859 Added object allocation profiler.
5861 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
5863 * reflection.h, reflection.c: handle global methods.
5864 Compress blob entries.
5866 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
5868 * marshal.c: fix compilation.
5870 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
5872 * loader.c (mono_method_get_marshal_info): impl.
5874 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
5876 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5878 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
5879 for reference types.
5881 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
5883 * loader.c: fixed off by one error in loaded parameter names.
5885 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
5887 * marshal.c (mono_marshal_get_icall_wrapper): like
5888 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
5889 instead of a MonoMethod.
5891 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5893 * decimal.c: fixed bug #36537.
5895 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
5897 * marshal.c: throw a missing method exception if a
5898 P/Invoke method is not found.
5900 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
5902 * icall.c: allow a null this for constructors.
5904 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
5906 * icall.c: raise the proper exceptions if the arguments to the
5907 internal Invoke are incorrect.
5909 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
5911 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
5913 2003-01-03 Martin Baulig <martin@ximian.com>
5915 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
5917 2002-12-31 Martin Baulig <martin@ximian.com>
5919 * debug-mono-symfile.c: Completely rewrote the type section.
5920 Instead of using individual malloc()ed fields, we use one big
5921 continuous memory area and offsets into this area.
5922 See the comments in the source code for details.
5924 2002-12-30 Martin Baulig <martin@ximian.com>
5926 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
5928 2002-12-30 Martin Baulig <martin@ximian.com>
5930 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
5931 line number table in this data blob instead of using an external
5934 2002-12-28 Martin Baulig <martin@ximian.com>
5936 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
5938 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
5940 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
5941 as a boxed return type.
5943 2002-12-21 Miguel de Icaza <miguel@ximian.com>
5946 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
5947 g_build_filename to properly get separators on the filename created.
5949 * object.h: Small change, introduce MonoMarshalByRefObject to
5950 track the layout of that structure in the C# universe as we make
5953 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
5955 * object.c: removed assert to allow static fields on interfaces.
5956 * loader.c: a TypeSpec may be used for any type, not just arrays.
5958 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
5960 * class.c, class.h: added mono_class_array_element_size ().
5961 Ignore static methods in interfaces.
5963 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5965 * threads.c: fixed the build under cygwin.
5967 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
5969 * reflection.c: handle nullref constants. Allocate keys for
5970 reflection handles with the GC.
5972 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
5974 * threads.c, threads.h: added mono_thread_get_abort_signal()
5975 to get a suitable signal for thread abort.
5977 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
5979 * metadata.c: fix handling of ExportedType table.
5981 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5983 * icall.c: added WriteWindowsDebugString internal call.
5985 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5987 * reflection.h: added fields to match C# implementation.
5989 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5991 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
5993 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
5995 * gc.h, gc-internal.h: Rename header for GC internal calls to
5996 gc-internal.h from gc.h as to not clash with Boehm GC having its
5997 header installed as <gc.h> in outside include paths.
5998 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
5999 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
6001 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6003 * icall.c: assign minor, build and revision in FillName.
6005 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
6007 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
6008 Added support for running code generated by Reflection.Emit.
6010 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6012 * appdomain.c: check for NULL argument in LoadFrom.
6014 2002-12-10 Dick Porter <dick@ximian.com>
6016 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
6018 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6020 * appdomain.c: fix buglet when building exe file name. Handle full
6021 assembly name (needed after latest changes to AssemblyName).
6023 (mono_image_close): free some hashtables.
6025 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
6027 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
6028 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
6029 on some systems (redhat 7.3)
6031 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
6033 * threads.c: delete the critical section of a sync block,
6034 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
6036 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
6038 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
6040 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6042 * appdomain.[ch]: handle the assembly preload event to try loading the
6043 assemblies using the paths we have in the current domain.
6045 * assembly.[ch]: created an assembly preload hook that is called to try
6046 loading the assembly by other means that the ones provided here.
6048 * domain.c: initialize the domain search path.
6050 From now on, assemblies (TODO: except corlib and System) are loaded
6051 according to these rules when using mono_assembly_load ():
6053 1. It tries to load the assembly from the ApplicationBase
6054 of the current domain appending .dll and .exe (TODO: have to
6055 try loading from name/name.dll and name/name.exe).
6057 2. It tries the search path specified in PrivateBinPath for the
6058 current domain (if any).
6060 3. Previous behavior.
6062 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
6064 * icall.c: implemented GetInterfaceMap() related icall.
6065 * domain.c, loader.h: load MethodInfo in mono_defaults.
6067 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
6069 * gc.c: disable the finalizer thread for now, untill all the issues
6070 with it are resolved.
6072 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
6074 * string-icalls.c: handle embedded nulls in string ctor when the
6075 length is specified.
6077 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
6079 * class.c: look for explicit interface implementation in parent
6082 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
6084 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
6086 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
6088 * gc.c: protect handles with a critical section.
6090 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6093 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
6094 parameters. If no assembly specified, try getting the type from all
6095 the assemblies in the current domain, else, load the assembly and get
6098 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6100 * marshal.c: applied patch from Aleksey Demakov that fixes
6101 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
6103 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6105 * icall.c: fixed get_location.
6107 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
6109 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
6110 declarations to make it work with older gcc.
6112 * loader.c (mono_get_method): set signature->pinvoke for native calls
6114 2002-11-20 Dick Porter <dick@ximian.com>
6116 * threads.c (mono_thread_init): Set the main thread's handle
6118 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
6120 * gc.c: allow compilation without GC support. Changed to match the
6123 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
6125 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
6127 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
6129 * reflection.c: set a public key token on the core assemblies.
6131 2002-11-18 Dick Porter <dick@ximian.com>
6133 * threads.c: Split out some thread initialisation so that other
6134 files can set the start callback function.
6136 * gc.c: Run finalisers in a separate thread, to avoid stack
6137 overflow. Fixes bug 31333.
6139 * appdomain.c: Set up GC finalisation thread.
6143 * domain.c: Use gc.h macros for GC_malloc
6145 2002-11-15 Dick Porter <dick@ximian.com>
6149 * appdomain.c: Removed mono_runtime_init_with_attach(),
6150 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
6151 merging the extra parameter with the existing function. Removed
6152 unneeded code in mono_thread_attach().
6154 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
6156 * image.c (mono_image_loaded_by_guid): a method to get loaded
6158 (load_metadata_ptrs): we store the guid as string.
6160 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
6162 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
6164 * metadata.c (mono_guid_to_string): imported method form Zoltan
6165 Varga (slightly modified)
6167 * assembly.c (mono_assembly_open): load precompiled code
6169 * loader.h (MonoMethod): we store the method token for use in the
6172 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6174 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
6175 the hook function called when an assembly is loaded.
6177 * domain.c: Modified file.
6178 (mono_domain_assembly_load): removed hash table insertion of assemblies.
6182 2002-11-07 Miguel de Icaza <miguel@ximian.com>
6184 * reflection.c: Map PEFileKind to the value expected by the WinNT
6187 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6189 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
6190 Read until the buffer is filled completely.
6192 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6194 * icall.c: implemented MonoType.InternalGetEvent ().
6196 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6198 * appdomain.c: implemented InitAppDomainSetup. Delayed
6199 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
6202 * assembly.c: base_dir is now an absolute path ending with
6205 * icall.c: modified get_location according to the above changes.
6207 * object.c: init AppDomain.SetupInformation for the default domain after
6208 we have the entry assembly.
6210 * domain.c: when unloading a domain, setup = NULL.
6212 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
6214 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
6216 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
6218 * object.h, object.c: introduced mono_object_get_virtual_method ()
6219 to lookup the method invoked on an object when a callvirt is done on
6221 * icall.c: make MethodInfo::Invoke() always do a virtual call.
6223 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6225 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
6226 current domain when loaded an assembly and failed to load it.
6228 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
6230 2002-10-31 Dick Porter <dick@ximian.com>
6234 * file-io.c: Return the error status in a parameter, as the
6235 GetLastError() value has long since been blown away if we try and
6236 look it up in a subsequent internal call invocation. Delete the
6237 GetLastError() internal call, because it's useless.
6239 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
6241 * class.[ch]: added cast_class to fix bug 29517
6243 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
6245 * marshal.c: create valid IL code in the filter clause:
6246 the new JIT is less forgiving:-)
6248 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6250 * icall.c: removed get_property internal call.
6252 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
6254 * appdomain.h domain.c: Added an ID to appdomains.
6256 * threads.c threads.h icall.c: Implement icall
6257 Thread:GetDomainID(), and remove unused icall
6258 CurrentThreadDomain_internal.
6260 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6262 * icall.c: Don't recurse through the base types in GetConstructor.
6265 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
6267 * mempool.h, mempool.c: added mono_mempool_empty() and
6268 mono_mempool_stats().
6270 2002-10-23 Dick Porter <dick@ximian.com>
6274 * icall.c: Added MonoIO.GetFileType internal call
6276 2002-10-17 Dick Porter <dick@ximian.com>
6278 * appdomain.c (mono_runtime_cleanup): Don't signal the async
6279 delegate semaphore before waiting for all threads to finish,
6280 because new threads can also call async delegates. Fixes bug
6283 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
6284 of 3 seconds, in case another async job is queued. (This part is
6285 needed because the bug fix reintroduced the 3s exit lag.) This
6286 makes the mono_runtime_shutdown flag superfluous.
6288 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
6290 * reflection.c: include ehader size in method section headers.
6291 Really check for suplicated modules entries.
6293 2002-10-17 Martin Baulig <martin@gnome.org>
6295 * debug-mono-symfile.c: Added back support for locals.
6297 2002-10-14 Martin Baulig <martin@gnome.org>
6299 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
6302 2002-10-14 Martin Baulig <martin@gnome.org>
6304 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
6305 mono_class_get() instead of looking in the class cache.
6307 2002-10-13 Martin Baulig <martin@gnome.org>
6309 * debug-mono-symfile.c: Set version number to 28, include the
6310 signature in method names.
6312 2002-10-13 Martin Baulig <martin@gnome.org>
6314 * debug-mono-symfile.h: Set version number to 27.
6316 2002-10-11 Martin Baulig <martin@gnome.org>
6318 * gc.c: Don't register/unregister NULL pointers as disappearing links.
6320 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
6322 * metadata.c, metadata.h: added helper function to allocate signatures.
6324 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6326 * icall.c: added internal call to get the location of machine.config.
6328 2002-10-08 Martin Baulig <martin@gnome.org>
6330 * debug-mono-symfile.c: Ignore classes with a pending init for the
6333 2002-10-03 Dick Porter <dick@ximian.com>
6335 * threads.c: Freebsd pthread_t is a pointer
6337 2002-10-03 Dick Porter <dick@ximian.com>
6339 * socket-io.c: Implemented GetHostName_internal
6341 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6344 (mono_config_parse_file): don't leak the text.
6346 2002-10-02 Martin Baulig <martin@gnome.org>
6348 * debug-mono-symfile.c: Added support for methods.
6350 2002-10-01 Martin Baulig <martin@gnome.org>
6352 * debug-mono-symfile.c: Don't emit methods and line numbers for
6353 the dynamic symbol file, just write the type table. We can easily
6354 have an external helper program which creates a symbol file for an
6357 2002-10-01 Dick Porter <dick@ximian.com>
6359 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
6360 Only add the handle to the cleanup array when we're about to
6361 launch the thread. Bug 31425 deadlocked when the test was run on
6364 2002-10-01 Martin Baulig <martin@gnome.org>
6366 * debug-mono-symfile.c: Added support for properties.
6368 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
6370 * reflection.c: unaligned store fix from Mark Crichton
6371 <crichton@gimp.org>.
6373 2002-09-27 Martin Baulig <martin@gnome.org>
6375 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
6378 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
6380 * assembly.h, assembly.c: use a sane API to hook into the assembly
6381 loading process instead of a useless special-purpouse hack
6382 (ngen needs a hook, too, for example).
6384 2002-09-27 Dick Porter <dick@ximian.com>
6386 * threads.c (mono_thread_init): Call GetCurrentProcess() so
6387 io-layer can set up some process handle info. Not needed on w32,
6388 but doesn't hurt either.
6390 * process.c: Pass the program name in the second parameter to
6391 CreateProcess, so the path is searched. Include the working
6392 directory. Implemented process name, process enumeration, and some
6393 process detail internal calls.
6395 * icall.c: Added internal calls for process lookup, and some
6398 2002-09-26 Martin Baulig <martin@gnome.org>
6400 * assembly.c (mono_install_open_assembly_hook): New global
6401 function to install a function to be invoked each time a new
6403 (mono_assembly_open): Run this callback function if set.
6405 * debug-mono-symfile.c: Put back line numbers for the dynamic
6406 symbol file and also record the .il file as source file. This
6407 allows us to install the temporary symbol file as `file.dbg' just
6408 like a compiler-generated one.
6410 2002-09-26 Nick Zigarovich <nick@chemlab.org>
6412 * Corrected typo in gc.c (BOHEM vs BOEHM).
6414 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6416 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
6417 GetProperties. Also avoid calling g_slist_length in GetProperties and
6420 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
6422 * reflection.c: avoid unaligned stores (bug spotted by
6423 Mark Crichton <crichton@gimp.org>).
6425 2002-09-25 Martin Baulig <martin@gnome.org>
6427 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
6428 instead of guint64 for addresses and added prologue/epilogue info.
6430 2002-09-25 Martin Baulig <martin@gnome.org>
6432 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
6433 store line number info. For the dynamic symbol file, we only need
6434 to provide the JIT generated dynamic line number info for the dynamic
6437 2002-09-25 Martin Baulig <martin@gnome.org>
6439 * debug-mono-symfile.h: Incremented version number.
6441 2002-09-24 Martin Baulig <martin@gnome.org>
6443 * class.c (mono_debugger_class_init_func): New global function
6445 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
6448 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
6449 function. This is called via the mono_debugger_class_init_func
6450 hook to add all types to the dynamic type table.
6451 (ves_icall_MonoDebugger_GetType): New interncall to get a class
6452 from its metadata token.
6454 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
6455 New interncall for the debugger.
6457 2002-09-24 Nick Drochak <ndrochak@gol.com>
6459 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
6460 before using it in case it is null.
6462 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
6464 * metadata.c: allow custom modifiers in local var signatures
6465 (bug spotted by Zoltan Varga).
6467 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
6469 * class.c: deal with the <Module> class that may have a NULL vtable.
6472 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6474 * image.c, image.h: more strong name helpers.
6475 * monosn.c: more work: convert pem keys to cryptoapi format.
6477 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
6479 * string-icalls.c: speedup IndexOf.
6481 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6483 * icall.c: updates from Zoltan.2.Varga@nokia.com.
6485 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
6487 * icall.c: cleanup: use mono_object_domain ().
6489 2002-09-23 Martin Baulig <martin@gnome.org>
6491 * debug-mono-symfile.c: Improved type support.
6493 2002-09-22 Martin Baulig <martin@gnome.org>
6495 * debug-mono-symfile.c: Added support for reference types and strings.
6497 2002-09-22 Martin Baulig <martin@gnome.org>
6499 * debug-mono-symfile.c: Started to work on the type table.
6501 2002-09-21 Martin Baulig <martin@gnome.org>
6503 * debug-mono-symfile.c: Largely reworked the symbol table format.
6504 The symbol table is now incrementally updated each time a new
6505 method is added. We're now also using our own magic and version
6506 so that you don't need to recompile all your classes if the
6507 dynamic table changes.
6508 (mono_debug_update_mono_symbol_file): Removed.
6509 (mono_debug_symfile_add_method): New function to add a method.
6511 2002-09-21 Martin Baulig <martin@gnome.org>
6514 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
6517 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
6518 New interncall to get a method from its metadata token.
6520 2002-09-21 Martin Baulig <martin@gnome.org>
6522 * debug-mono-symfile.c: Create type table.
6524 2002-09-20 Martin Baulig <martin@gnome.org>
6526 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
6528 2002-09-20 Martin Baulig <martin@gnome.org>
6530 * debug-mono-symfile.c: Provide information about params and locals.
6532 2002-09-20 Martin Baulig <martin@gnome.org>
6534 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
6537 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
6538 interncall to get a method from its metadata token.
6540 2002-09-20 Martin Baulig <martin@gnome.org>
6542 * debug-mono-symfile.c: Added a few checks for method->header
6543 being non-NULL. This should never happen, but for the moment
6544 let's use a g_warning() rather than a g_assert().
6546 2002-09-19 Mark Crichton <crichton@gimp.org>
6548 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
6549 even if support for it isn't present. Added an #ifdef to fix this.
6551 * socket-io.c: Added checks back for Solaris support.
6553 2002-09-19 Martin Baulig <martin@gnome.org>
6555 * debug-mono-symfile.c (read_string, write_string): Reflect latest
6556 changes in the symbol file format.
6558 2002-09-18 Martin Baulig <martin@gnome.org>
6560 * debug-mono-symfile.c: Set version number to 21.
6562 2002-09-18 Dick Porter <dick@ximian.com>
6564 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
6565 on netbsd. Fixes bug 30051.
6567 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6570 (set_version_from_string): little fix.
6572 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6574 * monosn.c, Makefile.am: added strong name utility.
6575 * reflection.h, reflection.c: implemented delayed signing,
6576 locale, version and hash id assembly attributes.
6578 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
6580 * loader.c, metadata.c: load param attributes in signatures.
6582 2002-09-16 Martin Baulig <martin@gnome.org>
6584 * debug-mono-symfile.c: Added string table with all method names.
6586 2002-09-14 Martin Baulig <martin@gnome.org>
6588 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
6591 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
6593 * reflection.c: record the public key token of referenced assemblies.
6595 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
6597 * image.c, image.h: added functions to get the strong name and the
6598 public key of an assembly.
6599 * pedump.c: use them.
6601 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
6603 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
6605 2002-09-12 Miguel de Icaza <miguel@ximian.com>
6607 * marshal.c (mono_marshal_get_managed_wrapper): Added
6610 2002-09-11 Martin Baulig <martin@gnome.org>
6612 * gc.c: Call GC_unregister_disappearing_link() on all links when
6613 finalizing them, this is necessary to aviod a crash in boehm's
6616 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6618 * gc.c: handle GetTarget for finalized objects spotted and fixed by
6621 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
6623 * icall.c: implemented MonoType::Module.
6624 * reflection.c, reflection.h: mono_module_get_object () from
6625 Tomi Pakarinen <tomi.pakarinen@welho.com>.
6627 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
6629 * icall.c: ignore overridden methods in GetMethods ().
6630 Fix for FieldInfo::SetValue().
6631 * object.c: handle float/double in runtime invoke.
6633 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
6635 * object.c: allow a constructor to be called again on an object.
6637 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6639 * class.h, class.c: move field layout code to it's own function and
6640 export it. Get an interface id earlier. Move fields in MonoClass
6641 so they are more cache friendly and align the bitfields.
6642 * loader.c: temporary handle get_param_names() for a runtime method.
6643 * reflection.c, reflection.h: more code to handle runtime creation of
6646 2002-09-09 Martin Baulig <martin@gnome.org>
6648 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
6649 signature with the pinvoke field being set for the actual call.
6651 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
6653 * icall.c: removed some unused icalls. Start of map of glib charsets
6654 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
6656 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
6658 * debug-helpers.c: break infinite loop (found and fixed by
6659 Holger Arnold <harnold@gmx.de>).
6661 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
6663 * icall.c: target may be null in create_delegate.
6665 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6667 * marshal.c: handle a boolean return type.
6669 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6671 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
6673 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
6675 * gc.c: fix weakreferences.
6677 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
6679 * icall.c: added icall to get default codepage.
6681 2002-09-03 Dick Porter <dick@ximian.com>
6684 * threads.c: Use MonoThread instead of MonoObject where
6687 Store running thread objects in a hash table, so that we have all
6688 the info to hand when waiting for them to finish
6689 (means we don't need OpenThread() any more, so mingw builds should
6690 be fully functional again.)
6693 * object.h: Added thread ID to MonoThread
6695 2002-09-03 Martin Baulig <martin@gnome.org>
6697 * icall.c (System.Reflection.Assembly::get_location): New interncall.
6699 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6701 * icall.c: fixed leak in get_temp_path. Thanks lupus.
6703 2002-09-03 Martin Baulig <martin@gnome.org>
6705 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
6706 argument to store the end address of the disassembled instruction.
6708 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
6709 here from debug-symfile.h.
6710 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
6711 JIT into this struct.
6712 (MonoSymbolFile): Added `char *image_file' field.
6713 (MonoDebugGetMethodFunc): Removed.
6714 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
6715 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
6716 (mono_debug_find_method): New method.
6718 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
6719 create a full symbol file.
6720 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
6721 and static symbol files.
6722 (mono_debug_find_method): The symbol file keeps an internal method hash,
6723 call this to get a MonoDebugMethodInfo from a MonoMethod.
6725 * debug-symfile.[ch]: Removed.
6727 2002-08-29 Miguel de Icaza <miguel@ximian.com>
6729 * image.c (do_mono_image_open): Remove linker version check.
6731 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
6733 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
6734 wrappers for instance methods.
6736 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6738 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
6740 2002-08-28 Dick Porter <dick@ximian.com>
6742 * Makefile.am: Export HOST_CC for w32 builds
6744 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
6746 * file-io.c process.c: MonoString are null terminated, no
6747 need for mono_string_to_utf16() anymore.
6749 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6751 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
6753 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
6755 * icall.c, reflection.h: speedup System.MonoType.
6757 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
6759 * reflection.c: allow null as the value of a string argument in
6760 custom attributes constructors.
6762 2002-08-27 Martin Baulig <martin@gnome.org>
6764 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
6765 `trampoline_address' field.
6767 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
6769 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
6770 check (fixes bug #29486)
6772 2002-08-27 Martin Baulig <martin@gnome.org>
6774 * debug-mono-symfile.c: Changed the file format in a way that allows us
6775 open it read-only and to use a specially malloced area for all the
6776 dynamic data. We can now also generate a symbol file on-the-fly if we're
6777 debugging IL code and there is no MCS generated symbol file for it.
6779 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
6781 * object.c: added a define for a good string and array
6782 creation speedup (not enabled by default because we need to deal with
6785 2002-08-26 Martin Baulig <martin@gnome.org>
6787 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
6788 function to create a dynamic symbol file. This is used by the
6789 debugger to create a symbol file for IL code on-the-fly.
6791 2002-08-26 Martin Baulig <martin@gnome.org>
6793 * loader.c (mono_lookup_pinvoke_call): Include the error message
6794 from g_module_error() in the error message.
6796 2002-08-24 Martin Baulig <martin@gnome.org>
6798 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
6799 function to update the symbol file. The symbol file is mmap()ed
6800 writable, but private. This allows us to install the symbol file
6801 together with the assembly.
6803 2002-08-24 Martin Baulig <martin@gnome.org>
6805 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
6806 but they can read the new symbol file format which mcs is now creating.
6808 * debug-symfile.c (mono_debug_find_source_location): Moved to
6809 debug-mono-symfile.c; this is now operating on the new symbol file.
6811 2002-08-23 Martin Baulig <martin@gnome.org>
6813 * debug-helpers.c (mono_method_desc_from_method): New function to get
6814 a MonoMethodDesc from a MonoMethod.
6816 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
6818 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
6819 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
6821 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
6823 * string-icalls.[ch]: make helper methods static.
6825 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6827 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
6828 types to it and to SetValueInternal.
6830 * object.c: Moved handle_enum label to its proper place. This was the
6833 This time i compiled mcs and gtk-sharp and they both work.
6835 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6837 * icall.c: reverted partially my previous patch until
6838 object.c:set_value handles enums correcly.
6840 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6843 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
6844 (ves_icall_System_Environment_get_MachineName): removed warning when
6845 compiling under cygwin.
6847 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
6849 * object.c: fixed field_get_value() for reference types.
6851 2002-08-22 Dick Porter <dick@ximian.com>
6853 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
6854 Don't free a buffer while it's still needed. Patch from Jonathan
6855 Liger <Jonathan.liger@wanadoo.fr>
6857 2002-08-21 Miguel de Icaza <miguel@ximian.com>
6859 * icall.c (ves_icall_System_Environment_get_Platform): Add new
6862 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
6864 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
6865 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
6867 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
6868 we call unmanaged code which throws exceptions.
6870 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6872 * appdomain.h: added per-domain entry_assembly.
6873 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
6875 * icall.c: Assembly::GetEntryAssembly icall.
6876 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
6877 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
6879 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
6881 * appdomain.h, gc.c: added mono_domain_finalize ().
6883 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6886 (mono_print_unhandled_exception): changed g_warning by g_printerr
6887 because g_log has a 1024 characters limit (yeah, i got a big stack
6888 trace). Don't print exception name, that should be in ToString
6891 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6893 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
6894 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
6896 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6899 (mono_print_unhandled_exception): after previous commit, i realized
6900 that MS calls ToString on the exception. I changed this function to
6901 do that. This way we get stack_trace for free.
6903 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6906 (mono_print_unhandled_exception): invoke Message property instead of
6907 getting 'message' field from Exception. Don't allocate memory for
6908 'trace' and 'message' if not needed.
6910 2002-08-18 Dick Porter <dick@ximian.com>
6912 * unicode.c: Fix asserts to match Encoder.cs checks
6914 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6916 * marshal.c: fix unaligned store issue and a few wrong
6917 opcode argument types.
6919 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6921 * icall.c: added GetUninitializedObjectInternal internal call.
6923 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
6925 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
6926 to the right domain.
6928 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
6930 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
6932 * class.c (class_compute_field_layout): set blittable to false for Strings
6934 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
6936 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6938 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
6939 first chunk of code to create types at runtime. Code to
6940 handle ReflectedType/DeclaringType. Make reflection handles
6943 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
6945 * class.c: set correct name in arrays.
6947 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
6949 * appdomain.c (mono_domain_transfer_object): make it work with
6950 valuetypes. bug fixes.
6952 2002-08-12 Dick Porter <dick@ximian.com>
6954 * object.h: Rename some parameters to avoid c++ keywords (Patch
6955 from Joseph Wenninger <kde@jowenn.at>)
6957 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
6959 * icall.c: added icall to implement Assembly.GetFile*.
6961 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
6963 * reflection.h, reflection.c: code to embed managed resources.
6965 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
6967 * class.c: move all the type size stuff into
6968 class_compute_field_layout().
6970 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6972 * class.c: ensure enums have always the correct instance size.
6973 * unicode.c: remove wrong assert.
6975 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
6977 * assembly.c: fix mem corruption issue.
6978 * image.h, image.c: added mono_image_get_resource () to access
6980 * icall.c: implemented Assembly.EntryPoint property and some
6981 Managed Resources related internalcalls.
6984 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
6986 * image.c, image.h: impemented mono_image_get_entry_point ().
6987 * appdomain.c: use mono_image_get_entry_point.
6989 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
6991 * reflection.c: support the object type argument when loading
6994 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
6996 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
6997 String as return type.
6999 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
7001 * reflection.c: fix encoding of named args for custom attrs to match
7002 the ms implementation. Read them back when instantiating custom
7005 2002-08-02 Radek Doulik <rodo@ximian.com>
7007 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
7008 by Dietmar as quick fix
7009 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
7010 16 as stack size, used on more places as quick fix before Dietmar
7011 will fix it properly
7013 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
7015 * object.h, object.c: added accessors for fields and properties.
7017 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
7019 * class.c, class.h: made mono_class_get_field_from_name ()
7020 loop on parent types.
7021 Added mono_class_get_property_from_name ().
7023 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7025 * class.c, class.h: move the code to setup the type vtable in its own
7026 function so that it can be reused also for types created at runtime.
7027 Eliminate the "class" identifier from the header file.
7028 * reflection.c: setup the vtable for enums so that we can create
7029 objects for use in SetConstant ().
7031 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
7033 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
7034 instead of the delegate itself as this pointer (bug #28383)
7036 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
7038 * marshal.c (mono_marshal_get_managed_wrapper): added return type
7041 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7043 * loader.c: don't set the pinvoke bit on icalls.
7045 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
7047 * debug-helpers.c (mono_method_full_name): only print a number to
7048 indicate wrapper type (so that the output is more readable in traces).
7050 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
7052 * class.c (mono_class_init): include method override patch from Paolo
7054 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
7056 * icall.c: fixed GetTypeCode().
7058 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
7060 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
7061 use real delegate invoke function to make it work with multicast
7062 delegates (fix bug# 28291).
7064 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7066 * object.c: load constant strings.
7068 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7070 * reflection.c: no magic numbers.
7071 * tabledefs.h: security action enum.
7073 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7075 * assembly.c: fix possible memory corruption.
7077 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
7079 * reflection.h, reflection.c: added support for linking resources.
7080 * verify.c: check we have an updated corlib.
7082 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
7084 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
7086 (mono_marshal_string_array): null terminate unmanaged string arrays.
7087 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
7089 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7091 * icall.c: Type.GetType () can now return also types from the
7094 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
7096 * loader.h, loader.c: stack walking support.
7097 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
7100 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
7102 * marshal.c: added optimisations for blittable types
7104 * class.c (mono_array_class_get): do not set blittable attribute on arrays
7105 (mono_class_setup_mono_type): set blittable attribute for single
7108 * marshal.c (mono_string_utf8_to_builder): impl.
7109 (mono_string_builder_to_utf8): impl.
7110 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
7112 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
7114 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
7115 (mono_marshal_get_managed_wrapper): impl. byref types
7117 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7120 (search_method): don't display debug message.
7122 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
7124 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
7126 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
7128 * appdomain.c: set the missing filename when throwing exception.
7130 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
7132 * metadata.c (mono_type_size): code cleanup
7133 (mono_type_stack_size): removed some test code
7135 2002-07-21 Miguel de Icaza <miguel@ximian.com>
7137 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
7138 mono_get_exception_file_not_found now.
7140 * exception.c (mono_exception_from_name_two_strings): New version
7141 that will call a constructor with two string arguments.
7142 (mono_get_exception_file_not_found): New helper routine, used to
7143 report file-not-found errors.
7145 2002-07-20 Dick Porter <dick@ximian.com>
7148 * process.c: Pass file handles to CreateProcess
7152 * file-io.c: Implemented CreatePipe
7154 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
7156 * metadata.c (mono_get_param_info): set alignment for value types
7158 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7160 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
7161 Constify mono_domain_assembly_open().
7162 * loader.c: handle null namespace in icalls.
7164 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
7166 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
7167 (emit_str_to_ptr_conv): marshal object as structs
7169 * metadata.c (mono_type_to_unmanaged): marshal object as structs
7171 * marshal.c (mono_marshal_get_runtime_invoke): support value types
7173 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
7175 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
7176 (mono_marshal_get_native_wrapper): we an now return value types
7178 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7180 * verify.c: more checks implemented.
7182 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
7184 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
7186 (mono_marshal_get_native_wrapper): allow byref arguments
7187 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
7188 impl. PtrToStringXXX methods
7189 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
7190 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
7191 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
7192 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
7193 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
7195 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7197 * reflection.c: fix buglet in parsing an assembly name.
7199 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
7201 * marshal.c (emit_ptr_to_str_conv): first impl.
7203 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
7205 * object.c, class.h: cache the vtable in the class as suggested by
7206 vargaz@freemail.hu (Zoltan Varga).
7208 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7210 * class.h, loader.c: added mono_field_from_token().
7211 * verify.c: first cut of type checking code.
7213 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
7215 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
7217 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
7219 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
7221 (mono_marshal_get_remoting_invoke): impl.
7222 (mono_delegate_begin_invoke): impl.
7223 (mono_mb_emit_save_args): impl.
7224 (mono_delegate_end_invoke): impl.
7225 (mono_marshal_get_delegate_begin_invoke):
7226 (mono_marshal_get_delegate_end_invoke):
7227 (mono_marshal_get_delegate_invoke): generate a special name for
7228 those methods (including the signature) and associate them whith
7231 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
7234 (mono_reflection_type_from_name): now it has a MonoImage parameter
7235 which is used as the default image to search the type in. If the image
7236 is NULL or getting the type from it fails, it defaults to corlib.
7238 * icall.c: changed 1 call to mono_reflection_type_from_name to match
7241 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7243 * reflection.c: update the parameter table index.
7245 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
7247 * domain.c: don't include the mark byte in the string hash.
7249 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
7251 * icall.cs: icall for Type.GetTypeCode ().
7252 * verify: a couple of fixes and disabled local initialization checks.
7254 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
7256 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
7258 * debug-helpers.c (mono_method_full_name): print the type of the
7261 * metadata.c (mono_signature_hash): a hash function for signatures
7262 (mono_signature_hash): better hash algorithm
7264 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
7266 * debug-helpers.c (mono_method_full_name): this can now generate
7267 method names with signatures
7269 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
7270 method dont have this pointers.
7272 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
7274 * reflection.c: fixup typebuilder tokens.
7275 * image.c: fix buglet.
7276 * marshal.h: remove whitespace.
7277 * metadata.h, metadata.c: reinstate code that was removed.
7278 * verify.c: handle catch directives and fix another couple of bugs.
7280 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
7282 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
7283 (mono_marshal_get_native_wrapper): make it comp. with the old code
7284 (mono_marshal_get_native_wrapper): support boolean
7285 (mono_marshal_get_managed_wrapper): support more types
7287 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
7289 * class.c (class_compute_field_layout): compute class->blittable attribute.
7291 2002-07-09 Dick Porter <dick@ximian.com>
7293 * threads.c: Make the thread cleaning up cope with threads that
7296 2002-07-08 Radek Doulik <rodo@ximian.com>
7298 * reflection.c (method_encode_code): use non-translated values to
7299 compute finally_start, this fixes exception handling on ppc, yay!
7301 * decimal.h (struct signscale): fix endianess
7303 2002-07-07 Radek Doulik <rodo@ximian.com>
7305 * reflection.c: swap box_val and not val
7307 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
7309 * reflection.c, reflection.h: handle full assembly info in type name.
7310 Handle Type arguments when loading custom attributes.
7311 * icall.c: updated to use new mono_reflection_type_from_name () method.
7313 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7316 (method_from_memberref): also print assembly name when method not found.
7318 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7321 (ves_icall_TypeGetProperties): fixed bug #27473.
7323 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7325 * reflection.c: display image name and token when cannot find the
7326 .ctor for an attribute.
7328 2002-07-05 Martin Baulig <martin@gnome.org>
7330 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
7332 2002-07-04 Dick Porter <dick@ximian.com>
7334 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
7335 compile on mingw. This will cause mingw builds to not wait for
7336 subthreads to terminate after the main thread does. I've lodged a
7337 bug with the mingw developers for them to wrap OpenThread().
7339 2002-07-03 Dick Porter <dick@ximian.com>
7341 * threads.c: Store thread IDs instead of handles, because
7342 GetCurrentThread() returns a pseudohandle and therefore stores
7343 useless values. mono_thread_cleanup() continues checking the
7344 array of threads until it is empty, to cope with subthreads
7345 spawning new threads after the main thread has finished.
7349 * profiler-private.h: Pass the thread ID to thread profiler
7350 functions, instead of a handle
7352 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7354 * verify.c: fixes to make it more usable.
7355 * pedump.c: added --verify code to verify IL code in an assembly.
7357 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7359 * reflection.c: turn errors into warnings to allow compiling corlib.
7361 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
7363 * reflection.c: add special cases to compile corlib.
7365 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7367 * reflection.c: handle properties with only a set method.
7369 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7371 * opcodes.h: add enum with opcodes in opval order.
7373 2002-07-01 Dick Porter <dick@ximian.com>
7376 * object.c (mono_runtime_run_main): Removed unneeded argument
7378 2002-06-28 Martin Baulig <martin@gnome.org>
7380 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
7382 2002-06-27 Dick Porter <dick@ximian.com>
7384 * threads.c: Store the handle in both the parent thread and in the
7385 subthread, to minimise the time between starting a new thread and
7388 2002-06-26 Dick Porter <dick@ximian.com>
7390 * appdomain.c (mono_runtime_cleanup): Close the socket library
7391 after all the threads have finished, not before
7393 2002-06-26 Martin Baulig <martin@gnome.org>
7395 * debug-symfile.c (mono_debug_find_source_location): Added
7396 `guint32 *line_number' argument. If it's not NULL, store the line number
7397 there and return the file name without the line number.
7399 2002-06-25 Dick Porter <dick@ximian.com>
7403 * process.c: Process forking and other support functions
7405 2002-06-25 Dick Porter <dick@ximian.com>
7407 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
7408 things dont happen when the image is closed.
7409 (mono_image_lookup_resource): Walk the resource section looking
7410 for a particular entry
7412 * cil-coff.h: PE resource section decoding
7414 2002-06-25 Dick Porter <dick@ximian.com>
7418 (mono_assembly_foreach): Accessor functions to walk the list of
7420 (mono_assembly_set_main):
7421 (mono_assembly_get_main): Process methods need to know which
7422 assembly is the "main" one
7424 * object.c (mono_runtime_run_main): Record the main assembly
7426 * debug-helpers.c: Fix typo
7428 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
7430 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
7431 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
7433 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7435 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
7437 2002-06-21 Miguel de Icaza <miguel@ximian.com>
7439 * image.c (do_mono_image_open): Initialize reference count,
7440 otherwise we leak the MonoImage.
7442 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
7444 * reflection.c: small tweak to handle self-hosting.
7446 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7448 * reflection.c: fix type name parse code.
7450 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7452 * reflection.c: break out of the loop.
7453 * image.c: special case corlib.
7455 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7457 * reflection.c: add all the custom attrs at the end to ensure the
7458 ctors have been properly initialized when the attributes are defined
7459 in the current assembly.
7461 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7463 * reflection.c: handle correctly multiple-nested types.
7465 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
7467 * row-indexes.h: fix typos.
7468 * reflection.c: adjust for typos and fix method_def_or_ref
7469 encoding in MethodImpl table.
7471 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7473 * reflection.c: fix entry point patching (thanks Serge!).
7475 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
7477 * verify.c: add check for System.Exception
7479 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
7481 * image.c, class.c: minifix for code just c&p'ed.
7482 * reflection.c: warning fix.
7483 * object.h, loader.h, domain.c: load also StringBuilder.
7485 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7487 * marshal.h, marshal.c: some support code to handle complex marshaling.
7489 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7491 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
7492 Better signatures with vtable error dump.
7494 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
7496 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
7498 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
7500 * icall.c (ves_icall_Type_GetField): impl.
7502 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7504 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
7505 to retrieve a marshal description blob for a field or param.
7507 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7509 * reflection.h, reflection.c: change order of nested type emission
7510 to avoid table corruption. The NestedTypes table is sorted.
7511 * icall.c: change order of GetConstructor results to workaround mcs bug.
7513 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7515 * reflection.h, reflection.c: handle field and param marshal
7518 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7520 * icall.c, marshal.c marshal.h: more Marshal class implementation.
7522 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7524 * reflection.c: fix call convention.
7526 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7528 * reflection.h, reflection.c: mono_image_get_memberref_token()
7529 takes a type instead of a class, now. Added
7530 mono_image_get_array_token() to create tokens for the special
7531 multi-dim array methods.
7533 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7535 * assembly.c: handle modules (no assembly table). Split
7536 loading references in its own function.
7537 * class.c: handle moduleref resolution scope.
7538 * image.c, image.h: cache module name in image.
7540 2002-06-07 Martin Baulig <martin@gnome.org>
7542 * reflection.c (mono_image_get_type_info): Only add a class layout entry
7543 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
7545 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7547 * icall.c: more signature fixes that used uint instead of int.
7549 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7551 * reflection.c: fixed signature of field refs.
7553 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7555 * class.c, reflection.c: handle typerefs of nested types
7556 (both on read and when writing files).
7558 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
7560 * icall.c: fix method signatures that tried to workaround the previous
7563 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
7565 * debug-helpers.c: fix typo.
7567 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
7569 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
7570 rewrote the PE/COFF writing code (our programs are understood by the
7573 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
7575 * gc.c, gc.h, icall.c: weakreference support.
7577 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7579 * Makefile.am, mono-config.c: use $(sysconfdir).
7581 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7583 * icall.c: changed default precision of Double.ToString() to 15.
7584 Fixed memory leak. Unified with Single.ToString.
7586 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
7588 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
7590 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
7592 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
7593 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
7594 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
7597 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7599 * debug-symfile.c, sysmath.c: yet more compilation fixes.
7601 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7603 * reflection.c, socket-io.c: more compilation fixes.
7605 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7607 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
7608 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
7609 unicode.c: warning and compiler compatibility fixes.
7611 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
7613 * class.h, metadata.c: fixed warnings/compilation errors.
7615 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7617 * Makefile.am, mono-config.c, mono-config.h: configuration file
7619 * loader.c, loader.h: make Dll mapping configurable at runtime in the
7620 config file. Export methods to insert and lookup mappings.
7622 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
7624 * reflection.c: handle types and boxed objects in custom attr
7627 2002-05-30 Martin Baulig <martin@gnome.org>
7630 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
7632 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
7634 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
7635 to lookup the implmap row for a P/Invoke method.
7636 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
7637 P/Invoke method from the runtime on an as needed basis.
7639 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
7641 * metadata.c (mono_metadata_parse_signature): impl.
7643 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7645 * class.c: handle .pack directive.
7647 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7649 * object.c: initialize static fields with RVA data.
7651 2002-05-25 Martin Baulig <martin@gnome.org>
7654 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
7656 2002-05-24 Martin Baulig <martin@gnome.org>
7659 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
7660 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
7661 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
7663 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
7665 * object.c: special case string ctros in invoke.
7666 * gc.c: silly whitespace changes.
7668 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
7670 * threadpool.[ch]: impl. a threadpool that can
7671 be used by mint and mono.
7673 2002-05-22 Martin Baulig <martin@gnome.org>
7675 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
7676 The first argument is now a `MonoReflectionModuleBuilder *', the return
7677 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
7678 `methods' field to get the method builder. The `token' argument is the
7681 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
7682 invalid characters instead of g_assert_not_reached()ing. This seems
7683 to be the behaviour of mscorlib.
7685 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
7687 * object.c (mono_runtime_invoke_array): applied patch from Rachel
7688 Hestilow to fix bug #25104
7690 2002-05-21 Martin Baulig <martin@gnome.org>
7692 * debug-symfile.c (mono_debug_find_source_location): New function.
7693 Looks up an IL offset in the line number table and returns the source
7694 location as a string.
7696 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7699 (mono_double_ToStringImpl): changed %f by %g until we have something
7702 2002-05-21 Nick Drochak <ndrochak@gol.com>
7704 * icall.c : Use different name for Math.Pow's icall. Needed to check
7705 parameters first in C#.
7707 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7709 * icall.c, reflection.h: added icall to get info about an event.
7711 2002-05-20 Radek Doulik <rodo@ximian.com>
7713 * object.c (mono_value_box): don't use memcpy for boxing on BIG
7715 (mono_value_box): don't use memcpy for small sizes on
7716 architectures with unaligned access
7718 2002-05-20 Martin Baulig <martin@gnome.org>
7720 * reflection.c (mono_reflection_setup_internal_class): Don't crash
7721 if `tb->parent == NULL'.
7722 (mono_reflection_create_internal_class): New function. This is
7723 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
7726 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
7729 2002-05-19 Martin Baulig <martin@gnome.org>
7731 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
7732 argument to get the length, don't default to the array length.
7734 2002-05-18 Miguel de Icaza <miguel@ximian.com>
7736 * assembly.c (mono_assembly_setrootdir): New function used to
7737 override the MONO_ASSEMBLIES directory.
7739 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
7741 * icall.c: ValueType_GetHashCode() initialize local var.
7743 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7745 * reflection.c: sort custom attributes table.
7747 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7749 * reflection.c: support named args in custom attributes (write support).
7751 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
7753 * reflection.c: fix finally position calculation.
7755 2002-05-15 Radek Doulik <rodo@ximian.com>
7757 * reflection.c: fixed endianess at many places
7759 * icall.c (ves_icall_InitializeArray): comment out debug msg
7761 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
7763 * object.c (mono_unhandled_exception): new function to handle
7764 unhandled exceptions.
7765 (mono_unhandled_exception): call the UnhandledException event.
7766 (mono_runtime_delegate_invoke): impl.
7768 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
7770 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
7771 returns the RVA, not the direct pointer to the data. Handle the case
7772 when the class size is fixed.
7774 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
7776 * reflection.c: fix some endianess issues.
7778 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
7780 * object.c (mono_runtime_invoke): is now able to catch exceptions.
7782 * threads.c (mono_thread_init): added a callback which is invoked
7785 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
7787 * icall.c: make GetHashCode return non-negative values.
7789 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
7791 * object.c, icall.c, gc.c: revert to address-based hashcode.
7793 2002-05-13 Miguel de Icaza <miguel@ximian.com>
7795 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
7797 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7799 * icall.c, class.c: special case <Module>.
7801 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
7803 * icall.c: fix bug in GetNow().
7805 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
7807 * object.c (mono_runtime_class_init): make sure that we call all
7808 static class constructors.
7810 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7812 * reflection.c: sort methodsemantics table.
7814 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
7816 * reflection.h, reflection.c: honour init locals setting.
7818 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
7820 * icall.c: copied Double ToStringImpl for Single ToStringImpl
7822 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
7824 * reflection.c: support ContructorBuilders in attribute blob creation.
7826 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7828 * reflection.c: some changes to build a binary that can be run
7829 directly in windows.
7831 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
7833 * loader.c: print a big message when an icall can't be found.
7835 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7837 * string-icalls.c: fix bug 24248.
7839 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
7841 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
7842 icall.c, reflection.h: separate assembly loading by pathname and by
7843 assembly name. Use the MONO_PATH env var to search for assemblies.
7845 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7847 * assembly.c, image.h: add some support for assemblies
7848 with multiple modules.
7849 * class.c, class.h: export mono_class_from_typeref().
7850 * loader.c: remove duplicated code and use mono_class_from_typeref(),
7853 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7855 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
7856 documentation says (the ECMA one is correct).
7858 2002-05-02 Dick Porter <dick@ximian.com>
7860 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
7861 Don't name the synchronisation mutex.
7863 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
7866 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
7867 Make the prototypes match.
7868 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
7872 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
7873 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
7874 all systems have tm.tm_zone, so use strftime() with %Z to print
7875 the timezone abreviation into a temp string.
7877 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
7878 rather than mono_array_addr() on a MonoString on Big Endian
7881 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
7883 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
7886 2002-04-30 Dick Porter <dick@ximian.com>
7888 * socket-io.c: Cope with SOCKET being an integer rather than a
7891 * threads.c: Added Thread_free_internal, to deal with thread
7892 handle cleanup. Moved calls to handle_store() and handle_remove()
7893 to start_wrapper(), so each can only be called once. Allocate
7894 synchronisation blocks with GC_malloc(), and use GC finalisation
7895 to close the handles.
7897 * icall.c: added System.Threading.Thread::Thread_free_internal
7899 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7901 * icall.c: support Environment.Exit, CommandLineArgs().
7903 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7905 * object.c, object.h: added mono_runtime_run_main () and
7906 mono_runtime_get_main_args () for use in System.Environment.
7908 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7910 * gc.c: fix thinko, enable actual finalization since the jit is now
7913 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7915 * gc.c, object.c: take into account that an object may be offset wrt the address
7916 returned by GC_malloc().
7918 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
7920 * image.c: handle files without entries in the assembly table (modules).
7922 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
7924 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
7925 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
7926 allowed to be null when it's System.Object class setup.
7928 2002-04-27 Martin Baulig <martin@gnome.org>
7930 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
7931 if `tb->parent == NULL' rather than crashing.
7933 2002-04-28 Nick Drochak <ndrochak@gol.com>
7935 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
7936 calling acos() where asin() should have been called.
7938 2002-04-26 Martin Baulig <martin@gnome.org>
7940 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
7941 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
7942 there's a subdirectory called `System', but we don't want to read that
7943 subdirectory as an assembly.
7945 2002-04-25 Martin Baulig <martin@gnome.org>
7947 * debug-symfile.c: Reflect latest MonoString changes.
7949 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7951 * rand.c, rand.h: instance method icalls need to have an explicit
7952 this pointer as first argument in the C implementation.
7954 2002-04-25 Nick Drochak <ndrochak@gol.com>
7956 * icall.c: Fix typo in map for GetNonZeroBytes
7958 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
7960 * string-icalls.c : String does now passes unit tests without any
7961 errors, the following changes has been made:
7963 Implemented replace methods.
7964 Renaming of methods to (try) follow the standard.
7965 Fixed compare ordinal
7966 Made all memory allocated directly to function instead of via icall function.
7967 Small performance fix in is_in_array function
7969 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
7971 c (mono_string_Internal_ctor_charp_int_int):
7972 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
7973 sindex < 0, throw ArgumentOutOfRangeException instead of
7974 ArgumentNullException.
7976 Added new check for length == 0, however
7977 I need to make it return String.Empty from the C code.
7979 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
7980 that calculate the length for us here.
7982 (mono_string_Internal_ctor_sbytep_int_int): Replaced
7983 mono_string_new_utf16 with mono_string_new, since value is utf8.
7985 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7987 * object.c: register the object for finalization if needed.
7988 Allocate one more char in the string for the terminating 0 char.
7990 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7992 * class.c, class.h, image.c: check if a type implemenst a destructor.
7993 Use the proper key for array class lookups.
7994 * icall.c: register the icalls in the System.GC class.
7995 * gc.c, gc.h: GC-related functions and icalls.
7997 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8001 * unicode.c: free some strings gotten from mono_string_to_utf8 and
8002 changed a couple of free () by g_free ().
8004 * decimal.c: one-liner in the comments for decimal2string ().
8006 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
8008 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
8010 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
8012 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
8013 * object.c (mono_runtime_invoke_array) : handle null in params
8015 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
8017 * string-icalls.c: fixed bug in split (one off bug)
8019 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
8021 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
8022 * icalls.c: added String::Equals as internal method
8024 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
8026 * threads.c: fixed bug in the double interlocked functions
8028 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
8030 * threads.c: implemented all of the new interlocked icalls.
8031 * string-icalls.c: fix a bug in insert.
8032 * icalls.c: added the icalls for interlocked, removed old string functions.
8034 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8036 * loader.c: fix off-by-one error when reading argument names.
8038 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8040 * profiler.c: win32 counter implementation (untested).
8041 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
8042 (the latter needs testing and more complete impl. from win32 folks).
8044 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
8046 * object.c: mono_array_new_full workaround mono_array_class_get
8049 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8051 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
8052 * object.h (mono_string_chars): Changed casting type.
8054 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8056 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
8057 method signatures to use gunichar2 instead of gint16.
8059 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
8061 * object.h, object.c: domain-specific versions of mono_object_new and
8064 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
8066 * object.c: changed String layout
8068 * string-icalls.c (mono_string_Internal_ctor_chara): added
8069 internal string constructors.
8071 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
8073 * threads.c: pass 'this' to the thread start routine.
8075 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8077 * string-icalls.c: fix IndexOf and LastIndexOf. Now
8078 InternalCompareStr don't call twice mono_string_cmp_char for the last
8079 character. Improved performance in mono_string_cmp_char.
8081 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8083 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
8084 code into its own library: libmonoruntime.
8086 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
8088 * object.h, object.c: changed array format so that szarrays do not
8089 require a bounds structure.
8090 * icall.c, appdomain.c: support for new szarray format.
8092 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
8094 * metadata.c: compare also the retuns type when comparing signatures:
8095 we didn't do this as an optimization since really overloaded methods
8096 must differ also in the arguments, but this doesn't work with
8097 low-level IL code (or when using explicit conversion operators: see
8098 bug#23498 for an example).
8100 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8102 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
8104 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8106 * icall.c: make MonoType::GetElementType its own icall.
8108 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8110 * icall.c: remove MonoMethod_get_Name().
8111 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
8114 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8116 * string-icalls.c: optimized a few methods.
8118 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8120 * icall.c: added all new string internal calls
8121 * string-icalls.c: added, new string internal call implementation.
8122 * object.c: added mono_string_new_size for allocating a string a size
8124 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
8126 * object.c (mono_object_isinst): use the same code as in the
8127 optimized x86 version.
8129 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8131 * profiler.c: TSC-based timer code (faster and more accurate).
8132 Not hooked up in configure, yet (set USE_X86TSC to 1).
8134 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
8136 * profiler.c, profiler.h: track time spent compiling methods.
8137 * threads.c: track thread creation/destruction.
8139 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
8141 * profiler.c, profiler.h, profiler-private.h: profiling interface
8142 and sample implementation. Moved here so that it can be used also by
8145 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
8147 * reflection.c, reflection.h: keep types and other handles separate in
8148 the hash tables for referred tokens. Add guid for modules.
8150 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
8152 * assembly.c: fix bugs found with valgrind.
8153 * metadata.h, metadata.c: added mono_metadata_guid_heap().
8155 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
8157 * threads: added icall support for getting current domain for
8160 2002-04-13 Martin Baulig <martin@gnome.org>
8162 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
8163 (MonoDebugVarInfo): Added `index' field for register based addresses.
8164 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
8165 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
8166 `MonoDebugVarInfo *params' and `guint32 this_offset' with
8167 `MonoDebugVarInfo *this_var'.
8169 * debug-symfile.c (relocate_variable): New static function to write
8170 a location description for a local variable or method parameter.
8172 2002-04-12 Martin Baulig <martin@gnome.org>
8174 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
8175 stack offset and begin/end scope address of a local variable.
8176 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
8177 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
8178 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
8180 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
8181 Added new relocation types for start/end scope of a local variable.
8183 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8185 * object.h: add mono_object_domain() macro.
8186 * reflection.c: handle typespecs.
8187 * icall.c: MonoMethod::get_Name() implementation.
8189 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8191 * icall.c: String::GetHashCode() icall implementation.
8193 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8195 * icall.c: String::IndexOfAny icall.
8196 * object.c, object.h: make array->max_length more useful.
8197 Intrduced mono_object_class() and mono_string_length() macros.
8199 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8201 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
8202 instead of g_unichar_isdigit.
8204 2002-04-11 Nick Drochak <ndrochak@gol.com>
8206 * icall.c: Implement a simple Double.ToString().
8208 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8210 * appdomain.h: only io-layer.h is supposed to be included.
8211 * icall.c: explicitly import environ. Fix warning.
8213 2002-04-10 Nick Drochak <ndrochak@gol.com>
8215 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
8216 return true even if it's not Daylight Savings time.
8217 Only return false for the case where the function isn't
8218 implemented for a plaform (read Windows).
8220 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8222 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
8225 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
8227 * mempool.c (mono_mempool_alloc): only use g_malloc when
8228 absolutely necessary.
8230 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
8232 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
8234 * class.c (mono_class_vtable): use domain mempool to allocate vtable
8235 (mono_class_proxy_vtable): use domain mempool
8237 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8239 * appdomain.h, appdomain.c: split initialization that requires the
8240 execution engine support into mono_runtime_init().
8242 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
8244 * class.c (mono_class_init): don't include vtable inside MonoClass
8245 to save some memory, gather some statistics.
8246 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
8248 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
8250 * icall.c: internalcall implementation for ValueType.Equals().
8252 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
8254 * object.c (mono_message_init): moved
8255 (mono_runtime_exec_main): new arch. independent impl.
8256 (mono_runtime_invoke_array): new method - like
8257 mono_runtime_invoke, but you can pass an array of objects.
8258 (mono_remoting_invoke): new arch. independent impl.
8259 (mono_message_invoke): new arch. independent impl.
8260 (mono_runtime_class_init): new arch. independent impl.
8261 (mono_runtime_object_init): new arch. independent impl.
8263 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8265 * metadata.c, object.c, reflection.c: documented the exported
8268 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
8270 * icall.c: simpler code to pass the assembly builder data to corlib.
8271 Implement GetNestedTypes() internalcall.
8273 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
8275 * class.c: warn if a type can't be loaded.
8277 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
8279 * image.h: typedef MonoImageOpenStatus
8280 * types.h: removed unused file
8282 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
8284 * icall.c: Enum_ToObject accepts enum value arguments.
8286 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8288 * class.c: move initialization of properties, events and nested
8289 classes, so that they happen for interfaces, too.
8291 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8293 * icall.c: cleanup some ugly casts in Array_SetValue*.
8295 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8297 * icall.c: the values array fro enums is of the correct type, now.
8298 Implement (correctly) getFullName instead of assQualifiedName for
8300 * reflection.h, reflection.c: added mono_type_get_name ().
8302 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8304 * assembly.c, image.h: for each MonoImage, record from wich assembly
8306 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
8307 Make Type.Assembly work.
8309 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
8311 * debug-symfile.h: use char* instead of gpointer to avoid
8314 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
8316 * icall.c (ves_icall_InternalExecute): impl. FielSetter
8317 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
8319 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
8321 * icall.c (mono_message_init): impl. (code cleanup)
8322 (ves_icall_InternalExecute): impl. FieldGetter
8324 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
8325 defined we call all (non-static)methods through the vtable.
8327 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
8329 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
8330 finalizer even though the memory is still referenced (and the chunk of
8331 memory is not freed).
8333 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
8335 * assembly.c: fix brokeness.
8337 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
8339 * class.c: kill some warnings. Check explicit interface method
8340 implementation also without considering the namespace.
8341 Load also literal strings in static class data.
8343 2002-03-29 Miguel de Icaza <miguel@ximian.com>
8345 * assembly.c (default_assembly_name_resolver): Kill memory leak.
8346 (default_assembly_name_resolver): Make the resolver take the
8347 "base" directory where the assembly was originally defined, so we
8348 can load DLLs that are in the same directory as the assembly that
8349 is being referenced.
8351 2002-03-28 Dick Porter <dick@ximian.com>
8357 * unicode.c: Warning cleanups
8359 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
8361 * object.h, reflection.h: use the correct type instead of MonoObject.
8363 2002-03-28 Martin Baulig <martin@gnome.org>
8365 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
8366 (mono_debug_update_symbol_file): Initialize classes if necessary.
8368 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
8370 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
8371 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
8373 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
8375 * assembly.h: fix function prototype.
8376 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
8377 * mono-endian.h: use const cast.
8379 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
8381 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
8383 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
8385 * loader.c: don't assert when a typeref can't be loaded, give
8386 a chance to the runtime to trow an exception instead.
8387 * loader.h: fix warning.
8389 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
8391 * class.c (mono_class_proxy_vtable): added proxy support
8393 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
8395 * icall.c: removed last of PAL calls, added System.Environment
8396 * file-io.h, file-io.c: MonoIO implementation
8397 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
8399 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
8401 * appdomain.c: do not use the byte marker in ldstr table lookup.
8402 * debug-helpers.c: allow two ':' to separate class and method name.
8403 * object.c: allocate arrays bounds with the GC, too.
8404 * verify: add a few more checks.
8406 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
8408 * reflection.c: output also literal strings. Allocate parameter data
8409 with GC_malloc() (thanks, Martin, for catching this!).
8411 2002-03-26 Martin Baulig <martin@gnome.org>
8413 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
8414 include the `this' offset in the `param_offsets'.
8416 2002-03-25 Martin Baulig <martin@gnome.org>
8418 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
8419 mono_debug_get_class() function to get the classes. Added new
8420 relocation types for arrays and strings.
8421 (mono_debug_get_class): New static function to search in all
8422 referenced assemblies for a metadata token.
8424 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
8426 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
8428 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
8429 hold gc-allocated objects. Make the string heap a stream like the
8430 others. Removed duplicated code when writing stream info.
8431 Added asserts to catch possible buffer overflows. Set the sorted map
8432 for tables that need sorting. Added some documentation.
8434 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
8436 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
8437 for interned strings and vtables.
8439 2002-03-24 Martin Baulig <martin@gnome.org>
8441 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
8442 it in the array since it was created with g_slist_prepend().
8444 2002-03-24 Martin Baulig <martin@gnome.org>
8446 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
8447 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
8448 (mono_debug_method_from_token): Renamed to
8449 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
8450 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
8452 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
8455 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
8457 2002-03-24 Martin Baulig <martin@gnome.org>
8459 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
8460 (mono_debug_method_from_token): New func.
8462 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
8463 New interncall, calls mono_debug_local_type_from_signature().
8464 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
8465 calls mono_debug_method_from_token().
8467 2002-03-23 Martin Baulig <martin@gnome.org>
8469 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
8470 specifies the number of bytes to be converted, not the array size.
8471 Return the number of chars, not the number of bytes.
8472 (ves_icall_iconv_get_chars): The `byteCount' argument
8473 specifies the number of bytes to be converted, not the array size.
8475 2002-03-23 Martin Baulig <martin@gnome.org>
8477 * reflection.h (MonoReflectionSigHelper): New type.
8479 * reflection.c (mono_reflection_sighelper_get_signature_local),
8480 (mono_reflection_sighelper_get_signature_local): New functions.
8482 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
8483 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
8486 2002-03-23 Martin Baulig <martin@gnome.org>
8488 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
8489 is_writeable is set.
8490 (mono_raw_buffer_update): New function to write the modified map
8493 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
8495 * debug-symfile.c (mono_debug_update_symbol_file): Call
8496 mono_raw_buffer_update() when done writing.
8498 2002-03-23 Martin Baulig <martin@gnome.org>
8500 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
8502 * debug-symfile.c: Added support for arguments and local variables.
8504 2002-03-23 Dick Porter <dick@ximian.com>
8506 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
8507 protected by ifdefs, hence breaking the w32 build.
8509 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8511 * object.c: implement is_interned() the right way.
8513 2002-03-21 Martin Baulig <martin@gnome.org>
8515 * debug-symfile.[ch]: New files to handle debugging information
8516 files. There's also support to dynamically update these symbol
8517 files to include machine dependent information.
8519 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
8521 * threads.c (mono_thread_create): new function to create thread
8524 2002-03-20 Martin Baulig <martin@gnome.org>
8526 * icall.c (ves_icall_InternalInvoke): Create a new object if the
8527 method is a constructor.
8528 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
8529 points to ves_icall_InternalInvoke().
8531 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
8533 * file-io.c: Flush shouldn't throw exceptions.
8535 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
8537 * file-io.c: FileStream flush support; FileSetLength now
8538 restores file pointer.
8540 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
8542 * class.c: set image for pointer classes.
8544 2002/03/19 Nick Drochak <ndrochak@gol.com>
8546 * sysmath.c: Forgot one.
8548 2002-03-18 Miguel de Icaza <miguel@ximian.com>
8550 * sysmath.c: Avoid redefining existing names.
8552 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
8554 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
8555 handled by runtime as icall rather than dllimport from libm.so
8556 * file-io.c, file-io.h: fixed handle argument type.
8558 2002-03-18 Dick Porter <dick@ximian.com>
8560 * reflection.c (mono_image_get_type_info): rename interface to
8561 iface, because of "#define interface struct" on windows.
8563 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
8565 * class.c, class.h: rename and export mono_ptr_class_get().
8566 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
8567 * reflection.c, reflection.h, icall.c: better/saner type name
8568 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
8571 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
8573 * class.c (mono_class_init): removed hardcoded GHC_SLOT
8575 * icall.c (ves_icall_InternalInvoke): impl.
8577 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
8579 * reflection.c: output the interface map table, too.
8581 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
8583 * class.c (class_compute_field_layout): separate computation of
8586 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
8588 * icall.c: added System.Buffer support.
8589 * file-io.c: moved file icalls from PAL to FileStream.
8591 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
8593 * icall.c (ves_icall_System_Object_GetHashCode): impl.
8595 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
8597 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
8599 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
8601 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
8603 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
8605 * debug-helpers.{c,h}: moved here from monograph some useful functions
8606 to locate a method by name/signature in a class or image. Included
8607 also a small and flexible IL disassembler.
8609 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
8611 * reflection.c: fixup tokens in methods with small header size, too.
8613 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
8615 * object.c (mono_string_to_utf8): remove assert(!error), instead
8618 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
8620 * icall.c: update to the new mono_Array_class_get interface.
8622 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
8624 * appdomain.c, object.c: Boehm-GC enable.
8625 * icall.c: make get_data_chunk() support split data requests.
8626 Ensure a class is initialized in more cases. Return only the first
8627 property found in GetProperties() or the compiler gets confused.
8628 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
8629 * reflection.h, reflection.c: add fixup mechanism for field and method
8630 tokens. Initialize assembly->typeref in a single place. Output
8631 properties after events. Support custom attributes for events, too.
8632 Typo fix for paramter custom attrs.
8634 2002-03-07 Martin Baulig <martin@gnome.org>
8636 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
8638 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
8640 * class.c (mono_array_class_get): fix. for multi. dim. arrays
8642 2002-03-06 Martin Baulig <martin@gnome.org>
8644 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
8645 non-zero lower bounds. See testcases #F10-#F13.
8647 2002-03-05 Martin Baulig <martin@gnome.org>
8649 * exception.c (mono_get_exception_argument_out_of_range): New exception.
8651 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
8652 ves_icall_System_Array_GetValue(), only calculate the absolute array position
8654 (ves_icall_System_Array_SetValue): Likewise.
8655 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
8656 as argument and does the actual work. This function is used when copying a
8657 multi-dimensional array.
8658 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
8659 now do all the widening conversions of value types.
8660 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
8662 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8664 * class.c: remove some magic numbers and use the smbolic names,
8665 instead. Added init_events() to load event info at class init time.
8666 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
8667 and mono_metadata_methods_from_event().
8668 * reflection.h, reflection.c: added support for writing out the evnets
8669 related information.
8671 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
8673 * reflection.h, icall.c: use a different method (GetInterfaces)
8674 to gather interface info and add isbyref, isprimitive and
8675 ispointer to the ves_icall_get_type_info() return value.
8677 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
8679 * class.h: stared adding support for events.
8680 * icall.c: split find_members implementation. Added debug icall to get
8681 the address of an object.
8682 * reflection.c: handle TypeBuilders in mono_type_get_object().
8684 2002-03-01 Martin Baulig <martin@gnome.org>
8686 * icall.c (ves_icall_System_Array_GetLength): This must throw an
8687 ArgumentOutOfRangeException(), not an ArgumentException().
8688 (ves_icall_System_Array_GetLowerBound): Likewise.
8689 (ves_icall_System_Array_GetValue): Improved argument checking.
8690 (ves_icall_System_Array_SetValue): Improved argument checking.
8692 2002-03-01 Martin Baulig <martin@gnome.org>
8694 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
8695 called with invalid arguments rather than just dying with g_assert().
8696 (ves_icall_System_Array_SetValue): Likewise.
8697 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
8698 raise a NotImplementedException instead.
8699 (ves_icall_System_Array_GetLength): Added argument checking.
8700 (ves_icall_System_Array_GetLowerBound): Added argument checking.
8702 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
8704 * object.h (mono_assert): new macros mono_assert and
8705 mono_assert_not_reached
8707 2002-02-28 Martin Baulig <martin@gnome.org>
8709 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
8710 and "System::String::IsInterned" to "System::String::_IsInterned".
8712 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
8714 * icall.c: remove hacks for typebuilder. Added icall to create a
8715 modified type from a tybebuilder.
8716 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
8717 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
8718 to create a backing MonoClass for a TypeBuilder.
8720 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8722 * class.c, class.h: more refactoring of class init.
8723 Export mono_class_setup_mono_type() and mono_class_setup_parent().
8725 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
8727 * marshal.c, marshal.h: start of marshaling interface.
8729 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
8731 * icall.c: fix order in assembly qualified name icall.
8733 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
8735 * class.c: do not free str, since we store it in the hash table.
8736 * reflection.h: add label field to MonoILExceptionInfo.
8737 * reflection.c: handle references to more than one assembly. Handle
8738 case when there isn't a module created in the assembly.
8740 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
8742 * class.c: Fix typo. Start refactoring of class init code.
8744 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
8746 * appdomain.c: exit with 1 on error.
8747 * class.c: we already have the name in MonoClassField.
8748 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
8749 MonoStreamHeader instead of an offset of image->raw_metadata.
8751 2002-02-26 Miguel de Icaza <miguel@ximian.com>
8753 * appdomain.c (mono_init): Be even more descriptive about the error.
8755 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
8757 * appdomain.c: give the user an informative message when corlib can't
8760 2002-02-26 Martin Baulig <martin@gnome.org>
8762 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
8763 New icall to get the time zone data.
8765 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8767 * reflection.c: set virtual and raw size of section correctly.
8768 * threads.c: transfer domain information to newly created threads.
8770 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
8772 * class.c: when instancing a class in a domain, load the default
8773 vaules for static fields from the constant table. Fix System.Enum to
8775 * icall.c: implement Object::GetType() internalcall. Implemented
8776 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
8777 Fixed checking of binding flags in find_members().
8778 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
8779 * reflection.c: handle enumerations when writing to the constant
8780 table. Use a different object cache for types.
8783 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
8785 * object.c (mono_object_isinst): fix for arrays
8787 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
8789 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
8791 * object.c: don't use mprotect () and fix intern pool hash table
8792 lookup for big endian systems.
8794 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
8796 * icall.c: change type_is_subtype_of () signature.
8798 2002-02-21 Mark Crichton <crichton@gimp.org>
8800 * rand.c, rand.h: Added random number generator for
8801 System.Security.Cryptography classes.
8803 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
8805 * icall.c: Added System.Security.Cryptography calls.
8807 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
8809 * class.c, icall.c, metadata.c: better support for pointer types.
8810 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
8811 * reflection.c: Add support for getting custom attrs for properties
8812 and simplify some code.
8814 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
8816 * icall.c: change getToken () and add custom attribute GetBlob()helper
8818 * reflection.h: add custom attrs array to the reflection builder structures.
8819 * reflection.c: encode and emit custom attributes for all the relevant
8820 reflection objects. Cache fieldref and methodref tokens. Change
8821 mono_image_create_token() interface to take a MonoDynamicAssembly.
8822 More complete custom attributes decoder. Load custom attributes for
8823 Assembly, Field, Method and Constructor objects, too. Make the
8824 returned array an Attribute[] one, not object[]. Added
8825 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
8826 custom attribute constructor.
8828 2002-02-20 Dick Porter <dick@ximian.com>
8832 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
8833 problem code out for now).
8835 2002-02-19 Radek Doulik <rodo@ximian.com>
8837 * object.c (mono_ldstr): use hash table to avoid multiple swapping
8839 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
8841 * icall.c: register the GetCustomAttributes method.
8842 * object.c, object.h: add mono_string_new_len ().
8843 * reflection.h, reflection.c: added mono_runtime_invoke(),
8844 mono_install_runtime_invoke(). Added
8845 mono_reflection_get_custom_attrs () to load custom attributes and
8846 create the attribute objects.
8848 2002-02-19 Dick Porter <dick@ximian.com>
8849 * threads-dummy-types.c:
8850 * threads-dummy-types.h:
8853 * threads-pthread-types.c:
8854 * threads-pthread-types.h:
8855 * threads-pthread.c:
8856 * threads-pthread.h: Deleted obsolete files
8858 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
8860 * class.c (mono_class_vtable): runtime init the class when we
8861 allocate static class data.
8863 * icall.c (ves_icall_System_Array_SetValue): check for null values.
8865 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
8866 and String - but we will need generic marshalling support in the
8868 (mono_init): set the domain name in a ms compatible way
8870 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
8873 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
8875 * object.c (mono_array_clone): use alloca() instead of g_malloc
8878 * appdomain.c (mono_domain_unload): impl.
8880 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
8882 * appdomain.c, object.c: fix intern pool implementation.
8883 * class.c: fix alignment code.
8885 2002-02-16 Radek Doulik <rodo@ximian.com>
8887 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
8888 and s2 > s1, just copy lower bytes to be compatible with little
8889 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
8890 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
8892 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
8893 force big_endian to be 1 for big endian machines
8894 (ves_icall_iconv_new_decoder): ditto
8896 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
8898 * socket-io.c (convert_sockopt_level_and_name): If the system
8899 doesn't define SOL_IP or SOL_TCP, get them by hand using
8900 getprotobyname() and caching the values (because this could be a
8902 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
8903 Use the appropriate struct when the system does support it. Ie,
8904 not all systems have struct ip_mreqn so use struct ip_mreq when
8907 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
8909 * reflection.c: handle finally clauses.
8911 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
8913 * socket-io.c: use g_snprintf() instead of snprintf.
8915 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
8917 * reflection.c (mono_param_get_objects): Cast second argument to
8918 mono_method_get_param_names to a const char** to silence the
8921 * appdomain.c (mono_domain_assembly_open): Put parens around the
8922 truth statement in the for-loop.
8924 * unicode.c (iconv_convert): Got rid of a compiler warning about
8925 int i being unused when the system has a new iconv.
8926 (iconv_get_length): Same.
8928 * image.c (load_class_names): Cast the second argument to
8929 g_hash_table_insert() to char* to hush compiler warnings about the
8931 (mono_image_open): Same here.
8933 * socket-io.c: Don't conditionally include sys/filio.h or
8934 sys/sockio.h here anymore since we now get them from
8936 (inet_pton): If the system doesn't support inet_aton, implement
8937 using inet_addr and also #define INADDR_NONE if it isn't defined
8940 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
8942 * metadata.c, metadata.h: added function to get packing and size info
8944 * reflection.h, reflection.c: handle field RVA data. Save info about
8945 the table layout if needed. Assign typedef indexes to all the types
8946 before dumping the info about them to avoid forward reference problems.
8948 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
8950 * socket-io.c (convert_sockopt_level_and_name): ifdef
8951 SO_ACCEPTCONN because it is not defined on my system (old debian)
8953 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
8955 * opcode.c: use stddef.h to get NULL.
8957 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
8959 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
8960 for FIONBIO, FIONREAD and SIOCATMARK.
8961 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
8962 define INADDR_NONE and besides, inet_addr() is deprecated and
8963 should not be used. Use inet_pton() instead - it also has the
8964 added bonus that it can easily handle IPv6 addresses as well.
8965 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
8967 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
8969 * decimal.c: remove _MSC_VER conditional.
8971 2002-02-13 Dick Porter <dick@ximian.com>
8974 * icall.c: Internal calls for Blocking, Select, Shutdown,
8975 GetSocketOption and SetSocketOption
8977 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8979 * assembly.cs: better resolver: use it instead of some kludgy
8982 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
8984 * reflection.c: the best way to speed-up the compiler is to avoid
8987 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
8989 * class.c (mono_class_vtable): changed the object layout
8990 (obj->vtable->class).
8991 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
8993 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8995 * assembly.c: look for assemblies in the assembly dir, too.
8997 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
8999 * class.c: fix thinko in mono_class_from_type().
9001 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
9003 * exception.h, exception.c: added TypeLoadException.
9004 * object.h, object.c: added mono_array_clone ().
9005 * icall.c: handle throwOnError in AssemblyGetType().
9006 Added Array.Clone().
9007 * opcode.h, opcode.c: use a single value for the opcode val.
9008 Compile fix for non-gcc compilers.
9010 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
9012 * opcodes.c, opcodes.h: export interesting info about opcodes.
9014 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
9016 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
9019 * class.c (class_compute_field_layout): set element_class for enums
9020 (mono_class_create_from_typedef): set element_class for normal classes
9022 * icall.c (ves_icall_System_Enum_get_value): impl.
9024 * class.c (mono_class_create_from_typedef): do not set valuetype
9025 flag for System.ValueType and System.Enum
9027 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
9029 * unicode.c (iconv_convert): fix big endian problem.
9031 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
9033 * class.c: add asserts if we are ever going to scribble over memory.
9034 * socket-io.c: not all systems have AF_IRDA defined.
9036 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
9038 * class.c (class_compute_field_layout): do not consider static
9039 fields to compute alignment
9041 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
9043 * appdomain.c (mono_appdomain_get): impl.
9044 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
9046 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
9048 * icall.c: ignore "file://" prefix when loading an assembly.
9050 2002-01-23 Dick Porter <dick@ximian.com>
9054 * Makefile.am: Added socket support
9056 2002-01-23 Miguel de Icaza <miguel@ximian.com>
9058 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
9059 code back. This should return the assemblies that are loaded by
9060 the runtime on behalf of an application domain.
9062 The current implementation is still broken, it just returns every
9063 assembly loaded, but until we get real applications domain this
9066 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
9068 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
9071 2002-01-23 Miguel de Icaza <miguel@ximian.com>
9073 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
9074 the mono_class_from_name lookup.
9075 (ves_icall_get_parameter_info): ditto.
9076 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
9078 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
9080 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
9082 * class.c: load also nested classes on class init.
9083 System.ValueType instance methods gets passed boxed
9084 values, unless methods in derived classed that get a pointer to the
9086 * icall.c: use better name parsing code in GetType().
9087 * image.c, image.h: add mono_image_loaded ().
9088 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
9089 * reflection.c, reflection.h: added mono_reflection_parse_type().
9091 2002-01-22 Veronica De Santis <veron78@interfree.it>
9093 * icall.c : Added mapping of internal calls for Manual and Auto reset events
9094 * threads.c : Added the implementation of internal calls for events
9095 * threads.h : Added prototypes of internal calls for events
9097 2002-01-21 Radek Doulik <rodo@ximian.com>
9099 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
9101 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
9103 * class.c (mono_class_init): set min_align to 1 (instead of 0)
9104 (mono_class_value_size): use min_align
9106 2002-01-20 Dick Porter <dick@ximian.com>
9109 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
9110 so it compiles on w32.
9112 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
9114 * metadata.c (mono_type_stack_size): impl.
9116 * class.c (mono_class_get_field): impl. memberref token
9118 2002-01-16 Veronica De Santis <veron78@@interfree.it>
9120 * icall.h : Added the internal calls mapping for CreateMutex_internal
9121 and ReleaseMutex_internal.
9122 * threads.h : Added the prototype of mutexes internal calls.
9123 * threads.c : Added the implementations of mutexes internal calls.
9125 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
9127 * metaparse.h: removed unused file.
9128 * reflection.c, reflection.h: added stream_data_align () function
9129 to align data in streams and keep stream aligned. Add support for
9130 exception support in method headers.
9132 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
9134 * unicode.c: make iconv_convert () return the number of bytess written
9135 in the output buffer.
9137 2002-01-15 Dick Porter <dick@ximian.com>
9138 * threads.c: Make the runtime's idea of infinite timeouts coincide
9139 with the class library's
9141 Fix a particularly egregious bug in mono_thread_cleanup(). That
9142 code was so utterly bogus it must have been written on a Monday.
9144 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
9146 * reflection.h: add subtypes field to TypeBuilder.
9147 * reflection.c: encode constants for literal fields.
9148 Handle subtypes. Fix user string token (and add a zero byte)
9151 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
9153 * class.c (mono_class_init): bug fix: assign slot numbers for
9156 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
9158 * reflection.c: don't try to output a code RVA for abstract methods.
9159 Small fixes for method header format. Output parameter info to the
9160 ParamDef table. Save method overriding info to MethodImpl table.
9161 Fix property support. Allow typedef.extends to be a type in the
9163 * verify.c: fix off-by-one error.
9165 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
9167 * class.c: fix mono_class_from_mono_type () for szarray types.
9168 Remove unused cache check in mono_class_from_type_spec().
9169 * icall.c: *type_from_name () functions handle simple arrays and byref.
9170 * reflection.c: handle byref and szarray types. Handle methods without
9171 body (gets P/Invoke compilation working). Handle types and fields in
9173 * reflection.h: add rank to MonoTypeInfo.
9175 2002-01-10 Dick Porter <dick@ximian.com>
9177 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
9180 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
9182 * icall.c: initialize class in type_from_handle ().
9183 Loop also in parent classes for get_method ().
9184 * reflection.c: properly encode class and valuetype types.
9185 Start on encoding TypeBuilder types. Handle fieldrefs.
9186 Use correct length when registering a user string.
9187 Handle ConstructorBuilder and MonoMethod in get_token ().
9188 Make mono_type_get_object () aware of cached types.
9189 * object.c: back out change to mono_string_new ().
9191 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
9192 * object.c: mono_string_new should return a NULL when the string
9193 passed in is NULL -- not try to deference it.
9195 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
9197 * icall.c: hack to make IsSubType work for TypeBuilders.
9198 * reflection.c: emit constructors before methods.
9199 Retrieve param names in mono_param_get_objects().
9201 2002/01/05 Nick Drochak <ndrochak@gol.com>
9203 * Makefile.am: fix list of headers and sources so automake 1.5
9204 doesn't complain. Removed \# at end of list.
9206 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
9208 * reflection.c: get token for a method ref. Set return type of
9209 constructor to void.
9210 * loader.c: debug message.
9211 * class.c: typo fix.
9213 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
9215 * icall.c: fix array init with rank > 1. FindMembers
9216 loops in parent class as well.
9217 * image.c: do not insert nested types in name cache.
9218 * reflection.c: warning fix.
9219 * reflection.h: add override method (for interface impl).
9221 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
9223 * metadata.c: fix customattr decoding.
9225 2001-12-21 Miguel de Icaza <miguel@ximian.com>
9227 * rawbuffer.cs: Added native Win32 implementation, avoids using
9228 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
9230 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
9232 * class.c: make the low-level routines handle the cache.
9234 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
9236 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
9238 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
9240 * class.c: fix mono_array_element_size() for objects.
9241 * class.h, class.c: add properties to MonoClass and load them
9243 * icall.c: check with isinst() when assigning a value to an array
9244 instead of requiring the classes to match exactly.
9245 Implemented icall for System.Type::GetType().
9246 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
9247 enums. Handle bindingflags when looking for methods and fields.
9248 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
9249 and mono_metadata_methods_from_property().
9250 * reflection.h, reflection.c: added structures for propreties,
9251 parameters and enums. Implemented mono_property_get_object() and
9252 mono_param_get_objects().
9254 2001-12-18 Dick Porter <dick@ximian.com>
9256 * file-io.c: Use mono_string_to_utf16() instead of
9259 * object.c: Added mono_string_to_utf16(), which copies the non
9260 NULL-terminated MonoString into a new double-null-terminated
9263 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
9265 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
9267 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
9269 * file-io.c: raise exceptions if handle is invalid.
9271 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
9273 * assembly.c: yet another check for mscorlib.
9274 * class.c, class.h: load nesting info for classes.
9275 * icall.c: many new functions to support the Reflection classes.
9276 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
9277 * reflection.h, reflection.c: mono_image_create_token(),
9278 mono_assembly_get_object(), mono_type_get_object(),
9279 mono_method_get_object(), mono_field_get_object(): methods to return
9280 objects that parallel the C representation of assemblies, types,
9283 2001-12-11 Dick Porter <dick@ximian.com>
9286 * file-io.c: Internal calls for file IO.
9288 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
9290 * tabledefs.h: missing FileAttributes.
9291 * verify.h, verify.c: use is_valid_string () to simplify and check for
9292 valid strings more correctly. Fix warnings and speeling.
9293 Check more tables: Filed, File, ModuleRef, StandAloneSig.
9294 Check code: branches, maxstack, method calls.
9296 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
9298 * object.c (mono_object_allocate): removed static, so that the jit
9299 can allocate value types.
9301 * icall.c (ves_icall_System_DateTime_GetNow): impl.
9303 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9305 * class.c: init enum types right away and register the
9306 token->MonoClass map in mono_class_create_from_typedef ().
9307 * verify.h, verify.c: first cut of the verifier.
9308 * pedump.c: add --verify switch to verify metadata tables.
9309 * tabledefs.h: add some missing enums.
9311 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
9313 * class.c (mono_install_runtime_class_init): impl.
9314 (mono_class_init): renamed mono_class_metadata_init to
9315 mono_class_init, also removed the metadata_inited flag
9317 * object.c (mono_object_isinst): use faster algorithm
9319 2001-11-30 Radek Doulik <rodo@ximian.com>
9321 * mono-endian.h: reverted last change
9322 added function prototypes
9324 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
9325 add mono-endian.c back
9327 * mono-endian.c: returned back, as Paolo pointed out, it's needed
9328 for unaligned access, I've mistaked it with endianess. I am
9330 (mono_read16): fix reverted endianess
9331 (mono_read64): ditto
9332 (mono_read32): ditto
9334 2001-11-30 Dick Porter <dick@ximian.com>
9336 * exception.c: Implement mono_exception_from_name()
9338 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
9340 * metadata.h, metadata.c: remove params_size and locals_size and their
9341 calculation from the metadata code: they are only usefult to the
9344 2001-11-29 Radek Doulik <rodo@ximian.com>
9346 * object.c (mono_ldstr): swap bytes here, it's probably not the
9347 best place, but works for me now, I'll redo it once I know mono
9348 better, also note that I add PROT_WRITE and don't reset back, also
9349 note that it's only affects big endians, so x86 should be OK
9351 * mono-endian.h (read16): use just glib macros for both endians
9353 * mono-endian.c: removed as glib macros are used in in
9354 mono-endian.h so we don't need to care about endianess for read
9355 macros as glib does that for us already
9357 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
9359 * class.h, class.h: take minimum alignment into consideration so
9360 that the fields of a class remain aligned also when in an array.
9362 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9364 * loader.h, loader.c: add mono_method_get_param_names().
9365 * class.c: 0-init class fields.
9367 2001-11-26 Dick Porter <dick@ximian.com>
9371 * threads.c: New file that handles System.Threading on all platforms
9374 * object.h: Remove the synchronisation struct from MonoObject,
9375 replace it with a pointer that gets initialised on demand
9377 * Makefile.am: Replace all the system-specific threading code with
9378 a single file that uses the new wrapper library
9380 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
9382 * class.c, class.h: add mono_install_trampoline() so that the runtime
9383 can register a function to create a trampoline: removes the ugly
9384 requirement that a runtime needed to export arch_create_jit_trampoline.
9385 * object.h, object.c: added mono_install_handler() so that the runtime
9386 can install an handler for exceptions generated in C code (with
9387 mono_raise_exception()). Added C struct for System.Delegate.
9388 * pedump.c: removed arch_create_jit_trampoline.
9389 * reflection.c: some cleanups to allow registering user strings and
9390 later getting a token for methodrefs and fieldrefs before the assembly
9392 * row-indexes.h: updates and fixes from the new ECMA specs.
9394 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
9396 * class.h, class.c: add enum_basetype field to MonoClass.
9397 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
9398 to get index in the constant table reated to a field, param or
9400 * reflection.h, reflection.c: handle constructors. Set public-key and
9401 version number of the built assembly to 0.
9402 * row-indexes.h: update from new ECMA spec.
9404 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
9406 * class.h, class.c: add a max_interface_id to MonoClass.
9407 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
9408 since it's used to do that. Added mono_type_type_from_obj().
9409 Make GetType() return NULL instead of segfaulting if the type was not
9410 found. Handle simple arrays in assQualifiedName.
9411 * object.h: add a struct to represent an Exception.
9412 * reflection.c: output call convention in method signature.
9413 Add code to support P/Invoke methods and fixed offsets for fields.
9415 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
9417 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
9419 * icall.c: use mono_array_addr instead of array->vector: fixes the
9420 reflection image writing.
9421 * reflection.c: init call convention byte to 0 in method signature.
9422 Encode the property signature. Don't output property-related methods
9423 twice. Really process the properties for a type (don't cast a field to
9424 a property, my mom always told me that).
9425 Fix 64 bit issues in pointer alignment in a different and more
9428 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
9430 * loader.h: Removed type class from MonoDefaults, added monotype
9432 * loader.c: Loaded MonoType, removed loading of Type
9434 * icall.c (my_mono_new_object): Now returns a System.MonoType,
9435 and fills in System.Type._impl with a RuntimeTypeHandle rather
9436 than the actual MonoClass *
9438 (ves_icall_type_from_handle): change from type_class to
9441 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
9444 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
9447 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
9449 (ves_icall_System_Reflection_Assembly_GetType): implemented
9451 (ves_icall_System_MonoType_assQualifiedName): implemented
9453 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
9455 2001-11-09 Miguel de Icaza <miguel@ximian.com>
9457 * assembly.c (mono_assembly_open): Implement a cache for the
9460 (mono_assembly_close): only destroy the assembly when the last
9463 2001-11-09 Dick Porter <dick@ximian.com>
9465 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
9467 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
9469 * class.c (mono_class_metadata_init): bug fix: compute the right slot
9471 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
9473 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
9474 from Martin Weindel.
9475 * object.h: add mono_string_chars ().
9477 2001-11-07 Miguel de Icaza <miguel@ximian.com>
9479 * reflection.c (build_compressed_metadata): Eliminates warnings
9480 and uses 64-bit clean code.
9482 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
9483 (mono_type_equal): Change signature to eliminate warnings.
9485 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9487 * icall.c, loader.c: remove the internalcall array constructors.
9488 Changes to match the new MonoArray structure.
9489 * object.h, object.c: an array object doesn't allocate an extra
9490 vector. Add mono_array_new_full () to create jagged arrays easily.
9492 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
9494 * metadata.h, metadata.c: add mono_metadata_field_info () to
9495 retreive all the info about a field from vairous tables.
9496 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
9497 * class.h, class.c: augment MonoClassField with more info.
9498 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
9499 policy and load a field's RVA if needed.
9501 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
9503 * class.c (mono_class_metadata_init): create a trampoline for all
9504 virtual functions instead of actually compiling them.
9506 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
9508 * class.h, class.c: include name in MonoClassField.
9509 * class.c: fix fundamental type of System.Object and System.String.
9510 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
9512 * icall.c: remove internalcalls for the Reflection stuff that is now
9514 * loader.c: mono_field_from_memberref () implementation.
9515 * mono-endian.c: thinko (s/struct/union/g).
9516 * object.c, object.h: make the mono_string_* prototypes actually use
9517 MonoString instead of MonoObject.
9518 * reflection.c, reflection.h: updates for changes in the reflection
9519 code in corlib: we use C structures that map to the actual C# classes.
9520 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
9521 fat method header if needed and use the info from the ILGenerator for
9522 methods. Handle fields in types. Misc fixes.
9524 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
9526 * class.c (mono_class_metadata_init): bug fix: always allocate
9527 space for static class data
9529 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
9531 * class.c (mono_compute_relative_numbering): use relative
9532 numbering to support fast runtime type checks.
9534 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
9536 * class.c (mono_class_create_from_typeref): added debugging output
9537 to print class name when MonoDummy is returned instead of real class
9539 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
9541 * class.c (mono_class_metadata_init): interface offset table now
9542 contains pointers into the vtable - this is more efficient for the jit
9544 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
9546 * class.c (mono_class_metadata_init): use a temporary vtable (the
9547 old algorithm only worked for the interpreter, but not for the jit)
9549 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
9551 * loader.c (method_from_memberref): use mono_class_get to get the
9552 class of an array instead of using System.Array directly.
9553 (mono_get_method): also add MEMBERREF methods to the method cache
9554 which usefull for arrays.
9556 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
9558 * pedump.c (arch_compile_method): added to compute vtable entry
9560 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
9561 number of interfaces.
9563 * class.h: merged MonoArrayClass into MonoClass
9565 * class.c (mono_class_create_from_typedef): compute the vtable size and
9566 allocate space to include the vtable inside MonoClass
9567 (mono_class_metadata_init): initialize the vtable
9569 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
9571 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
9572 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
9573 * image.c: endian fixes by Laurent Rioux.
9574 * object.h, object.c: rename MonoStringObject to MonoString and
9575 MonoArrayObject to MonoArray. Change some function names to conform to
9576 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
9577 guint16* as first argument, so don't use char*.
9578 Provide macros to do the interesting things on arrays in a portable way.
9579 * threads-pthread.c: updates for the API changes and #include <sched.h>
9580 (required for sched_yield()).
9581 * icall.c: updates for the API changes above.
9582 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
9583 platforms that need them.
9585 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
9587 * class.c: set the correct type for all the fundamental
9588 type when loading the class.
9590 2001-10-05 Dick Porter <dick@ximian.com>
9592 * threads-pthread.c (pthread_mutex_timedlock): Simple
9593 compatibility version for C libraries that lack this call.
9595 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
9597 * class.c: MonoTypes stored in MonoClass are stored as
9598 fundamental MonoTypes when the class represents a
9599 fundamental type (System.Int32, ...).
9600 The TypeHandle return by ldtoken is a MonoType*.
9601 * icall.c: ves_icall_get_data_chunk () write out all the
9602 PE/COFF stuff. Implement ves_icall_define_method (),
9603 ves_icall_set_method_body (), ves_icall_type_from_handle ().
9604 * image.c: properly skip unknown streams.
9605 * loader.h, loader.c: add type_class to mono_defaults.
9606 * metadata.c, metadata.h: export compute_size () as
9607 mono_metadata_compute_size () with a better interface.
9609 * pedump.c: don't try to print the entry point RVA if there is no entry point.
9610 * reflection.c, reflection.h: many cleanups, fixes, output method
9611 signatures and headers, typedef and typeref info, compress the metadata
9612 tables, output all the heap streams, cli header etc.
9613 * row-indexes.h: typo fixes.
9615 2001-10-04 Dick Porter <dick@ximian.com>
9617 * object.h: Add a synchronisation mutex struct to MonoObject
9619 * object.c (mono_new_object): Initialise the object
9620 synchronisation mutexes
9622 * icall.c: System.Threading.Monitor internal calls
9624 * threads-pthread.h:
9625 * threads-pthread.c: System.Threading.Monitor internal calls
9627 * threads-types.h: New file, includes the system-specific thread
9630 * threads-pthread-types.h:
9631 * threads-pthread-types.c: New files, handle pthread-specific
9632 synchronisation types
9634 * threads-dummy-types.h:
9635 * threads-dummy-types.c: New files of dummy support for
9636 thread-specific types
9640 * pedump.c: include mono-endian.h not endian.h
9642 * Makefile.am: More threads files.
9643 Name mono-endian.h not endian.h
9645 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
9647 * Makefile.am, reflection.h, reflection.c: move here the reflection related
9648 stuff and implement a few more bits.
9649 * icall.c: a field needs to be dereferenced twice. Do not use the same
9650 name for two variables in the same scope.
9651 * image.c, image.h: cleanups.
9653 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
9655 * class.c (mono_class_metadata_init): bug fix: compute the right size
9657 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
9659 * icall.c: implemented some of the Reflection internalcalls.
9660 * image.c, image.h: start writing out the PE/COFF image.
9661 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
9662 that does the reverse than decode_blob_size ().
9663 * object.c: use mono_metadata_encode_value (). Move here
9664 temporary implementation of mono_string_to_utf8 ().
9665 * rawbuffer.c: make malloc_map static.
9667 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
9669 * metadata.c: fix type comparison for arrays.
9670 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
9671 Added a couple of new classes to monodefaults.
9672 * icall.c: added a couple of Reflection-related internalcalls.
9673 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
9674 Added a byval_arg MonoType to MonoClass.
9676 2001-09-28 Dick Porter <dick@ximian.com>
9679 * threads-pthread.h:
9680 * threads-pthread.c: Implemented internal calls for
9681 LocalDataStoreSlot operations. Applied mutexes around all shared
9682 data. Reworked the thread creation and Start() operations to
9683 avoid a race condition.
9686 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
9688 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
9690 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
9692 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
9694 * class.c, loader.c: warn and return NULL instead of erroring out.
9695 * icall.c: added System.AppDomain::getCurDomain().
9696 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
9698 2001-09-25 Dick Porter <dick@ximian.com>
9700 * threads-pthread.h:
9701 * threads-pthread.c: Implemented timed thread joining and added
9702 System.Threading.Thread::Join_internal internal call
9704 * icall.c: Added System.Threading.Thread::Join_internal internal call
9707 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
9709 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
9711 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
9712 mono_string_intern () to implement the semantics of the ldstr opcode
9713 and the interning of System.Strings.
9714 * icall.c: provide hooks to make String::IsIntern and String::Intern
9717 2001-09-23 Dick Porter <dick@ximian.com>
9720 * threads-dummy.h: New files of dummy threading routines
9722 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
9723 support code based on system specifics
9725 Rename PTHREAD_LIBS to THREAD_LIBS
9727 2001-09-23 Dick Porter <dick@ximian.com>
9729 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
9730 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
9732 (mono_thread_init): Set up a Thread object instance to return when
9733 the main thread calls Thread.CurrentThread
9734 (mono_thread_cleanup): Wait for all subthreads to exit
9736 * icall.c: New internal calls for System.Threading.Thread::Sleep
9737 (including Schedule) and CurrentThread
9739 * threads.h: New file, to insulate thread-specific stuff from the
9742 2001-09-21 Dick Porter <dick@ximian.com>
9744 * threads-pthread.h:
9745 * threads-pthread.c: New file, for handling pthreads-style
9746 threading support. Start() now starts a new thread and executes
9747 the ThreadStart delegate instance.
9749 * icall.c: Added the internalcall for
9750 System.Threading.Thread::Start_internal
9752 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
9754 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
9756 * loader.c: work around the different signatures for delegates
9757 constructors csc generates in compiled code vs the ones compiled in mscorlib.
9759 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
9761 * class.h, class.c: add mono_class_get_field_from_name ().
9762 * *: Fix C comments and other ANSI C issues.
9764 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
9766 * endian.h, assembly.c: fix some endianness issues.
9768 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
9770 * loader.h, load.c: add delegate_class to mono_defaults.
9771 Handle runtime provided methods in mono_get_method ().
9773 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
9775 * loader.c (mono_get_method): use pinvoke for internal call
9777 * icall.c: use pinvoke for internal call
9779 * loader.c (method_from_memberref): set the method name
9781 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
9783 * metadata.c: help the compiler generate better code for
9784 mono_class_from_mono_type ().
9786 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
9788 * class.c (mono_class_metadata_init): delayed computing of the
9789 class size to mono_class_metadata_init ()
9791 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
9793 * class.c, class.h: add an interfaces member to MonoClass.
9794 * image.c, image.h: add assembly_name field to MonoImage
9795 from the assembly table.
9796 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
9798 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
9800 * class.c: Handle Array in mono_class_from_mono_type ().
9801 * metadata.c, pedump.c: some endian fixes.
9803 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
9805 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
9806 * metadata.c: fix small problem introduced with the latest commit.
9808 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
9810 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
9811 We don't need a MonoMetadata pointer anymore to compare signatures in
9812 mono_metadata_signature_equal (), update callers.
9813 Reduced memory usage an number of allocations for MonoMethodHeader and
9814 MonoMethodSignature.
9816 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
9818 * metadata.c: added compare for szarray.
9820 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
9822 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
9823 and add a couple more types to it and mono_defaults. Give an hint on
9824 classes that need implementing in our corlib and are referenced
9827 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
9829 * class.h, class.c: keep track if a class is also an Enum.
9830 * loader.c: Implement a couple more types for use in libffi
9831 marshalling. Gives better diagnostics when failing to dlopen
9832 a library. Set method->klass for P/Invoke methods, too.
9834 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
9836 * class.c, class.h: add a MonoType this_arg to MonoClass that
9837 represents a pointer to an object of the class' type that
9838 can be used by the interpreter and later the type cache.
9839 Add best guess alignment info for valuetype objects.
9841 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
9843 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
9844 into MonoType: one less level of indirection and allocation and
9845 simplifies quite a bit of code. Added cache for MonoTypes that are
9846 used frequently, so that we don't need to allocate them all the time.
9848 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
9850 * class.c (mono_class_create_from_typedef): System.Enum is also a
9851 value type, although it does not derive from System.ValueType
9852 (maybe a bug in the ms compiler?)
9854 * metadata.c (mono_type_size): return the right size for value types
9856 * loader.c (mono_get_method): only initialize method header if not abstract
9858 * class.c (mono_class_from_mono_type): use mono_default values.
9860 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
9862 * *: use MonoClass pointers instead of <type_tokens>
9864 * class.h: new flag: metadata_inited.
9866 * class.c (mono_class_metadata_init): impl.
9867 (mono_class_instance_size): impl.
9868 (mono_class_data_size): impl.
9870 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
9872 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
9873 MonoClass now has the name and name_space fields.
9874 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
9875 mono_get_method () takes and optional MonoClass as argument.
9876 Removed mono_typedef_from_name() and added mono_class_token_from_name()
9877 instead that takes advantage of a map from class names to typedef
9878 tokens in MonoImage.
9880 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
9882 * metadata.c: zero is not a valid alignment boundary.
9883 Merge MONO_TYPE_VOID in default decoding code.
9885 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
9887 * image.h: merged MonoMetadata into MonoImage
9889 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
9890 identify the type of elements.
9892 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
9894 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
9895 * cil-coff.h: split MonoMSDOSHeader and add size info.
9896 * image.c: add some consistency checks.
9897 * metadata.c: fix row size computation: one programmer
9898 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
9899 add explanation for the locator routine.
9900 Fix decoding of size in method header.
9902 2001-08-20 Miguel de Icaza <miguel@ximian.com>
9904 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
9905 (g_concat_dir_and_file): Bring g_concat_dir_and_file
9906 function from gnome-libs. This uses the right path separator
9907 based on the OS, and also works around a bug in some systems where
9908 a double slash is not allowed.
9909 (default_assembly_name_resolver): Use g_concat_dir_and_file
9910 (mono_assembly_open): ditto.
9912 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
9914 * metadata.c (mono_metadata_signature_equal): impl.
9916 * *: void is now a realy MonoType (instead of using NULL)
9918 * metadata.c (do_mono_metadata_parse_type): use
9919 mono_metadata_parse_type to parse void value.
9921 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
9923 * metadata.c, metadata.h: in the signature and method header store
9924 only the space required for holding the loca vars and incoming arguments.
9926 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
9928 * metadata.c (do_mono_metadata_parse_type): treat void like any
9929 other type (instead of assigning NULL);
9931 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
9933 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
9935 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
9937 * image.c (do_mono_image_open): added a cache for arrays.
9939 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
9941 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
9942 decode a single column from a row in a metadata table and changes
9943 to take advantage of it in the typedef locator (gives a nice speed up).
9944 Store offset info for function params.
9946 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
9948 * image.h (MONO_IMAGE_IS_CORLIB): removed
9950 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
9952 * assembly.c: how could mono_assembly_close () had ever worked?
9953 * metadata.c, metadata.h: provide offset info for local vars.
9954 Implement mono_type_size () to take care of alignment as well
9955 as size (it was mono_field_type_size in cli/class.c before).
9957 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
9959 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
9961 * assembly.h (CORLIB_NAME): set to corlib.dll
9963 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
9965 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
9967 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
9968 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
9969 tokentype.h: massive namespace cleanup.
9971 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
9973 * metadata.h, metadata.c: decode exception clauses when parsing method header.
9975 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
9977 * metadata.c (mono_metadata_free_type): added check for type !=
9978 NULL (void) before calling mono_metadata_free_type()
9980 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
9982 * metadata.h, row_indexes.h: added header with enumerations to use
9983 to index in the columns from tables in metadata and to decode coded
9984 tokens: we should start using this instead of embedding magic numbers
9987 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
9989 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
9990 Move metadata_t info from cli_image_info_t to MonoImage, where
9991 it's easily accessible. Changed all the uses accordingly.
9992 Added the method and class caches to MonoImage.
9993 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
9994 and mono_metadata_decode_value () signature to be more consistent
9995 with the other parse functions (and simplify code). Taken advantage
9996 of zero-length array allocation with GCC. Removed reduntant (and
9997 wrong) MonoFieldType struct and use MonoParam instead. Changed
9998 mono_metadata_parse_field_type () to use common code for parsing.
9999 Added mono_metadata_typedef_from_field () and
10000 mono_metadata_typedef_from_method () to lookup a typedef index from a
10001 field or method token.
10002 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
10004 2001-07-23 Miguel de Icaza <miguel@ximian.com>
10006 * metadata.c (mono_metadata_parse_field_type): Implement.
10007 (do_mono_metadata_parse_type): Split engine from
10008 mono_metadata_parse_type, so that we can create smaller structures
10009 for things that just have one pointer to the MonoType (look at
10012 2001-07-20 Miguel de Icaza <miguel@ximian.com>
10014 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
10015 as Jan Gray found out, it is incorrect.
10017 2001-07-18 Miguel de Icaza <miguel@ximian.com>
10019 * assembly.c: Implement asssembly loading. This loads an image
10020 and loads all the referenced assemblies. Come to think of it, we
10021 could always do lazy loading of the assemblies.
10023 * image.c (mono_image_open): Keep loaded images in a hashtable.
10025 * image.h (MonoImage): Add reference count.
10027 2001-07-17 Miguel de Icaza <miguel@ximian.com>
10029 * assembly.c (mono_assembly_open): Keep track of the file name in
10030 case the assembly has no ASSEMBLY table.
10032 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
10035 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
10037 * metadata.c, metadata.h: decode local vars in method header
10038 parse function. Change callers accordingly.
10040 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
10042 * metadata.h, cil-coff.h: protect against multiple inclusion.
10043 Added some new structures to hold information decoded from metadata:
10044 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
10045 and relevant decoding/free functions.
10046 * metadata.c: implement decoding functions. Add warning for out of bounds
10047 index in mono_metadata_locate(). Implement mono_get_method () to retreive
10048 all the info about a method signature and invocation. Remove check on
10049 uninitialized local var in parse_mh() and fix memory leak.
10051 2001-07-12 Miguel de Icaza <miguel@ximian.com>
10053 * metadata.h: More macros.
10055 * tokentype.h: New file.
10057 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
10059 * assembly.c: added a consistency check and initialize
10060 some structures with g_new0().
10061 * metadata.c: fixed a couple more bugs in table size computation
10062 and add other checks for out-of bound access to metadata.
10064 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
10066 * metatada.c: fix bugs computing table sizes. Spew a
10067 warning when index in string heap is out of bounds.
10069 2001-07-04 Miguel de Icaza <miguel@ximian.com>
10071 * metadata.h: Add a couple of macros to manipulate tokens.
10073 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
10075 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
10076 cli_section_tables).
10078 2001-07-01 Miguel de Icaza <miguel@ximian.com>
10080 * metadata.c (mono_metadata_user_string): New function, provides
10081 access to the UserString heap.
10083 2001-06-27 Miguel de Icaza <miguel@ximian.com>
10085 * metadata.c: Add inline documentation.
10087 2001-06-26 Miguel de Icaza <miguel@ximian.com>
10089 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
10092 2001-06-22 Miguel de Icaza <miguel@ximian.com>
10094 * typeattr.h: New file, TypeAttribute flags.
10096 2001-06-21 Miguel de Icaza <miguel@ximian.com>
10098 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
10099 mono_assembly_ensure_section): Section loading code.
10100 (load_section_tables): Load the sections.
10102 * mono/metadata/metadata.c (mono_metadata_locate_token,
10103 mono_metadata_locate): Functions to locate the information
10104 definition given a token or a table and an index.
10105 (mono_metadata_compute_table_bases): New.
10106 (compute_size): New function to compute the sizes of the various
10109 * mono/metadata/metadata.h: Finish listing the different index
10112 * mono/metadata/pedump.c: Improve to dump new information.
10114 2001-06-19 Miguel de Icaza <miguel@ximian.com>
10116 * mono/metadata/metadata.c: Entered all the tables matching
10119 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2