2 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
4 * reflection.c, reflection.h: do not free custom attrs that are cached.
5 * icall.c: use braces to make code clearer.
7 2004-06-11 Martin Baulig <martin@ximian.com>
9 * class.h (MonoInflatedField): New type.
10 (MonoClassField): Replaced `MonoType *generic_type' with
11 `MonoInflatedField *generic_info'.
14 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
16 2004-06-11 Martin Baulig <martin@ximian.com>
18 * reflection.c (mono_image_create_method_token): Correctly encode
21 2004-06-11 Martin Baulig <martin@ximian.com>
23 * metadata.c (mono_metadata_parse_method_signature): When parsing
24 a MethodDef which has VarArgs, also set sentinelpos if we don't
27 2004-06-11 Martin Baulig <martin@ximian.com>
29 * verify.c (mono_method_verify): In CEE_CALL, use
30 mono_method_get_signature() to get the method's signature, unless
31 we're a PInvoke method.
33 2004-06-10 Jackson Harper <jackson@ximian.com>
35 * assembly.c: Use <path>/lib/mono/gac for the extra paths
36 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
37 logical name as the supplied path is just a prefix to the gac not
38 the direct path to it.
40 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
42 * reflection.c: make the token for a created method match
43 the token of the MethodBuilder it was created from
44 (IKVM requires this behaviour now).
46 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
48 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
49 reflection.c, socket-io.c: leak fixes.
51 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
53 * icall.c: handle sentinel pos in vararg methods in position different
56 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
58 * culture-info-tables.h: freshly generated.
60 2004-06-09 Martin Baulig <martin@ximian.com>
62 * loader.c (mono_get_method_constrained): Call `mono_class_init
65 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
67 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
68 any methods. Fixes #59629.
70 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
72 * culture-info-tables.h: reflecting locale-builder updates.
74 2004-06-08 Dick Porter <dick@ximian.com>
77 * locales.c: Fixed compile warnings, including a real bug in
78 CompareInfo_internal_compare.
80 2004-06-08 Dick Porter <dick@ximian.com>
83 (ves_icall_System_Globalization_CompareInfo_internal_index):
84 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
85 Double-check the resuls of usearches, because ICU currently
86 ignores most of the collator settings here. Fixes bug 59720.
88 2004-06-08 Dick Porter <dick@ximian.com>
91 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
92 Fix memory leak and segfault-causing typo. No idea how this one
93 lasted so long without being noticed.
95 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
97 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
98 any methods. Fixes #59629.
100 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
103 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
104 own the critical section before). Removed dead code (that's done
105 in the preload hook).
107 (mono_assembly_load_with_partial_name): call the preload hook.
109 2004-06-08 Martin Baulig <martin@ximian.com>
111 * metadata.c (mono_metadata_signature_alloc): Default
114 * reflection.c (mono_image_get_array_token): Likewise.
116 2004-06-08 Martin Baulig <martin@ximian.com>
118 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
120 * metadata.c (mono_metadata_parse_method_signature): When parsing
121 a MethodDef which has VarArgs, set sentinelpos.
123 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
124 `gint16' since we're using -1 for non-varargs methods.
127 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
128 (method_encode_signature): Added varargs support.
129 (method_builder_encode_signature): Likewise.
130 (mono_image_get_varargs_method_token): New static method.
131 (mono_image_create_method_token): New public method; this is
132 called via an icall instead of mono_image_create_token() when
133 calling a varargs method.
135 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
137 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
139 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
141 * culture-info-tables.h : Reflecting the latest locale-builder that
142 fixed empty array representation ({} to {0}).
144 2004-06-07 Jackson Harper <jackson@ximian.com>
146 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
147 looking up extra gac paths. This allows MONO_GAC_PATH to act
148 exactly like a prefix.
150 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
152 * reflection.c (mono_reflection_type_from_name): Make a copy of the
153 type name before modifying it. Fixes #59405.
155 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
157 * culture-info.h: added fields for "all datetime patterns".
158 * locales.c: ( ves_icall_System_Globalization_CultureInfo
159 _construct_datetime_format ()): fill xxx_patterns fields.
160 * object.h: added fields for "all datetime patterns" to
161 MonoDateTimeFormatInfo.
162 * culture-info-tables.h: reflecting locale-builder updates.
164 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
166 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
167 the event has no add and remove methods. Fixes #59629.
169 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
171 * object.c: Fixed possible integer overflow when allocating large
174 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
176 * culture-info-tables.h: reflecting locale-builder updates.
178 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
180 * culture-info-tables.h: reflecting locale-builder updates.
182 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
184 * culture-info-tables.h: reflecting locale-builder updates.
186 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
188 * threads.c: Made Thread.Sleep abortable.
190 2004-06-02 Martin Baulig <martin@ximian.com>
192 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
194 * debug-mono-symfile.h: Bumped symbol file version number to 37.
196 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
198 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
200 2004-05-30 Jackson Harper <jackson@ximian.com>
202 * reflection.c: Do not hardcode assembly versions or public key
203 tokens anymore. All of this except the corlib section was dead
206 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
208 * object.c (mono_runtime_invoke_array): Automatically create boxed
209 objects for byref valuetypes if needed. Fixes #59300.
211 * object.c (mono_method_return_message_restore): Handle
212 MONO_TYPE_OBJECT as well.
214 2004-05-28 Jackson Harper <jackson@ximian.com>
216 * reflection.c: The modified type encoding was causing build
217 problems. Reverted for now.
219 2004-05-28 Jackson Harper <jackson@ximian.com>
221 * reflection.c/h: Take an assembly ref so that we dont create
222 fully qualified names when encoding types in the same assembly as
223 the custom attribute being emitted.
224 * appdomain.c: Increment version number.
226 2004-05-26 Duncan Mak <duncan@ximian.com>
229 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
230 Set the full version number (major, minor, build, revision).
232 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
234 * marshal.c (emit_struct_conv): increment src/dst after blit
235 (mono_marshal_get_managed_wrapper,
236 mono_marshal_get_native_wrapper): make sure we have marshalling
237 info before marshalling params (info computation affects
240 * class.c (class_compute_field_layout): correctly deal with
242 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
243 value types (as per what windows dows by default)
244 (mono_class_setup_mono_type): System.ValueType is blittable
245 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
248 * marshal.c (mono_marshal_load_type_info): flag types as
249 non-blittable if the native layout doesn't match the managed
252 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
254 * appdomain.c: don't add stuff in the private search path that is
255 above the application base. If application base is not set, there's
256 no private search path.
258 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
260 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
261 byref struct arguments in native->managed marshalling.
263 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
265 * marshal.c (mono_marshal_get_runtime_invoke): correctly
266 cache methods using signature (special case for methods
267 that are value type or string class)
269 * image.c (mono_image_close): clean up allocated GSList's
270 in runtime_invoke_cache.
272 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
274 * mono-config.c: set the correct path for mono_cfg_dir on windows when
275 there's no MONO_CFG_DIR environment variable defined.
277 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
279 * threads.c: windows version must be >= 0x0500 to include OpenThread.
281 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
283 * threadpool.c: Really wait for 500ms after the async call, even if the wait
285 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
286 before waiting for it, and call CloseHandle after the wait to unref it.
287 This will make sure that handles are not disposed too early.
289 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
294 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
297 * object.c: se the application_base only for the domain that runs
298 Main. Fixes bug #59216,
300 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
303 * object.c: only the domain in which Main is run have
304 SetupInformation.ConfigurationFile set, so moved a few lines from
305 appdomain.c to object.c.
307 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
309 * appdomain.c: we tried to load [name].(dll|exe), but according
310 to bug #57710, we must also try [culture]/[name].(dll|exe) and
311 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
312 There's a test case attached to bug #58922.
314 2004-05-27 Dick Porter <dick@ximian.com>
317 * file-io.c: Implemented icalls for locking and unlocking regions
319 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
320 FALSE on error (fixes both compiler warning and real bug.)
322 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
324 * culture-info-tables.h: reflecting locale-builder updates.
326 (Added missing ChangeLog entry for 05/26)
328 2004-05-27 Jackson Harper <jackson@ximian.com>
330 * locales.c: Fix some cut and paste errors.
332 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
334 * mono-config.c: set the correct path for config. directory on windows.
336 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
338 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
341 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
343 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
344 from pinvoke functions.
346 * marshal.c (mono_ftnptr_to_delegate): Implement this.
348 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
350 * culture-info-tables.h: reflecting locale-builder updates.
352 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
354 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
357 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
359 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
360 * icall.c: Modified icalls for RNG.
361 * rand.c|h: Changed RNG interface to allow thread-safe usage under
364 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
366 * locales.c: Fix build.
368 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
370 * culture-info-tables.h: reflecting locale-builder updates.
372 2004-05-25 Jackson Harper <jackson@ximian.com>
374 * locales.c: When creating the current culture use the $LANGs
375 specific culture. So DateTimeFormat and NumberFormat entries are created.
377 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
379 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
380 a char array as parameter.
382 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
384 * image.c: In mono_image_open(), always use an absolute path name to
385 look for already loaded images.
387 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
389 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
390 missing in the windows build (like older cygwin include files).
392 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
394 * icall.c: Fixed check for possible integer overflow in Buffer_
395 BlockCopy icall. Replaced comments style // by /* */.
397 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
399 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
401 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
402 check after MONO_VTADDR. Fixes pinvoke2.exe.
404 * marshal.h marshal.c metadata.h: Add beginnings of support for
405 ftnptr -> delegate marshalling.
407 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
409 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
410 * threads.c: Fix warnings.
412 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
414 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
415 * icall.c: Registered icalls for Suspend and Resume.
416 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
418 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
419 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
420 * process.c: Use WaitForSingleObjectEx.
421 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
423 * threads.c, threads.h: Make use of new Ex wait methods. Improved
424 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
425 for Suspend and Resume. Added new mono_thread_stop, used for stoping
426 background threads. Added basic support for Abort in Windows.
427 Start new threads using a managed delegate invoke wrapper. This wrapper
428 has an interruption checkpoint that is needed since an interruption
429 can be requested before the thread leaves the unmanaged code that starts
431 * marshal.c: Added interruption checkpoint after every native call, and
432 also before managed calls for wrappers called from unmanaged code to
433 go into managed code.
434 * object.h: Added new field in MonoThread to keep track of interruption
437 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
439 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
442 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
449 * rand.c: getenv -> g_getenv (windows!)
451 * process.c: complete_path is also used on non-windows platforms.
453 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
455 * icall.c: new signature for Process_Start.
457 * process.[ch]: new signature for Process_Start. If we're on windows
458 and UseShellExecute is false, we have to search for the program by
459 ourselves if we don't get a full path.
461 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
463 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
464 marshalling and call CleanUpNativeData if needed. Fixes #58646.
466 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
468 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
471 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
473 * process.c: use double quotes to quote program name and arguments on
474 windows. Fixes bug #58575.
476 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
478 * file-io.c: don't return "." and ".." when using windows Find*File.
480 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
482 * marshal.c: Don't pass wrappers to message init because method
483 addressed used to lookup metadata. part of remoting[2|3] fix.
485 2004-05-15 Jackson Harper <jackson@ximian.com>
487 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
488 path is essentially the same as MONO_PATH except that it points to
489 GACs instead of lib directories.
490 * loader.h: The user gac is gone so we dont need function to
492 * mono-config.c: user gac option is now gone.
494 2004-05-15 Jackson Harper <jackson@ximian.com>
496 * culture-info.h: Make defines more consistent, add calendar data
497 to the culture info table.
498 * culture-info-tables.h: Add basic calendar data. Basically
499 everyone gets default gregorian until all the data is
501 * locales.c: Use the new consistent defines. Set calendar data for
502 culture info objects.
503 * object.h: add a field for calendar data to CultureInfo
505 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
507 * image.c: image->runtime_invoke_cache is keyed on signatures now.
508 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
510 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
511 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
512 an extra param that is the pointer of the method to invoke. The IL for
513 the invoke method is no longer specific to the method, but to the
514 signature of the method. Thus, we can share the same code for multiple
515 methods. This reduces the number of methods that have to be compiled.
517 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
519 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
521 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
523 * icall.c: Optimize Buffer.BlockCopy.
525 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
527 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
528 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
529 quote). Changed them to "MMMM yyyy".
531 2004-05-12 Miguel de Icaza <miguel@ximian.com>
534 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
536 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
538 * reflection.h: Updated after changes to managed structures.
540 * appdomain.c: Bump corlib version.
542 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
544 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
547 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
549 * Makefile.am: link to ../os/libmonoos.la on windows.
552 -If MONO_DEBUG, warn about non-existing directories in
554 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
555 compile time variable.
556 -Removed init_default_path and call mono_set_rootdir from
557 libmonoos.a instead (windows only).
559 * assembly.h: declare mono_assembly_getrootdir().
562 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
564 * loader.c: s/getenv/g_getenv/
566 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
568 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
570 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
572 * metadata.h: Add new marshalling conversions.
574 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
577 * reflection.c (mono_reflection_get_type): Lookup the type in all
578 modules of a multi-module assembly. Fixes #58291.
580 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
582 * threads.c: Before aborting a background, set the StopRequested
583 state. This avoids throwing the Abort exception.
584 In mono_thread_manage, don't continue with the shutdown until all
585 aborted threads have actually stopped.
587 2004-05-10 Jackson Harper <jackson@ximian.com>
589 * locales.c: Remove the modifier from culture names.
591 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
593 * Makefile.am: monosn is not installed any more. It has been deprecated
596 2004-05-07 Jackson Harper <jackson@ximian.com>
599 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
600 Fix array construction, add bailout if the length is 0.
602 2004-05-07 Dick Porter <dick@ximian.com>
604 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
605 machine doesn't have a DNS entry. Patch by Urs Muff
606 (umuff@quark.com), fixes bug 57928.
608 2004-05-06 Jackson Harper <jackson@ximian.com>
610 * reflection.c: Handle null PublicTokens properly. alloc mem for
611 assembly names culture so we dont crash when freeing it.
613 2004-05-06 Jackson Harper <jackson@ximian.com>
615 * assembly.c: Check the usergac when loading with partial names.
617 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
619 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
620 does nothing for now (not required for Linux/Windows) but the class
621 library can call it (and a newer or modified runtime could need it).
622 * icall.c: Registred icall.
624 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
626 * loader.c: prints a message on module loading error we set MONO_DEBUG
627 environment variable.
629 2004-05-05 Jackson Harper <jackson@ximian.com>
631 * appdomain.c: Handle PublicKeyToken=null properly.
633 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
635 * environment.c|h: Added icall ves_icall_System_Environment_
636 GetOSVersionString to get the current OS version as a string.
637 * icall.c: Registred icall.
639 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
641 * object.c: in mono_object_get_virtual_method(), take into account that
642 non-virtual methods don't have a slot in the vtable. Check needed when
643 the object is a proxy.
645 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
647 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
648 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
650 * object.c (mono_class_compute_gc_descriptor): Fix warning.
652 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
653 passed when a valuetype is expected.
655 * object.c (mono_unhandled_exception): Only set the exit code if the
656 exception happens in the main thread. Fixes thread5.exe.
658 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
659 invalid names. Fixes #58047.
661 2004-05-03 Jackson Harper <jackson@ximian.com>
663 * assembly.c: This line was committed accidently and is unneeded.
665 2004-05-03 Jackson Harper <jackson@ximian.com>
667 * icall.c: Add new icall for Assembly::LoadWithPartialName
668 * assembly.c/.h: new function that probes the GAC to load partial
669 assembly names by Paolo Molaro.
671 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
673 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
674 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
675 (type_get_fully_qualified_name): Added PublicKeyToken when building a
678 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
680 * appdomain.c: fixed check for 'neutral' culture and removed warning.
681 * reflection.c: fix bug when parsing a full type name and Version is not
682 the last thing in the string.
684 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
686 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
687 crashes when it is freed.
689 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
691 * assembly.c: print the compat warning to stderr.
693 2004-05-01 Miguel de Icaza <miguel@ximian.com>
695 * assembly.c (mono_assembly_load_references): Add a compatibility
696 hack to run old applications that might be still referencing the
697 3300-based assemblies, only do this for System.xxx.
699 2004-05-01 Jackson Harper <jackson@ximian.com>
701 * appdomain.c: If the culture is neutral we set it to "".
703 2004-04-29 Jackson Harper <jackson@ximian.com>
705 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
707 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
709 * string-icalls.c: added low overhead function for copying chars
710 * icall.c: added needed icall for the above function
712 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
714 * icall.c: fix return value of get_global_assembly_cache. Implemented
715 Environment.GetLogicalDrives.
717 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
719 * rand.c: try and talk to egd or prngd
720 for random bytes if opening devices fail.
722 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
724 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
725 alignment for the type using the native alignment of its members
726 instead of using klass->min_align.
728 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
730 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
733 * socket-io.c: added check for sys/aio.h.
735 2004-04-28 Dick Porter <dick@ximian.com>
737 * threads.c: Don't abort a thread thats already aborting, when
738 terminating everything.
740 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
742 * icall.c: added 2 new async calls for Socket.
744 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
747 * threadpool.c: removed unused variable.
749 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
751 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
753 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
755 * locales.c: put back string_invariant_tolower () and
756 string_invariant_toupper ().
758 2004-04-26 David Waite <mass@akuma.org>
763 * unicode.h: remove comma from end of enumeration declarations
765 2004-04-26 David Waite <mass@akuma.org>
767 * debug-mono-symfile.h:
770 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
773 2004-04-26 Jackson Harper <jackson@ximian.com>
775 * appdomain.c: Increment version number.
777 2004-04-26 Jackson Harper <jackson@ximian.com>
779 * appdomain.c: Set assembly references public token value when
780 PublicKeyToken is specified, not the hash_value. Free public token
781 values when free assembly name data. Previously the public key
782 token was hex decoded, however we are using hex encoded public key
783 tokens, so this is not neccasary.
784 * assembly.c: Lookup assemblies in the gac if their public token
785 value is set. Add function to allow enabling user gac
786 lookups. Specify whether or not the assembly was loaded from the
787 GAC. Compare full assembly names when checking the cache for
788 assemblies (Temporarily disabled see comment in code). Remove
789 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
790 specifies trace-loader they get extra info to stdout on the
791 loading of assemblies.
792 * image.h: Add a field for an assembly references public token
793 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
794 whether an assembly has been loaded from the GAC.
795 * image.c: Remove a corlib -> mscorlib name mapping.
796 * loader.h: Add function to enable/disable the user gac.
797 * mono-config.c: Check if the usergac is enabled in the config
799 * icall.c: New icall to determine whether or not an assembly has
800 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
801 * tabldefs.h: Add constant for assemblyref flag that specifies a
802 full public key is used instead of a public token.
803 * reflection.c: Remove mscorlib -> corlib mappings. Set
804 PublicTokenValue instead of hash value. This value is a hex
805 string so it does not need to be expanded.
807 2004-04-26 Martin Baulig <martin@ximian.com>
809 * mono-debug-debugger.c (mono_debugger_initialize): Set
810 `mono_debugger_initialized' before calling mono_debug_lock().
812 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
814 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
815 InternalToUpper/InternalToLower.
816 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
817 removed invariant culture shortcut. This is now done in managed code.
818 * locales.c: (string_invariant_toupper/tolower) removed.
820 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
822 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
823 Added Poll internal call.
825 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
826 call for Poll. Select was too heavy for polling a single socket.
828 * threadpool.[ch]: added mono_threadpool_cleanup.
829 * threads.c: use it. Don't use Thread_Abort on windows.
831 2004-04-23 Martin Baulig <martin@ximian.com>
833 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
835 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
837 * icall.c: Registred new icalls for key pair protection and added an
838 icall for Environment.GetFolderPath on Windows.
839 * security.c|h: Added new icalls for key pair protection.
841 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
843 * socket-io.c: don't display the non-supported family warning for known
844 families. Now this is not displayed on windows when checking support
847 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
849 * class.c: don't display the layout warning for static fields.
851 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
853 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
854 * locales.c, locales.h: Added new icalls for culture-specific
855 Char.ToLower and Char.ToUpper.
857 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
859 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
862 2004-04-20 Martin Baulig <martin@ximian.com>
864 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
865 of the type name before passing it to mono_reflection_type_from_name().
867 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
869 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
870 encodings here. Fixes #56965.
872 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
874 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
875 fix test on strstr result not that I can see anything that
876 relies on the result.
878 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
880 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
883 * marshal.c (mono_marshal_get_string_encoding): New helper function.
885 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
886 function to determine which marshalling to use for strings. Fixes
889 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
891 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
893 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
895 * icall.c: #include mono-config.h
897 2004-04-15 Jackson Harper <jackson@ximian.com>
899 * culture-info-tables.h: Fix date formats for en-US culture.
901 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
903 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
904 ThreadPool.SetMinThreads.
905 * threadpool.c: Implemented ThreadPool.GetMinThreads and
906 ThreadPool.SetMinThreads.
908 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
910 * mono-config.c: also load the .config file in the directory
911 where the assembly was found.
913 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
915 * assembly.c: load per-assembly config files.
916 * icall.c: decrapified code to get the config dir and moved to
918 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
919 per-assembly config files. When doing a dll map lookup give precedence
920 to the per-assembly data.
922 2004-04-14 Martin Baulig <martin@ximian.com>
924 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
925 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
926 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
928 * mono-debugger-debugger.c: While the debugger is locked, remember
929 whether the symbol tables have changes and send one single
930 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
932 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
934 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
936 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
939 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
940 account when marshalling string arrays. Fixes #56965.
942 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
944 * icall.c: Add new icalls mapping for security.
945 * security.c|h: Add internal calls for WindowsIdentity,
946 WindowsImpersonationContext and WindowsPrincipal.
948 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
950 * class.c: Added comment to ensure the System.MonoDummy class
951 is removed when no longer necessary
953 2004-04-13 Miguel de Icaza <miguel@ximian.com>
955 * appdomain.c: Pass arguments to the bootstraping exceptions to
956 minimize JITed methods at boot
958 * metadata.c (mono_exception_from_name_two_strings): Allow for the
959 second string to be null.
961 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
962 Change the protocol to minimize the JIT methods at startup. Now
963 it Returns the internal codepage, if the value of "int_code_page"
964 is 1 at entry, and we can not compute a suitable code page
965 number, returns the code page as a string.
967 2004-04-13 Jackson Harper <jackson@ximian.com>
969 * culture-info-tables.h: Fix number of decimal digits for all
972 2004-04-13 Jackson Harper <jackson@ximian.com>
974 * icall.c: Clairfy out of sync error message. It is not always
975 your corlib that is out of sync.
977 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
979 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
980 properties when only the set accessor is overriden. Fixes #55874.
982 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
984 * assembly.c (mono_assembly_load_references): Make this thread safe.
987 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
989 * monosn.c: Add missing initialization calls.
991 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
994 ves_icall_System_Globalization_CultureInfo_construct_number_format
995 Fix g_assert so it compiles on fussier compilers re int/ptr
998 2004-04-08 Dick Porter <dick@ximian.com>
1001 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
1002 53992. Also rearrange the code so that the internal calls return
1003 an error value and exceptions are thrown from managed code.
1005 * icall.c: Add type info to the socket icalls.
1007 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1009 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
1012 2004-04-07 Martin Baulig <martin@ximian.com>
1014 * class.c (mono_class_from_generic_parameter): Don't default
1015 `klass->parent' to `mono_defaults.object_type'.
1017 2004-04-07 Martin Baulig <martin@ximian.com>
1019 * reflection.c (mono_reflection_initialize_generic_parameter): Set
1020 `param->pklass->reflection_info'.
1022 2004-04-07 Jackson Harper <jackson@ximian.com>
1024 * culture-info-tables.h: Fix date separator symbol.
1026 2004-04-07 Martin Baulig <martin@ximian.com>
1028 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
1029 from System.Type to System.MonoType.
1031 2004-04-07 Martin Baulig <martin@ximian.com>
1034 (MonoReflectionGenericParam): Added `has_reference_type' and
1035 `has_value_type' fields.
1037 * reflection.c (mono_image_get_generic_param_info): Encode the
1038 correct flags if we have the `class' or `struct' constraint.
1040 2004-04-07 Martin Baulig <martin@ximian.com>
1043 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
1045 2004-04-07 Jackson Harper <jackson@ximian.com>
1047 * appdomain.c: Revert extra patches, just wanted to bump the
1050 2004-04-07 Jackson Harper <jackson@ximian.com>
1052 * Makefile.am: Add culture-info private headers.
1053 * icall.c: Add new icalls for contructing locales.
1054 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
1055 * locales.h: Declare new culture info construction methods.
1056 * object.h: Add new fields used to avoid the CultureMap to
1058 * culture-info.h: Definition of structs used in the culture info
1060 * culture-info-tables.h: Autogenerated tables that contain culture
1061 info data. This file was generated with the locale-builder tool.
1062 * appdomain.c: Incement corlib version number.
1064 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
1066 * appdomain.c: (mono_runtime_init) move mono_thread_init
1067 to before mono_object_new calls so critical sections
1068 are initialized before use.
1070 2004-04-07 Martin Baulig <martin@ximian.com>
1073 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
1074 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
1075 (ves_icall_MonoGenericParam_initialize): Removed.
1076 (monogenericparam_icalls): Removed.
1077 (generictypeparambuilder_icalls): Added new table for
1078 System.Reflection.Emit.GenericTypeParameterBuilder.
1081 (mono_reflection_define_generic_parameter): Removed.
1082 (mono_reflection_initialize_generic_parameter): This is now called
1083 from GenericTypeParameterBuilder's .ctor.
1085 2004-04-06 Martin Baulig <martin@ximian.com>
1087 * class.c (mono_class_init): Don't inflate nested classes in a
1089 (mono_type_get_name_recurse): Include the generic arguments for
1090 generic instances and generic type declarations.
1091 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
1092 (_mono_class_get_instantiation_name): Removed.
1093 (mono_class_create_generic): Always use `gklass->name' as our name.
1095 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
1097 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
1098 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
1099 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
1100 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
1101 closed generic methods here.
1104 (mono_reflection_generic_inst_get_nested_types): Removed.
1105 (inflate_mono_method): Copy the generic parameters from the
1106 MonoMethodHeader into out MonoGenericMethod.
1108 2004-04-06 Martin Baulig <martin@ximian.com>
1111 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
1113 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
1115 * reflection.c (build_compressed_metadata): If we have any entries
1116 in the GenericParam, MethodSpec or GenericParamConstraint tables,
1117 set the header version to 1.1.
1119 2004-04-06 Martin Baulig <martin@ximian.com>
1121 * class.c (mono_class_init): If we're a generic instance,
1122 initialize our nested classes, too.
1123 (_mono_class_get_instantiation_name): Deal with the new `!%d'
1126 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1128 * process.c: quote the argument passed to the shell on windows.
1130 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
1132 * threads.c (mono_alloc_special_static_data): Allow this to be
1133 called during startup.
1135 2004-04-02 Martin Baulig <martin@ximian.com>
1138 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
1140 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
1142 * icall.c: Fix build.
1144 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
1146 * Makefile.am: Added security.c|h.
1147 * icall.c: Added icall for get_UserName;
1148 * security.c: New file for security related icalls. Added function
1149 get_UserName for System.Environment (fix #56144).
1150 * security.h: New. Header file for security.c
1152 2004-04-02 Dick Porter <dick@ximian.com>
1154 * icall.c: Deleted the icalls that were obsoleted some time ago
1155 by the ICU string code, and which were mixed into the icall
1156 rearranging. Fixes bug 55969.
1159 * string-icalls.c: Deleted the code that those icalls reference.
1161 2004-04-01 Martin Baulig <martin@ximian.com>
1163 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
1165 * class.c (mono_class_from_generic_parameter): Don't set
1166 TYPE_ATTRIBUTE_INTERFACE.
1167 (my_mono_class_from_generic_parameter): Likewise.
1169 2004-04-01 Martin Baulig <martin@ximian.com>
1171 * loader.c (find_method): Added an optional `MonoClass *ic'
1172 argument to search in a specific interface.
1173 (mono_get_method_constrained): New public function.
1175 2004-04-01 Martin Baulig <martin@ximian.com>
1177 * reflection.c (mono_image_get_generic_field_token): Use the
1178 `handleref' cache here.
1180 2004-04-01 Martin Baulig <martin@ximian.com>
1182 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
1184 * reflection.c (create_generic_typespec): Use the `typespec' hash
1185 here, not the `typeref' one.
1187 2004-04-01 Martin Baulig <martin@ximian.com>
1189 * class.c (mono_class_inflate_generic_type): Moved the
1190 functionality into a new static inflate_generic_type() which
1191 returns NULL if it didn't do anything. Only increment the
1192 `mono_stats.inflated_type_count' if we actually inflated
1194 (mono_class_get_full): Check the classes type to see whether we
1195 need to inflate it; also inflate MONO_TYPE_(M)VAR.
1197 2004-04-01 Jackson Harper <jackson@ximian.com>
1199 * reflection.c: Set culture for assembly references.
1201 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
1203 * reflection.[ch], icall.[ch], Fix support for pinning variables.
1205 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1208 (do_mono_assembly_open): the critical section also covers
1209 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
1211 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1214 (mono_manage_threads): abort the background threads when finishing.
1217 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1219 * gc.c: only close the done_event handle if there was no timeout.
1222 2004-03-30 Martin Baulig <martin@ximian.com>
1224 * icall.c (icall_entries): It's called "System.Activator", not
1225 "System.Activation".
1227 2004-03-30 Martin Baulig <martin@ximian.com>
1229 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
1230 (mono_class_create_from_typespec): Likewise.
1232 2004-03-30 Martin Baulig <martin@ximian.com>
1234 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
1235 `has_ctor_constraint' and `initialized'.
1237 2004-03-30 Martin Baulig <martin@ximian.com>
1239 * reflection.c (encode_new_constraint): New static function to add
1240 the constructor constraint attribute to a type parameter.
1241 (encode_constraints): Call encode_new_constraint() if necessary.
1244 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
1246 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
1248 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
1250 * reflection.c, icall.c: add support for pinning variables.
1252 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
1254 * marshal.c (mono_marshal_get_managed_wrapper):
1255 init bool local with zero rather than null.
1257 2004-03-29 Martin Baulig <martin@ximian.com>
1259 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
1260 the "official" behavior here.
1261 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
1263 2004-03-29 Martin Baulig <martin@ximian.com>
1265 * icall.c: Reflect latest API changes.
1267 2004-03-29 Martin Baulig <martin@ximian.com>
1269 * loader.c (mono_get_method_from_token): Also call
1270 mono_metadata_load_generic_params () for abstract and interface
1271 methods; replace the type arguments in the method signature with
1272 the ones which are loaded from the metadata.
1274 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
1276 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
1277 of the lock is not the current thread. MS.NET don't do it, in spite of
1278 what the documentation says. See bug #56157.
1280 2004-03-28 Martin Baulig <martin@ximian.com>
1282 * class.c (mono_class_init): Don't call init_properties() and
1283 init_events() for generic instances; set `prop->parent' when
1284 inflating properties.
1286 * reflection.c (mono_generic_inst_get_object): Call
1287 `mono_class_init (ginst->klass)'.
1288 (mono_type_get_object): Only create a MonoGenericInst if your
1289 generic type is a TypeBuilder.
1290 (do_mono_reflection_bind_generic_parameters): Only set
1291 `ginst->is_dynamic' if our generic type is a TypeBuilder.
1293 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
1295 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
1298 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1300 * icall.c: added Kill_internal icall.
1301 * process.[ch]: added Kill_internal icall.
1303 2004-03-25 Martin Baulig <martin@ximian.com>
1305 * class.h (MonoStats): Added `generic_instance_count',
1306 `inflated_method_count', `inflated_type_count' and
1307 `generics_metadata_size'.
1309 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1311 * reflection.c: no warnings now.
1313 2004-03-25 Martin Baulig <martin@ximian.com>
1315 * class.c (mono_class_get_full): New public function; does a
1316 mono_class_get(), but also takes a `MonoGenericContext *'.
1318 * loader.c (mono_field_from_memberref): Renamed to
1319 `field_from_memberref', made static and added `MonoGenericContext *'
1321 (mono_field_from_token): Added `MonoGenericInst *' argument.
1322 (method_from_memberef): Likewise.
1323 (mono_get_method_from_token): Likewise.
1324 (mono_get_method_full): New public function; does a
1325 mono_get_method(), but also takes a `MonoGenericContext *'.
1327 * verify.c (mono_method_verify): Get the method's generic context
1328 and pass it to mono_field_from_token(), mono_get_method_full() and
1329 mono_class_get_full().
1331 2004-03-25 Martin Baulig <martin@ximian.com>
1333 * class.c (mono_class_inflate_generic_type): Take a
1334 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
1335 `MonoGenericMethod *'.
1337 2004-03-25 Martin Baulig <martin@ximian.com>
1339 * loader.h (MonoMethodInflated): Store the MonoGenericContext
1340 instead of the MonoGenericMethod here.
1342 2004-03-25 Martin Baulig <martin@ximian.com>
1344 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
1345 each time we create a new MonoGenericInst, we also create a new
1346 context which points back to us.
1348 * class.c (inflate_method): Use `ginst->context' instead of
1349 creating a new context.
1351 * loader.c (method_from_memberref): Use
1352 `klass->generic_inst->context' instead of creating a new context.
1354 2004-03-25 Martin Baulig <martin@ximian.com>
1356 * class.h (MonoGenericContext): New struct.
1357 (MonoGenericMethod): Removed `generic_inst'.
1359 * class.c (mono_class_inflate_generic_method): Take a
1360 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
1362 2004-03-25 Martin Baulig <martin@ximian.com>
1364 * loader.h (MonoMethodInflated): New typedef.
1366 * metadata.h (MonoMethodSignature): Removed `gen_method', make
1367 `generic_param_count' consume just 30 bits, added `is_inflated'
1368 and `has_type_parameters' flags (one bit each).
1370 * class.c (mono_class_inflate_generic_method): Create a
1371 MonoMethodInflated instead of a MonoMethodNormal and set
1372 `is_inflated' in the method signature.
1374 * class.h (MonoGenericMethod): Removed `generic_method'.
1376 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
1378 * image.c: Make sure the name of a MonoImage is always an absolute path.
1379 This fixes bug #54415.
1381 2004-03-24 Martin Baulig <martin@ximian.com>
1383 * class.c (mono_class_setup_vtable): If we're a generic instance,
1384 use our generic type's vtable size.
1386 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
1388 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
1389 MONO_NO_UNLOAD env var as a temporary workaround for unloading
1392 2004-03-23 Martin Baulig <martin@ximian.com>
1394 * class.h (MonoDynamicGenericInst): Added `int count_events' and
1395 `MonoEvent *events'.
1397 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
1398 (typebuilder_icalls): Added "get_event_info"; calls
1399 mono_reflection_event_builder_get_event_info().
1401 * reflection.c (mono_reflection_generic_inst_initialize): Added
1402 `MonoArray *events'.
1403 (mono_reflection_event_builder_get_event_info): New function.
1405 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
1407 * object.h: add mono_type_initialization_init
1409 * object.c (mono_runtime_class_init):
1410 implement class constructor synchronization rules
1411 to cope with threading issues.
1412 add mono_type_initialization_init
1414 * appdomain.c (mono_runtime_init): call
1415 mono_type_initialization_init
1417 * class.h: removing initializing field from MonoVTable
1419 2004-03-23 Martin Baulig <martin@ximian.com>
1421 * class.c (my_mono_class_from_generic_parameter): Use
1422 `param->name' if it's not NULL.
1424 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
1426 * class.c: do not insert non-virtual methods in the vtable.
1427 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
1428 that means the method is non-virtual. This never would have
1431 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
1433 * profiler.c: Added lock for accessing coverage_hash.
1435 2004-03-22 Martin Baulig <martin@ximian.com>
1437 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
1438 `method->method->signature->generic_param_count != 0' to make it
1439 work for interface methods.
1441 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1443 * process.c: quote the string passed to the shell using g_shell_quote.
1445 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1448 (mono_threads_manage): don't remove the finalizer thread and self
1449 from the threads hash table so that mono_thread_manage can be called
1452 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1454 * process.c: quote the arguments when UseShellExecute is true. Fixes
1457 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1459 * threads.c: set mono_thread_detach as a cleanup routine for every
1460 thread. This way it's always executed upon thread termination, either
1461 aborted or finished normally. No more xsp hangs!
1463 2004-03-17 Martin Baulig <martin@ximian.com>
1465 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
1466 `int count_nested' and a `MonoType **nested'.
1468 * reflection.c (mono_reflection_bind_generic_parameters): Moved
1469 most of the functionality into a new static
1470 do_mono_reflection_bind_generic_parameters() and don't take a
1471 `MonoType *nested_in' argument any more. Don't compute nested
1473 (mono_reflection_generic_inst_get_nested_types): New public method
1474 to get nested types.
1476 * class.c (mono_class_create_generic): Set `klass->nested_in' if
1477 we're a nested class.
1479 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
1480 mono_reflection_generic_inst_get_nested_types() to compute the
1483 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
1485 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
1486 descriptive error message under windows.
1488 2004-03-17 Martin Baulig <martin@ximian.com>
1490 * class.c (dup_type): Added `const MonoType *original' argument;
1491 copy the attrs from the original type.
1493 2004-03-17 Martin Baulig <martin@ximian.com>
1495 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
1496 `m->generic_inst_cache' here.
1498 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
1500 * exception.h exception.c: Add stack_overflow_exception.
1502 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1505 (overlapped_callback): call SetEvent *after* invoking the callback.
1506 No need to call CloseHandle.
1508 2004-03-16 Martin Baulig <martin@ximian.com>
1510 * reflection.c (mono_image_get_fieldref_token): Take a
1511 `MonoReflectionField *' instead of a `MonoClassField *' and a
1512 `MonoClass *'; store the `MonoReflectionField *' in the hash.
1514 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1516 * appdomain.c: don't add the culture to the filename we're looking for
1517 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
1519 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1521 * locales.c: don't ignore symbols when doing case insensitive compares.
1522 Thanks Dick! Fixes bug #54046.
1524 * threads.c: surround 'threads' usage with enter/leave in
1527 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
1529 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
1530 implicitly marshalled as [Out]. Fixes #55450.
1532 (mono_marshal_get_runtime_invoke): Zero out the result if there is
1535 2004-03-16 Martin Baulig <martin@ximian.com>
1537 * class.c (mono_class_from_generic_parameter): Use the actual
1540 2004-03-16 Martin Baulig <martin@ximian.com>
1542 * reflection.c (type_get_signature_size): New static function.
1543 Compues the size of the type in a method signature.
1544 (method_get_signature_size): New static function; calls
1545 type_get_signature_size() to compute the actual size of the
1547 (method_encode_signature): Use method_get_signature_size() to get
1548 the signature's size rather than using `nparams * 10'.
1550 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1552 * file-io.h: define here WapiOverlapped on windows. I don't want the
1553 regular OVERLAPPED one.
1556 * threadpool.c: somehow, BindIoCompletionCallback is not found.
1557 Disabling AIO on windows.
1559 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1561 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
1564 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1566 * appdomain.c: upgraded corlib version.
1568 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
1569 and BeginWrite. Allow opening files for asynchrnous operations.
1571 * file-io.h: new struct that maps FileStreamAsyncResult.
1572 * icall.c: added new icalls.
1573 * process.[ch]: support setting child process environment variables
1574 and use the SHELL or COMSPEC when UseShellExecute is true.
1576 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
1577 callback for async. IO is here and also BindHandle.
1579 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
1582 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
1584 * reflection.c (create_custom_attr): Allow len == 0.
1586 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
1587 computation on big-endian machines.
1589 2004-03-13 Martin Baulig <martin@ximian.com>
1591 * class.h (MonoGenericInst): Added `int count_ifaces'.
1593 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
1594 `ginst->count_ifaces' instead `klass->interface_count' since we
1595 may get called before the vtable is created.
1597 * loader.c (mono_method_get_param_names): If we're a generic
1598 instance, return and don't initialize the class.
1600 * reflection.c (mono_reflection_setup_generic_class): Don't call
1601 ensure_runtime_vtable().
1602 (mono_reflection_bind_generic_parameters): Set
1603 `ginst->count_ifaces'.
1605 2004-03-11 Jackson Harper <jackson@ximian.com>
1609 * unicode.h: Remove unused System.Char icalls.
1611 2004-03-11 Miguel de Icaza <miguel@ximian.com>
1613 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
1614 code when we P/Invoke the first library in Windows.Forms, instead
1615 of when we first open the assembly.
1617 * assembly.c: Drop the lookup from here.
1619 2004-03-10 Martin Baulig <martin@ximian.com>
1621 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
1622 class for properties, fields and events. Finally fixes #54945.
1624 2004-03-10 Martin Baulig <martin@ximian.com>
1626 * metadata.c (mono_metadata_class_equal): New static function;
1627 checks whether two generic instances or two generic parameters are
1629 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
1632 2004-03-10 Martin Baulig <martin@ximian.com>
1634 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
1636 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
1637 argument and write it into the `reflection_info' field.
1640 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
1641 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
1643 2004-03-09 Jackson Harper <jackson@ximian.com>
1645 * char-conversions.h: use 8 bits for numeric data its all we need
1646 * icall.c: numeric data is only 8 bits now.
1648 2004-03-09 Martin Baulig <martin@ximian.com>
1650 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
1652 * class.c (init_properties, init_events): Initialize the new
1655 * reflection.c (typebuilder_setup_properties): Likewise.
1656 (typebuilder_setup_events): Likewise.
1658 * reflection.h (MonoEventInfo): Replaced `parent with
1659 `declaring_type' and `reflected_type'.
1661 * icall.c (ves_icall_get_property_info): Distinguish between
1662 declaring and reflected type.
1663 (ves_icall_get_event_info): Likewise.
1665 2004-03-09 Martin Baulig <martin@ximian.com>
1667 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
1668 (ves_icall_Type_GetField): Correctly set field->klass.
1670 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
1672 * loader.h: Fix warning.
1674 2004-03-08 Miguel de Icaza <miguel@ximian.com>
1676 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
1677 library routine if present. Notice that it will still continue
1678 executing even if its missing, for those working on the Gtk#
1679 edition of Windows.Forms.
1681 * assembly.c (do_mono_assembly_open): If loading the
1682 System.Windows.Forms call mono_loader_wini_init.
1684 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
1686 * class.h: Added MonoRemoteClass struct.
1687 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
1688 function for MonoStrings.
1689 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
1690 Added internal call for getting the proxy type.
1691 * marshal.c: Get the type of transparent proxies from its remote_class.
1692 Added methods that generate the IL for type checks and casts:
1693 mono_marshal_get_isinst, mono_marshal_get_castclass,
1694 mono_marshal_get_proxy_cancast.
1695 * marshal.h: Declaration of the previous new methods.
1696 * object.c: Added new moethods for creating and updating MonoRemoteClass
1697 instances: mono_remote_class, mono_upgrade_remote_class,
1698 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
1699 * verify.c: FIx transparent_proxy_fields layout.
1700 * appdomain.c: Bump corlib version.
1702 2004-03-04 Jackson Harper <jackson@ximian.com>
1704 * icall.c: Add icall to access char conversion tables.
1705 * char-conversions.h: Character conversion tables.
1706 * Makefile.am: Add char-conversions.h private header file.
1708 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
1710 * appdomain.c (unload_thread_main): Increase unloading timeout to
1711 10 sec as a temporary workaround for Nant problems.
1713 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
1715 * gc.c: Add checks for GC_enable and GC_disable.
1717 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
1718 (jaak@zd.com.pl). Fix memory corruption in String.Replace
1721 2004-02-27 Martin Baulig <martin@ximian.com>
1723 * reflection.c (mono_reflection_bind_generic_parameters): Take a
1724 `MonoReflectionType *' instead of a `MonoType *'.
1726 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
1728 * gc.c (run_finalize): Avoid finalizing the object representing the
1730 (finalizer_thread): Fix warning.
1732 2004-02-25 Martin Baulig <martin@ximian.com>
1734 * class.c (_mono_class_get_instantiation_name): Added `int offset'
1735 argument for nested types.
1736 (mono_class_create_generic): Added support for nested generictypes.
1738 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
1741 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
1743 * reflection.c (method_encode_signature): Increase the minimum
1744 value of `size' from 10 to 11.
1745 (mono_reflection_bind_generic_parameters): Take `int type_argc'
1746 and `MonoType **types' arguments instead of the `MonoArray
1747 *types'; added `MonoType *nested_in'. Recursively instantiate
1750 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
1752 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
1753 stack_overflow_ex members which are used by exception handling.
1755 * appdomain.c (mono_runtime_init): Initialize the new members.
1757 * gc.c (mono_gc_enable): New helper function.
1758 * gc.c (mono_gc_disable): New helper function.
1760 2004-02-23 Martin Baulig <martin@ximian.com>
1762 * icall.c: I must have been really stupid - make it actually work
1765 2004-02-23 Martin Baulig <martin@ximian.com>
1767 * loader.c (method_from_memberref): Only inflate the method if
1768 it's in another klass.
1770 2004-02-23 Martin Baulig <martin@ximian.com>
1772 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
1773 (mono_class_init): If we're a generic instance and an interface,
1774 compute `class->interface_id'; also create `class->interfaces'
1775 here and inflate them.
1777 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
1779 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
1781 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
1783 2004-02-15 Miguel de Icaza <miguel@ximian.com>
1785 * reflection.c (method_encode_code): Improved the error message
1786 generated by the exception.
1788 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1790 * icall.c: Martin did not do what he said in the ChangeLog for
1791 2004-02-18, but put back the changes for properties and events.
1792 Commenting those changes out again and adding comment to bug #54518.
1794 * process.c: removed warning.
1796 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
1798 * marshal.c (emit_struct_conv): Print an error message instead of
1799 asserting when a type does not have the StructLayout attribute.
1801 2004-02-20 Martin Baulig <martin@ximian.com>
1803 * reflection.c (mono_type_get_object): Also use the cache for
1805 (mono_reflection_bind_generic_parameters): Always compute
1808 2004-02-20 Martin Baulig <martin@ximian.com>
1810 * class.h (MonoGenericMethod): Removed `klass'.
1812 * class.c (mono_class_inflate_generic_method): Added `MonoClass
1815 2004-02-20 Martin Baulig <martin@ximian.com>
1817 * reflection.c (method_encode_methodspec): Actually use the
1818 uninflated signature for the memberref.
1820 2004-02-20 Martin Baulig <martin@ximian.com>
1822 * class.h (MonoGenericMethod): Removed `declaring'.
1824 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
1825 is NULL, compute it here.
1827 2004-02-20 Martin Baulig <martin@ximian.com>
1829 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
1831 * metadata.c (mono_metadata_generic_inst_hash): New method.
1832 (mono_metadata_generic_inst_equal): New method.
1834 * reflection.c (mono_reflection_bind_generic_parameters): Use the
1835 `klass->image->generic_inst_cache' cache to avoid creating
1836 duplicate MonoGenericInst's.
1838 * class.c (mono_class_inflate_generic_type): Use the cache.
1840 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
1842 * object.c: fixed gc descriptor calculation for embedded valuetypes.
1844 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1846 * icall.c: added Socket.WSAIoctl icall.
1848 * socket-io.[ch]: implemented
1849 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
1851 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
1853 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
1855 2004-02-18 Urs C Muff <umuff@quark.com>
1857 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
1858 this work on PPC and other big-endian architectures.
1860 * debug-mono-symfile.h: Prepended the names of all the `guint32'
1861 fields with an underscore to make sure they're only accessed by
1864 2004-02-18 Martin Baulig <martin@ximian.com>
1866 * icall.c: Put the klass->refclass changes back for methods and
1867 fields, but not for properties and events. We're currently not
1868 distinguishing between DeclaringType and ReflectedType for
1869 properties and events, that's what caused the regressions.
1871 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1874 (mono_async_result_new): the handle can be NULL.
1876 * threadpool.c: Use an event instead of a semaphore, don't initialize
1877 it until needed. This saves quite a few semaphores from being created
1878 when using the threadpool.
1880 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
1882 * object.c (mono_string_is_interned_lookup): Fix interning of long
1883 strings. Fixes #54473.
1885 * domain.c (ldstr_equal): Optimize if the two strings are equal.
1887 * icall.c: Revert the klass->refclass changes since they introduce
1888 regressions (bug #54518).
1890 2004-02-18 Martin Baulig <martin@ximian.com>
1892 * class.c (mono_class_init): If we're a generic instance and don't
1893 come from a TypeBuilder, inflate our members here.
1894 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
1895 (mono_class_create_generic): New public method.
1896 (mono_class_initialize_generic): Removed.
1897 (get_instantiation_name): Renamed to
1898 _mono_class_get_instantiation_name() and made it public.
1900 2004-02-18 Martin Baulig <martin@ximian.com>
1902 * class.c (mono_class_inflate_generic_type): Clear the new
1903 instance's `nginst->klass' when inflating a generic instance.
1904 (mono_class_is_subclass_of): Added (basic) support for generic
1907 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
1909 * appdomain.h, domain.c: use a MonoCodeManager instead of a
1910 MonoMempool to hold compiled native code.
1912 2004-02-17 Martin Baulig <martin@ximian.com>
1914 * class.h (MonoDynamicGenericInst): Added `count_properties' and
1917 * reflection.c (mono_reflection_generic_inst_initialize): Added
1918 `MonoArray *properties' argument.
1920 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
1922 2004-02-17 Martin Baulig <martin@ximian.com>
1924 * icall.c (ves_icall_Type_GetFields): Renamed to
1925 ves_icall_Type_GetFields_internal() and added a
1926 `MonoReflectionType *rtype' argument; pass it to
1927 mono_field_get_object() to set the field's "reflected" type.
1928 (ves_icall_Type_GetConstructors): Likewise.
1929 (ves_icall_Type_GetEvents): Likewise.
1930 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
1931 argument; pass it to mono_method_get_object() to set the method's
1934 2004-02-17 Martin Baulig <martin@ximian.com>
1936 * class.h (MonoDynamicGenericInst): New type.
1937 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
1939 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
1940 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
1941 (ves_icall_MonoGenericInst_GetFields): New interncall.
1943 * class.c (mono_class_from_generic): Don't call
1944 mono_class_initialize_generic() if this is a dynamic instance;
1945 ie. it's being created from a TypeBuilder.
1946 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
1947 `class->byval_arg.type'.
1949 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
1950 to `inflate_method' and made static.
1951 (mono_reflection_inflate_field): Removed.
1952 (mono_reflection_generic_inst_initialize): New public method.
1954 * reflection.h (MonoReflectionGenericInst): Removed `methods',
1955 `ctors' and `fields'; added `initialized'.
1957 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
1959 * debug-helpers.c (mono_method_full_name): Fix output for empty
1962 2004-02-12 Martin Baulig <martin@ximian.com>
1964 * class.h (MonoClassField): Added `MonoType *generic_type'.
1966 * reflection.c (mono_image_get_fieldref_token): Added support for
1967 instantiated generic types.
1968 (field_encode_inflated_field): Removed.
1969 (mono_image_get_inflated_field_token): Removed.
1970 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
1972 * reflection.h (MonoReflectionInflatedField): Removed.
1974 2004-02-12 Martin Baulig <martin@ximian.com>
1976 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
1977 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
1979 * reflection.c (mono_image_get_methodspec_token): Take a
1980 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
1981 (mono_image_create_token): Check whether we have a
1982 `method->signature->gen_method' and call
1983 mono_image_get_methodspec_token() if appropriate.
1984 (inflated_method_get_object): Removed.
1985 (mono_reflection_bind_generic_method_parameters): Return a
1986 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
1987 (mono_reflection_inflate_method_or_ctor): Likewise.
1989 * reflection.h (MonoReflectionInflatedMethod): Removed.
1991 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
1993 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
1994 for custom valuetype marshalling.
1996 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
1998 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2000 * icall.c: fixed WSAGetLastError_internal name.
2002 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
2004 * threads.c (mono_thread_attach): Allow this to be called multiple
2007 * threads.c (build_wait_tids): Do not wait for ourselves.
2009 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
2010 appdomain list is empty.
2012 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
2013 memory returned by mono_string_builder_to_utf16, since it points into
2014 managed memory. Thanks to Bernie Solomon for noticing this.
2016 * icall.c: Add AppDomainSetup icalls.
2018 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
2020 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
2023 * reflection.c (reflection_methodbuilder_to_mono_method): Save
2024 custom attributes to the method_aux struct. Also fix array indexes etc.
2026 * loader.c (mono_method_get_param_names): Make dynamic case work again.
2028 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
2030 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
2031 (both static and runtime) and reduce startup time.
2033 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
2035 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
2036 AsAny marshalling conversion instead of crashing.
2038 * marshal.c: Fix warnings.
2040 2004-02-09 Martin Baulig <martin@ximian.com>
2042 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
2044 * reflection.h (MonoReflectionInflatedMethod): Removed the
2045 `declaring' field, it's now in the unmanaged MonoGenericMethod.
2047 * reflection.c (method_encode_methodspec): Removed the `method'
2048 argument; we get it from `gmethod->declaring'.
2049 (inflated_method_get_object): Removed the `declaring' argument.
2051 2004-02-09 Martin Baulig <martin@ximian.com>
2053 * class.h (MonoGenericMethod): New type.
2054 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
2057 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
2058 a `MonoGenericMethod *gen_method' one.
2060 * class.c (mono_class_inflate_generic_type): Take an additional
2061 `MonoGenericMethod * argument. This is only non-NULL if we're
2062 inflating types for a generic method.
2063 (mono_class_inflate_generic_signature): Renamed to
2064 inflate_generic_signature() and made static; take a
2065 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
2066 (inflate_generic_header): Take a `MonoGenericMethod *' argument
2067 instead of a `MonoGenericInst *' one.
2068 (mono_class_inflate_generic_method): Likewise.
2070 * reflection.c (encode_generic_method_sig): Take a
2071 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
2072 (method_encode_methodspec): Likewise.
2073 (inflated_method_get_object): Likewise.
2075 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
2076 field with a `MonoGenericMethod *gmethod' one.
2078 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
2080 * class.h (mono_class_has_parent): add parens to expansion
2083 2004-02-08 Martin Baulig <martin@ximian.com>
2085 * image.h (MonoImage): Removed `generics_cache'.
2087 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
2088 instead of a `MonoType *' argument; removed the `inflate_methods'
2089 argument. Don't inflate methods here.
2091 * loader.c (find_method): If it's a generic instance, call
2092 mono_class_init() on the `sclass->generic_inst->generic_type'.
2094 * metadata.c (mono_type_size): Make this work on uninitialized
2095 generic instances; call it on the `ginst->generic_type's class.
2097 * reflection.c (mono_reflection_bind_generic_parameters): Call
2098 mono_class_from_generic() to create the `ginst->klass'.
2100 2004-02-08 Martin Baulig <martin@ximian.com>
2102 * class.h (MonoClass): Changed type of `generic_inst' from
2103 `MonoType *' to `MonoGenericInst *'.
2105 2004-02-08 Martin Baulig <martin@ximian.com>
2107 * icall.c (ves_icall_Type_BindGenericParameters): Just call
2108 mono_type_get_object(), this is now creating a `MonoGenericInst'
2109 for MONO_TYPE_GENERICINST.
2110 (ves_icall_MonoGenericInst_GetParentType): Likewise.
2111 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
2113 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
2114 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
2115 (inflated_method_get_object): Added `MonoClass *refclass' argument.
2116 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
2119 * reflection.h (MonoReflectionInflatedMethod): Removed
2120 `declaring_type' and `reflected_type'.
2122 2004-02-08 Martin Baulig <martin@ximian.com>
2124 * class.h (MonoGenericInst): Added `MonoType *parent' and
2125 `MonoType **ifaces'.
2127 * reflection.h (MonoReflectionGenericInst): Removed `klass',
2128 `parent' and `interfaces'.
2130 * reflection.c (mono_reflection_bind_generic_parameters): Take a
2131 `MonoType *' argument and return a `MonoType *'.
2134 (ves_icall_MonoGenericInst_GetParentType): New interncall.
2135 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
2137 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
2139 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
2140 valuetype marshalling.
2142 2004-02-06 Martin Baulig <martin@ximian.com>
2145 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
2146 (my_mono_class_from_generic_parameter): Likewise.
2148 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
2150 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
2151 contents of the symbol files lazily.
2153 * object.h (MonoThread): Add 'name' and 'name_len' fields.
2155 * threads.h threads.c icall.c: New icalls for getting and setting the
2158 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
2160 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
2161 Raise an exception when the domain is not found.
2163 2004-02-03 Martin Baulig <martin@ximian.com>
2165 * reflection.c (mono_image_get_methodspec_token): Use the
2166 uninflated signature; fixes gen-33.
2168 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
2170 * gc.c threads.c: Make the finalizer thread a normal managed thread so
2171 the finalizer code can use thread functionality.
2173 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
2174 the finalizer thread.
2176 * threads.c: Make some functions more robust.
2178 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
2180 * metadata.h: Add new marshalling conventions.
2182 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
2183 stringbuilder marshalling. Fixes #53700.
2185 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
2187 * reflection.c (mono_image_get_type_info): Save declarative security
2190 * reflection.c (mono_image_get_field_info): Handle uninitialized
2191 unmanaged fields as well.
2193 * appdomain.c: Bump corlib version.
2195 2004-02-01 Martin Baulig <martin@ximian.com>
2197 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
2198 method type arguments.
2200 2004-01-30 Duncan Mak <duncan@ximian.com>
2202 * marshal.h: Add prototype for
2203 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
2205 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
2208 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
2210 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
2211 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
2213 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
2215 * marshal.c (mono_marshal_get_native_wrapper): Add support for
2216 custom marshalling of valuetypes.
2218 * marshal.c: Fix some warnings.
2220 2004-01-29 Martin Baulig <martin@ximian.com>
2222 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
2223 for generic method parameters.
2225 * reflection.c (method_encode_methodspec): Write the uninflated
2226 signature into the methodspec table.
2227 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
2228 is always the uninflated method.
2229 (reflection_methodbuilder_to_mono_method): Copy the generic
2230 parameters from the MethodBuilder into `header->gen_params'.
2232 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
2234 * class.c (mono_class_from_generic_parameter): Fix warning.
2236 2004-01-27 Martin Baulig <martin@ximian.com>
2238 * class.c (mono_class_from_generic_parameter): Don't create
2239 `klass->methods' here.
2241 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
2243 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
2244 extension since it does not work with libraries named lib<FOO>.dll.so.
2246 2004-01-25 Martin Baulig <martin@ximian.com>
2248 * class.c (mono_class_inflate_generic_type): Added support for
2249 MONO_TYPE_GENERICINST.
2251 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
2252 inflate methods on open constructed types.
2254 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2256 * object.c: fire ProcessExit event in the root AppDomain after running
2257 Main. Fixes bug #53299.
2259 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
2261 * socket-io.c: include the new socket-wrappers.h header.
2262 Use the wrappers instead of the unix socket functions to make the code
2265 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
2267 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
2269 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
2272 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
2274 * reflection.c (mono_image_create_pefile): Handle the case when the
2275 entry point is not a MethodBuilder.
2277 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
2278 field to ReflectionMethod since it is not allways a builder.
2280 * reflection.c (type_get_fully_qualified_name): New helper function to
2281 return the fully qualified name of a type.
2283 * reflection.c (encode_marshal_blob): Always emit the fully qualified
2284 type name for custom marshallers.
2286 * reflection.c (mono_marshal_spec_from_builder): Ditto.
2288 * class.c (mono_class_setup_vtable): If a parent class already
2289 implements an interface, use the implementing methods from that class.
2292 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2294 * threadpool.c: just return instead of ExitThread to allow for thread
2297 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
2299 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
2300 when closing resource modules.
2302 * reflection.c (mono_image_create_pefile): Handle the case when the
2303 entry point is not a MethodBuilder.
2305 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
2306 field to ReflectionMethod since it is not allways a builder.
2308 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
2310 * marshal.c (mono_marshal_get_managed_wrapper):
2311 mono_marshal_alloc takes native int so CONV_I
2314 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
2316 * reflection.c (fixup_cattrs): New function to fixup the methoddef
2317 tokens in the cattr table. Fixes #53108.
2319 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2321 * loader.c: don't trim ".dll" before looking up in the config file.
2322 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
2324 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
2326 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
2327 Return the module which contains the resource as well.
2328 (ves_icall_System_Reflection_Module_Close): New icall.
2330 * appdomain.c: Bump corlib version number.
2332 * image.c (mono_image_addref): New public function.
2334 * assembly.c: Call mono_image_addref.
2336 * reflection.c (mono_module_get_object): Increase reference count of
2339 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
2342 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
2343 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
2344 proper exceptions on DllImport problems.
2346 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
2348 * class.c, metadata.c: eliminate CSIZE macro.
2350 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
2352 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
2353 * object.h: Added async_callback field in MonoAsyncResult.
2354 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
2355 * verify.c: Added async_callback in MonoAsyncResult layout.
2357 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
2359 * reflection.c (mono_reflection_get_custom_attrs): Add support
2362 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
2364 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
2366 (mono_marshal_method_from_wrapper): Add null pointer check.
2368 2004-01-16 Martin Baulig <martin@ximian.com>
2370 * debug-mono-symfile.h: Set version number to 36 and reflect
2371 latest symbol writer changes.
2373 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
2375 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
2376 multi-dimensional arrays.
2377 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
2378 (mono_class_from_mono_type): Use bounded_array_class_get.
2380 * class.c (mono_bounded_array_class_get): New function which takes
2381 a 'bounded' bool argument to distinguish vectors from one dimensional
2384 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
2385 bounded_array_class_get if the array has bounds.
2387 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2388 Search modules loaded using AssemblyBuilder:AddModule as well.
2390 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2392 * appdomain.c: increased corlib version.
2393 * filewatcher.c: removed g_print.
2395 (get_property_info): only allocate what is actually requested.
2396 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
2398 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2400 * Makefile.am: added filewatcher.[ch]
2401 * filewatcher.[ch]: FileSystemWatcher runtime support.
2402 * icall.c: added new FSW icalls.
2404 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
2406 * string-icalls.c: fix stringbuilder regression as suggested by
2407 Iain McCoy <iain@mccoy.id.au>.
2409 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
2411 * process.c (process_read_stringtable_block): Recognize '007f' as
2412 a language neutral stringtable block.
2414 2004-01-12 Patrik Torstensson
2416 * object.h (MonoStringBuilder) : Changed layout to support our
2417 new stringbuilder class.
2418 * marshal.c: Change marshalling to support the new layout of
2420 * appdomain.c: increased version number because new layout of
2423 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
2425 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
2426 assembly name as an string instead of an AssemblyName, since it is
2427 easier to extract info from it.
2429 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
2430 the culture subdirectories too. Fixes #52231.
2432 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2434 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
2435 It takes 2 new parameters with an optional name for the method to look
2436 for and case ignoring info.
2438 * threadpool.c: removed unused variable.
2440 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2442 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
2443 It takes 2 new parameters with an optional name for the property to look
2444 for and case ignoring info.
2447 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
2449 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
2452 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2455 * assembly.c: escape the uri before passing it to g_filename_from_uri.
2458 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
2460 * reflection.c: Add support for more than one unmanaged resource.
2462 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
2463 in field->def_value, as done in all other cases.
2465 * reflection.c (mono_reflection_get_custom_attrs): Add support for
2468 * reflection.c (mono_reflection_create_runtime_class): Remove
2469 errorneous assignment to klass->element_class, since it is already
2470 done in mono_reflection_setup_internal_class.
2472 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2474 * gc.c: added missing LeaveCriticalSection.
2475 * icall.c: indented a couple of lines.
2476 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
2477 if we call EndInvoke inside a callback. Fixes bug #52601.
2479 2004-01-07 Martin Baulig <martin@ximian.com>
2481 * mono-debug-debugger.h
2482 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
2484 2004-01-06 Miguel de Icaza <miguel@ximian.com>
2486 * appdomain.c: Use messages in NotImplementedException.
2488 * exception.c (mono_get_exception_not_implemented): Now this takes
2491 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
2492 exception instead of g_asserting an aborting when something is not
2495 Add some inline docs.
2497 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
2499 * reflection.h: Update after changes to object layout.
2501 * reflection.c: Implement saving of unmanaged aka win32 resources.
2503 * appdomain.c: Bump version number.
2505 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
2506 Handle missing domains gracefully.
2508 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
2510 * file-io.c : On Windows, there are much more invalid_path_chars.
2512 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
2514 * class.h, object.c: prepare for GetType () speedup.
2516 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
2518 * profiler.c: workaround for --profile null reference exception on
2519 cygwin. Patch by Patrik Torstensson.
2521 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
2523 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
2524 make work for unaligned access.
2526 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
2528 * class.c: small cleanup (class->fields [i] -> field).
2529 * image.c: check address of metadata is valid.
2531 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
2533 * assembly.h assembly.c (mono_assembly_loaded): New public function to
2534 search the list of loaded assemblies.
2536 * reflection.c (mono_reflection_type_from_name): Use
2537 mono_assembly_loaded instead of mono_image_loaded.
2539 * reflection.c: Fix warnings.
2541 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
2543 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
2544 is dynamic. This is needed since an assembly can contain both dynamic and
2547 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
2550 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
2552 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
2553 to store modules loaded using AddModule.
2555 * reflection.c (mono_image_fill_file_table): Generalize this so it works
2558 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
2560 * reflection.c (mono_image_fill_export_table_from_module): New function to
2561 fill out the EXPORTEDTYPES table from a module.
2563 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
2564 into a separate function. Also handle loaded non-dynamic modules.
2566 * reflection.c (mono_image_basic_init): Fix memory allocation.
2568 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2570 * assembly.c (mono_assembly_load_references): Make this public.
2572 2003-12-19 Martin Baulig <martin@ximian.com>
2574 * class.c (mono_class_initialize_generic): Made this static, take
2575 a `MonoGenericInst *' instead of a `MonoClass *'.
2576 (mono_class_from_generic): Call mono_class_initialize_generic()
2577 unless we're already initialized or being called from
2578 do_mono_metadata_parse_generic_inst().
2580 * class.h (MonoGenericInst): Added `initialized' and
2581 `init_pending' flags.
2583 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
2584 `mono_class_init (gklass)' or mono_class_initialize_generic()
2585 here; set `generic_inst->init_pending' while parsing the
2588 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
2590 * locales.c: include string.h for memxxx prototypes
2592 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
2594 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
2595 constructor when accessing literal fields.
2597 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
2599 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2601 * reflection.c (assembly_add_resource_manifest): New function to fill
2602 the MANIFESTRESOURCE table.
2604 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
2606 * reflection.h: Update to changes in class layout.
2608 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
2609 Reenable call to mono_runtime_is_shutting_down ().
2611 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
2612 determine if the runtime is shutting down.
2614 2003-12-16 Jackson Harper <jackson@ximian.com>
2616 * icall.c: comment out call to mono_runtime_is_shutting_down to
2619 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
2621 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
2622 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
2624 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
2626 * reflection.c: move definition of swap_with_size
2627 to before its first call
2629 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
2631 * appdomain.c (mono_runtime_is_shutting_down): New public function.
2633 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
2636 * object.c: Fix warnings.
2638 * icall.c (ves_icall_Type_Get...): Only consider inherited static
2639 members if FlattenHierarchy is set.
2641 * reflection.c (mono_image_add_decl_security): New function to emit
2642 declarative security.
2644 * reflection.h reflection.c: Add support for declarative security.
2646 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
2648 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
2650 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
2652 * appdomain.c verify.c: Moved corlib version checking into its own
2653 function in appdomain.c since it needs to create vtables etc.
2655 2003-12-13 Patrik Torstensson <p@rxc.se>
2657 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
2658 instead of unwrapped server.
2660 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
2662 * verify.c (check_corlib): Fix field index.
2664 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
2666 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
2669 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
2671 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
2672 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
2673 cope with sizeof(size_t) != sizeof(guint32).
2675 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2677 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
2680 2003-12-10 Mark Crichton <crichton@gimp.org>
2682 * icall.c: removed the GetNonZeroBytes. We now handle this case
2685 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
2687 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
2689 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
2692 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
2694 * verify.c (check_corlib): Handle the case when the version field is
2695 initialized by a static constructor.
2697 2003-12-08 Patrik Torstensson <p@rxc.se>
2699 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
2701 2003-12-08 Martin Baulig <martin@ximian.com>
2703 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
2704 a MonoReflectionGenericParameter, also take the parameter index
2705 and name as arguments.
2706 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
2707 (ves_icall_MonoGenericParam_initialize): New interncall.
2708 (ves_icall_Type_make_byref_type): New interncall.
2710 * reflection.h (MonoReflectionGenericParam): Derive from
2711 MonoReflectionType, not just from MonoObject. Added `refobj' and
2714 * reflection.c (mono_reflection_define_generic_parameter): Create
2715 and return a new MonoReflectionGenericParam; don't initialize the
2717 (mono_reflection_initialize_generic_parameter): New public method;
2718 initializes the constraints and creates the `param->pklass'.
2720 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
2722 * reflection.h reflection.c: Use the new fields 'num_types',
2723 'num_fields' and 'num_methods' to track the number of types etc.
2725 * verify.c (check_corlib): Check corlib version number.
2727 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
2729 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
2730 function works on all methods.
2732 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
2734 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
2735 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
2736 the custom_type_info flag of the transparent proxy.
2737 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
2738 objects that supports IRemotingTypeInfo.
2739 * object.h: Added custom_type_info field in transparent proxy.
2741 2003-12-06 Martin Baulig <martin@ximian.com>
2743 * class.c (mono_class_create_from_generic): Removed.
2744 (mono_class_from_generic): Check `ginst->klass' before doing
2745 anything else. This is important to fully support "recursive"
2748 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
2749 empty `generic_inst->klass' before doing anything else.
2751 2003-12-06 Dick Porter <dick@ximian.com>
2756 * locales.c: Use C structs to access class fields. Don't do a
2757 conversion between MonoString and UChar because both are
2758 platform-endian UTF-16. Compare now takes startindex and count
2759 parameters. Add a char overload for IndexOf. Speed up the
2760 invariant string IndexOf.
2762 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
2764 * Makefile.am (monosn_LDADD): Fix parallel build.
2766 2003-12-04 Martin Baulig <martin@ximian.com>
2769 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
2770 (ves_icall_Type_make_array_type): New interncall.
2772 2003-12-04 Martin Baulig <martin@ximian.com>
2774 * locales.c: also change it in the !HAVE_ICU case.
2776 2003-12-04 Dick Porter <dick@ximian.com>
2779 * locales.c: construct_compareinfo is now in CompareInfo, not
2782 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
2784 * image.c (mono_image_load_file_for_image): Cache loaded images in the
2787 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
2790 * assembly.c (mono_assembly_load_references): Only load references
2793 * class.c (mono_class_from_name): Avoid linear search of the
2796 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
2798 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
2800 * image.h (MonoImage): Add 'field_cache' field.
2802 * loader.c (mono_field_from_token): Cache field lookups.
2804 * reflection.c (mono_module_get_object): Fix name property.
2806 * icall.c (ves_icall_get_enum_info): Update after changes to
2807 mono_metadata_get_constant_index ().
2809 * icall.c: Get rid of get_type_info icall, use a separate icall for
2810 each type property to avoid needless memory allocations. Fixes #51514.
2812 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
2813 to avoid needless binary searches.
2815 * class.c (class_compute_field_layout): Move the initialization of
2816 field->def_value to mono_class_vtable ().
2818 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
2821 * object.c (mono_object_allocate): Make it inline.
2823 * object.c (mono_object_allocate_spec): Make it inline.
2825 2003-12-02 Dick Porter <dick@ximian.com>
2827 * locales.c (create_NumberFormat): NumberFormatInfo construction.
2828 Patch by Mohammad DAMT (mdamt@cdl2000.com).
2830 2003-12-01 Dick Porter <dick@ximian.com>
2832 * threads.c: Fix signature and call in CreateMutex and
2835 2003-12-01 Dick Porter <dick@ximian.com>
2838 * locales.c: Implement string compares and searching
2840 * object.h: Add extra Thread field
2842 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
2844 * reflection.c (fixup_method): Add support for MonoCMethod.
2846 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
2848 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
2850 * reflection.c (assembly_name_to_aname): Allow extra characters in
2851 assembly names. Fixes #51468.
2853 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
2855 * exception.c (mono_exception_from_name_domain): New helper function.
2857 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
2858 exception object in the correct domain.
2860 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
2861 formatting + make a copy a the input data.
2863 * loader.c (mono_get_method_from_token): Methods which contain
2864 native code do not have entries in the ImplMap.
2866 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
2867 Thanks to Gonzalo for spotting this.
2869 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
2870 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
2872 * assembly.h (mono_assembly_load_from): Split the second part of
2873 assembly loading into a new public function.
2875 * exception.h (mono_get_exception_bad_image_format): New function.
2877 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
2879 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2880 Enumerate all modules inside a dynamic assembly. Fixes #51293.
2882 * icall.c: Add new icall for creating dynamic methods.
2884 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
2886 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
2888 * reflection.c (mono_reflection_create_dynamic_method): New icall to
2889 create a dynamic method.
2891 * reflection.c (resolve_object): New helper function.
2893 * reflection.c: Generalize ReflectionMethodBuilder and the functions
2894 which manipulate it so they can also work on dynamic methods.
2896 * reflection.c (reflection_method_builder_to_mono_method): Avoid
2897 creating the MonoReflectionMethodAux structure if it is not needed.
2899 * reflection.h verify.c: Update after changes to object layout.
2901 * reflection.c (method_builder_encode_signature): Fix compilation on
2904 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
2906 * appdomain.h: Added support for context static fields. Added static_data
2907 field to MonoAppContext and renamed thread_static_fields to a more
2908 generic special_static_fields in MonoAppDomain, since it can now contain
2909 context static fields.
2910 * domain.c: Updated hashtable name.
2911 * object.c: Replaced field_is_thread_static() for a more generic
2912 field_is_special_static() which also checks for context static attribute.
2913 In mono_class_vtable(), added support for static context fields.
2914 * threads.c: Changed methods that manage thread static fields to more
2915 generic methods so they can be reused both for thread and context static
2917 * threads.h: Declared some new methods.
2919 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
2921 * reflection.h: Update after changes to the managed types.
2923 * reflection.c (encode_custom_modifiers): New helper function.
2925 * reflection.c (method_encode_signature): Emit custom modifiers.
2927 * reflection.c (field_encode_signature): Emit custom modifiers.
2929 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
2931 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
2933 * icall.c (ves_icall_System_ValueType_Equals): New optimized
2936 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
2939 * object.c (mono_field_get_value_object): New function.
2941 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
2944 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
2946 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
2947 return a preallocated out-of-memory exception instance.
2949 * object.c (out_of_memory): Use the new function.
2951 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
2952 flag is before the custom modifiers. Fixes #49802.
2954 2003-11-16 Martin Baulig <martin@ximian.com>
2956 * class.c (mono_class_is_open_constructed_type): Implemented the
2957 MONO_TYPE_GENERICINST case.
2959 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
2961 * assembly.c (mono_assembly_fill_assembly_name): New function to
2962 fill out the MonoAssemblyName structure.
2963 (mono_assembly_open): Use the new function.
2965 * icall.c (fill_reflection_assembly_name): New helper function.
2967 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
2970 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
2972 2003-11-15 Martin Baulig <martin@ximian.com>
2974 * class.c (mono_class_is_open_constructed_type): New public
2975 function; checks whether a type is an open constructed type,
2976 ie. whether it still contains type parameters.
2977 (mono_class_inflate_generic_type): If we're a type parameter and
2978 the inflated type is also a MONO_TYPE_(M)VAR, return the original
2981 * class.h (MonoGenericInst): Added `guint32 is_open'.
2983 * loader.c (method_from_methodspec): Check whether we're an open
2984 or closed constructed type and set `ginst->is_open'.
2986 * reflection.c (mono_reflection_bind_generic_parameters): Check
2987 whether we're an open or closed constructed type and set
2989 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
2990 from open constructed types.
2992 2003-11-15 Martin Baulig <martin@ximian.com>
2994 * reflection.c (mono_reflection_bind_generic_parameters): If we're
2995 a generic instance (instead of a generic type declaration) with
2996 unbound generic parameters, bind them to our actual types.
2998 2003-11-14 Martin Baulig <martin@ximian.com>
3000 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
3002 * reflection.c (mono_reflection_bind_generic_parameters): If we're
3003 an interface type, populate `res->interfaces' with instantiated
3004 versions of all the interfaces we inherit.
3006 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
3008 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
3009 when MONO_PATH is set but doesn't contain the install dir.
3011 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3014 (ves_icall_Type_GetInterfaces): don't return an interface twice when
3015 it's also implemented in base classes. Fixes bug #50927.
3017 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
3019 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
3020 if this method is called from a finalizer. Fixes #50913.
3022 2003-11-12 Miguel de Icaza <miguel@ximian.com>
3024 * threads.c: Implement VolatileRead/VolatileWrite
3026 * icall.c: Add new icalls for VolatileRead/VolatileWrite
3028 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
3030 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
3031 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
3034 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
3035 from Peter Ross (pro@missioncriticalit.com).
3037 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
3039 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
3041 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
3043 * assembly.c (mono_assembly_load_references): Disable check because it
3044 triggers on older corlibs which lots of people have.
3046 2003-11-12 Jackson Harper <jackson@ximian.com>
3048 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
3049 load corlib.dll if mscorlib.dll is not found.
3050 * assembly.h: Remove corlib name define.
3053 * image.c: Change corlib name to mscorlib.
3055 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
3057 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
3059 2003-11-11 Miguel de Icaza <miguel@ximian.com>
3061 * appdomain.h: Added loader_optimization here to sync with the C#
3062 code, and add disallow_binding_redirects field.
3064 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
3066 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
3068 * reflection.c (mono_image_build_metadata): Fix crash on modules
3071 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
3073 * icall.c (ves_icall_get_method_info): Return callingConvention as
3076 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
3077 namespaces from the EXPORTEDTYPE table as well.
3079 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
3080 from all modules inside the assembly.
3082 2003-11-11 Martin Baulig <martin@ximian.com>
3084 * reflection.c (mono_reflection_bind_generic_parameters): Make
3085 this work for interfaces.
3087 2003-11-11 Martin Baulig <martin@ximian.com>
3089 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
3091 2003-11-11 Martin Baulig <martin@ximian.com>
3093 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
3094 "MonoInflatedMethod" and "MonoInflatedCtor".
3096 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
3098 * reflection.c (resolution_scope_from_image): Use the assembly table
3099 from the manifest module, since other modules don't have it.
3101 * debug-helpers.c (mono_type_full_name): New helper function.
3103 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
3105 * image.c (mono_image_load_file_for_image): New public function which
3106 is a replacement for the load_file_for_image in class.c.
3108 * assembly.c (mono_assembly_load_module): A wrapper for the function
3109 above which does assembly association and reference loading too.
3111 * class.c (mono_class_from_name): Call mono_assembly_load_module.
3113 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3115 * appdomain.c: not all of the attributes for the full assembly name
3116 are required and the order doesn't matter. Fixes bug #50787.
3118 2003-11-10 Dick Porter <dick@ximian.com>
3120 * locales.c: Use platform-endian UTF16
3122 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
3124 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
3126 2003-11-10 Martin Baulig <martin@ximian.com>
3129 (mono_metadata_load_generic_params): Make this actually work.
3131 * reflection.c (mono_reflection_bind_generic_parameters): If our
3132 parent is a generic instance, pass all the `types' to it, no
3133 matter whether it has the same number of type parameters or not.
3135 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
3137 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
3139 * assembly.c (mono_assembly_load_references): Move the image<->assembly
3140 assignment code to this function so it gets called recursively for all
3143 * image.c (load_modules): Remove the assembly assignment since it is
3144 now done by mono_assembly_load_references.
3146 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3147 Add 'module' argument.
3148 (mono_module_get_types): New helper function.
3149 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
3151 2003-11-08 Martin Baulig <martin@ximian.com>
3153 * class.c (mono_class_inflate_generic_method): Interface method
3154 don't have a header.
3156 * reflection.c (mono_image_get_methodspec_token): Take an
3157 additional `MonoGenericInst *' argument instead of reading it from
3158 the header; this is necessary to support interfaces.
3159 (mono_image_create_token): Pass the `MonoGenericInst *' from the
3160 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
3161 (inflated_method_get_object): Take an additional `MonoGenericInst *'
3164 * reflection.h (MonoReflectionInflatedMethod): Added
3165 `MonoGenericInst *ginst'.
3167 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
3169 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
3171 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
3173 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
3175 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
3178 (reflection_methodbuilder_from_method_builder):
3179 (reflection_methodbuilder_from_ctor_builder): New helper functions to
3180 initialize a ReflectionMethodBuilder structure.
3181 (mono_image_get_methodbuilder_token):
3182 (mono_image_get_ctorbuilder_token): New functions to emit memberref
3183 tokens which point to types in another module inside the same assembly.
3185 * reflection.c: Use the new helper functions.
3187 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
3189 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
3190 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
3192 * reflection.c (resolution_scope_from_image): Emit a moduleref if
3195 * reflection.c (mono_image_build_metadata): Emit metadata only for the
3196 current module. Emit the manifest only for the main module.
3198 * reflection.c (mono_image_create_token): Add assertion when a
3199 memberref needs to be created.
3201 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
3203 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
3204 larger buffer for the custom attribute blob. Fixes #50637.
3206 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3208 * threadpool.c: notify listener on async processing handles after
3209 invoking the async callback. Thanks to Zoltan.
3211 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
3213 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
3214 avoid code duplication.
3216 * reflection.h (MonoDynamicImage): New type which is currently unused,
3217 but will be used through the ref.emit code in place of
3218 MonoDynamicAssembly.
3220 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
3223 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
3224 a MonoDynamicImage instead of just a MonoImage.
3226 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
3227 icalls to ModuleBuilder but keep their semantics, so they will work
3228 with moduleb->assemblyb. This will change later.
3230 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
3232 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
3235 * reflection.c (mono_image_build_metadata): Avoid creation of a default
3236 main module, since it is now done by the managed code.
3238 2003-11-03 Martin Baulig <martin@ximian.com>
3240 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
3241 `ginst->klass' here.
3242 (method_encode_methodspec): Don't use the `ginst->generic_method's
3243 klass if it's a generic instance, use `ginst->klass' in this case.
3245 2003-11-03 Martin Baulig <martin@ximian.com>
3247 * reflection.c (mono_image_get_generic_method_param_info):
3248 Removed, use mono_image_get_generic_param_info() instead.
3249 (mono_image_get_type_info): Write the GenericParam table before
3250 the Method table. This is neccessary because in the GenericParam
3251 table, type parameters of the class (ie. '!0' etc.) must come
3252 before the ones from its generic methods (ie. '!!0' etc).
3254 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
3256 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
3258 2003-11-02 Martin Baulig <martin@ximian.com>
3260 * reflection.c (create_generic_typespec): Take a
3261 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
3262 the generic parameters from it.
3264 2003-11-02 Martin Baulig <martin@ximian.com>
3266 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
3267 instead of a `MonoClassField *' since we just need the type.
3268 (create_generic_typespec): New static function. Creates a
3269 TypeSpec token for a generic type declaration.
3270 (mono_image_get_generic_field_token): New static function.
3271 (mono_image_create_token): If we're a FieldBuilder in a generic
3272 type declaration, call mono_image_get_generic_field_token() to get
3275 2003-11-02 Martin Baulig <martin@ximian.com>
3278 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
3279 `MonoReflectionGenericInst *declaring_type' and
3280 `MonoReflectionGenericInst *reflected_type' fields.
3282 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
3283 `MonoReflectionGenericInst *declaring_type' and a
3284 `MonoReflectionGenericInst *reflected_type' argument instead of a
3285 single `MonoReflectionGenericInst *type' one. Set
3286 `res->declaring_type' and `res->reflected_type' from them.
3287 (mono_reflection_inflate_field): Likewise.
3289 2003-11-02 Martin Baulig <martin@ximian.com>
3291 * class.c (mono_class_setup_vtable): Don't store generic methods
3294 2003-11-02 Martin Baulig <martin@ximian.com>
3296 * reflection.h (MonoReflectionGenericInst): Added
3297 `MonoReflectionType *declaring_type'.
3299 * reflection.c (mono_reflection_bind_generic_parameters): Use
3300 `if (tb->parent)' instead of `klass->parent'.
3302 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
3304 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
3305 with an empty ASSEMBLY table.
3307 * reflection.c (mono_image_build_metadata): Avoid using the same loop
3308 variable in the inner and outer loops.
3310 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
3312 * metadata.h (mono_metadata_make_token): Put parentheses around macro
3315 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
3317 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
3318 icalls. Instead, do everything in managed code. This is needed since
3319 it is hard to restore the original domain etc. in unmanaged code in the
3320 presence of undeniable exceptions.
3322 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
3323 New icalls to push and pop appdomain refs.
3325 2003-10-31 Martin Baulig <martin@ximian.com>
3327 * class.c (inflate_generic_type): Renamed to
3328 mono_class_inflate_generic_type() and made it public.
3330 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
3333 * loader.c (mono_field_from_memberref): Also set the retklass for
3336 * fielder.c (mono_image_get_inflated_field_token): New static
3337 method; creates a metadata token for an inflated field.
3338 (mono_image_create_token, fixup_method): Added support for
3339 "MonoInflatedField".
3340 (fieldbuilder_to_mono_class_field): New static function.
3341 (mono_reflection_inflate_field): New public function.
3344 (MonoReflectionGenericInst): Added `MonoArray *fields'.
3345 (MonoReflectionInflatedField): New typedef.
3347 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
3349 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
3350 for Solaris and other platforms without s6_addr16
3352 2003-10-30 Martin Baulig <martin@ximian.com>
3354 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
3355 argument instead of two.
3356 (mono_class_inflate_generic_signature): Likewise.
3357 (inflate_generic_header): Likewise.
3358 (mono_class_inflate_generic_method): Likewise. In addition, if
3359 `ginst->klass' is set, it becomes the new `method->klass'.
3361 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
3364 * reflection.c (encode_generic_method_sig): Write a 0xa as the
3366 (method_encode_methodspec): If we have generic parameters, create
3367 a MethodSpec instead of a MethodRef.
3368 (fixup_method): Added support for "MonoInflatedMethod" and
3370 (mono_image_create_token): Added support for "MonoInflatedMethod"
3371 and "MonoInflatedCtor".
3372 (inflated_method_get_object): New static function; returns a
3373 managed "System.Reflection.MonoInflatedMethod" object.
3374 (mono_reflection_bind_generic_method_parameters): Return a
3375 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
3376 (mono_reflection_inflate_method_or_ctor): Likewise.
3377 (mono_image_get_generic_method_param_info): Initialize unused
3379 (mono_image_get_generic_param_info): Likewise.
3381 * reflection.h (MonoReflectionInflatedMethod): New public
3382 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
3383 "S.R.MonoInflatedCtor" classes.
3385 * loader.c (method_from_memberref): If we're a TypeSpec and it
3386 resolves to a generic instance, inflate the method.
3388 2003-10-28 Dick Porter <dick@ximian.com>
3390 * object.c (mono_runtime_run_main): Convert command-line arguments
3391 into utf8, falling back to the user's locale encoding to do so.
3393 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
3395 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
3398 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
3400 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
3401 up icalls at method definition time. Partially fixes #33569.
3403 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
3405 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
3406 marshalling of arrays. Fixes #50116.
3408 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
3410 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
3411 points to a vtable in the dying appdomain.
3413 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
3414 listeners into unmanaged code inside the lock.
3416 * object.c (mono_class_vtable): Turn off typed allocation in non-root
3417 domains and add some comments.
3419 2003-10-25 Martin Baulig <martin@ximian.com>
3421 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
3423 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
3425 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
3426 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
3427 currently parsing. Create the generic class and store it in
3428 `generic_inst->klass' before parsing the type arguments. This is
3429 required to support "recursive" definitions; see mcs/tests/gen-23.cs
3431 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
3432 to support recursive typespec entries.
3434 * class.c (mono_class_setup_parent): If our parent is a generic
3435 instance, we may get called before it has its name set.
3436 (mono_class_from_generic): Splitted into
3437 mono_class_create_from_generic() and mono_class_initialize_generic().
3439 2003-10-25 Martin Baulig <martin@ximian.com>
3441 * icall.c (ves_icall_Type_BindGenericParameters): Return a
3442 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
3443 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
3444 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
3446 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
3447 (create_typespec): Likewise.
3448 (mono_reflection_bind_generic_parameters): Return a
3449 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
3450 (mono_reflection_inflate_method_or_ctor): New public function.
3452 * reflection.h (MonoReflectionGenericInst): New typedef.
3454 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
3456 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
3457 inside the domain lock. Fixes #49993.
3459 * object.c (mono_class_vtable): When typed allocation is used,
3460 allocate vtables in the GC heap instead of in the mempool, since the
3461 vtables contain GC descriptors which are used by the collector even
3462 after the domain owning the mempool is unloaded.
3464 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
3466 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
3467 reflect what it does. Also invalidate mempools instead of freeing
3468 them if a define is set.
3470 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
3473 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
3474 hold the finalizable objects in this domain.
3476 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
3479 * appdomain.c (mono_domain_set): New function to set the current
3480 appdomain, but only if it is not being unloaded.
3482 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
3483 appdomain which is being unloaded.
3485 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
3486 unloading of the root appdomain.
3488 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
3489 icall to execute a method in another appdomain. Intended as a
3490 replacement for InternalSetDomain, which can confuse the code
3491 generation in the JIT.
3493 * appdomain.c (mono_domain_is_unloading): New function to determine
3494 whenever an appdomain is unloading.
3496 * appdomain.c (mono_domain_unload): New function to correctly unload
3499 * assembly.c (mono_assembly_load_references): Check that an assembly
3500 does not references itself.
3502 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
3503 domain manually, it asks the finalizer thread to do it, then waits for
3504 the result. Also added a timeout.
3506 * icall.c: Register the new icalls.
3508 * threads.h threads.c: Export the mono_gc_stop_world and
3509 mono_gc_start_world functions.
3511 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
3512 function to fill out the mempool with 0x2a.
3514 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
3516 * reflection.h (MonoReflectionMethodAux): New structure to store
3517 information which is rarely used, thus is not in the MonoMethod
3520 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
3523 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
3524 and marshalling info into the aux structure.
3526 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
3527 from the aux structure.
3529 * loader.c (mono_method_get_param_names): Retrieve the param names from
3532 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
3534 * exception.h exception.c: Add AppDomainUnloadedException && fix
3537 2003-10-21 Dick Porter <dick@ximian.com>
3540 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
3541 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
3543 2003-10-21 Martin Baulig <martin@ximian.com>
3545 * reflection.c (mono_reflection_bind_generic_parameters):
3546 `klass->parent' is NULL for interfaces.
3548 2003-10-21 Martin Baulig <martin@ximian.com>
3550 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3552 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
3554 * exception.c (mono_exception_from_name_msg): New helper function for
3555 creating exceptions and initializing their message field.
3557 * exception.c: Simplify functions using the new helper.
3559 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
3562 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
3563 mono_raise_exception, since otherwise gcc doesn't generate the function
3564 epilog for raise_exception, confusing the stack unwinding in the JIT.
3567 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
3568 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
3571 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3573 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
3576 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
3578 * icall.c: Removed GetUninitializedObject method because
3579 AllocateUninitializedClassInstance does the same.
3581 2003-10-18 Martin Baulig <martin@ximian.com>
3583 * class.c (inflate_generic_signature): Renamed to
3584 mono_class_inflate_generic_signature() and made it public.
3585 (my_mono_class_from_generic_parameter): New static function; if we
3586 don't already have the generic parameter's MonoClass, create a
3587 very simple one which is just used internally in the runtime and
3588 not passed back to managed code.
3590 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
3592 * metadata.h (MonoMethodSignature): Moved the
3593 `MonoGenericParam *gen_params' to the MonoMethodHeader.
3594 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
3596 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
3597 ves_icall_MonoMethod_GetGenericArguments(); this is now an
3598 interncall on the MonoMethod class, not on MethodInfo.
3599 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
3600 calling mono_reflection_bind_generic_method_parameters() directly.
3602 * loader.c (mono_method_get_signature): If this is a MethodSpec;
3603 return the already computed `method->signature'.
3604 (method_from_methodspec): New static function to load a method
3605 from a MethodSpec entry.
3606 (mono_get_method_from_token): Call the new method_from_methodspec()
3607 for MethodSpec tokens.
3608 (mono_get_method_from_token): If we're a generic method, load the
3611 * reflection.c (mono_image_get_memberref_token): Allow
3612 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
3614 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
3615 (mono_image_create_token): First check whether it's a generic
3616 method (so we'd need to create a MethodSpec), then do the other
3618 (mono_reflection_bind_generic_method_parameters): Return a
3619 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
3620 called directly from the interncall.
3622 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
3624 * reflection.c (load_public_key): Move loading of the public key
3627 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
3629 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
3632 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
3633 culture, hash_alg and public_key. Fixes #49555.
3635 2003-10-17 Martin Baulig <martin@ximian.com>
3637 * class.h (MonoGenericInst): Moved this declaration here and added
3638 `MonoMethod *generic_method'.
3641 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
3642 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
3644 * metadata.c (mono_metadata_type_equal): Two types of
3645 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
3646 index; ie. don't compare the address of the `MonoGenericParam'
3648 (mono_metadata_load_generic_params): Removed the `MonoMethod
3651 * metadata.h (MonoGenericInst): Moved declaration to class.h.
3652 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
3654 * reflection.c (method_encode_signature): Encode the number of
3656 (encode_generic_method_sig): New static function.
3657 (method_encode_methodspec): New static function; creates an entry
3658 in the MethodSpec table for a generic method.
3659 (mono_image_get_methodspec_token): New static function.
3660 (mono_image_create_token): Call mono_image_get_methodspec_token()
3661 for generic methods.
3662 (mono_reflection_bind_generic_method_parameters): New public
3663 function. Instantiates a generic method.
3665 2003-10-16 Martin Baulig <martin@ximian.com>
3667 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
3668 *gen_params' here from MonoMethodHeader.
3670 * metadata.c (mono_metadata_parse_method_signature): If we have
3671 generic parameters, initialize `method->gen_params' and then set
3672 the correct `type->data.generic_param' in all the parameters.
3674 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
3676 * threads.c (mono_threads_get_default_stacksize): New function to
3677 return the default stacksize.
3679 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
3680 termination of the finalizer thread, since the previous method had
3681 race conditions. Fixes #49628.
3683 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
3684 as for the other managed threads.
3686 2003-10-16 Martin Baulig <martin@ximian.com>
3688 * class.c (inflate_generic_signature): Copy `generic_param_count'
3691 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
3694 * metadata.c (mono_metadata_parse_method_signature): Actually set
3695 the `method->generic_param_count' here.
3696 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
3698 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
3700 * object.h: Add a new field to TypedRef to simplify the implementation
3701 of the REFANY opcodes in the JIT.
3703 * icall.c: Make use of the new field.
3705 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
3708 2003-10-15 Martin Baulig <martin@ximian.com>
3710 * class.c (mono_class_from_gen_param): Renamed to
3711 mono_class_from_generic_parameter() and moved most of the
3712 functionality from mono_reflection_define_generic_parameter()
3713 here; ie. we create a "real" class here.
3714 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
3715 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
3716 previously been called.
3718 * class.h (MonoGenericParam): Moved the declaration of this struct
3719 here from metadata.h and added `MonoMethod *method'.
3721 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
3724 * loader.c (mono_get_method_from_token): If we have any generic
3725 parameters, call mono_metadata_load_generic_params() to read them
3726 from the MONO_TABLE_GENERICPAR.
3728 * metadata.c (mono_metadata_load_generic_params): Added
3729 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
3731 * metadata.h (MonoMethodSignature): Replaced
3732 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
3733 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
3735 * reflection.c (mono_reflection_define_generic_parameter): Moved
3736 most of the functionality into the new
3737 mono_class_from_generic_parameter(); set the `method' field if
3738 we're a method parameter.
3740 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
3742 * marshal.c (emit_struct_conv): if native size is 0
3745 2003-10-14 Martin Baulig <martin@ximian.com>
3747 * icall.c: The generics API has changed in the spec since it was
3748 added to System.Type; these modifications make it match the spec
3750 (ves_icall_Type_GetGenericParameters): Renamed to
3751 `ves_icall_Type_GetGenericArguments'.
3752 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
3753 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
3754 `ves_icall_MonoType_get_HasGenericArguments'.
3755 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
3756 `ves_icall_MonoType_get_IsGenericParameter'.
3757 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
3758 this is no interncall anymore.
3759 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
3760 `ves_icall_TypeBuilder_get_IsGenericParameter'.
3762 2003-10-14 Martin Baulig <martin@ximian.com>
3764 * reflection.c (mono_reflection_bind_generic_parameters): Also
3765 inflate generic methods if we're reading the class from IL.
3767 2003-10-13 Martin Baulig <martin@ximian.com>
3769 * reflection.c (mono_reflection_define_generic_parameter): This
3770 method isn't called directly from the icall anymore; take a
3771 `MonoReflectionAssemblyBuilder *' so we can use this for type and
3772 method generic parameters.
3773 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
3774 (method_builder_encode_signature): Encode generic parameters.
3775 (mono_image_get_method_info): Write generic params to the
3776 MONO_TABLE_GENERICPARAM table.
3778 * reflection.h (MonoReflectionMethodBuilder): Added
3779 `MonoArray *generic_params'.
3781 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
3783 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
3784 wrapper for mono_reflection_define_generic_parameter().
3785 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
3787 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
3789 * marshal.h: Add missing function to fix build.
3791 * marshal.c (mono_marshal_get_native_wrapper): Add support for
3792 the SetLastError pinvoke attribute.
3794 * marshal.c (mono_marshal_set_last_error): New helper function called
3795 by the generated code.
3797 * marshal.c (mono_mb_emit_branch): New helper function.
3799 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
3801 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
3802 classes as parameters and return values of delegates. Fixes #29256.
3804 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
3806 * locales.c: use gint32 in non HAVE_ICU case
3808 2003-10-11 Martin Baulig <martin@ximian.com>
3810 * mono-debug.c (mono_debug_add_method): Added a workaround for
3813 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
3815 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
3816 delegates passed to native code must use the STDCALL calling
3817 convention. Fixes #35987.
3819 2003-10-10 Martin Baulig <martin@ximian.com>
3821 * class.c (inflate_generic_type): If we're inflating for a generic
3822 type instance (and not for a generic method), return
3823 MONO_TYPE_MVAR unchanged.
3825 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3827 * string-icalls.c: Join ignores null strings in the source array.
3828 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
3829 * threads.c: GetAvailableTheads is slightly more accurate.
3831 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
3833 * threads.h threads.c : add mono_threads_set_default_stacksize
3834 and pass default to CreateThread calls.
3836 2003-10-09 Dick Porter <dick@ximian.com>
3840 * locales.c: Internal calls for constructing CultureInfo and
3841 related objects from libicu (if its available.)
3843 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
3845 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
3847 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3849 * threadpool.c: added an argument to async_invoke_thread that is the
3850 item to process, pass the MonoAsyncResult to the thread start function
3851 when creating a new thread. This way we don't need to acquire any lock
3852 when we're creating a new thread. Readded a semaphore for faster
3853 response times (instead of that Sleep i added).
3855 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
3857 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
3858 get daylight change dates better on Windows, fix handling
3859 of platforms without tm_gmtoff.
3861 2003-10-06 Martin Baulig <martin@ximian.com>
3863 * class.c (inflate_generic_method): Renamed to
3864 mono_class_inflate_generic_method() and made public.
3865 (mono_class_init): Don't inflate the generic methods here.
3866 (mono_class_from_generic): Added `gboolean inflate_methods'
3867 argument. Inflate the methods here.
3869 * loader.c (mono_method_get_param_names): Ignore instances of
3870 generic types for the moment.
3872 * reflection.c (fixup_method): Added support for inflated methods.
3873 (mono_image_create_token): Use mono_image_get_methodref_token()
3874 for inflated methods.
3875 (mono_custom_attrs_from_param): Ignore instances of generic types
3877 (mono_reflection_bind_generic_parameters): New public function.
3878 Moved all the functionality from
3879 ves_icall_Type_BindGenericParameters() here and added support for
3881 (mono_reflection_define_generic_parameter): Initialize
3882 `klass->methods' here.
3884 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
3885 functionality into mono_reflection_define_generic_parameter().
3886 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
3887 TypeBuilder, return that TypeBuilder.
3889 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3891 * appdomain.c: removed mono_delegate_semaphore.
3894 (mono_thread_pool_add): moved hash table creation inside and the thread
3895 creation outside of the critical region.
3896 (mono_thread_pool_finish): removed obsolete code.
3897 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
3898 continue or exit the thread depending on the queue.
3900 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
3902 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
3903 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
3904 handle more bool marshalling options
3906 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
3908 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
3909 arrays of structs. Also add a more descriptive error message when
3910 a structure member is marshalled as LPArray.
3912 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
3914 * marshal.c (mono_marshal_get_native_wrapper): Add support for
3915 marshalling arrays of complex types. Fixes #29098. Also remove an
3916 usused and incomplete function.
3918 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
3920 * gc.c: report heap_size - free_bytes as total memory allocated
3923 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
3925 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
3926 fix timezone handling problems on Windows.
3928 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
3929 asserts when the year is outside the range handled by ms the functions.
3931 * class.c (setup_interface_offsets): If the class is an interface,
3932 fill out its interface_offsets slot.
3934 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3936 * threadpool.c: mark threadpool threads as background.
3938 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
3940 * decimal.c - define DECINLINE to nothing if not using GCC
3942 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
3944 * assembly.c: More refcount fixes.
3946 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3948 * string-icalls.c: if we're not trimming, return the same string.
3949 When not splitting, don't create a new string.
3951 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3954 (mono_image_open): increment the ref_count inside the critical section.
3956 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
3958 * image.c (mono_image_open): Fix reference counting bug.
3960 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
3962 * marshal.c (mono_marshal_type_size) struct alignment changed for
3963 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
3964 64bits. Avoid leak in mono_marshal_get_native_wrapper when
3965 mono_lookup_pinvoke_call throws.
3967 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
3969 * reflection.c (mono_reflection_parse_type): Fix #49114.
3971 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
3972 temporary workaround for cygwin header problem.
3974 * object.c (mono_object_isinst): Synchronize this with the code
3975 generated by the JIT for casts.
3977 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
3979 * reflection.c (encode_type): Fix #38332.
3981 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
3983 * marshal.c (mono_marshal_method_from_wrapper): New function to return
3984 the original method from the wrapper method.
3986 2003-09-25 Martin Baulig <martin@ximian.com>
3988 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
3989 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
3990 (ves_icall_Type_get_IsGenericInstance): New interncall.
3992 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
3994 * object.c: fix cast warning in big endian code.
3996 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
3998 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
4000 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4002 * assembly.c: don't call check_env from mono_assembly_load. It's
4003 already done once in mono_assemblies_init and may cause headaches when
4004 multiple threads are loading assemblies.
4006 2003-09-19 Martin Baulig <martin@ximian.com>
4008 * reflection.c (mono_reflection_define_generic_parameter): Don't
4009 allocate `klass->methods', set `klass->flags' to
4010 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
4012 2003-09-18 Martin Baulig <martin@ximian.com>
4014 * class.c (mono_class_init): Don't create `class->methods' if it's
4015 already initialized.
4017 * metadata.c (mono_metadata_load_generic_params): Make this
4020 * reflection.c (mono_reflection_define_generic_parameter): Set
4021 parent class and interfaces from the constraints.
4023 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
4024 to keep this struct in sync with the declaration in TypeBuilder.cs.
4026 2003-09-17 Martin Baulig <martin@ximian.com>
4028 * metadata.h (MonoType): Replaced the data's `int type_param'
4029 field with `MonoGenericParam *generic_param'.
4030 (MonoGenericParam): Added `MonoClass *klass'.
4032 * class.c (mono_class_from_gen_param): Removed the
4033 `MonoImage *image' and `int type_num' arguments.
4035 * metadata.c (mono_metadata_parse_generic_param): New static
4036 method; creates a MonoGenericParam which just contains the index.
4037 (do_mono_metadata_parse_type): Call
4038 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
4041 * reflection.c (mono_image_typedef_or_ref): Generic type
4042 parameters may be in the same assembly, but never use a typedef
4044 (mono_reflection_define_generic_parameter): We're now creating a
4045 "real" class for the type parameter; it's now safe to call
4046 mono_class_from_mono_type() on the class'es type, it'll do the
4049 2003-09-16 Martin Baulig <martin@ximian.com>
4051 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
4052 `symfile->range_entry_size' and `symfile->class_entry_size' here;
4053 the `symfile' data structure must be fully initialized before it
4054 gets added to the table.
4056 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
4058 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
4060 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
4061 class init trampolines.
4063 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
4065 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
4066 to the built-in profiler to turn off time and allocation profiling
4069 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
4071 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
4074 * debug-helpers.c (mono_method_full_name): Print the wrapper type
4075 in human readable form.
4077 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
4079 * reflection.c icall.c: Fixed warnings.
4081 * image.c (load_class_names): Use a temporary hash table to hold the
4082 namespaces in order to avoid doing many string comparisons.
4084 * image.h: Fix typo.
4086 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
4087 Pass NULL instead of g_direct_equal to the GHashTable constructor
4088 since the NULL case is short-circuited inside g_hash_table_lookup,
4089 leading to better performance.
4091 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
4092 obtain the first custom attribute for a given index. Depends on the
4093 CustomAttribute table being sorted by the parent field.
4095 * reflection.c (mono_custom_attrs_from_index): Use the new function
4096 for better performance.
4098 2003-09-07 Martin Baulig <martin@ximian.com>
4100 * class.c (mono_class_init): If we're a generic instance, inflate
4101 all our methods instead of loading them from the image.
4102 (mono_class_from_generic): Set `class->methods = gklass->methods'.
4104 2003-09-07 Martin Baulig <martin@ximian.com>
4106 * mono-debug-debugger.c: Added support for constructors.
4108 2003-09-06 Martin Baulig <martin@ximian.com>
4110 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
4113 * reflection.c (mono_reflection_setup_generic_class): Call
4114 ensure_runtime_vtable() to create the vtable.
4116 2003-09-05 Martin Baulig <martin@ximian.com>
4118 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
4121 2003-09-04 Martin Baulig <martin@ximian.com>
4123 * reflection.c (mono_reflection_define_generic_parameter): Generic
4124 parameters start with zero.
4126 2003-09-04 Martin Baulig <martin@ximian.com>
4128 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4130 * reflection.h (MonoReflectionGenericParam): New typedef.
4131 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
4132 the generic parameters from the managed TypeBuilder.
4134 * reflection.c (mono_reflection_define_generic_parameter): New function.
4135 (mono_reflection_create_runtime_class): Encode generic parameters.
4136 (mono_reflection_setup_generic_class): New function; this is
4137 called after adding adding all generic params to the TypeBuilder.
4138 (encode_type): Added MONO_TYPE_VAR.
4140 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
4142 * class.h class.c (mono_class_needs_cctor_run): Moved this method
4145 * assembly.h assembly.c: Moved the AOT loading code into an assembly
4148 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
4150 * reflection.h reflection.c class.h class.c: Delete duplicate
4151 definition of mono_type_get_name () from reflection.c and export the
4154 * class.c: Class loading fixes from Bernie Solomon
4155 (bernard@ugsolutions.com).
4157 * reflection.c: Endianness fixes from Bernie Solomon
4158 (bernard@ugsolutions.com).
4160 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
4162 * assembly.h assembly.c: Define a file format version for AOT
4165 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
4167 * appdomain.h (MonoJitInfo): New field to determine whenever the
4168 code is domain neutral.
4170 2003-08-31 Miguel de Icaza <miguel@ximian.com>
4172 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
4174 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
4176 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
4177 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
4178 Avoid caching the result since strings must be domain specific. Fixes
4181 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
4183 * marshal.c (mono_marshal_init): Make this callable multiple times
4184 since it is hard to find a correct place to call it.
4186 * object.c (mono_runtime_class_init): Execute static constructors in
4187 the correct appdomain.
4189 * image.c (build_guid_table): Handle the case when multiple images have
4192 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4194 * icall.c: added a couple of icalls for System.Web.
4196 2003-08-28 Martin Baulig <martin@ximian.com>
4198 * icall.c (ves_icall_Type_BindGenericParameters): Use
4199 `klass->generic_inst' instead of `&klass->byval_arg' in the
4200 mono_type_get_object() call. The returned type must be
4201 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
4203 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
4207 * object.c (mono_class_proxy_vtable): Make it thread safe.
4209 * pedump.c: Fix warning.
4211 * object.c appdomain.h: Get rid of metadata_section.
4212 It is no longer needed and it was causing deadlocks with domain->lock.
4214 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
4216 2003-08-26 Martin Baulig <martin@ximian.com>
4218 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
4220 2003-08-26 Martin Baulig <martin@ximian.com>
4222 * pedump.c (main): Call mono_metadata_init(),
4223 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
4224 and mono_loader_init().
4226 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
4228 * loader.h: Add missing include to fix build.
4230 * image.h: mono_image_load_references is no more.
4232 * assembly.c: Reworked assembly loading to make it really thread safe.
4233 After these changes, the assembly returned by mono_assembly_open is
4234 fully initialized, i.e. all its references assemblies are loaded.
4236 * assembly.c (mono_image_load_references): Renamed to
4237 mono_assembly_load_references, and made private, since clients no
4238 longer need to call it.
4240 * class.c: Removed calls to mono_assembly_load_references, since it was
4241 a source of deadlocks.
4243 * loader.h loader.c class.h class.c: Protect data structures using a
4244 new lock, the loader lock.
4246 * class.c (mono_class_setup_vtable): Create temporary hash tables and
4247 GPtrArrays only when needed.
4249 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
4250 into empty structures by mcs. Fixes pinvoke7.cs.
4252 * domain.c (mono_init): Call a new initialization function.
4254 * appdomain.c (mono_runtime_init): Call the new initializer function
4255 of the marshal module.
4257 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
4258 inserted into empty structures by mcs. Fixes pinvoke7.cs.
4260 * marshal.h marshal.c: Added locks around the wrapper caches to make
4261 this module thread safe.
4263 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
4264 this argument. Fixes pinvoke1.exe.
4266 2003-08-25 Lluis Sanchez <lluis@ximian.com>
4268 * object.h: Added call_type field to MonoMethodMessage and the corresponding
4269 enumeration of values. Removed fields to store remote call output values in
4270 MonoAsyncResult. Not needed any more.
4271 * object.c: Initialize call_type and async_result fields in mono_message_init.
4272 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
4273 dispatching the message.
4274 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
4275 async call to finish. To do it use a message with EndInvoke call type.
4277 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
4279 * loader.h loader.c (mono_method_hash_marhal_info): New function which
4280 determines whenever a method has marshalling info.
4282 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4284 * assembly.c: fix the build on windows.
4286 2003-08-22 Lluis Sanchez <lluis@ximian.com>
4288 * object.cs: Fixed bug #47785.
4290 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
4292 * string-icalls.c (StringReplace): If their are no occurances of
4293 the old string found return a reference to the supplied
4294 string. This saves some memory and matches MS behavoir.
4296 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4298 * socket-io.c: fixed compilation for systems that define AF_INET6
4299 and don't define SOL_IP/SOL_IPV6.
4301 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
4303 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
4304 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
4306 * rawbuffer.c rawbuffer.h: Make this module thread safe.
4308 * domain.c: Make this module thread safe.
4310 * domain.c (mono_init): Call new initialization function.
4312 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
4313 reference types too. Fixes #38812.
4315 * image.c (mono_image_init): Fixed warnings.
4317 * class.c (mono_class_from_typeref): Handle assembly load failure
4320 * appdomain.c (add_assemblies_to_domain): Handle the case when
4321 the references of an assembly are not yet loaded.
4323 * metadata.c image.c assembly.c: Moved initialization of global
4324 variables to a separate function called at startup since lazy
4325 initialization of these variables is not thread safe.
4327 * image.c assembly.c: Made this module thread safe by adding locks in
4328 the appropriate places.
4330 * domain.c (mono_init): Call the new initialization functions of the
4333 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
4335 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
4336 make a direct call. It is proxy's work to make the call asynchronous.
4337 mono_delegate_end_invoke(): If the targe is a proxy, just collect
4339 * object.cs: mono_method_call_message_new(): read AsyncResult and
4340 state object from parameters list, if this info is requested.
4341 * object.h: Added fields to store remote call output values in
4342 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
4344 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
4346 * object.h: add needed fields to MonoThread.
4347 * threads.c, threads.h: allow registering a function to cleanup data
4348 allocated per thread by the JIT.
4350 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
4352 * loader.h: portability fix by Bernie Solomon
4353 * <bernard@ugsolutions.com>.
4355 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
4357 * reflection.h reflection.c (mono_param_get_objects): Changed this to
4358 return a MonoArray. This simplifies the code and also ensures that
4359 the cache allways contains an object reference as a value.
4361 * icall.c (ves_icall_get_parameter_info): Simplified using the new
4364 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4366 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
4367 fixes a problem with byte ordering when getting the address family for
4370 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
4372 * .cvsignore: Added monosn.
4374 * reflection.h reflection.c loader.c: Added support for parameter
4375 marshalling to dynamically created types. Fixes #47295.
4377 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
4379 * rand.c: remove useless warnings.
4381 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
4383 * class.c: implemented ldtoken for methods and fieldrefs.
4385 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4387 * threadpool.c: when mono_async_invoke was called, no one took care of
4388 monitoring the queue. So if the method invoked took some time and we
4389 got new async invoke requests after 500 ms (the thread created waited
4390 that long in WaitForSingleObject), the new async invoke was not called
4391 until the previous one finished.
4393 This is fixed now. Thanks to Totte for helping with it.
4395 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4397 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
4399 2003-08-11 Martin Baulig <martin@ximian.com>
4401 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
4403 2003-08-06 Martin Baulig <martin@ximian.com>
4405 * mono-debug-debugger.c: Added support for static fields,
4406 properties and methods.
4408 2003-08-06 Martin Baulig <martin@ximian.com>
4410 * mono-debug-debugger.c: Don't store the MonoString's vtable to
4411 make this work for applications with multiple application domains.
4413 2003-08-04 Martin Baulig <martin@ximian.com>
4415 * mono-debug-debugger.c: Completely reworked the type support; the
4416 most important thing is that we're now just using one single
4417 `MonoType' instance per type.
4419 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
4421 * mono-endian.h, mono-endian.c, icall.c: Added icall
4422 ves_icall_System_Double_AssertEndianity to assert double word endianity
4423 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
4425 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
4427 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
4428 support, icalls and fixes.
4430 2003-07-31 Miguel de Icaza <miguel@ximian.com>
4432 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
4433 classes that are a punctuation character in .NET is not the same a
4436 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
4438 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
4440 2003-07-29 Miguel de Icaza <miguel@ximian.com>
4442 * icall.c: Add new MemCopy internalcall.
4443 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
4444 Simplified code; It is not necessary to handle all the cases here,
4445 as the C# code takes care of it. Only handle the case of the name
4446 resource embedded into the assembly.
4448 Changed signature to return the data pointer and the size of the
4451 2003-07-26 Miguel de Icaza <miguel@ximian.com>
4453 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
4454 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
4456 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
4458 * socket-io.c: ignore EINTR error in select.
4460 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
4462 * class.h, class.c: removed unused subclasses field in MonoClass.
4464 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
4466 * icall.c: improve fix of get_base_definition(). If the parent class
4467 doesn't have the mehod, look at the parent of the parent.
4468 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
4469 to check if a parameter is an in or out parameter
4470 (PARAM_ATTRIBUTE_IN is not set by default).
4471 mono_method_return_message_restore(): Use mono_class_value_size to
4472 get the size of a value type. mono_type_stack_size (parameterType)
4473 does not return the correct value if parameterType is byRef.
4474 mono_load_remote_field(), mono_load_remote_field_new(),
4475 mono_store_remote_field(), mono_store_remote_field_new():
4476 raise exception if the remote call returns an exception.
4478 2003-07-28 Martin Baulig <martin@ximian.com>
4480 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
4481 method. This is a wrapper around mono_runtime_invoke() which
4482 boxes the instance object if neccessary.
4484 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
4486 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
4487 metadata.h, row-indexes.h, verify.c: first cut of generics support.
4489 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
4491 * icall.c: disable mcs bug workaround.
4493 2003-07-21 Miguel de Icaza <miguel@ximian.com>
4495 * object.c (mono_runtime_class_init): Take the metadata_section
4496 mutex before obtaining the domain mutex.
4498 * appdomain.h: Added definition of metadata_section mutex here.
4500 * object.c: define metadata_mutex here.
4502 2003-07-24 Ravi Pratap <ravi@ximian.com>
4504 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
4507 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
4509 * reflection.c: Fix bug #46669
4511 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4516 * object.h: fill in the type name for TypeLoadException.
4518 2003-07-23 Ravi Pratap <ravi@ximian.com>
4520 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
4521 relationship between TypeBuilders while compiling corlib) and bug
4522 45993 (Array types returned from the runtime while compiling
4523 corlib were from the loaded corlib).
4525 2003-07-22 Martin Baulig <martin@ximian.com>
4527 * mono-debug-debugger.c: Reworked the type support a bit more;
4528 distinguish between types and classes.
4530 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
4532 * icall.c: add IsArrayImpl icall.
4534 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
4536 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
4537 initializing real_size only once. Also fix bug #46602.
4539 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
4541 * object.c: Renamed mono_metadata_section to metadata_section.
4543 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
4545 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
4546 empty array if the type is an array. Fixed.
4547 ves_icall_MonoMethod_get_base_definition: if the base method
4548 is abstract, get the MethodInfo from the list of methods of
4550 * reflection.c: ParameterInfo.PositionImpl should be zero-based
4551 and it was 1-based. Fixed in mono_param_get_objects.
4553 2003-07-20 Martin Baulig <martin@ximian.com>
4555 * mono-debug.h: Set version number to 31.
4556 (mono_debug_init): Added `MonoDomain *' argument.
4558 * mono-debug-debugger.c: Reworked the type support; explicitly
4559 tell the debugger about builtin types; pass the `klass' address to
4562 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
4564 * image.c: Allow new metadata tables to be loaded without a
4565 warning. Also update the warning message to give the new constant value.
4567 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
4569 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
4570 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
4571 array type representation changes.
4573 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
4575 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
4576 on Environment.Exit () call.
4578 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
4580 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
4581 requires a matching corlib.
4583 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
4585 * Changelog: My editor decided to add a CR to each line. Sorry about that.
4586 Committed again without the CRs.
4588 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
4590 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
4591 getting it from the "this" socket instance. Did not work
4592 if the socket is a subclass of Socket.
4593 Also fixed bug #35371.
4595 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
4597 * metadata.c: fixed size for TypedByRef.
4598 * loader.c: when searching for a method, consider the vararg amrker.
4599 * unicode.c, decimal.c: constify some arrays.
4601 2003-07-15 Dick Porter <dick@ximian.com>
4603 * socket-io.c: Fixed compilation for gcc < 3.2.
4605 Fixed compilation for machines that don't have AF_INET6 (thanks to
4606 Bernie Solomon <bernard@ugsolutions.com> for that part.)
4608 Fixed compile warnings.
4610 Fixed formatting and line endings.
4612 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
4615 * socket-io.c: Added IPv6 support.
4617 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
4619 * class.c (mono_class_is_assignable_from): New function to implement
4620 the is_assignable_from logic. Used by mono_object_isinst,
4621 Type::IsAssignableFrom () and the interpreter.
4623 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
4624 Object, even interfaces.
4626 * object.c (mono_object_isinst): Implement in terms of
4629 * icall.c (ves_icall_type_is_assignable_from): New icall.
4631 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
4633 * domain.c (foreach_domain): fix compiler warning.
4635 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
4637 * image.c (load_metadata_ptrs): use g_strndup because strndup is
4638 not available on all plattforms
4640 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
4642 * image.h image.c: Store the metadata version string in MonoImage.
4643 * icall.c: New icall to retrieve the image version.
4644 * reflection.c (create_dynamic_image): Fill in the image version field
4645 * reflection.c (build_compressed_metadata): Use the image version
4646 from the image structure.
4648 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4650 * appdomain.c: modified comment.
4651 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
4652 That will be its last iteration when mono_gc_cleanup is called from
4653 mono_runtime_cleanup and before the domain is unloaded.
4657 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
4659 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
4662 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
4664 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
4665 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
4666 Bernie Solomon <bernard@ugsolutions.com>.
4668 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
4670 * object.c, object.h: provide mono_object_new_fast() for faster
4671 allocation in some special cases.
4673 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
4675 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
4676 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
4678 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
4680 * threadpool.c: fix leaks.
4682 2003-07-01 Dick Porter <dick@ximian.com>
4684 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
4685 using MonoGHashTables. Fixes threadpool bug posted to list.
4687 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
4689 * image.h, image.c: added support to load an assembly from a byte array.
4690 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
4691 assembly bundle support.
4693 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
4695 * threadpool.c (mono_thread_pool_add): keep a reference to the
4696 AsyncResult to prevent GC
4698 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
4700 * class.c: leak fix.
4702 2003-06-25 Dick Porter <dick@ximian.com>
4704 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
4705 for the async object, the WaitHandle object will close the handle.
4708 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
4710 * class.c: in mono_array_class_get (), lookup from the hash with the
4711 same type we insert: this works around a bug in
4712 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
4713 lluis. The real fix will have to wait for after the release.
4715 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
4717 * icall.c: fix memory leak when getting type members.
4719 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
4721 * reflection.c: added more pubtoken special cases.
4723 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
4725 * class.c: handle field offset correctly when class size
4726 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
4728 2003-06-20 Martin Baulig <martin@ximian.com>
4730 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
4733 2003-06-20 Martin Baulig <martin@ximian.com>
4735 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
4737 2003-06-20 Martin Baulig <martin@ximian.com>
4739 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
4740 just distinguish between variables in registers and variables at
4741 an offset relative to a register.
4743 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4745 * icall.c: #ifdef out latest changes until mcs is fixed.
4747 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
4749 * icall.c: return members in metadata order.
4751 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
4753 * icall.c: avoid infinite loop in GetTimeZoneData.
4755 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
4757 * icall.c: added Marshal.Prelink/All icalls.
4759 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
4761 * object.c, object.h: fix warnings and do some overflow checking
4762 when creating arrays.
4764 2003-06-17 Dick Porter <dick@ximian.com>
4767 * file-io.c: File attributes need to be tweaked slightly when
4768 passed from the managed to the w32 world.
4770 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
4771 * profiler.h profiler-private.h profiler.c: Rework last patch
4772 based on suggestion by Paolo.
4774 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
4776 * profiler.h profiler-private.h profiler.c: Added infrastructure for
4777 instruction level coverage data collection.
4778 * profiler.h profiler.c (: Added new callback function which can be
4779 used by the profiler to limit which functions should have coverage
4781 * profiler.c (mono_profiler_load): Call g_module_build_path to
4782 generate the file name of the profiler library.
4784 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
4786 * profiler.c, profiler.h, profiler-private.h: added basic block
4787 coverage profiling API.
4789 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
4791 * reflection.c (mono_reflection_create_runtime_class): Add support
4792 for events in dynamically generated code.
4794 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
4797 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
4799 * icall.c: when getting timezone info, return reasonable values if we
4800 can't get the actual data.
4802 2003-06-14 Dick Porter <dick@ximian.com>
4804 * threads.c (start_wrapper): Remove the reference to the thread
4805 object in the TLS data, so the thread object can be finalized.
4806 This won't be reached if the thread threw an uncaught exception,
4807 so those thread handles will stay referenced :-( (This is due to
4808 missing support for scanning thread-specific data in the Boehm GC
4809 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
4811 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
4813 * reflection.c: ensure streams and tables are first allocated with
4814 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
4816 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
4818 * icall.c: fixed GetElementType for byrefs (bug# 44792).
4820 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
4822 * reflection.c (mono_reflection_create_runtime_class): Add support for
4823 properties to dynamically created classes.
4824 * reflection.c: Fix a few places where non-MonoObjects were inserted
4825 into the tokens hashtable.
4827 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4829 * object.c: some support to handle out of memory exceptions.
4831 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
4833 * marshal.c (mono_marshal_get_native_wrapper): support reference
4836 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
4838 * object.h, object.c: more portability stuff from Bernie Solomon.
4839 Unexport mono_object_allocate(). Added mono_object_unbox ().
4840 Set exitcode when an unhandled exception is thrown.
4842 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
4844 * marshal.c (mono_marshal_get_native_wrapper): use custom
4845 marshaler for return types.
4847 2003-06-10 Dick Porter <dick@ximian.com>
4849 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
4850 ip_mreq is available
4852 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
4854 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
4855 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
4856 by Bernie Solomon <bernard@ugsolutions.com>.
4858 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
4860 * gc.c (mono_gc_init): Avoid error message on shutdown when
4861 GC_DONT_GC=1 is used.
4863 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
4864 New icall to return the GUID of a module.
4866 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
4868 * class.c: ensure instance size always includes the parent's size
4869 even whem class size is set explicitly (fixes bug#44294).
4871 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
4873 * profiler.h, profiler.c: made the simple profiler thread-safe,
4874 get more accurate timing info. Allow the loading of an
4875 externally-developed profiler module.
4877 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
4879 * marshal.c (mono_marshal_get_native_wrapper): improved
4880 class/byref arguments.
4881 (mono_marshal_get_native_wrapper): better string marshaling support.
4883 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
4885 * class.c: ensure .pack and .size are handled correctly and
4886 simplified layout of static fields.
4888 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
4891 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
4893 * loader.c (mono_lookup_pinvoke_call): look for modules in the
4894 current directory (fix bug 44008)
4896 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
4898 * marshal.c (mono_marshal_get_native_wrapper): started support for
4900 (mono_delegate_to_ftnptr): consider marshalling specifications
4902 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
4904 * reflection.c, reflection.h: emit custom marshal info.
4906 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4908 * object.c: free the GError.
4909 * icall.c: added CloseEvent_internal.
4911 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
4914 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
4916 * loader.c (mono_method_get_signature): Add support for dynamic
4919 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
4921 * reflection.c: fixed bug #43905.
4923 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
4925 * class.c, domain.c, icall.c, metadata.h, object.h: support for
4926 handling TypedReference and ArgIterator.
4927 * loader.c, loader.h: added function to get signature at call site.
4929 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4931 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
4932 data readonly. Buglets and warning fixes. Some MethodSpec support.
4934 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
4936 * class.h, class.c, object.c: remove relative numbering support.
4938 2003-05-26 Miguel de Icaza <miguel@ximian.com>
4940 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
4941 free the string, until we get a chance to fix Gtk#
4943 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4945 * marshal.c: revert last patch.
4947 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
4949 * icall.c: updates for new mono_class_vtable() not calling
4950 the type constructor anymore.
4952 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
4954 * object.h, object.c: separate vtable creation from type
4955 initialization. Make running the .cctor thread safe.
4957 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
4959 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
4961 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
4963 * loader.c (mono_get_method): consider calling convention
4965 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
4967 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
4968 to return the invisible global type for a module.
4970 * reflection.c (mono_image_build_metadata): Emit global fields too.
4972 2003-05-20 Peter Williams <peterw@ximian.com>
4974 * loader.c (mono_lookup_internal_call): Add a few newlines.
4976 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
4978 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
4981 * appdomain.c (set_domain_search_path): Recalculate search path when
4982 AppDomainSetup.PrivateBinPath changes.
4984 * object.c (mono_class_compute_gc_descriptor): It turns out some
4985 parts of the class libs (like System.Thread) holds pointers to
4986 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
4987 to treat native int a pointer type here.
4989 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
4991 * appdomain.h, domain.c: add hashtable for jump target resolution.
4993 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
4995 * reflection.h reflection.c icall.c: Added new icalls
4996 GetManifestResourceInfoInternal, GetModulesInternal and support
4999 2003-05-16 Dick Porter <dick@ximian.com>
5003 * file-io.c: Implement System.IO.MonoIO::GetTempPath
5005 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
5007 * object.c: mono_store_remote_field: little fix to previous patch.
5009 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5011 * class.c: add constructors to array classes.
5012 * icall.c: special case array construction for InternalInvoke (),
5014 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
5016 * class.h class.c reflection.c object.c: Added support for field
5017 defaults in dynamically generated classes.
5019 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
5021 * reflection.c: properly encode charset for ddlimport.
5023 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
5025 * threads.c: allow compiling without GC.
5027 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5029 * appdomain.h, object.c, object.h, threads.c, threads.h: added
5030 handling of thread static data.
5032 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5034 * reflection.h, reflection.c: added mono_custom_attrs_free ().
5036 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
5038 * class.c (mono_array_class_get): always set the serializable flags
5039 (mono_array_class_get): always set the SEALED attribute for array types
5041 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
5043 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
5044 attributes (fix for bug 42021).
5046 2003-05-12 Dick Porter <dick@ximian.com>
5048 * gc.c: Don't run finalizers when the finalizer thread is
5049 finishing up, because the default domain has already been
5052 2003-05-11 Miguel de Icaza <miguel@ximian.com>
5054 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
5055 value is null, we should throw an exception. This is slightly
5056 different than the other conventions used for the constructor.
5058 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5060 * socket-io.c: fixed windows build.
5062 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5064 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
5066 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
5068 * object.c (mono_string_new_wrapper): Compatibility fix for MS
5071 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
5073 * class.c (mono_class_layout_fields): Add experimental GC aware
5074 auto layout facility. Requires class library changes to work correctly.
5076 (mono_class_setup_vtable): Avoid overriding explicit interface
5077 method implementations. Fixes iface3.exe test.
5079 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
5081 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
5082 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
5084 * metadata.h: Add new type classification macro which determines
5085 whenever the type holds an object reference.
5087 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
5089 * marshal.c (mono_marshal_get_native_wrapper): cleanups
5091 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
5093 * gc.c (finalizer_thread): Work around a GC bug.
5095 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
5097 * marshal.c (emit_struct_conv): allow unions
5099 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
5101 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
5103 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
5105 2003-05-06 Martin Baulig <martin@ximian.com>
5107 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
5109 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5112 (Select_internal): allow NULLs, don't create arrays if not needed.
5113 Coupled with Socket.cs changes.
5116 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
5117 register a finalizer for it that will close the semaphore handle. This
5118 fixes the leak and make Lupus' test run with > 4080 loops.
5120 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
5122 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
5123 Jerome Laban (bug #42287)
5125 2003-05-02 Martin Baulig <martin@ximian.com>
5127 * debug-mono-symfile.h
5128 (MonoSymbolFile): Moved declaration into mono-debug.h.
5129 (MonoDebugMethodJitInfo): Likewise.
5130 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
5132 (_mono_debug_address_from_il_offset): Take a
5133 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
5136 (MonoDebugDomainData): New struct.
5137 (mono_debug_get_domain_data): New function.
5138 (mono_debug_add_method): Take an additional `MonoDomain *'
5140 (mono_debug_source_location_from_address): Likewise.
5141 (mono_debug_il_offset_from_address): Likewise.
5142 (mono_debug_address_from_il_offset): Likewise.
5144 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
5146 * reflection.c: one more check for null type in custom attrs.
5148 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5150 * reflection.c: avoid warning (comparison is always false due to limited
5151 range of data type).
5153 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5155 * icall.c: throw an exception in Type.GetField if the argument 'name'
5158 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
5160 * reflection.c: fixed handling of enums in named arguments to custom
5161 attributes (bug #42123).
5163 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
5165 * reflection.c: use the right array element type and handle
5166 a null for a Type argument, too.
5168 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
5170 * reflection.c: handle arrays as arguments to custom attributes.
5172 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
5174 * reflection.c: handle a string value in a custom attr
5175 ctor that takes an object.
5177 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
5179 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
5182 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
5184 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
5186 2003-04-27 Martin Baulig <martin@ximian.com>
5188 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
5189 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
5190 MONO_DEBUGGER_EVENT_BREAKPOINT.
5191 (mono_breakpoint_trampoline_code): Removed.
5192 (mono_debugger_event_handler): The last argument is now a
5194 (mono_debugger_insert_breakpoint_full): Removed the
5195 `use_trampoline' argument.
5196 (mono_debugger_method_has_breakpoint): Likewise.
5197 (mono_debugger_trampoline_breakpoint_callback): Renamed to
5198 mono_debugger_breakpoint_callback(); take the method and
5199 breakpoint number as arguments.
5201 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
5203 * metadata.c: fix off by one when loading parameters attributes.
5205 2003-04-24 Martin Baulig <martin@ximian.com>
5207 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
5209 2003-04-24 Martin Baulig <martin@ximian.com>
5211 * mono-debug-debugger.c: Moved all code which interacts with the
5214 * debug-mono-symfile.c: This code now just deals with the symbol
5215 file itself, the debugger code is now in mono-debug-debugger.c.
5217 2003-04-23 Martin Baulig <martin@ximian.com>
5219 * mono-debug.c (mono_debug_source_location_from_il_offset):
5220 New method; like mono_debug_source_location_from_address(), but
5221 takes an IL offset instead of a machine address.
5223 2003-04-23 Martin Baulig <martin@ximian.com>
5225 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
5226 `line' field; this is now computed by the debugger.
5228 2003-04-23 Martin Baulig <martin@ximian.com>
5230 * mono-debug.[ch]: New files. This is the new debugging interface.
5232 * mono-debug-debugger.[ch]: New files. Moved all code which
5233 interacts with the Mono Debugger here.
5235 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
5237 * domain.c (mono_init): initialize mono_defaults.monitor_class
5239 2003-04-21 Miguel de Icaza <miguel@ximian.com>
5241 * reflection.c (method_encode_code): Add a spicy exception to help
5242 future compiler authors.
5244 2003-04-21 Martin Baulig <martin@ximian.com>
5247 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
5248 Make this work with relative pathnames; g_filename_to_uri() needs
5249 an absolute filename.
5251 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
5253 * icall.c: Track name changes in Object and ValueType.
5255 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
5257 * metadata.c (mono_type_stack_size): size should be a multiple of
5260 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5263 (internal_domain_finalize): moved into mono_domain_finalize. No need
5264 to create another thread because the finalizers will be run in the
5267 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
5268 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
5269 to be run (MS does this too).
5271 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
5273 * object.c (mono_class_compute_gc_descriptor): Update comment.
5275 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
5277 * image.h: Add synchronized wrapper cache.
5279 * image.c (do_mono_image_open): Initialize cache.
5281 * reflection.c (create_dynamic_mono_image): Initialize cache.
5283 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5285 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
5286 ves_icall_System_Buffer_ByteLengthInternal.
5288 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5290 * reflection.c: setup klass->nested_in earlier. Allow
5291 a dash in the assembly name.
5293 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
5295 * metadata.c (mono_type_to_unmanaged): dont access
5296 type->data.klass for MONO_TYPE_OBJECT
5297 (mono_type_to_unmanaged): consider System.Delegate class
5299 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
5301 * class.c: just setup supertypes in the proper place instead of
5302 initializing the full element class for arrays.
5304 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
5306 * class.c: ensure the element class of arrays is initialized.
5307 Setup the supertype info for array classes, too.
5309 2003-04-14 Miguel de Icaza <miguel@ximian.com>
5311 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
5313 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5315 * Makefile.am: re-added -m option when running cygpath. This way,
5316 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
5318 * mono-config.c: same codepath for locating mono config file for WIN32
5320 * assembly.c: if mono_assembly_setrootdir is called, don't override
5323 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5325 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
5326 MONO_ASSEMBLIES variable.
5328 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
5330 * icall.c: added Assembly::GetNamespaces() icall.
5332 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5334 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
5336 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
5338 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
5339 * object.c: fixed bug in the construction of vtable for proxies
5341 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
5343 * object.c (mono_array_new): Mark mono_array_new as an icall.
5345 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5347 * class.c: fixed test for public method when overriding interfaces.
5350 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
5352 * appdomain.h, domain.c: added mono_domain_foreach() to
5353 be able to access the currently loaded appdomains.
5354 * object.c: make string interning work across sppdomains.
5355 Mark some functions for use as icalls.
5357 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
5359 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
5361 * reflection.h reflection.c: Allocate long living data using
5362 GC_MALLOC_ATOMIC so the collector does not need to scan it.
5364 * reflection.c: Double the allocation size in streams instead of
5365 increasing it, to prevent unneccesary copying on large assemblies.
5367 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
5368 creation if the assembly does not have the Run flag set.
5370 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
5372 * class.h: avoid the C++ keywords in header files (Jerome Laban
5373 spotted and fixed this).
5375 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5378 (mono_unhandled_exception): fill in the arguments for the
5379 UnhandledException event. Only trigger that event for the default
5380 domain (as MS does).
5382 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
5384 * object.c: Improve typed allocation stuff based on suggestions from
5385 Paolo. Also turn it on if the GC library supports it.
5387 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
5389 * object.c object.h class.h: Added experimental typed allocation
5390 facility using the interfaces in gc_gcj.h.
5392 * os/gc_wrapper.h: Added new include files.
5394 2003-04-03 Martin Baulig <martin@ximian.com>
5396 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
5397 which is not yet enabled by default.
5399 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
5401 (mono_gc_lock, mono_gc_unlock): New static functions.
5403 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
5404 functions; stop/start the world for the garbage collector. This
5405 is using the windows API; we need to complete the SuspendThread()/
5406 ResumeThread() implementation in the io-layer to make this work on Unix.
5407 (mono_gc_push_all_stacks): New public function; tells the garbage
5408 collector about the stack pointers from all managed threads.
5410 2003-04-03 Martin Baulig <martin@ximian.com>
5412 * object.h (MonoThread): Added `gpointer stack_ptr'.
5414 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
5416 2003-04-03 Martin Baulig <martin@ximian.com>
5418 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
5420 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
5422 * reflection.c (typebuilder_setup_fields): Initialize field.first and
5425 2003-04-02 Miguel de Icaza <miguel@ximian.com>
5427 * loader.c (mono_lookup_internal_call): Report the corlib that is
5430 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
5432 * icall.c (ves_icall_type_GetTypeCode): fixed check for
5433 System.DBNull (it's class not valuetype).
5435 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
5437 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
5438 if the array method was already assigned a token (fixes bug#40646).
5440 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
5442 * reflection.c (mono_reflection_get_type): Attempt type resolve even
5443 if no assembly is given.
5445 2003-04-01 Miguel de Icaza <miguel@ximian.com>
5447 * metadata.h: Added the new tables.
5449 * row-indexes.h: Added definitions for new tables.
5451 * metadata.c: Add schemas for new tables, and add support for
5452 computing the sizes of them.
5454 * class.c: Update for handling the new type cases.
5456 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
5458 * metadata.h (MONO_TYPE_IS_VOID): new macro
5460 2003-03-31 Martin Baulig <martin@ximian.com>
5462 * threads.h (MonoThreadCallbacks): Added `thread_created'.
5464 * threads.c (mono_thread_new_init): Call `thread_created' in the
5465 mono_thread_callbacks.
5467 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
5469 * loader.h: added marshalbyrefobject_class to mono_defaults
5470 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
5471 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
5472 generation of output parameters.
5473 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
5474 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
5475 contextbound and the target object belongs to the context of the caller.
5476 * object.h: added context and unwrapped_server variables in MonoRealProxy.
5477 * object.c: Implemented support for interfaces and abstract classes
5478 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
5479 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
5481 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
5483 * class.h class.c (mono_class_is_subclass_of): New function.
5485 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
5486 routines for most common case (calls from ArrayList::ToArray).
5488 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
5489 routine so programs which call Environment::Exit() can be profiled.
5491 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
5492 Added MONO_ARCH_SAVE_REGS.
5494 * icall.c (ves_icall_type_is_subtype_of): Use new function.
5496 2003-03-29 Miguel de Icaza <miguel@ximian.com>
5498 * blob.h: Add a couple of new MonoType types definitions.
5500 * tabledefs.h: Add a couple of new call convs.
5502 2003-03-27 Zoltan Varga <vargaz@freemail.h>
5504 * reflection.h (MonoReflectionDynamicAssembly): track changes in
5505 the layout of the class.
5507 * reflection.c (alloc_table): double the size on overflow to avoid
5508 unnecessary copying.
5510 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
5511 avoid filling out metadata tables and blobs. Also set mb->ilgen to
5512 null so it can be garbage collected.
5514 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
5516 * reflection.c (mono_reflection_get_type): Return the resolved type
5517 only if it is in the assembly we searched.
5519 * reflection.c (ensure_runtime_vtable): Initialize method slots.
5521 * class.c (mono_class_setup_vtable): Set the slot of the overriding
5524 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5527 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
5528 the right one is 'file:///blah', but MS allows it.
5530 (mono_assembly_open): allow 'file://blah'
5532 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
5534 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
5536 * socket-io.c: fixes bug #40310.
5538 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
5540 * reflection.c (mono_reflection_parse_type): handle deeply nested
5543 * reflection.c (mono_image_create_token): Use unique token values
5544 since they will be put into a hash table.
5546 * class.c (mono_class_setup_vtable): If a method occurs in more than
5547 one place in the vtable, and it gets overriden, then change the
5548 other occurances too.
5550 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
5551 object as return type.
5553 2003-03-22 Pedro MartÃnez Juliá <yoros@wanadoo.es>
5555 * icall.c: Deleted "ToString" implementation for double and float
5556 because they are full implemented in managed code.
5558 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
5560 * reflection.c, reflection.h: implemented and exported functions
5561 to retrieve info about custom attributes.
5563 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5565 * appdomain.c: moved Uri handling to assembly.c
5566 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
5567 work when using a file Uri in *nix and windows.
5569 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
5570 GetReferencedAssemblies.
5572 2003-03-18 Dick Porter <dick@ximian.com>
5574 * icall.c: Rename a couple of internal calls
5576 * threads.c: Set the thread state to Stopped when a thread exits.
5579 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
5581 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
5584 * object.c (mono_class_vtable): fix warning.
5586 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
5588 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
5590 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
5592 (method_encode_clauses): Create exception info structures in the right
5594 (mono_reflection_setup_internal_class): Initialize supertypes field.
5596 * class.c object.c: Handle interfaces which implement other interfaces
5599 * class.h class.c: Move the supertypes array initialization code into
5600 a separate function so it can be used for dynamic types too. Also call
5601 it earlier, in mono_class_init(), since it can be used before the
5602 type is initialized.
5604 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5608 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
5613 * object.c: remove warnings.
5615 2003-03-13 Martin Baulig <martin@ximian.com>
5617 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
5618 (MonoDebugLexicalBlockEntry): New types.
5620 * debug-mono-symfile.c
5621 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
5623 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5625 * process.c: ret can be any non-zero value accroding to MS doc.
5627 2003-03-07 Miguel de Icaza <miguel@ximian.com>
5629 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
5630 fixing a warning for a miss-used prototype, would have cause
5631 random memory corruption.
5633 2003-03-07 Martin Baulig <martin@ximian.com>
5635 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
5636 getting really annoying ....
5638 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
5640 * reflection.c (fixup_method): added support for array methods.
5642 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
5644 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
5645 (pointed out by Michael Adams).
5647 2003-03-04 Dick Porter <dick@ximian.com>
5649 * icall.c: Temporarily reverted the Double and Single ToString()
5650 change, because it broke nunit.
5652 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
5654 * object.h, threads.h: make include files compatible with C++
5655 (patch by Jerome Laban <jlaban@wanadoo.fr>).
5657 2003-03-04 Pedro MartÃnez Juliá <yoros@wanadoo.es>
5659 * icall.c: Erased ToString helper functions for Double and Single.
5660 Now, that implementations ar all in managed code (Double and Single
5663 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
5665 * appdomain.c: Added method for initializing the default context of
5666 a domain. Added internal call for getting the default context.
5667 * appdomain.h: Added context variable in MonoDomain struct.
5668 * domain.c: mono_domain_set also sets the default context of the domain
5669 * icall.c: Mapped internal method InternalGetDefaultContext.
5670 * object.c: mono_object_get_virtual_method returns always a remoting
5671 wrapper if the object is a transparent proxy.
5672 mono_runtime_invoke_array: when creating an object by calling the
5673 constructor, if the created object is a proxy, then the constructor should
5674 be called using the a remoting wrapper.
5676 2003-03-03 Dick Porter <dick@ximian.com>
5678 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
5679 variable so it compiles on solaris. Problem spotted by
5680 Christopher Taylor <ct@cs.clemson.edu>
5682 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5685 (get_info_from_assembly_name): don't leak value.
5688 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
5691 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
5693 * assembly.c: export mono_image_load_references ().
5694 * class.c: handle function pointers. mono_class_from_name() now
5695 supports nested type names directly.
5697 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
5699 * reflection.h reflection.c: Encode already created dynamic methods
5700 and fields correctly as a DEF instead of a REF.
5702 * reflection.c: Get rid of the force_ref argument to
5703 mono_image_typedef_or_ref since it was wrong in the first place.
5705 * string-icalls.c: add error checking to string constructors according
5708 * reflection.c: Emit types in the order their TypeBuilders were
5709 created. Previously, a new table index was assigned to each type before
5710 the tables were emitted. This was wrong because the signature blob
5711 might already refer to a type by its original table index.
5713 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
5715 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
5718 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5720 * Makefile.am: make assemblies dir have \ instead of / on windows.
5722 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
5724 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
5725 iterate over the NESTEDCLASS table using a linear search since the
5726 table is not guaranteed to be sorted by the secondary key.
5728 * class.c (mono_class_create_from_typedef): fixed up call to
5729 mono_metadata_nesting_typedef.
5731 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
5733 * marshal.c (mono_string_to_byvalstr): clear the memory as
5734 suggested by Jerome Laban <jlaban@wanadoo.fr>
5736 2003-02-26 Dick Porter <dick@ximian.com>
5738 * process.c: Cope with padding in .rsrc blocks
5740 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
5742 * metadata.h: reverted the filter_len change, it breaks reflection
5744 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
5746 * metadata.h: added a new field to store the filter_len
5749 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
5751 * reflection.c: handle custom attributes for types and members
5752 created with Reflection.Emit (bug#38422).
5754 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
5756 * reflection.c: define RTSpecialName automatically for constructors for
5757 compatibility with MS.NET.
5759 * reflection.c (mono_reflection_create_runtime_class): initialize
5760 nested_in field of dynamically created classes.
5762 2003-02-22 Martin Baulig <martin@ximian.com>
5764 * debug-mono-symfile.h: Incremented version number.
5766 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
5768 * object.h icall.c process.c: fix warnings.
5770 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
5772 * appdomain.h appdomain.c:
5773 (mono_domain_try_type_resolve): split the
5774 name_or_tb argument into a name and a tb argument.
5775 (mono_domain_has_type_resolve): new function to check whenever the
5776 application has registered a TypeResolve event handler.
5778 * icall.c reflection.h reflection.c: move the type resolve logic into
5779 mono_reflection_get_type () so it will be invoked when
5780 Assembly::GetType () is called.
5783 (mono_reflection_get_type): renamed to get_type_internal.
5784 (mono_reflection_get_type): fixed type name generation so it works
5785 for nested types too.
5786 (mono_reflection_get_type): call has_type_resolve () to avoid the
5787 costly type name generation if there is no resolve event handler.
5789 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
5791 * class.c, image.c: load exported types from file references.
5793 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
5795 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
5796 used to cache the managed methods used to create proxies and make
5797 remote invocation of methods.
5798 * class.h: Added in MonoVTable a flag to indicate that a class needs
5799 to be remotely created.
5800 * object.c: Modified the method mono_class_vtable(). It now initializes
5801 the remote flag of the vtable. Modified mono_object_new_specific(),
5802 so now it checks the remote flag.
5803 * icall.c: Added a couple of internal methods, one for enabling instance
5804 creation interception for a type, and one for creating objects bypassing
5807 2003-02-18 Martin Baulig <martin@ximian.com>
5809 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
5810 New interncall to get a method's metadata token.
5812 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
5813 New interncall for the debugger.
5815 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
5817 * class.c (mono_class_setup_vtable): allocate supertype array
5819 2003-02-18 Martin Baulig <martin@ximian.com>
5821 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
5823 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5826 (assembly_name_to_aname): jump over unknown properties (i've found
5827 something like: 'type, assembly, version=xxx, custom=null, public...',
5828 so now will ignore custom=null and still get the rest of the values).
5830 2003-02-17 Dick Porter <dick@ximian.com>
5832 * threads.c: Have Thread.Start() wait for a semaphore to signal
5833 that the thread has set up all its local data. This fixes bug
5834 34323, where Abort() raced the new thread's TLS data.
5836 Also removes the handle_store() call from start_wrapper, because
5837 threads are now always created suspended and there is no longer a
5838 race between the parent and child threads to store the info.
5840 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
5842 * image.c: explain the #- heap issue in a message, hopefully
5843 avoiding FAQs on mono-list.
5845 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5848 (GetEntryAssembly): if the domain has not invoked
5849 AppDomain.ExecuteAssembly yet, return the assembly of the default
5852 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
5854 * class.c (mono_ldtoken): make it work in dynamic assemblies.
5856 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
5858 * metadata.c, reflection.c: simple speedup to type hash
5861 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
5863 * image.c, image.h, class.c, assembly.c: move module loading
5864 to MonoImage. When loading metadata, consider alignemnet from
5865 the start of metadata, not from the metadata address in memory.
5867 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
5869 * reflection.c (mono_reflection_get_custom_attrs): Added support for
5870 AssemblyBuilder objects. Factored out custom attribute creation into
5871 a separate function.
5872 (create_custom_attr): new function to create custom attributes.
5874 2003-02-12 Miguel de Icaza <miguel@ximian.com>
5876 * Makefile.am: Got tired of typing the full pathname to pedump.
5877 Until there is another option, am installing this.
5879 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
5881 * class.c (class_compute_field_layout): always set field->parent
5882 (mono_ldtoken): use mono_defaults.fieldhandle_class;
5884 2003-02-11 Dick Porter <dick@ximian.com>
5887 * monitor.c: Rewrote Monitor, making lock much faster and
5888 Pulse/Wait work as specified. Also uses much fewer handles, and only
5889 creates them as needed.
5891 * exception.c: Added SynchronizationLockException
5893 * threads.c: Deleted old Monitor implementation. The new one is
5896 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
5898 * class.c: handled TypedReference type code. Set the correct size for
5899 class data. Setup interface_offsets for interface classes, too.
5901 2003-02-09 Martin Baulig <martin@ximian.com>
5903 * debug-mono-symfile.h: Reflect latest symbol writer changes.
5905 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
5907 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
5908 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
5909 * object.c: fixed mono_object_get_virtual_method () for interfaces.
5910 * verify.c: check for code that runs after the end of the method.
5912 2003-02-08 Pedro MartÃnez Juliá <yoros@wanadoo.es>
5914 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
5915 "System.Math::Round2".
5916 * sysmath.h: Added Floor, Round and Round2 definitions.
5917 * sysmath.c: Modified certain functions that were not 100% compliant
5918 with MS.NET (math precision) and added the implementation of Floor,
5921 2003-02-07 Martin Baulig <martin@ximian.com>
5923 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
5925 2003-02-07 Martin Baulig <martin@ximian.com>
5927 * debug-mono-symfile.c: Reflected latest symwriter changes.
5928 (mono_debug_create_mono_symbol_file): Removed.
5929 (mono_debug_open_mono_symbol_file): Take an argument which
5930 specifies whether to create a dynamic symbol file.
5932 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
5934 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
5936 2003-02-05 Martin Baulig <martin@ximian.com>
5938 * reflection.c (mono_image_build_metadata): Make this public,
5939 protect it against being called multiple times, don't create
5940 resources and don't build the compressed metadata here.
5941 (mono_image_create_pefile): Do this here.
5944 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
5946 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5948 * socket-io.c: fixed bug #36322.
5950 2003-02-06 Piers Haken <piersh@friskit.com>
5954 * debug-mono-symfile.c:
5960 * socket-io.c: warning cleanups
5962 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
5964 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
5965 function. works like remoting invoke, but does a check for the Proxy first.
5967 2003-02-05 Miguel de Icaza <miguel@ximian.com>
5969 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
5971 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
5973 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
5975 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
5976 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
5978 * object.c (mono_store_remote_field_new): used by the new jit
5979 instead of mono_store_remote_field
5980 (mono_load_remote_field_new): used by the new jit
5981 instead of mono_load_remote_field
5983 2003-02-05 Patrik Torstensson
5985 * appdomain.c: changed unload to take the domain id instead
5988 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
5991 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5993 * appdomain.c: don't look for assemblies in ApplicationBase if
5994 PrivateBinPathProbe is set.
5996 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5998 * object.c: make the first argument in main_args contain the absolute
5999 path to the assembly. Fixes bug #37511.
6001 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6003 * icall.c: get correct UTC offset for countries not using daylight
6004 time saving. Fixes bug #30030.
6006 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6008 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
6009 and 1 are the family).
6011 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
6013 * icall.c (ves_icall_InternalExecute): removed wrong assertion
6015 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
6017 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
6019 * reflection.c: added support for SignatureHelper tokens, which is
6020 needed by the Calli opcode.
6022 * reflection.h: track changes to SignatureHelper class.
6024 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
6026 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6028 * appdomain.c: fixed loading assemblies from PrivateBinPath.
6030 2003-02-03 Patrik Torstensson
6031 * appdomain.[c|h], domain.c :
6032 - Added support for getting a domain via domain id
6033 - Support for setting and getting domain from System.AppDomain
6034 (used in cross appdomain channel)
6035 - Added support for get/set for a MonoAppContext on a thread
6036 (Context class in System.Runtime.Remoting.Contexts),
6037 - Removed hack in Get/SetData and ExecuteAssembly.
6039 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
6040 the managed world to get control when a proxy is created.
6042 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
6044 2003-02-03 Miguel de Icaza <miguel@ximian.com>
6047 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6048 Populate the codebase field as well.
6050 2003-02-02 Martin Baulig <martin@ximian.com>
6052 * debug-mono-symfile.c
6053 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
6054 (mono_debug_symfile_add_method): Allow interncalls.
6056 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6058 * icall.c: throw parse exception if strtod fails or the string is empty.
6060 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
6062 * marshal.c: handle object type separately from defined
6065 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
6067 * marshal.c: handle NATIVE_LPSTR for strings when it's
6068 explicitly specified.
6070 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
6072 * reflection.c, reflection.h, icall.c: setup the reflection
6073 handle cache for ModuleBuilders and AssemblyBuilders.
6075 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
6077 * reflection.c (reflection_methodbuilder_to_mono_method): set
6080 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6082 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
6084 2003-01-29 Dick Porter <dick@ximian.com>
6086 * threads.c: No need for the fake_thread kludge now that Thread
6087 doesn't run a class constructor
6089 2003-01-29 Dick Porter <dick@ximian.com>
6091 * threads.c: Use g_direct_hash instead of the rather bogus
6094 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
6096 * marshal.c (mono_marshal_get_native_wrapper): add check for null
6098 (mono_marshal_get_struct_to_ptr): generate valid IL code
6099 (mono_marshal_get_ptr_to_struct): generate valid IL code
6100 (*): correctly set sig->pinvoke, we need to memdup the signature
6103 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6105 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
6106 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
6108 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
6110 * profiler.c: provide more callers information.
6112 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
6114 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
6116 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
6118 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
6120 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6122 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
6123 exception instead of going into an infinite loop on dates which it
6126 * string-icalls.c (ves_icall_System_String_get_Chars): raise
6127 out-of-range exception if needed.
6129 * class.c (mono_class_setup_vtable): allow a virtual method to provide
6130 an implementation for an interface method and to override an inherited
6131 method at the same time.
6132 Imagine a scenario when a virtual method is used to override a
6133 virtual abstract method in a parent class, and this same method
6134 provides an implementation for an method inherited from an interface.
6135 In this case, the interface resolution code will set im->slot, which
6136 means that the virtual method override pass will skip this method
6137 which means a pointer to the abstract method inherited from the parent
6138 will remain in the vtable of this non-abstract class.
6140 * class.c: (mono_class_setup_vtable): continue search for a real
6141 method if only an abstract method is found.
6143 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
6145 * reflection.c: add size to encoding for ByValStr and ByValArray
6146 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
6148 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6150 * class.c (mono_class_setup_vtable): pass the override info as an
6153 * class.c (mono_class_setup_vtable): set the slot of overriding methods
6156 * reflection.c (ensure_runtime_vtable); add support for method
6159 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6161 * reflection.c (resolution_scope_from_image): Hack to work to work with
6164 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
6165 added a 'force_ref' argument to force this function to allways return
6166 a TypeRef. This is needed by mono_image_get_memberref_token ().
6168 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6170 * reflection.c (mono_image_get_type_info): interfaces really don't have
6173 * reflection.c (mono_image_basic_init): fill out missing fields of
6176 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
6177 dynamic assemblies. This is required so dynamic assemblies show up in
6178 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
6179 Type::GetType() etc. This is consistent with MS behaviour.
6181 * image.c image.h reflection.c: add newly created classes to the name
6182 cache so mono_class_get () will find them.
6184 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6186 First part of changes to get IKVM.NET running under mono.
6188 * appdomain.h, appdomain.c: added new function
6189 mono_domain_try_type_resolve() which will emit TypeResolve events.
6190 This function will call AppDomain::DoTypeResolve to do the actual work.
6192 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
6193 moved existing code dealing with dynamic tokens to a new function
6194 called mono_reflection_lookup_dynamic_token (). This function will
6195 raise TypeResolve events when appropriate. Since reflection.c is not
6196 part of libmetadata, a new hook function called
6197 mono_lookup_dynamic_token() is added to class.c which will call this.
6199 * assembly.h assembly.c: make the invoke_load_hook function public,
6200 so it can be called for dynamic assemblies.
6202 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
6204 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
6207 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
6208 MonoGHashTable, since it contains pointers to objects which the GC
6211 * assembly.c (search_loaded): remove unused variable.
6213 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
6215 * object.c: fixed issue exposed by gcc-generated IL programs
6216 that use RVA data for pointers.
6218 2003-01-25 Martin Baulig <martin@ximian.com>
6220 * threads.c (start_wrapper): Moved the initialization of
6221 `start_func' above the mono_new_thread_init() call to which we
6222 pass it as argument.
6224 2003-01-24 Martin Baulig <martin@ximian.com>
6226 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
6227 the MonoThread pointer.
6229 2003-01-21 Miguel de Icaza <miguel@ximian.com>
6231 * icall.c: Rename `PowImpl' to Pow.
6233 2003-01-23 Dick Porter <dick@ximian.com>
6235 * threads.c (start_wrapper): Create a Thread object if needed, so
6236 the Main() thread can do the class initialisation in a subthread
6237 that has been set up to allow managed code execution.
6239 Pass the thread ID instead of the MonoThread pointer to the thread
6240 start and attach callbacks. This change is required, because the
6241 jit thread start callback must be called _before_ the Thread
6242 object can be created.
6244 (mono_thread_init): Removed much object creation code that is no
6245 longer needed. No managed code is called from here now.
6247 * object.c (mono_runtime_exec_managed_code): Create a subthread
6248 for Main, and call back to the runtime to use it.
6249 Set the exit code when Main exits.
6251 * gc.c: Make sure domain finalisation happens in a subthread.
6252 Re-enable threaded GC, fixing bug 31333 (again).
6254 * environment.c: System.Environment internall calls (so far just
6255 ExitCode is here, the others are still in icall.c)
6257 * appdomain.c (mono_runtime_cleanup): All threads running managed
6258 code should have finished before mono_runtime_cleanup() is
6259 reached, so no need to clean up threads.
6261 2003-01-22 Martin Baulig <martin@ximian.com>
6263 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
6264 `gpointer func' arguments.
6265 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
6266 but added `MonoThread *thread' argument.
6267 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
6269 * threads.c (mono_new_thread_init): Added `gpointer func' argument
6270 and pass it to the mono_thread_start_cb callback.
6271 (mono_install_thread_callbacks): New public function to install a
6272 set of callbacks which are set by the debugger.
6273 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
6275 2003-01-22 Martin Baulig <martin@ximian.com>
6277 * Makefile.am: Install debug-mono-symfile.h.
6279 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
6281 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
6283 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
6285 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
6286 * class.c (mono_ptr_class_get): correctly set access levels of pointers
6287 (mono_array_class_get): correctly set access levels of arrays
6289 2003-01-20 Patrik Torstensson
6290 * image.h (MonoAssemblyName): changed major, minor, build, revision
6291 from signed to unsigned.
6293 2003-01-20 sean kasun <skasun@azstarnet.com>
6295 * reflection.c (load_cattr_value): Now this handles
6296 MONO_TYPE_SZARRAY. Fixes bug #35629
6298 2003-01-20 Miguel de Icaza <miguel@ximian.com>
6300 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
6303 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6305 * decimal.c: fixed bug #26056.
6307 2003-01-17 Martin Baulig <martin@ximian.com>
6309 * gc.c: Raise an ExecutionEngineException instead of using g_error().
6311 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6314 (mono_get_exception_type_initialization): new function.
6316 * object.c: throw a TypeInitializationException when an exception is
6317 thrown invoking the class constructor.
6319 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6321 * reflection.c: fixed attribute reading.
6323 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6326 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
6327 provided, look for the type in the calling assembly and then in
6328 mscorlib; if the assembly name is provided, only try that one.
6330 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
6332 * object.c: register the vtable before there is a chance it's
6333 queried again recursively.
6335 2003-01-13 Duncan Mak <duncan@ximian.com>
6337 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
6340 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
6342 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
6344 2003-01-11 Martin Baulig <martin@ximian.com>
6346 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
6347 this to 20 for the release.
6349 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
6351 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
6353 * loader.c (mono_method_get_marshal_info): bug fix
6355 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
6356 structures with explicit layout
6358 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
6360 * profiler.c: made the output more readable (and sorted).
6361 Added caller information for the allocation profiler.
6363 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
6365 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
6367 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6369 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
6372 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
6374 * object.c, profiler.h, profiler.c, profiler-private.h:
6375 Added object allocation profiler.
6377 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
6379 * reflection.h, reflection.c: handle global methods.
6380 Compress blob entries.
6382 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
6384 * marshal.c: fix compilation.
6386 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
6388 * loader.c (mono_method_get_marshal_info): impl.
6390 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
6392 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6394 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
6395 for reference types.
6397 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
6399 * loader.c: fixed off by one error in loaded parameter names.
6401 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
6403 * marshal.c (mono_marshal_get_icall_wrapper): like
6404 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
6405 instead of a MonoMethod.
6407 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6409 * decimal.c: fixed bug #36537.
6411 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
6413 * marshal.c: throw a missing method exception if a
6414 P/Invoke method is not found.
6416 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
6418 * icall.c: allow a null this for constructors.
6420 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
6422 * icall.c: raise the proper exceptions if the arguments to the
6423 internal Invoke are incorrect.
6425 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
6427 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
6429 2003-01-03 Martin Baulig <martin@ximian.com>
6431 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
6433 2002-12-31 Martin Baulig <martin@ximian.com>
6435 * debug-mono-symfile.c: Completely rewrote the type section.
6436 Instead of using individual malloc()ed fields, we use one big
6437 continuous memory area and offsets into this area.
6438 See the comments in the source code for details.
6440 2002-12-30 Martin Baulig <martin@ximian.com>
6442 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
6444 2002-12-30 Martin Baulig <martin@ximian.com>
6446 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
6447 line number table in this data blob instead of using an external
6450 2002-12-28 Martin Baulig <martin@ximian.com>
6452 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
6454 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
6456 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
6457 as a boxed return type.
6459 2002-12-21 Miguel de Icaza <miguel@ximian.com>
6462 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
6463 g_build_filename to properly get separators on the filename created.
6465 * object.h: Small change, introduce MonoMarshalByRefObject to
6466 track the layout of that structure in the C# universe as we make
6469 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
6471 * object.c: removed assert to allow static fields on interfaces.
6472 * loader.c: a TypeSpec may be used for any type, not just arrays.
6474 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
6476 * class.c, class.h: added mono_class_array_element_size ().
6477 Ignore static methods in interfaces.
6479 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6481 * threads.c: fixed the build under cygwin.
6483 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
6485 * reflection.c: handle nullref constants. Allocate keys for
6486 reflection handles with the GC.
6488 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
6490 * threads.c, threads.h: added mono_thread_get_abort_signal()
6491 to get a suitable signal for thread abort.
6493 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
6495 * metadata.c: fix handling of ExportedType table.
6497 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6499 * icall.c: added WriteWindowsDebugString internal call.
6501 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6503 * reflection.h: added fields to match C# implementation.
6505 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6507 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
6509 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
6511 * gc.h, gc-internal.h: Rename header for GC internal calls to
6512 gc-internal.h from gc.h as to not clash with Boehm GC having its
6513 header installed as <gc.h> in outside include paths.
6514 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
6515 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
6517 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6519 * icall.c: assign minor, build and revision in FillName.
6521 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
6523 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
6524 Added support for running code generated by Reflection.Emit.
6526 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6528 * appdomain.c: check for NULL argument in LoadFrom.
6530 2002-12-10 Dick Porter <dick@ximian.com>
6532 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
6534 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6536 * appdomain.c: fix buglet when building exe file name. Handle full
6537 assembly name (needed after latest changes to AssemblyName).
6539 (mono_image_close): free some hashtables.
6541 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
6543 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
6544 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
6545 on some systems (redhat 7.3)
6547 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
6549 * threads.c: delete the critical section of a sync block,
6550 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
6552 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
6554 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
6556 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6558 * appdomain.[ch]: handle the assembly preload event to try loading the
6559 assemblies using the paths we have in the current domain.
6561 * assembly.[ch]: created an assembly preload hook that is called to try
6562 loading the assembly by other means that the ones provided here.
6564 * domain.c: initialize the domain search path.
6566 From now on, assemblies (TODO: except corlib and System) are loaded
6567 according to these rules when using mono_assembly_load ():
6569 1. It tries to load the assembly from the ApplicationBase
6570 of the current domain appending .dll and .exe (TODO: have to
6571 try loading from name/name.dll and name/name.exe).
6573 2. It tries the search path specified in PrivateBinPath for the
6574 current domain (if any).
6576 3. Previous behavior.
6578 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
6580 * icall.c: implemented GetInterfaceMap() related icall.
6581 * domain.c, loader.h: load MethodInfo in mono_defaults.
6583 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
6585 * gc.c: disable the finalizer thread for now, untill all the issues
6586 with it are resolved.
6588 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
6590 * string-icalls.c: handle embedded nulls in string ctor when the
6591 length is specified.
6593 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
6595 * class.c: look for explicit interface implementation in parent
6598 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
6600 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
6602 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
6604 * gc.c: protect handles with a critical section.
6606 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6609 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
6610 parameters. If no assembly specified, try getting the type from all
6611 the assemblies in the current domain, else, load the assembly and get
6614 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6616 * marshal.c: applied patch from Aleksey Demakov that fixes
6617 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
6619 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6621 * icall.c: fixed get_location.
6623 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
6625 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
6626 declarations to make it work with older gcc.
6628 * loader.c (mono_get_method): set signature->pinvoke for native calls
6630 2002-11-20 Dick Porter <dick@ximian.com>
6632 * threads.c (mono_thread_init): Set the main thread's handle
6634 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
6636 * gc.c: allow compilation without GC support. Changed to match the
6639 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
6641 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
6643 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
6645 * reflection.c: set a public key token on the core assemblies.
6647 2002-11-18 Dick Porter <dick@ximian.com>
6649 * threads.c: Split out some thread initialisation so that other
6650 files can set the start callback function.
6652 * gc.c: Run finalisers in a separate thread, to avoid stack
6653 overflow. Fixes bug 31333.
6655 * appdomain.c: Set up GC finalisation thread.
6659 * domain.c: Use gc.h macros for GC_malloc
6661 2002-11-15 Dick Porter <dick@ximian.com>
6665 * appdomain.c: Removed mono_runtime_init_with_attach(),
6666 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
6667 merging the extra parameter with the existing function. Removed
6668 unneeded code in mono_thread_attach().
6670 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
6672 * image.c (mono_image_loaded_by_guid): a method to get loaded
6674 (load_metadata_ptrs): we store the guid as string.
6676 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
6678 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
6680 * metadata.c (mono_guid_to_string): imported method form Zoltan
6681 Varga (slightly modified)
6683 * assembly.c (mono_assembly_open): load precompiled code
6685 * loader.h (MonoMethod): we store the method token for use in the
6688 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6690 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
6691 the hook function called when an assembly is loaded.
6693 * domain.c: Modified file.
6694 (mono_domain_assembly_load): removed hash table insertion of assemblies.
6698 2002-11-07 Miguel de Icaza <miguel@ximian.com>
6700 * reflection.c: Map PEFileKind to the value expected by the WinNT
6703 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6705 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
6706 Read until the buffer is filled completely.
6708 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6710 * icall.c: implemented MonoType.InternalGetEvent ().
6712 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6714 * appdomain.c: implemented InitAppDomainSetup. Delayed
6715 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
6718 * assembly.c: base_dir is now an absolute path ending with
6721 * icall.c: modified get_location according to the above changes.
6723 * object.c: init AppDomain.SetupInformation for the default domain after
6724 we have the entry assembly.
6726 * domain.c: when unloading a domain, setup = NULL.
6728 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
6730 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
6732 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
6734 * object.h, object.c: introduced mono_object_get_virtual_method ()
6735 to lookup the method invoked on an object when a callvirt is done on
6737 * icall.c: make MethodInfo::Invoke() always do a virtual call.
6739 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6741 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
6742 current domain when loaded an assembly and failed to load it.
6744 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
6746 2002-10-31 Dick Porter <dick@ximian.com>
6750 * file-io.c: Return the error status in a parameter, as the
6751 GetLastError() value has long since been blown away if we try and
6752 look it up in a subsequent internal call invocation. Delete the
6753 GetLastError() internal call, because it's useless.
6755 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
6757 * class.[ch]: added cast_class to fix bug 29517
6759 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
6761 * marshal.c: create valid IL code in the filter clause:
6762 the new JIT is less forgiving:-)
6764 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6766 * icall.c: removed get_property internal call.
6768 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
6770 * appdomain.h domain.c: Added an ID to appdomains.
6772 * threads.c threads.h icall.c: Implement icall
6773 Thread:GetDomainID(), and remove unused icall
6774 CurrentThreadDomain_internal.
6776 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6778 * icall.c: Don't recurse through the base types in GetConstructor.
6781 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
6783 * mempool.h, mempool.c: added mono_mempool_empty() and
6784 mono_mempool_stats().
6786 2002-10-23 Dick Porter <dick@ximian.com>
6790 * icall.c: Added MonoIO.GetFileType internal call
6792 2002-10-17 Dick Porter <dick@ximian.com>
6794 * appdomain.c (mono_runtime_cleanup): Don't signal the async
6795 delegate semaphore before waiting for all threads to finish,
6796 because new threads can also call async delegates. Fixes bug
6799 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
6800 of 3 seconds, in case another async job is queued. (This part is
6801 needed because the bug fix reintroduced the 3s exit lag.) This
6802 makes the mono_runtime_shutdown flag superfluous.
6804 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
6806 * reflection.c: include ehader size in method section headers.
6807 Really check for suplicated modules entries.
6809 2002-10-17 Martin Baulig <martin@gnome.org>
6811 * debug-mono-symfile.c: Added back support for locals.
6813 2002-10-14 Martin Baulig <martin@gnome.org>
6815 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
6818 2002-10-14 Martin Baulig <martin@gnome.org>
6820 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
6821 mono_class_get() instead of looking in the class cache.
6823 2002-10-13 Martin Baulig <martin@gnome.org>
6825 * debug-mono-symfile.c: Set version number to 28, include the
6826 signature in method names.
6828 2002-10-13 Martin Baulig <martin@gnome.org>
6830 * debug-mono-symfile.h: Set version number to 27.
6832 2002-10-11 Martin Baulig <martin@gnome.org>
6834 * gc.c: Don't register/unregister NULL pointers as disappearing links.
6836 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
6838 * metadata.c, metadata.h: added helper function to allocate signatures.
6840 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6842 * icall.c: added internal call to get the location of machine.config.
6844 2002-10-08 Martin Baulig <martin@gnome.org>
6846 * debug-mono-symfile.c: Ignore classes with a pending init for the
6849 2002-10-03 Dick Porter <dick@ximian.com>
6851 * threads.c: Freebsd pthread_t is a pointer
6853 2002-10-03 Dick Porter <dick@ximian.com>
6855 * socket-io.c: Implemented GetHostName_internal
6857 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6860 (mono_config_parse_file): don't leak the text.
6862 2002-10-02 Martin Baulig <martin@gnome.org>
6864 * debug-mono-symfile.c: Added support for methods.
6866 2002-10-01 Martin Baulig <martin@gnome.org>
6868 * debug-mono-symfile.c: Don't emit methods and line numbers for
6869 the dynamic symbol file, just write the type table. We can easily
6870 have an external helper program which creates a symbol file for an
6873 2002-10-01 Dick Porter <dick@ximian.com>
6875 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
6876 Only add the handle to the cleanup array when we're about to
6877 launch the thread. Bug 31425 deadlocked when the test was run on
6880 2002-10-01 Martin Baulig <martin@gnome.org>
6882 * debug-mono-symfile.c: Added support for properties.
6884 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
6886 * reflection.c: unaligned store fix from Mark Crichton
6887 <crichton@gimp.org>.
6889 2002-09-27 Martin Baulig <martin@gnome.org>
6891 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
6894 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
6896 * assembly.h, assembly.c: use a sane API to hook into the assembly
6897 loading process instead of a useless special-purpouse hack
6898 (ngen needs a hook, too, for example).
6900 2002-09-27 Dick Porter <dick@ximian.com>
6902 * threads.c (mono_thread_init): Call GetCurrentProcess() so
6903 io-layer can set up some process handle info. Not needed on w32,
6904 but doesn't hurt either.
6906 * process.c: Pass the program name in the second parameter to
6907 CreateProcess, so the path is searched. Include the working
6908 directory. Implemented process name, process enumeration, and some
6909 process detail internal calls.
6911 * icall.c: Added internal calls for process lookup, and some
6914 2002-09-26 Martin Baulig <martin@gnome.org>
6916 * assembly.c (mono_install_open_assembly_hook): New global
6917 function to install a function to be invoked each time a new
6919 (mono_assembly_open): Run this callback function if set.
6921 * debug-mono-symfile.c: Put back line numbers for the dynamic
6922 symbol file and also record the .il file as source file. This
6923 allows us to install the temporary symbol file as `file.dbg' just
6924 like a compiler-generated one.
6926 2002-09-26 Nick Zigarovich <nick@chemlab.org>
6928 * Corrected typo in gc.c (BOHEM vs BOEHM).
6930 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6932 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
6933 GetProperties. Also avoid calling g_slist_length in GetProperties and
6936 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
6938 * reflection.c: avoid unaligned stores (bug spotted by
6939 Mark Crichton <crichton@gimp.org>).
6941 2002-09-25 Martin Baulig <martin@gnome.org>
6943 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
6944 instead of guint64 for addresses and added prologue/epilogue info.
6946 2002-09-25 Martin Baulig <martin@gnome.org>
6948 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
6949 store line number info. For the dynamic symbol file, we only need
6950 to provide the JIT generated dynamic line number info for the dynamic
6953 2002-09-25 Martin Baulig <martin@gnome.org>
6955 * debug-mono-symfile.h: Incremented version number.
6957 2002-09-24 Martin Baulig <martin@gnome.org>
6959 * class.c (mono_debugger_class_init_func): New global function
6961 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
6964 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
6965 function. This is called via the mono_debugger_class_init_func
6966 hook to add all types to the dynamic type table.
6967 (ves_icall_MonoDebugger_GetType): New interncall to get a class
6968 from its metadata token.
6970 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
6971 New interncall for the debugger.
6973 2002-09-24 Nick Drochak <ndrochak@gol.com>
6975 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
6976 before using it in case it is null.
6978 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
6980 * metadata.c: allow custom modifiers in local var signatures
6981 (bug spotted by Zoltan Varga).
6983 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
6985 * class.c: deal with the <Module> class that may have a NULL vtable.
6988 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6990 * image.c, image.h: more strong name helpers.
6991 * monosn.c: more work: convert pem keys to cryptoapi format.
6993 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
6995 * string-icalls.c: speedup IndexOf.
6997 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6999 * icall.c: updates from Zoltan.2.Varga@nokia.com.
7001 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
7003 * icall.c: cleanup: use mono_object_domain ().
7005 2002-09-23 Martin Baulig <martin@gnome.org>
7007 * debug-mono-symfile.c: Improved type support.
7009 2002-09-22 Martin Baulig <martin@gnome.org>
7011 * debug-mono-symfile.c: Added support for reference types and strings.
7013 2002-09-22 Martin Baulig <martin@gnome.org>
7015 * debug-mono-symfile.c: Started to work on the type table.
7017 2002-09-21 Martin Baulig <martin@gnome.org>
7019 * debug-mono-symfile.c: Largely reworked the symbol table format.
7020 The symbol table is now incrementally updated each time a new
7021 method is added. We're now also using our own magic and version
7022 so that you don't need to recompile all your classes if the
7023 dynamic table changes.
7024 (mono_debug_update_mono_symbol_file): Removed.
7025 (mono_debug_symfile_add_method): New function to add a method.
7027 2002-09-21 Martin Baulig <martin@gnome.org>
7030 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
7033 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
7034 New interncall to get a method from its metadata token.
7036 2002-09-21 Martin Baulig <martin@gnome.org>
7038 * debug-mono-symfile.c: Create type table.
7040 2002-09-20 Martin Baulig <martin@gnome.org>
7042 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
7044 2002-09-20 Martin Baulig <martin@gnome.org>
7046 * debug-mono-symfile.c: Provide information about params and locals.
7048 2002-09-20 Martin Baulig <martin@gnome.org>
7050 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
7053 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
7054 interncall to get a method from its metadata token.
7056 2002-09-20 Martin Baulig <martin@gnome.org>
7058 * debug-mono-symfile.c: Added a few checks for method->header
7059 being non-NULL. This should never happen, but for the moment
7060 let's use a g_warning() rather than a g_assert().
7062 2002-09-19 Mark Crichton <crichton@gimp.org>
7064 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
7065 even if support for it isn't present. Added an #ifdef to fix this.
7067 * socket-io.c: Added checks back for Solaris support.
7069 2002-09-19 Martin Baulig <martin@gnome.org>
7071 * debug-mono-symfile.c (read_string, write_string): Reflect latest
7072 changes in the symbol file format.
7074 2002-09-18 Martin Baulig <martin@gnome.org>
7076 * debug-mono-symfile.c: Set version number to 21.
7078 2002-09-18 Dick Porter <dick@ximian.com>
7080 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
7081 on netbsd. Fixes bug 30051.
7083 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7086 (set_version_from_string): little fix.
7088 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7090 * monosn.c, Makefile.am: added strong name utility.
7091 * reflection.h, reflection.c: implemented delayed signing,
7092 locale, version and hash id assembly attributes.
7094 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
7096 * loader.c, metadata.c: load param attributes in signatures.
7098 2002-09-16 Martin Baulig <martin@gnome.org>
7100 * debug-mono-symfile.c: Added string table with all method names.
7102 2002-09-14 Martin Baulig <martin@gnome.org>
7104 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
7107 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
7109 * reflection.c: record the public key token of referenced assemblies.
7111 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7113 * image.c, image.h: added functions to get the strong name and the
7114 public key of an assembly.
7115 * pedump.c: use them.
7117 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
7119 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
7121 2002-09-12 Miguel de Icaza <miguel@ximian.com>
7123 * marshal.c (mono_marshal_get_managed_wrapper): Added
7126 2002-09-11 Martin Baulig <martin@gnome.org>
7128 * gc.c: Call GC_unregister_disappearing_link() on all links when
7129 finalizing them, this is necessary to aviod a crash in boehm's
7132 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
7134 * gc.c: handle GetTarget for finalized objects spotted and fixed by
7137 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
7139 * icall.c: implemented MonoType::Module.
7140 * reflection.c, reflection.h: mono_module_get_object () from
7141 Tomi Pakarinen <tomi.pakarinen@welho.com>.
7143 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
7145 * icall.c: ignore overridden methods in GetMethods ().
7146 Fix for FieldInfo::SetValue().
7147 * object.c: handle float/double in runtime invoke.
7149 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
7151 * object.c: allow a constructor to be called again on an object.
7153 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7155 * class.h, class.c: move field layout code to it's own function and
7156 export it. Get an interface id earlier. Move fields in MonoClass
7157 so they are more cache friendly and align the bitfields.
7158 * loader.c: temporary handle get_param_names() for a runtime method.
7159 * reflection.c, reflection.h: more code to handle runtime creation of
7162 2002-09-09 Martin Baulig <martin@gnome.org>
7164 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
7165 signature with the pinvoke field being set for the actual call.
7167 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7169 * icall.c: removed some unused icalls. Start of map of glib charsets
7170 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
7172 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
7174 * debug-helpers.c: break infinite loop (found and fixed by
7175 Holger Arnold <harnold@gmx.de>).
7177 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
7179 * icall.c: target may be null in create_delegate.
7181 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7183 * marshal.c: handle a boolean return type.
7185 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7187 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
7189 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
7191 * gc.c: fix weakreferences.
7193 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
7195 * icall.c: added icall to get default codepage.
7197 2002-09-03 Dick Porter <dick@ximian.com>
7200 * threads.c: Use MonoThread instead of MonoObject where
7203 Store running thread objects in a hash table, so that we have all
7204 the info to hand when waiting for them to finish
7205 (means we don't need OpenThread() any more, so mingw builds should
7206 be fully functional again.)
7209 * object.h: Added thread ID to MonoThread
7211 2002-09-03 Martin Baulig <martin@gnome.org>
7213 * icall.c (System.Reflection.Assembly::get_location): New interncall.
7215 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7217 * icall.c: fixed leak in get_temp_path. Thanks lupus.
7219 2002-09-03 Martin Baulig <martin@gnome.org>
7221 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
7222 argument to store the end address of the disassembled instruction.
7224 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
7225 here from debug-symfile.h.
7226 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
7227 JIT into this struct.
7228 (MonoSymbolFile): Added `char *image_file' field.
7229 (MonoDebugGetMethodFunc): Removed.
7230 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
7231 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
7232 (mono_debug_find_method): New method.
7234 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
7235 create a full symbol file.
7236 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
7237 and static symbol files.
7238 (mono_debug_find_method): The symbol file keeps an internal method hash,
7239 call this to get a MonoDebugMethodInfo from a MonoMethod.
7241 * debug-symfile.[ch]: Removed.
7243 2002-08-29 Miguel de Icaza <miguel@ximian.com>
7245 * image.c (do_mono_image_open): Remove linker version check.
7247 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
7249 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
7250 wrappers for instance methods.
7252 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7254 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
7256 2002-08-28 Dick Porter <dick@ximian.com>
7258 * Makefile.am: Export HOST_CC for w32 builds
7260 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7262 * file-io.c process.c: MonoString are null terminated, no
7263 need for mono_string_to_utf16() anymore.
7265 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7267 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
7269 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
7271 * icall.c, reflection.h: speedup System.MonoType.
7273 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7275 * reflection.c: allow null as the value of a string argument in
7276 custom attributes constructors.
7278 2002-08-27 Martin Baulig <martin@gnome.org>
7280 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
7281 `trampoline_address' field.
7283 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
7285 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
7286 check (fixes bug #29486)
7288 2002-08-27 Martin Baulig <martin@gnome.org>
7290 * debug-mono-symfile.c: Changed the file format in a way that allows us
7291 open it read-only and to use a specially malloced area for all the
7292 dynamic data. We can now also generate a symbol file on-the-fly if we're
7293 debugging IL code and there is no MCS generated symbol file for it.
7295 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
7297 * object.c: added a define for a good string and array
7298 creation speedup (not enabled by default because we need to deal with
7301 2002-08-26 Martin Baulig <martin@gnome.org>
7303 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
7304 function to create a dynamic symbol file. This is used by the
7305 debugger to create a symbol file for IL code on-the-fly.
7307 2002-08-26 Martin Baulig <martin@gnome.org>
7309 * loader.c (mono_lookup_pinvoke_call): Include the error message
7310 from g_module_error() in the error message.
7312 2002-08-24 Martin Baulig <martin@gnome.org>
7314 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
7315 function to update the symbol file. The symbol file is mmap()ed
7316 writable, but private. This allows us to install the symbol file
7317 together with the assembly.
7319 2002-08-24 Martin Baulig <martin@gnome.org>
7321 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
7322 but they can read the new symbol file format which mcs is now creating.
7324 * debug-symfile.c (mono_debug_find_source_location): Moved to
7325 debug-mono-symfile.c; this is now operating on the new symbol file.
7327 2002-08-23 Martin Baulig <martin@gnome.org>
7329 * debug-helpers.c (mono_method_desc_from_method): New function to get
7330 a MonoMethodDesc from a MonoMethod.
7332 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
7334 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
7335 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
7337 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
7339 * string-icalls.[ch]: make helper methods static.
7341 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7343 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
7344 types to it and to SetValueInternal.
7346 * object.c: Moved handle_enum label to its proper place. This was the
7349 This time i compiled mcs and gtk-sharp and they both work.
7351 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7353 * icall.c: reverted partially my previous patch until
7354 object.c:set_value handles enums correcly.
7356 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7359 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
7360 (ves_icall_System_Environment_get_MachineName): removed warning when
7361 compiling under cygwin.
7363 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7365 * object.c: fixed field_get_value() for reference types.
7367 2002-08-22 Dick Porter <dick@ximian.com>
7369 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
7370 Don't free a buffer while it's still needed. Patch from Jonathan
7371 Liger <Jonathan.liger@wanadoo.fr>
7373 2002-08-21 Miguel de Icaza <miguel@ximian.com>
7375 * icall.c (ves_icall_System_Environment_get_Platform): Add new
7378 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
7380 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
7381 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
7383 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
7384 we call unmanaged code which throws exceptions.
7386 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
7388 * appdomain.h: added per-domain entry_assembly.
7389 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
7391 * icall.c: Assembly::GetEntryAssembly icall.
7392 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
7393 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
7395 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
7397 * appdomain.h, gc.c: added mono_domain_finalize ().
7399 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7402 (mono_print_unhandled_exception): changed g_warning by g_printerr
7403 because g_log has a 1024 characters limit (yeah, i got a big stack
7404 trace). Don't print exception name, that should be in ToString
7407 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7409 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
7410 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
7412 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7415 (mono_print_unhandled_exception): after previous commit, i realized
7416 that MS calls ToString on the exception. I changed this function to
7417 do that. This way we get stack_trace for free.
7419 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7422 (mono_print_unhandled_exception): invoke Message property instead of
7423 getting 'message' field from Exception. Don't allocate memory for
7424 'trace' and 'message' if not needed.
7426 2002-08-18 Dick Porter <dick@ximian.com>
7428 * unicode.c: Fix asserts to match Encoder.cs checks
7430 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7432 * marshal.c: fix unaligned store issue and a few wrong
7433 opcode argument types.
7435 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7437 * icall.c: added GetUninitializedObjectInternal internal call.
7439 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
7441 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
7442 to the right domain.
7444 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
7446 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
7448 * class.c (class_compute_field_layout): set blittable to false for Strings
7450 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
7452 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7454 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
7455 first chunk of code to create types at runtime. Code to
7456 handle ReflectedType/DeclaringType. Make reflection handles
7459 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
7461 * class.c: set correct name in arrays.
7463 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
7465 * appdomain.c (mono_domain_transfer_object): make it work with
7466 valuetypes. bug fixes.
7468 2002-08-12 Dick Porter <dick@ximian.com>
7470 * object.h: Rename some parameters to avoid c++ keywords (Patch
7471 from Joseph Wenninger <kde@jowenn.at>)
7473 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
7475 * icall.c: added icall to implement Assembly.GetFile*.
7477 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
7479 * reflection.h, reflection.c: code to embed managed resources.
7481 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
7483 * class.c: move all the type size stuff into
7484 class_compute_field_layout().
7486 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
7488 * class.c: ensure enums have always the correct instance size.
7489 * unicode.c: remove wrong assert.
7491 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
7493 * assembly.c: fix mem corruption issue.
7494 * image.h, image.c: added mono_image_get_resource () to access
7496 * icall.c: implemented Assembly.EntryPoint property and some
7497 Managed Resources related internalcalls.
7500 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7502 * image.c, image.h: impemented mono_image_get_entry_point ().
7503 * appdomain.c: use mono_image_get_entry_point.
7505 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
7507 * reflection.c: support the object type argument when loading
7510 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
7512 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
7513 String as return type.
7515 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
7517 * reflection.c: fix encoding of named args for custom attrs to match
7518 the ms implementation. Read them back when instantiating custom
7521 2002-08-02 Radek Doulik <rodo@ximian.com>
7523 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
7524 by Dietmar as quick fix
7525 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
7526 16 as stack size, used on more places as quick fix before Dietmar
7527 will fix it properly
7529 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
7531 * object.h, object.c: added accessors for fields and properties.
7533 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
7535 * class.c, class.h: made mono_class_get_field_from_name ()
7536 loop on parent types.
7537 Added mono_class_get_property_from_name ().
7539 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7541 * class.c, class.h: move the code to setup the type vtable in its own
7542 function so that it can be reused also for types created at runtime.
7543 Eliminate the "class" identifier from the header file.
7544 * reflection.c: setup the vtable for enums so that we can create
7545 objects for use in SetConstant ().
7547 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
7549 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
7550 instead of the delegate itself as this pointer (bug #28383)
7552 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
7554 * marshal.c (mono_marshal_get_managed_wrapper): added return type
7557 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7559 * loader.c: don't set the pinvoke bit on icalls.
7561 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
7563 * debug-helpers.c (mono_method_full_name): only print a number to
7564 indicate wrapper type (so that the output is more readable in traces).
7566 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
7568 * class.c (mono_class_init): include method override patch from Paolo
7570 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
7572 * icall.c: fixed GetTypeCode().
7574 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
7576 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
7577 use real delegate invoke function to make it work with multicast
7578 delegates (fix bug# 28291).
7580 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7582 * object.c: load constant strings.
7584 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7586 * reflection.c: no magic numbers.
7587 * tabledefs.h: security action enum.
7589 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7591 * assembly.c: fix possible memory corruption.
7593 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
7595 * reflection.h, reflection.c: added support for linking resources.
7596 * verify.c: check we have an updated corlib.
7598 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
7600 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
7602 (mono_marshal_string_array): null terminate unmanaged string arrays.
7603 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
7605 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7607 * icall.c: Type.GetType () can now return also types from the
7610 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
7612 * loader.h, loader.c: stack walking support.
7613 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
7616 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
7618 * marshal.c: added optimisations for blittable types
7620 * class.c (mono_array_class_get): do not set blittable attribute on arrays
7621 (mono_class_setup_mono_type): set blittable attribute for single
7624 * marshal.c (mono_string_utf8_to_builder): impl.
7625 (mono_string_builder_to_utf8): impl.
7626 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
7628 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
7630 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
7631 (mono_marshal_get_managed_wrapper): impl. byref types
7633 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7636 (search_method): don't display debug message.
7638 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
7640 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
7642 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
7644 * appdomain.c: set the missing filename when throwing exception.
7646 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
7648 * metadata.c (mono_type_size): code cleanup
7649 (mono_type_stack_size): removed some test code
7651 2002-07-21 Miguel de Icaza <miguel@ximian.com>
7653 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
7654 mono_get_exception_file_not_found now.
7656 * exception.c (mono_exception_from_name_two_strings): New version
7657 that will call a constructor with two string arguments.
7658 (mono_get_exception_file_not_found): New helper routine, used to
7659 report file-not-found errors.
7661 2002-07-20 Dick Porter <dick@ximian.com>
7664 * process.c: Pass file handles to CreateProcess
7668 * file-io.c: Implemented CreatePipe
7670 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
7672 * metadata.c (mono_get_param_info): set alignment for value types
7674 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7676 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
7677 Constify mono_domain_assembly_open().
7678 * loader.c: handle null namespace in icalls.
7680 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
7682 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
7683 (emit_str_to_ptr_conv): marshal object as structs
7685 * metadata.c (mono_type_to_unmanaged): marshal object as structs
7687 * marshal.c (mono_marshal_get_runtime_invoke): support value types
7689 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
7691 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
7692 (mono_marshal_get_native_wrapper): we an now return value types
7694 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7696 * verify.c: more checks implemented.
7698 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
7700 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
7702 (mono_marshal_get_native_wrapper): allow byref arguments
7703 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
7704 impl. PtrToStringXXX methods
7705 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
7706 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
7707 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
7708 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
7709 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
7711 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7713 * reflection.c: fix buglet in parsing an assembly name.
7715 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
7717 * marshal.c (emit_ptr_to_str_conv): first impl.
7719 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
7721 * object.c, class.h: cache the vtable in the class as suggested by
7722 vargaz@freemail.hu (Zoltan Varga).
7724 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7726 * class.h, loader.c: added mono_field_from_token().
7727 * verify.c: first cut of type checking code.
7729 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
7731 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
7733 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
7735 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
7737 (mono_marshal_get_remoting_invoke): impl.
7738 (mono_delegate_begin_invoke): impl.
7739 (mono_mb_emit_save_args): impl.
7740 (mono_delegate_end_invoke): impl.
7741 (mono_marshal_get_delegate_begin_invoke):
7742 (mono_marshal_get_delegate_end_invoke):
7743 (mono_marshal_get_delegate_invoke): generate a special name for
7744 those methods (including the signature) and associate them whith
7747 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
7750 (mono_reflection_type_from_name): now it has a MonoImage parameter
7751 which is used as the default image to search the type in. If the image
7752 is NULL or getting the type from it fails, it defaults to corlib.
7754 * icall.c: changed 1 call to mono_reflection_type_from_name to match
7757 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7759 * reflection.c: update the parameter table index.
7761 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
7763 * domain.c: don't include the mark byte in the string hash.
7765 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
7767 * icall.cs: icall for Type.GetTypeCode ().
7768 * verify: a couple of fixes and disabled local initialization checks.
7770 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
7772 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
7774 * debug-helpers.c (mono_method_full_name): print the type of the
7777 * metadata.c (mono_signature_hash): a hash function for signatures
7778 (mono_signature_hash): better hash algorithm
7780 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
7782 * debug-helpers.c (mono_method_full_name): this can now generate
7783 method names with signatures
7785 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
7786 method dont have this pointers.
7788 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
7790 * reflection.c: fixup typebuilder tokens.
7791 * image.c: fix buglet.
7792 * marshal.h: remove whitespace.
7793 * metadata.h, metadata.c: reinstate code that was removed.
7794 * verify.c: handle catch directives and fix another couple of bugs.
7796 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
7798 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
7799 (mono_marshal_get_native_wrapper): make it comp. with the old code
7800 (mono_marshal_get_native_wrapper): support boolean
7801 (mono_marshal_get_managed_wrapper): support more types
7803 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
7805 * class.c (class_compute_field_layout): compute class->blittable attribute.
7807 2002-07-09 Dick Porter <dick@ximian.com>
7809 * threads.c: Make the thread cleaning up cope with threads that
7812 2002-07-08 Radek Doulik <rodo@ximian.com>
7814 * reflection.c (method_encode_code): use non-translated values to
7815 compute finally_start, this fixes exception handling on ppc, yay!
7817 * decimal.h (struct signscale): fix endianess
7819 2002-07-07 Radek Doulik <rodo@ximian.com>
7821 * reflection.c: swap box_val and not val
7823 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
7825 * reflection.c, reflection.h: handle full assembly info in type name.
7826 Handle Type arguments when loading custom attributes.
7827 * icall.c: updated to use new mono_reflection_type_from_name () method.
7829 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7832 (method_from_memberref): also print assembly name when method not found.
7834 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7837 (ves_icall_TypeGetProperties): fixed bug #27473.
7839 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7841 * reflection.c: display image name and token when cannot find the
7842 .ctor for an attribute.
7844 2002-07-05 Martin Baulig <martin@gnome.org>
7846 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
7848 2002-07-04 Dick Porter <dick@ximian.com>
7850 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
7851 compile on mingw. This will cause mingw builds to not wait for
7852 subthreads to terminate after the main thread does. I've lodged a
7853 bug with the mingw developers for them to wrap OpenThread().
7855 2002-07-03 Dick Porter <dick@ximian.com>
7857 * threads.c: Store thread IDs instead of handles, because
7858 GetCurrentThread() returns a pseudohandle and therefore stores
7859 useless values. mono_thread_cleanup() continues checking the
7860 array of threads until it is empty, to cope with subthreads
7861 spawning new threads after the main thread has finished.
7865 * profiler-private.h: Pass the thread ID to thread profiler
7866 functions, instead of a handle
7868 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7870 * verify.c: fixes to make it more usable.
7871 * pedump.c: added --verify code to verify IL code in an assembly.
7873 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7875 * reflection.c: turn errors into warnings to allow compiling corlib.
7877 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
7879 * reflection.c: add special cases to compile corlib.
7881 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7883 * reflection.c: handle properties with only a set method.
7885 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7887 * opcodes.h: add enum with opcodes in opval order.
7889 2002-07-01 Dick Porter <dick@ximian.com>
7892 * object.c (mono_runtime_run_main): Removed unneeded argument
7894 2002-06-28 Martin Baulig <martin@gnome.org>
7896 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
7898 2002-06-27 Dick Porter <dick@ximian.com>
7900 * threads.c: Store the handle in both the parent thread and in the
7901 subthread, to minimise the time between starting a new thread and
7904 2002-06-26 Dick Porter <dick@ximian.com>
7906 * appdomain.c (mono_runtime_cleanup): Close the socket library
7907 after all the threads have finished, not before
7909 2002-06-26 Martin Baulig <martin@gnome.org>
7911 * debug-symfile.c (mono_debug_find_source_location): Added
7912 `guint32 *line_number' argument. If it's not NULL, store the line number
7913 there and return the file name without the line number.
7915 2002-06-25 Dick Porter <dick@ximian.com>
7919 * process.c: Process forking and other support functions
7921 2002-06-25 Dick Porter <dick@ximian.com>
7923 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
7924 things dont happen when the image is closed.
7925 (mono_image_lookup_resource): Walk the resource section looking
7926 for a particular entry
7928 * cil-coff.h: PE resource section decoding
7930 2002-06-25 Dick Porter <dick@ximian.com>
7934 (mono_assembly_foreach): Accessor functions to walk the list of
7936 (mono_assembly_set_main):
7937 (mono_assembly_get_main): Process methods need to know which
7938 assembly is the "main" one
7940 * object.c (mono_runtime_run_main): Record the main assembly
7942 * debug-helpers.c: Fix typo
7944 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
7946 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
7947 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
7949 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7951 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
7953 2002-06-21 Miguel de Icaza <miguel@ximian.com>
7955 * image.c (do_mono_image_open): Initialize reference count,
7956 otherwise we leak the MonoImage.
7958 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
7960 * reflection.c: small tweak to handle self-hosting.
7962 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7964 * reflection.c: fix type name parse code.
7966 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7968 * reflection.c: break out of the loop.
7969 * image.c: special case corlib.
7971 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7973 * reflection.c: add all the custom attrs at the end to ensure the
7974 ctors have been properly initialized when the attributes are defined
7975 in the current assembly.
7977 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7979 * reflection.c: handle correctly multiple-nested types.
7981 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
7983 * row-indexes.h: fix typos.
7984 * reflection.c: adjust for typos and fix method_def_or_ref
7985 encoding in MethodImpl table.
7987 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7989 * reflection.c: fix entry point patching (thanks Serge!).
7991 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
7993 * verify.c: add check for System.Exception
7995 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
7997 * image.c, class.c: minifix for code just c&p'ed.
7998 * reflection.c: warning fix.
7999 * object.h, loader.h, domain.c: load also StringBuilder.
8001 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8003 * marshal.h, marshal.c: some support code to handle complex marshaling.
8005 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8007 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
8008 Better signatures with vtable error dump.
8010 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
8012 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
8014 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
8016 * icall.c (ves_icall_Type_GetField): impl.
8018 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8020 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
8021 to retrieve a marshal description blob for a field or param.
8023 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8025 * reflection.h, reflection.c: change order of nested type emission
8026 to avoid table corruption. The NestedTypes table is sorted.
8027 * icall.c: change order of GetConstructor results to workaround mcs bug.
8029 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8031 * reflection.h, reflection.c: handle field and param marshal
8034 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8036 * icall.c, marshal.c marshal.h: more Marshal class implementation.
8038 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8040 * reflection.c: fix call convention.
8042 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8044 * reflection.h, reflection.c: mono_image_get_memberref_token()
8045 takes a type instead of a class, now. Added
8046 mono_image_get_array_token() to create tokens for the special
8047 multi-dim array methods.
8049 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8051 * assembly.c: handle modules (no assembly table). Split
8052 loading references in its own function.
8053 * class.c: handle moduleref resolution scope.
8054 * image.c, image.h: cache module name in image.
8056 2002-06-07 Martin Baulig <martin@gnome.org>
8058 * reflection.c (mono_image_get_type_info): Only add a class layout entry
8059 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
8061 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
8063 * icall.c: more signature fixes that used uint instead of int.
8065 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8067 * reflection.c: fixed signature of field refs.
8069 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8071 * class.c, reflection.c: handle typerefs of nested types
8072 (both on read and when writing files).
8074 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
8076 * icall.c: fix method signatures that tried to workaround the previous
8079 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
8081 * debug-helpers.c: fix typo.
8083 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8085 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
8086 rewrote the PE/COFF writing code (our programs are understood by the
8089 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8091 * gc.c, gc.h, icall.c: weakreference support.
8093 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8095 * Makefile.am, mono-config.c: use $(sysconfdir).
8097 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8099 * icall.c: changed default precision of Double.ToString() to 15.
8100 Fixed memory leak. Unified with Single.ToString.
8102 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
8104 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
8106 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8108 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
8109 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
8110 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
8113 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8115 * debug-symfile.c, sysmath.c: yet more compilation fixes.
8117 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8119 * reflection.c, socket-io.c: more compilation fixes.
8121 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8123 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
8124 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
8125 unicode.c: warning and compiler compatibility fixes.
8127 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8129 * class.h, metadata.c: fixed warnings/compilation errors.
8131 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
8133 * Makefile.am, mono-config.c, mono-config.h: configuration file
8135 * loader.c, loader.h: make Dll mapping configurable at runtime in the
8136 config file. Export methods to insert and lookup mappings.
8138 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8140 * reflection.c: handle types and boxed objects in custom attr
8143 2002-05-30 Martin Baulig <martin@gnome.org>
8146 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
8148 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
8150 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
8151 to lookup the implmap row for a P/Invoke method.
8152 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
8153 P/Invoke method from the runtime on an as needed basis.
8155 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
8157 * metadata.c (mono_metadata_parse_signature): impl.
8159 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8161 * class.c: handle .pack directive.
8163 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8165 * object.c: initialize static fields with RVA data.
8167 2002-05-25 Martin Baulig <martin@gnome.org>
8170 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
8172 2002-05-24 Martin Baulig <martin@gnome.org>
8175 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
8176 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
8177 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
8179 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8181 * object.c: special case string ctros in invoke.
8182 * gc.c: silly whitespace changes.
8184 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
8186 * threadpool.[ch]: impl. a threadpool that can
8187 be used by mint and mono.
8189 2002-05-22 Martin Baulig <martin@gnome.org>
8191 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
8192 The first argument is now a `MonoReflectionModuleBuilder *', the return
8193 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
8194 `methods' field to get the method builder. The `token' argument is the
8197 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
8198 invalid characters instead of g_assert_not_reached()ing. This seems
8199 to be the behaviour of mscorlib.
8201 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
8203 * object.c (mono_runtime_invoke_array): applied patch from Rachel
8204 Hestilow to fix bug #25104
8206 2002-05-21 Martin Baulig <martin@gnome.org>
8208 * debug-symfile.c (mono_debug_find_source_location): New function.
8209 Looks up an IL offset in the line number table and returns the source
8210 location as a string.
8212 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8215 (mono_double_ToStringImpl): changed %f by %g until we have something
8218 2002-05-21 Nick Drochak <ndrochak@gol.com>
8220 * icall.c : Use different name for Math.Pow's icall. Needed to check
8221 parameters first in C#.
8223 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8225 * icall.c, reflection.h: added icall to get info about an event.
8227 2002-05-20 Radek Doulik <rodo@ximian.com>
8229 * object.c (mono_value_box): don't use memcpy for boxing on BIG
8231 (mono_value_box): don't use memcpy for small sizes on
8232 architectures with unaligned access
8234 2002-05-20 Martin Baulig <martin@gnome.org>
8236 * reflection.c (mono_reflection_setup_internal_class): Don't crash
8237 if `tb->parent == NULL'.
8238 (mono_reflection_create_internal_class): New function. This is
8239 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
8242 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
8245 2002-05-19 Martin Baulig <martin@gnome.org>
8247 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
8248 argument to get the length, don't default to the array length.
8250 2002-05-18 Miguel de Icaza <miguel@ximian.com>
8252 * assembly.c (mono_assembly_setrootdir): New function used to
8253 override the MONO_ASSEMBLIES directory.
8255 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8257 * icall.c: ValueType_GetHashCode() initialize local var.
8259 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8261 * reflection.c: sort custom attributes table.
8263 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8265 * reflection.c: support named args in custom attributes (write support).
8267 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
8269 * reflection.c: fix finally position calculation.
8271 2002-05-15 Radek Doulik <rodo@ximian.com>
8273 * reflection.c: fixed endianess at many places
8275 * icall.c (ves_icall_InitializeArray): comment out debug msg
8277 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
8279 * object.c (mono_unhandled_exception): new function to handle
8280 unhandled exceptions.
8281 (mono_unhandled_exception): call the UnhandledException event.
8282 (mono_runtime_delegate_invoke): impl.
8284 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
8286 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
8287 returns the RVA, not the direct pointer to the data. Handle the case
8288 when the class size is fixed.
8290 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8292 * reflection.c: fix some endianess issues.
8294 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
8296 * object.c (mono_runtime_invoke): is now able to catch exceptions.
8298 * threads.c (mono_thread_init): added a callback which is invoked
8301 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
8303 * icall.c: make GetHashCode return non-negative values.
8305 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
8307 * object.c, icall.c, gc.c: revert to address-based hashcode.
8309 2002-05-13 Miguel de Icaza <miguel@ximian.com>
8311 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
8313 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8315 * icall.c, class.c: special case <Module>.
8317 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
8319 * icall.c: fix bug in GetNow().
8321 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
8323 * object.c (mono_runtime_class_init): make sure that we call all
8324 static class constructors.
8326 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8328 * reflection.c: sort methodsemantics table.
8330 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8332 * reflection.h, reflection.c: honour init locals setting.
8334 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
8336 * icall.c: copied Double ToStringImpl for Single ToStringImpl
8338 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8340 * reflection.c: support ContructorBuilders in attribute blob creation.
8342 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8344 * reflection.c: some changes to build a binary that can be run
8345 directly in windows.
8347 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
8349 * loader.c: print a big message when an icall can't be found.
8351 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8353 * string-icalls.c: fix bug 24248.
8355 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
8357 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
8358 icall.c, reflection.h: separate assembly loading by pathname and by
8359 assembly name. Use the MONO_PATH env var to search for assemblies.
8361 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8363 * assembly.c, image.h: add some support for assemblies
8364 with multiple modules.
8365 * class.c, class.h: export mono_class_from_typeref().
8366 * loader.c: remove duplicated code and use mono_class_from_typeref(),
8369 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8371 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
8372 documentation says (the ECMA one is correct).
8374 2002-05-02 Dick Porter <dick@ximian.com>
8376 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
8377 Don't name the synchronisation mutex.
8379 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
8382 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
8383 Make the prototypes match.
8384 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
8388 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
8389 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
8390 all systems have tm.tm_zone, so use strftime() with %Z to print
8391 the timezone abreviation into a temp string.
8393 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
8394 rather than mono_array_addr() on a MonoString on Big Endian
8397 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
8399 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
8402 2002-04-30 Dick Porter <dick@ximian.com>
8404 * socket-io.c: Cope with SOCKET being an integer rather than a
8407 * threads.c: Added Thread_free_internal, to deal with thread
8408 handle cleanup. Moved calls to handle_store() and handle_remove()
8409 to start_wrapper(), so each can only be called once. Allocate
8410 synchronisation blocks with GC_malloc(), and use GC finalisation
8411 to close the handles.
8413 * icall.c: added System.Threading.Thread::Thread_free_internal
8415 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8417 * icall.c: support Environment.Exit, CommandLineArgs().
8419 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8421 * object.c, object.h: added mono_runtime_run_main () and
8422 mono_runtime_get_main_args () for use in System.Environment.
8424 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8426 * gc.c: fix thinko, enable actual finalization since the jit is now
8429 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8431 * gc.c, object.c: take into account that an object may be offset wrt the address
8432 returned by GC_malloc().
8434 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
8436 * image.c: handle files without entries in the assembly table (modules).
8438 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
8440 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
8441 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
8442 allowed to be null when it's System.Object class setup.
8444 2002-04-27 Martin Baulig <martin@gnome.org>
8446 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
8447 if `tb->parent == NULL' rather than crashing.
8449 2002-04-28 Nick Drochak <ndrochak@gol.com>
8451 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
8452 calling acos() where asin() should have been called.
8454 2002-04-26 Martin Baulig <martin@gnome.org>
8456 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
8457 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
8458 there's a subdirectory called `System', but we don't want to read that
8459 subdirectory as an assembly.
8461 2002-04-25 Martin Baulig <martin@gnome.org>
8463 * debug-symfile.c: Reflect latest MonoString changes.
8465 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8467 * rand.c, rand.h: instance method icalls need to have an explicit
8468 this pointer as first argument in the C implementation.
8470 2002-04-25 Nick Drochak <ndrochak@gol.com>
8472 * icall.c: Fix typo in map for GetNonZeroBytes
8474 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
8476 * string-icalls.c : String does now passes unit tests without any
8477 errors, the following changes has been made:
8479 Implemented replace methods.
8480 Renaming of methods to (try) follow the standard.
8481 Fixed compare ordinal
8482 Made all memory allocated directly to function instead of via icall function.
8483 Small performance fix in is_in_array function
8485 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
8487 c (mono_string_Internal_ctor_charp_int_int):
8488 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
8489 sindex < 0, throw ArgumentOutOfRangeException instead of
8490 ArgumentNullException.
8492 Added new check for length == 0, however
8493 I need to make it return String.Empty from the C code.
8495 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
8496 that calculate the length for us here.
8498 (mono_string_Internal_ctor_sbytep_int_int): Replaced
8499 mono_string_new_utf16 with mono_string_new, since value is utf8.
8501 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8503 * object.c: register the object for finalization if needed.
8504 Allocate one more char in the string for the terminating 0 char.
8506 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8508 * class.c, class.h, image.c: check if a type implemenst a destructor.
8509 Use the proper key for array class lookups.
8510 * icall.c: register the icalls in the System.GC class.
8511 * gc.c, gc.h: GC-related functions and icalls.
8513 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8517 * unicode.c: free some strings gotten from mono_string_to_utf8 and
8518 changed a couple of free () by g_free ().
8520 * decimal.c: one-liner in the comments for decimal2string ().
8522 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
8524 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
8526 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
8528 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
8529 * object.c (mono_runtime_invoke_array) : handle null in params
8531 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
8533 * string-icalls.c: fixed bug in split (one off bug)
8535 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
8537 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
8538 * icalls.c: added String::Equals as internal method
8540 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
8542 * threads.c: fixed bug in the double interlocked functions
8544 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
8546 * threads.c: implemented all of the new interlocked icalls.
8547 * string-icalls.c: fix a bug in insert.
8548 * icalls.c: added the icalls for interlocked, removed old string functions.
8550 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8552 * loader.c: fix off-by-one error when reading argument names.
8554 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8556 * profiler.c: win32 counter implementation (untested).
8557 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
8558 (the latter needs testing and more complete impl. from win32 folks).
8560 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
8562 * object.c: mono_array_new_full workaround mono_array_class_get
8565 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8567 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
8568 * object.h (mono_string_chars): Changed casting type.
8570 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8572 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
8573 method signatures to use gunichar2 instead of gint16.
8575 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
8577 * object.h, object.c: domain-specific versions of mono_object_new and
8580 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
8582 * object.c: changed String layout
8584 * string-icalls.c (mono_string_Internal_ctor_chara): added
8585 internal string constructors.
8587 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
8589 * threads.c: pass 'this' to the thread start routine.
8591 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8593 * string-icalls.c: fix IndexOf and LastIndexOf. Now
8594 InternalCompareStr don't call twice mono_string_cmp_char for the last
8595 character. Improved performance in mono_string_cmp_char.
8597 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8599 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
8600 code into its own library: libmonoruntime.
8602 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
8604 * object.h, object.c: changed array format so that szarrays do not
8605 require a bounds structure.
8606 * icall.c, appdomain.c: support for new szarray format.
8608 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
8610 * metadata.c: compare also the retuns type when comparing signatures:
8611 we didn't do this as an optimization since really overloaded methods
8612 must differ also in the arguments, but this doesn't work with
8613 low-level IL code (or when using explicit conversion operators: see
8614 bug#23498 for an example).
8616 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8618 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
8620 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8622 * icall.c: make MonoType::GetElementType its own icall.
8624 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8626 * icall.c: remove MonoMethod_get_Name().
8627 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
8630 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8632 * string-icalls.c: optimized a few methods.
8634 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8636 * icall.c: added all new string internal calls
8637 * string-icalls.c: added, new string internal call implementation.
8638 * object.c: added mono_string_new_size for allocating a string a size
8640 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
8642 * object.c (mono_object_isinst): use the same code as in the
8643 optimized x86 version.
8645 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8647 * profiler.c: TSC-based timer code (faster and more accurate).
8648 Not hooked up in configure, yet (set USE_X86TSC to 1).
8650 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
8652 * profiler.c, profiler.h: track time spent compiling methods.
8653 * threads.c: track thread creation/destruction.
8655 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
8657 * profiler.c, profiler.h, profiler-private.h: profiling interface
8658 and sample implementation. Moved here so that it can be used also by
8661 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
8663 * reflection.c, reflection.h: keep types and other handles separate in
8664 the hash tables for referred tokens. Add guid for modules.
8666 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
8668 * assembly.c: fix bugs found with valgrind.
8669 * metadata.h, metadata.c: added mono_metadata_guid_heap().
8671 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
8673 * threads: added icall support for getting current domain for
8676 2002-04-13 Martin Baulig <martin@gnome.org>
8678 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
8679 (MonoDebugVarInfo): Added `index' field for register based addresses.
8680 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
8681 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
8682 `MonoDebugVarInfo *params' and `guint32 this_offset' with
8683 `MonoDebugVarInfo *this_var'.
8685 * debug-symfile.c (relocate_variable): New static function to write
8686 a location description for a local variable or method parameter.
8688 2002-04-12 Martin Baulig <martin@gnome.org>
8690 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
8691 stack offset and begin/end scope address of a local variable.
8692 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
8693 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
8694 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
8696 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
8697 Added new relocation types for start/end scope of a local variable.
8699 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8701 * object.h: add mono_object_domain() macro.
8702 * reflection.c: handle typespecs.
8703 * icall.c: MonoMethod::get_Name() implementation.
8705 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8707 * icall.c: String::GetHashCode() icall implementation.
8709 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8711 * icall.c: String::IndexOfAny icall.
8712 * object.c, object.h: make array->max_length more useful.
8713 Intrduced mono_object_class() and mono_string_length() macros.
8715 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8717 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
8718 instead of g_unichar_isdigit.
8720 2002-04-11 Nick Drochak <ndrochak@gol.com>
8722 * icall.c: Implement a simple Double.ToString().
8724 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8726 * appdomain.h: only io-layer.h is supposed to be included.
8727 * icall.c: explicitly import environ. Fix warning.
8729 2002-04-10 Nick Drochak <ndrochak@gol.com>
8731 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
8732 return true even if it's not Daylight Savings time.
8733 Only return false for the case where the function isn't
8734 implemented for a plaform (read Windows).
8736 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8738 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
8741 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
8743 * mempool.c (mono_mempool_alloc): only use g_malloc when
8744 absolutely necessary.
8746 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
8748 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
8750 * class.c (mono_class_vtable): use domain mempool to allocate vtable
8751 (mono_class_proxy_vtable): use domain mempool
8753 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8755 * appdomain.h, appdomain.c: split initialization that requires the
8756 execution engine support into mono_runtime_init().
8758 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
8760 * class.c (mono_class_init): don't include vtable inside MonoClass
8761 to save some memory, gather some statistics.
8762 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
8764 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
8766 * icall.c: internalcall implementation for ValueType.Equals().
8768 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
8770 * object.c (mono_message_init): moved
8771 (mono_runtime_exec_main): new arch. independent impl.
8772 (mono_runtime_invoke_array): new method - like
8773 mono_runtime_invoke, but you can pass an array of objects.
8774 (mono_remoting_invoke): new arch. independent impl.
8775 (mono_message_invoke): new arch. independent impl.
8776 (mono_runtime_class_init): new arch. independent impl.
8777 (mono_runtime_object_init): new arch. independent impl.
8779 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8781 * metadata.c, object.c, reflection.c: documented the exported
8784 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
8786 * icall.c: simpler code to pass the assembly builder data to corlib.
8787 Implement GetNestedTypes() internalcall.
8789 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
8791 * class.c: warn if a type can't be loaded.
8793 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
8795 * image.h: typedef MonoImageOpenStatus
8796 * types.h: removed unused file
8798 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
8800 * icall.c: Enum_ToObject accepts enum value arguments.
8802 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8804 * class.c: move initialization of properties, events and nested
8805 classes, so that they happen for interfaces, too.
8807 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8809 * icall.c: cleanup some ugly casts in Array_SetValue*.
8811 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8813 * icall.c: the values array fro enums is of the correct type, now.
8814 Implement (correctly) getFullName instead of assQualifiedName for
8816 * reflection.h, reflection.c: added mono_type_get_name ().
8818 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8820 * assembly.c, image.h: for each MonoImage, record from wich assembly
8822 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
8823 Make Type.Assembly work.
8825 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
8827 * debug-symfile.h: use char* instead of gpointer to avoid
8830 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
8832 * icall.c (ves_icall_InternalExecute): impl. FielSetter
8833 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
8835 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
8837 * icall.c (mono_message_init): impl. (code cleanup)
8838 (ves_icall_InternalExecute): impl. FieldGetter
8840 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
8841 defined we call all (non-static)methods through the vtable.
8843 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
8845 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
8846 finalizer even though the memory is still referenced (and the chunk of
8847 memory is not freed).
8849 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
8851 * assembly.c: fix brokeness.
8853 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
8855 * class.c: kill some warnings. Check explicit interface method
8856 implementation also without considering the namespace.
8857 Load also literal strings in static class data.
8859 2002-03-29 Miguel de Icaza <miguel@ximian.com>
8861 * assembly.c (default_assembly_name_resolver): Kill memory leak.
8862 (default_assembly_name_resolver): Make the resolver take the
8863 "base" directory where the assembly was originally defined, so we
8864 can load DLLs that are in the same directory as the assembly that
8865 is being referenced.
8867 2002-03-28 Dick Porter <dick@ximian.com>
8873 * unicode.c: Warning cleanups
8875 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
8877 * object.h, reflection.h: use the correct type instead of MonoObject.
8879 2002-03-28 Martin Baulig <martin@gnome.org>
8881 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
8882 (mono_debug_update_symbol_file): Initialize classes if necessary.
8884 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
8886 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
8887 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
8889 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
8891 * assembly.h: fix function prototype.
8892 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
8893 * mono-endian.h: use const cast.
8895 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
8897 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
8899 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
8901 * loader.c: don't assert when a typeref can't be loaded, give
8902 a chance to the runtime to trow an exception instead.
8903 * loader.h: fix warning.
8905 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
8907 * class.c (mono_class_proxy_vtable): added proxy support
8909 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
8911 * icall.c: removed last of PAL calls, added System.Environment
8912 * file-io.h, file-io.c: MonoIO implementation
8913 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
8915 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
8917 * appdomain.c: do not use the byte marker in ldstr table lookup.
8918 * debug-helpers.c: allow two ':' to separate class and method name.
8919 * object.c: allocate arrays bounds with the GC, too.
8920 * verify: add a few more checks.
8922 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
8924 * reflection.c: output also literal strings. Allocate parameter data
8925 with GC_malloc() (thanks, Martin, for catching this!).
8927 2002-03-26 Martin Baulig <martin@gnome.org>
8929 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
8930 include the `this' offset in the `param_offsets'.
8932 2002-03-25 Martin Baulig <martin@gnome.org>
8934 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
8935 mono_debug_get_class() function to get the classes. Added new
8936 relocation types for arrays and strings.
8937 (mono_debug_get_class): New static function to search in all
8938 referenced assemblies for a metadata token.
8940 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
8942 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
8944 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
8945 hold gc-allocated objects. Make the string heap a stream like the
8946 others. Removed duplicated code when writing stream info.
8947 Added asserts to catch possible buffer overflows. Set the sorted map
8948 for tables that need sorting. Added some documentation.
8950 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
8952 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
8953 for interned strings and vtables.
8955 2002-03-24 Martin Baulig <martin@gnome.org>
8957 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
8958 it in the array since it was created with g_slist_prepend().
8960 2002-03-24 Martin Baulig <martin@gnome.org>
8962 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
8963 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
8964 (mono_debug_method_from_token): Renamed to
8965 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
8966 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
8968 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
8971 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
8973 2002-03-24 Martin Baulig <martin@gnome.org>
8975 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
8976 (mono_debug_method_from_token): New func.
8978 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
8979 New interncall, calls mono_debug_local_type_from_signature().
8980 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
8981 calls mono_debug_method_from_token().
8983 2002-03-23 Martin Baulig <martin@gnome.org>
8985 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
8986 specifies the number of bytes to be converted, not the array size.
8987 Return the number of chars, not the number of bytes.
8988 (ves_icall_iconv_get_chars): The `byteCount' argument
8989 specifies the number of bytes to be converted, not the array size.
8991 2002-03-23 Martin Baulig <martin@gnome.org>
8993 * reflection.h (MonoReflectionSigHelper): New type.
8995 * reflection.c (mono_reflection_sighelper_get_signature_local),
8996 (mono_reflection_sighelper_get_signature_local): New functions.
8998 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
8999 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
9002 2002-03-23 Martin Baulig <martin@gnome.org>
9004 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
9005 is_writeable is set.
9006 (mono_raw_buffer_update): New function to write the modified map
9009 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
9011 * debug-symfile.c (mono_debug_update_symbol_file): Call
9012 mono_raw_buffer_update() when done writing.
9014 2002-03-23 Martin Baulig <martin@gnome.org>
9016 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
9018 * debug-symfile.c: Added support for arguments and local variables.
9020 2002-03-23 Dick Porter <dick@ximian.com>
9022 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
9023 protected by ifdefs, hence breaking the w32 build.
9025 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9027 * object.c: implement is_interned() the right way.
9029 2002-03-21 Martin Baulig <martin@gnome.org>
9031 * debug-symfile.[ch]: New files to handle debugging information
9032 files. There's also support to dynamically update these symbol
9033 files to include machine dependent information.
9035 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
9037 * threads.c (mono_thread_create): new function to create thread
9040 2002-03-20 Martin Baulig <martin@gnome.org>
9042 * icall.c (ves_icall_InternalInvoke): Create a new object if the
9043 method is a constructor.
9044 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
9045 points to ves_icall_InternalInvoke().
9047 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
9049 * file-io.c: Flush shouldn't throw exceptions.
9051 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
9053 * file-io.c: FileStream flush support; FileSetLength now
9054 restores file pointer.
9056 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
9058 * class.c: set image for pointer classes.
9060 2002/03/19 Nick Drochak <ndrochak@gol.com>
9062 * sysmath.c: Forgot one.
9064 2002-03-18 Miguel de Icaza <miguel@ximian.com>
9066 * sysmath.c: Avoid redefining existing names.
9068 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
9070 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
9071 handled by runtime as icall rather than dllimport from libm.so
9072 * file-io.c, file-io.h: fixed handle argument type.
9074 2002-03-18 Dick Porter <dick@ximian.com>
9076 * reflection.c (mono_image_get_type_info): rename interface to
9077 iface, because of "#define interface struct" on windows.
9079 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
9081 * class.c, class.h: rename and export mono_ptr_class_get().
9082 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
9083 * reflection.c, reflection.h, icall.c: better/saner type name
9084 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
9087 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
9089 * class.c (mono_class_init): removed hardcoded GHC_SLOT
9091 * icall.c (ves_icall_InternalInvoke): impl.
9093 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
9095 * reflection.c: output the interface map table, too.
9097 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
9099 * class.c (class_compute_field_layout): separate computation of
9102 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
9104 * icall.c: added System.Buffer support.
9105 * file-io.c: moved file icalls from PAL to FileStream.
9107 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
9109 * icall.c (ves_icall_System_Object_GetHashCode): impl.
9111 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
9113 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
9115 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
9117 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
9119 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
9121 * debug-helpers.{c,h}: moved here from monograph some useful functions
9122 to locate a method by name/signature in a class or image. Included
9123 also a small and flexible IL disassembler.
9125 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
9127 * reflection.c: fixup tokens in methods with small header size, too.
9129 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
9131 * object.c (mono_string_to_utf8): remove assert(!error), instead
9134 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
9136 * icall.c: update to the new mono_Array_class_get interface.
9138 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
9140 * appdomain.c, object.c: Boehm-GC enable.
9141 * icall.c: make get_data_chunk() support split data requests.
9142 Ensure a class is initialized in more cases. Return only the first
9143 property found in GetProperties() or the compiler gets confused.
9144 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
9145 * reflection.h, reflection.c: add fixup mechanism for field and method
9146 tokens. Initialize assembly->typeref in a single place. Output
9147 properties after events. Support custom attributes for events, too.
9148 Typo fix for paramter custom attrs.
9150 2002-03-07 Martin Baulig <martin@gnome.org>
9152 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
9154 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
9156 * class.c (mono_array_class_get): fix. for multi. dim. arrays
9158 2002-03-06 Martin Baulig <martin@gnome.org>
9160 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
9161 non-zero lower bounds. See testcases #F10-#F13.
9163 2002-03-05 Martin Baulig <martin@gnome.org>
9165 * exception.c (mono_get_exception_argument_out_of_range): New exception.
9167 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
9168 ves_icall_System_Array_GetValue(), only calculate the absolute array position
9170 (ves_icall_System_Array_SetValue): Likewise.
9171 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
9172 as argument and does the actual work. This function is used when copying a
9173 multi-dimensional array.
9174 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
9175 now do all the widening conversions of value types.
9176 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
9178 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9180 * class.c: remove some magic numbers and use the smbolic names,
9181 instead. Added init_events() to load event info at class init time.
9182 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
9183 and mono_metadata_methods_from_event().
9184 * reflection.h, reflection.c: added support for writing out the evnets
9185 related information.
9187 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
9189 * reflection.h, icall.c: use a different method (GetInterfaces)
9190 to gather interface info and add isbyref, isprimitive and
9191 ispointer to the ves_icall_get_type_info() return value.
9193 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
9195 * class.h: stared adding support for events.
9196 * icall.c: split find_members implementation. Added debug icall to get
9197 the address of an object.
9198 * reflection.c: handle TypeBuilders in mono_type_get_object().
9200 2002-03-01 Martin Baulig <martin@gnome.org>
9202 * icall.c (ves_icall_System_Array_GetLength): This must throw an
9203 ArgumentOutOfRangeException(), not an ArgumentException().
9204 (ves_icall_System_Array_GetLowerBound): Likewise.
9205 (ves_icall_System_Array_GetValue): Improved argument checking.
9206 (ves_icall_System_Array_SetValue): Improved argument checking.
9208 2002-03-01 Martin Baulig <martin@gnome.org>
9210 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
9211 called with invalid arguments rather than just dying with g_assert().
9212 (ves_icall_System_Array_SetValue): Likewise.
9213 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
9214 raise a NotImplementedException instead.
9215 (ves_icall_System_Array_GetLength): Added argument checking.
9216 (ves_icall_System_Array_GetLowerBound): Added argument checking.
9218 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
9220 * object.h (mono_assert): new macros mono_assert and
9221 mono_assert_not_reached
9223 2002-02-28 Martin Baulig <martin@gnome.org>
9225 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
9226 and "System::String::IsInterned" to "System::String::_IsInterned".
9228 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
9230 * icall.c: remove hacks for typebuilder. Added icall to create a
9231 modified type from a tybebuilder.
9232 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
9233 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
9234 to create a backing MonoClass for a TypeBuilder.
9236 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
9238 * class.c, class.h: more refactoring of class init.
9239 Export mono_class_setup_mono_type() and mono_class_setup_parent().
9241 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
9243 * marshal.c, marshal.h: start of marshaling interface.
9245 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
9247 * icall.c: fix order in assembly qualified name icall.
9249 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
9251 * class.c: do not free str, since we store it in the hash table.
9252 * reflection.h: add label field to MonoILExceptionInfo.
9253 * reflection.c: handle references to more than one assembly. Handle
9254 case when there isn't a module created in the assembly.
9256 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
9258 * class.c: Fix typo. Start refactoring of class init code.
9260 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
9262 * appdomain.c: exit with 1 on error.
9263 * class.c: we already have the name in MonoClassField.
9264 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
9265 MonoStreamHeader instead of an offset of image->raw_metadata.
9267 2002-02-26 Miguel de Icaza <miguel@ximian.com>
9269 * appdomain.c (mono_init): Be even more descriptive about the error.
9271 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
9273 * appdomain.c: give the user an informative message when corlib can't
9276 2002-02-26 Martin Baulig <martin@gnome.org>
9278 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
9279 New icall to get the time zone data.
9281 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
9283 * reflection.c: set virtual and raw size of section correctly.
9284 * threads.c: transfer domain information to newly created threads.
9286 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
9288 * class.c: when instancing a class in a domain, load the default
9289 vaules for static fields from the constant table. Fix System.Enum to
9291 * icall.c: implement Object::GetType() internalcall. Implemented
9292 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
9293 Fixed checking of binding flags in find_members().
9294 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
9295 * reflection.c: handle enumerations when writing to the constant
9296 table. Use a different object cache for types.
9299 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
9301 * object.c (mono_object_isinst): fix for arrays
9303 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
9305 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
9307 * object.c: don't use mprotect () and fix intern pool hash table
9308 lookup for big endian systems.
9310 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
9312 * icall.c: change type_is_subtype_of () signature.
9314 2002-02-21 Mark Crichton <crichton@gimp.org>
9316 * rand.c, rand.h: Added random number generator for
9317 System.Security.Cryptography classes.
9319 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
9321 * icall.c: Added System.Security.Cryptography calls.
9323 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
9325 * class.c, icall.c, metadata.c: better support for pointer types.
9326 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
9327 * reflection.c: Add support for getting custom attrs for properties
9328 and simplify some code.
9330 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
9332 * icall.c: change getToken () and add custom attribute GetBlob()helper
9334 * reflection.h: add custom attrs array to the reflection builder structures.
9335 * reflection.c: encode and emit custom attributes for all the relevant
9336 reflection objects. Cache fieldref and methodref tokens. Change
9337 mono_image_create_token() interface to take a MonoDynamicAssembly.
9338 More complete custom attributes decoder. Load custom attributes for
9339 Assembly, Field, Method and Constructor objects, too. Make the
9340 returned array an Attribute[] one, not object[]. Added
9341 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
9342 custom attribute constructor.
9344 2002-02-20 Dick Porter <dick@ximian.com>
9348 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
9349 problem code out for now).
9351 2002-02-19 Radek Doulik <rodo@ximian.com>
9353 * object.c (mono_ldstr): use hash table to avoid multiple swapping
9355 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
9357 * icall.c: register the GetCustomAttributes method.
9358 * object.c, object.h: add mono_string_new_len ().
9359 * reflection.h, reflection.c: added mono_runtime_invoke(),
9360 mono_install_runtime_invoke(). Added
9361 mono_reflection_get_custom_attrs () to load custom attributes and
9362 create the attribute objects.
9364 2002-02-19 Dick Porter <dick@ximian.com>
9365 * threads-dummy-types.c:
9366 * threads-dummy-types.h:
9369 * threads-pthread-types.c:
9370 * threads-pthread-types.h:
9371 * threads-pthread.c:
9372 * threads-pthread.h: Deleted obsolete files
9374 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
9376 * class.c (mono_class_vtable): runtime init the class when we
9377 allocate static class data.
9379 * icall.c (ves_icall_System_Array_SetValue): check for null values.
9381 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
9382 and String - but we will need generic marshalling support in the
9384 (mono_init): set the domain name in a ms compatible way
9386 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
9389 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
9391 * object.c (mono_array_clone): use alloca() instead of g_malloc
9394 * appdomain.c (mono_domain_unload): impl.
9396 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
9398 * appdomain.c, object.c: fix intern pool implementation.
9399 * class.c: fix alignment code.
9401 2002-02-16 Radek Doulik <rodo@ximian.com>
9403 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
9404 and s2 > s1, just copy lower bytes to be compatible with little
9405 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
9406 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
9408 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
9409 force big_endian to be 1 for big endian machines
9410 (ves_icall_iconv_new_decoder): ditto
9412 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
9414 * socket-io.c (convert_sockopt_level_and_name): If the system
9415 doesn't define SOL_IP or SOL_TCP, get them by hand using
9416 getprotobyname() and caching the values (because this could be a
9418 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
9419 Use the appropriate struct when the system does support it. Ie,
9420 not all systems have struct ip_mreqn so use struct ip_mreq when
9423 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
9425 * reflection.c: handle finally clauses.
9427 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
9429 * socket-io.c: use g_snprintf() instead of snprintf.
9431 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
9433 * reflection.c (mono_param_get_objects): Cast second argument to
9434 mono_method_get_param_names to a const char** to silence the
9437 * appdomain.c (mono_domain_assembly_open): Put parens around the
9438 truth statement in the for-loop.
9440 * unicode.c (iconv_convert): Got rid of a compiler warning about
9441 int i being unused when the system has a new iconv.
9442 (iconv_get_length): Same.
9444 * image.c (load_class_names): Cast the second argument to
9445 g_hash_table_insert() to char* to hush compiler warnings about the
9447 (mono_image_open): Same here.
9449 * socket-io.c: Don't conditionally include sys/filio.h or
9450 sys/sockio.h here anymore since we now get them from
9452 (inet_pton): If the system doesn't support inet_aton, implement
9453 using inet_addr and also #define INADDR_NONE if it isn't defined
9456 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
9458 * metadata.c, metadata.h: added function to get packing and size info
9460 * reflection.h, reflection.c: handle field RVA data. Save info about
9461 the table layout if needed. Assign typedef indexes to all the types
9462 before dumping the info about them to avoid forward reference problems.
9464 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
9466 * socket-io.c (convert_sockopt_level_and_name): ifdef
9467 SO_ACCEPTCONN because it is not defined on my system (old debian)
9469 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
9471 * opcode.c: use stddef.h to get NULL.
9473 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
9475 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
9476 for FIONBIO, FIONREAD and SIOCATMARK.
9477 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
9478 define INADDR_NONE and besides, inet_addr() is deprecated and
9479 should not be used. Use inet_pton() instead - it also has the
9480 added bonus that it can easily handle IPv6 addresses as well.
9481 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
9483 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
9485 * decimal.c: remove _MSC_VER conditional.
9487 2002-02-13 Dick Porter <dick@ximian.com>
9490 * icall.c: Internal calls for Blocking, Select, Shutdown,
9491 GetSocketOption and SetSocketOption
9493 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9495 * assembly.cs: better resolver: use it instead of some kludgy
9498 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
9500 * reflection.c: the best way to speed-up the compiler is to avoid
9503 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
9505 * class.c (mono_class_vtable): changed the object layout
9506 (obj->vtable->class).
9507 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
9509 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9511 * assembly.c: look for assemblies in the assembly dir, too.
9513 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
9515 * class.c: fix thinko in mono_class_from_type().
9517 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
9519 * exception.h, exception.c: added TypeLoadException.
9520 * object.h, object.c: added mono_array_clone ().
9521 * icall.c: handle throwOnError in AssemblyGetType().
9522 Added Array.Clone().
9523 * opcode.h, opcode.c: use a single value for the opcode val.
9524 Compile fix for non-gcc compilers.
9526 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
9528 * opcodes.c, opcodes.h: export interesting info about opcodes.
9530 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
9532 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
9535 * class.c (class_compute_field_layout): set element_class for enums
9536 (mono_class_create_from_typedef): set element_class for normal classes
9538 * icall.c (ves_icall_System_Enum_get_value): impl.
9540 * class.c (mono_class_create_from_typedef): do not set valuetype
9541 flag for System.ValueType and System.Enum
9543 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
9545 * unicode.c (iconv_convert): fix big endian problem.
9547 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
9549 * class.c: add asserts if we are ever going to scribble over memory.
9550 * socket-io.c: not all systems have AF_IRDA defined.
9552 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
9554 * class.c (class_compute_field_layout): do not consider static
9555 fields to compute alignment
9557 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
9559 * appdomain.c (mono_appdomain_get): impl.
9560 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
9562 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
9564 * icall.c: ignore "file://" prefix when loading an assembly.
9566 2002-01-23 Dick Porter <dick@ximian.com>
9570 * Makefile.am: Added socket support
9572 2002-01-23 Miguel de Icaza <miguel@ximian.com>
9574 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
9575 code back. This should return the assemblies that are loaded by
9576 the runtime on behalf of an application domain.
9578 The current implementation is still broken, it just returns every
9579 assembly loaded, but until we get real applications domain this
9582 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
9584 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
9587 2002-01-23 Miguel de Icaza <miguel@ximian.com>
9589 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
9590 the mono_class_from_name lookup.
9591 (ves_icall_get_parameter_info): ditto.
9592 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
9594 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
9596 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
9598 * class.c: load also nested classes on class init.
9599 System.ValueType instance methods gets passed boxed
9600 values, unless methods in derived classed that get a pointer to the
9602 * icall.c: use better name parsing code in GetType().
9603 * image.c, image.h: add mono_image_loaded ().
9604 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
9605 * reflection.c, reflection.h: added mono_reflection_parse_type().
9607 2002-01-22 Veronica De Santis <veron78@interfree.it>
9609 * icall.c : Added mapping of internal calls for Manual and Auto reset events
9610 * threads.c : Added the implementation of internal calls for events
9611 * threads.h : Added prototypes of internal calls for events
9613 2002-01-21 Radek Doulik <rodo@ximian.com>
9615 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
9617 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
9619 * class.c (mono_class_init): set min_align to 1 (instead of 0)
9620 (mono_class_value_size): use min_align
9622 2002-01-20 Dick Porter <dick@ximian.com>
9625 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
9626 so it compiles on w32.
9628 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
9630 * metadata.c (mono_type_stack_size): impl.
9632 * class.c (mono_class_get_field): impl. memberref token
9634 2002-01-16 Veronica De Santis <veron78@@interfree.it>
9636 * icall.h : Added the internal calls mapping for CreateMutex_internal
9637 and ReleaseMutex_internal.
9638 * threads.h : Added the prototype of mutexes internal calls.
9639 * threads.c : Added the implementations of mutexes internal calls.
9641 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
9643 * metaparse.h: removed unused file.
9644 * reflection.c, reflection.h: added stream_data_align () function
9645 to align data in streams and keep stream aligned. Add support for
9646 exception support in method headers.
9648 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
9650 * unicode.c: make iconv_convert () return the number of bytess written
9651 in the output buffer.
9653 2002-01-15 Dick Porter <dick@ximian.com>
9654 * threads.c: Make the runtime's idea of infinite timeouts coincide
9655 with the class library's
9657 Fix a particularly egregious bug in mono_thread_cleanup(). That
9658 code was so utterly bogus it must have been written on a Monday.
9660 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
9662 * reflection.h: add subtypes field to TypeBuilder.
9663 * reflection.c: encode constants for literal fields.
9664 Handle subtypes. Fix user string token (and add a zero byte)
9667 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
9669 * class.c (mono_class_init): bug fix: assign slot numbers for
9672 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
9674 * reflection.c: don't try to output a code RVA for abstract methods.
9675 Small fixes for method header format. Output parameter info to the
9676 ParamDef table. Save method overriding info to MethodImpl table.
9677 Fix property support. Allow typedef.extends to be a type in the
9679 * verify.c: fix off-by-one error.
9681 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
9683 * class.c: fix mono_class_from_mono_type () for szarray types.
9684 Remove unused cache check in mono_class_from_type_spec().
9685 * icall.c: *type_from_name () functions handle simple arrays and byref.
9686 * reflection.c: handle byref and szarray types. Handle methods without
9687 body (gets P/Invoke compilation working). Handle types and fields in
9689 * reflection.h: add rank to MonoTypeInfo.
9691 2002-01-10 Dick Porter <dick@ximian.com>
9693 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
9696 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
9698 * icall.c: initialize class in type_from_handle ().
9699 Loop also in parent classes for get_method ().
9700 * reflection.c: properly encode class and valuetype types.
9701 Start on encoding TypeBuilder types. Handle fieldrefs.
9702 Use correct length when registering a user string.
9703 Handle ConstructorBuilder and MonoMethod in get_token ().
9704 Make mono_type_get_object () aware of cached types.
9705 * object.c: back out change to mono_string_new ().
9707 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
9708 * object.c: mono_string_new should return a NULL when the string
9709 passed in is NULL -- not try to deference it.
9711 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
9713 * icall.c: hack to make IsSubType work for TypeBuilders.
9714 * reflection.c: emit constructors before methods.
9715 Retrieve param names in mono_param_get_objects().
9717 2002/01/05 Nick Drochak <ndrochak@gol.com>
9719 * Makefile.am: fix list of headers and sources so automake 1.5
9720 doesn't complain. Removed \# at end of list.
9722 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
9724 * reflection.c: get token for a method ref. Set return type of
9725 constructor to void.
9726 * loader.c: debug message.
9727 * class.c: typo fix.
9729 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
9731 * icall.c: fix array init with rank > 1. FindMembers
9732 loops in parent class as well.
9733 * image.c: do not insert nested types in name cache.
9734 * reflection.c: warning fix.
9735 * reflection.h: add override method (for interface impl).
9737 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
9739 * metadata.c: fix customattr decoding.
9741 2001-12-21 Miguel de Icaza <miguel@ximian.com>
9743 * rawbuffer.cs: Added native Win32 implementation, avoids using
9744 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
9746 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
9748 * class.c: make the low-level routines handle the cache.
9750 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
9752 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
9754 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
9756 * class.c: fix mono_array_element_size() for objects.
9757 * class.h, class.c: add properties to MonoClass and load them
9759 * icall.c: check with isinst() when assigning a value to an array
9760 instead of requiring the classes to match exactly.
9761 Implemented icall for System.Type::GetType().
9762 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
9763 enums. Handle bindingflags when looking for methods and fields.
9764 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
9765 and mono_metadata_methods_from_property().
9766 * reflection.h, reflection.c: added structures for propreties,
9767 parameters and enums. Implemented mono_property_get_object() and
9768 mono_param_get_objects().
9770 2001-12-18 Dick Porter <dick@ximian.com>
9772 * file-io.c: Use mono_string_to_utf16() instead of
9775 * object.c: Added mono_string_to_utf16(), which copies the non
9776 NULL-terminated MonoString into a new double-null-terminated
9779 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
9781 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
9783 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
9785 * file-io.c: raise exceptions if handle is invalid.
9787 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
9789 * assembly.c: yet another check for mscorlib.
9790 * class.c, class.h: load nesting info for classes.
9791 * icall.c: many new functions to support the Reflection classes.
9792 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
9793 * reflection.h, reflection.c: mono_image_create_token(),
9794 mono_assembly_get_object(), mono_type_get_object(),
9795 mono_method_get_object(), mono_field_get_object(): methods to return
9796 objects that parallel the C representation of assemblies, types,
9799 2001-12-11 Dick Porter <dick@ximian.com>
9802 * file-io.c: Internal calls for file IO.
9804 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
9806 * tabledefs.h: missing FileAttributes.
9807 * verify.h, verify.c: use is_valid_string () to simplify and check for
9808 valid strings more correctly. Fix warnings and speeling.
9809 Check more tables: Filed, File, ModuleRef, StandAloneSig.
9810 Check code: branches, maxstack, method calls.
9812 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
9814 * object.c (mono_object_allocate): removed static, so that the jit
9815 can allocate value types.
9817 * icall.c (ves_icall_System_DateTime_GetNow): impl.
9819 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9821 * class.c: init enum types right away and register the
9822 token->MonoClass map in mono_class_create_from_typedef ().
9823 * verify.h, verify.c: first cut of the verifier.
9824 * pedump.c: add --verify switch to verify metadata tables.
9825 * tabledefs.h: add some missing enums.
9827 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
9829 * class.c (mono_install_runtime_class_init): impl.
9830 (mono_class_init): renamed mono_class_metadata_init to
9831 mono_class_init, also removed the metadata_inited flag
9833 * object.c (mono_object_isinst): use faster algorithm
9835 2001-11-30 Radek Doulik <rodo@ximian.com>
9837 * mono-endian.h: reverted last change
9838 added function prototypes
9840 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
9841 add mono-endian.c back
9843 * mono-endian.c: returned back, as Paolo pointed out, it's needed
9844 for unaligned access, I've mistaked it with endianess. I am
9846 (mono_read16): fix reverted endianess
9847 (mono_read64): ditto
9848 (mono_read32): ditto
9850 2001-11-30 Dick Porter <dick@ximian.com>
9852 * exception.c: Implement mono_exception_from_name()
9854 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
9856 * metadata.h, metadata.c: remove params_size and locals_size and their
9857 calculation from the metadata code: they are only usefult to the
9860 2001-11-29 Radek Doulik <rodo@ximian.com>
9862 * object.c (mono_ldstr): swap bytes here, it's probably not the
9863 best place, but works for me now, I'll redo it once I know mono
9864 better, also note that I add PROT_WRITE and don't reset back, also
9865 note that it's only affects big endians, so x86 should be OK
9867 * mono-endian.h (read16): use just glib macros for both endians
9869 * mono-endian.c: removed as glib macros are used in in
9870 mono-endian.h so we don't need to care about endianess for read
9871 macros as glib does that for us already
9873 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
9875 * class.h, class.h: take minimum alignment into consideration so
9876 that the fields of a class remain aligned also when in an array.
9878 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9880 * loader.h, loader.c: add mono_method_get_param_names().
9881 * class.c: 0-init class fields.
9883 2001-11-26 Dick Porter <dick@ximian.com>
9887 * threads.c: New file that handles System.Threading on all platforms
9890 * object.h: Remove the synchronisation struct from MonoObject,
9891 replace it with a pointer that gets initialised on demand
9893 * Makefile.am: Replace all the system-specific threading code with
9894 a single file that uses the new wrapper library
9896 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
9898 * class.c, class.h: add mono_install_trampoline() so that the runtime
9899 can register a function to create a trampoline: removes the ugly
9900 requirement that a runtime needed to export arch_create_jit_trampoline.
9901 * object.h, object.c: added mono_install_handler() so that the runtime
9902 can install an handler for exceptions generated in C code (with
9903 mono_raise_exception()). Added C struct for System.Delegate.
9904 * pedump.c: removed arch_create_jit_trampoline.
9905 * reflection.c: some cleanups to allow registering user strings and
9906 later getting a token for methodrefs and fieldrefs before the assembly
9908 * row-indexes.h: updates and fixes from the new ECMA specs.
9910 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
9912 * class.h, class.c: add enum_basetype field to MonoClass.
9913 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
9914 to get index in the constant table reated to a field, param or
9916 * reflection.h, reflection.c: handle constructors. Set public-key and
9917 version number of the built assembly to 0.
9918 * row-indexes.h: update from new ECMA spec.
9920 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
9922 * class.h, class.c: add a max_interface_id to MonoClass.
9923 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
9924 since it's used to do that. Added mono_type_type_from_obj().
9925 Make GetType() return NULL instead of segfaulting if the type was not
9926 found. Handle simple arrays in assQualifiedName.
9927 * object.h: add a struct to represent an Exception.
9928 * reflection.c: output call convention in method signature.
9929 Add code to support P/Invoke methods and fixed offsets for fields.
9931 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
9933 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
9935 * icall.c: use mono_array_addr instead of array->vector: fixes the
9936 reflection image writing.
9937 * reflection.c: init call convention byte to 0 in method signature.
9938 Encode the property signature. Don't output property-related methods
9939 twice. Really process the properties for a type (don't cast a field to
9940 a property, my mom always told me that).
9941 Fix 64 bit issues in pointer alignment in a different and more
9944 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
9946 * loader.h: Removed type class from MonoDefaults, added monotype
9948 * loader.c: Loaded MonoType, removed loading of Type
9950 * icall.c (my_mono_new_object): Now returns a System.MonoType,
9951 and fills in System.Type._impl with a RuntimeTypeHandle rather
9952 than the actual MonoClass *
9954 (ves_icall_type_from_handle): change from type_class to
9957 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
9960 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
9963 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
9965 (ves_icall_System_Reflection_Assembly_GetType): implemented
9967 (ves_icall_System_MonoType_assQualifiedName): implemented
9969 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
9971 2001-11-09 Miguel de Icaza <miguel@ximian.com>
9973 * assembly.c (mono_assembly_open): Implement a cache for the
9976 (mono_assembly_close): only destroy the assembly when the last
9979 2001-11-09 Dick Porter <dick@ximian.com>
9981 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
9983 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
9985 * class.c (mono_class_metadata_init): bug fix: compute the right slot
9987 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
9989 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
9990 from Martin Weindel.
9991 * object.h: add mono_string_chars ().
9993 2001-11-07 Miguel de Icaza <miguel@ximian.com>
9995 * reflection.c (build_compressed_metadata): Eliminates warnings
9996 and uses 64-bit clean code.
9998 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
9999 (mono_type_equal): Change signature to eliminate warnings.
10001 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10003 * icall.c, loader.c: remove the internalcall array constructors.
10004 Changes to match the new MonoArray structure.
10005 * object.h, object.c: an array object doesn't allocate an extra
10006 vector. Add mono_array_new_full () to create jagged arrays easily.
10008 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
10010 * metadata.h, metadata.c: add mono_metadata_field_info () to
10011 retreive all the info about a field from vairous tables.
10012 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
10013 * class.h, class.c: augment MonoClassField with more info.
10014 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
10015 policy and load a field's RVA if needed.
10017 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
10019 * class.c (mono_class_metadata_init): create a trampoline for all
10020 virtual functions instead of actually compiling them.
10022 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
10024 * class.h, class.c: include name in MonoClassField.
10025 * class.c: fix fundamental type of System.Object and System.String.
10026 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
10028 * icall.c: remove internalcalls for the Reflection stuff that is now
10030 * loader.c: mono_field_from_memberref () implementation.
10031 * mono-endian.c: thinko (s/struct/union/g).
10032 * object.c, object.h: make the mono_string_* prototypes actually use
10033 MonoString instead of MonoObject.
10034 * reflection.c, reflection.h: updates for changes in the reflection
10035 code in corlib: we use C structures that map to the actual C# classes.
10036 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
10037 fat method header if needed and use the info from the ILGenerator for
10038 methods. Handle fields in types. Misc fixes.
10040 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
10042 * class.c (mono_class_metadata_init): bug fix: always allocate
10043 space for static class data
10045 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
10047 * class.c (mono_compute_relative_numbering): use relative
10048 numbering to support fast runtime type checks.
10050 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
10052 * class.c (mono_class_create_from_typeref): added debugging output
10053 to print class name when MonoDummy is returned instead of real class
10055 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
10057 * class.c (mono_class_metadata_init): interface offset table now
10058 contains pointers into the vtable - this is more efficient for the jit
10060 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
10062 * class.c (mono_class_metadata_init): use a temporary vtable (the
10063 old algorithm only worked for the interpreter, but not for the jit)
10065 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
10067 * loader.c (method_from_memberref): use mono_class_get to get the
10068 class of an array instead of using System.Array directly.
10069 (mono_get_method): also add MEMBERREF methods to the method cache
10070 which usefull for arrays.
10072 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
10074 * pedump.c (arch_compile_method): added to compute vtable entry
10076 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
10077 number of interfaces.
10079 * class.h: merged MonoArrayClass into MonoClass
10081 * class.c (mono_class_create_from_typedef): compute the vtable size and
10082 allocate space to include the vtable inside MonoClass
10083 (mono_class_metadata_init): initialize the vtable
10085 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
10087 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
10088 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
10089 * image.c: endian fixes by Laurent Rioux.
10090 * object.h, object.c: rename MonoStringObject to MonoString and
10091 MonoArrayObject to MonoArray. Change some function names to conform to
10092 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
10093 guint16* as first argument, so don't use char*.
10094 Provide macros to do the interesting things on arrays in a portable way.
10095 * threads-pthread.c: updates for the API changes and #include <sched.h>
10096 (required for sched_yield()).
10097 * icall.c: updates for the API changes above.
10098 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
10099 platforms that need them.
10101 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
10103 * class.c: set the correct type for all the fundamental
10104 type when loading the class.
10106 2001-10-05 Dick Porter <dick@ximian.com>
10108 * threads-pthread.c (pthread_mutex_timedlock): Simple
10109 compatibility version for C libraries that lack this call.
10111 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
10113 * class.c: MonoTypes stored in MonoClass are stored as
10114 fundamental MonoTypes when the class represents a
10115 fundamental type (System.Int32, ...).
10116 The TypeHandle return by ldtoken is a MonoType*.
10117 * icall.c: ves_icall_get_data_chunk () write out all the
10118 PE/COFF stuff. Implement ves_icall_define_method (),
10119 ves_icall_set_method_body (), ves_icall_type_from_handle ().
10120 * image.c: properly skip unknown streams.
10121 * loader.h, loader.c: add type_class to mono_defaults.
10122 * metadata.c, metadata.h: export compute_size () as
10123 mono_metadata_compute_size () with a better interface.
10124 Typo and C&P fixes.
10125 * pedump.c: don't try to print the entry point RVA if there is no entry point.
10126 * reflection.c, reflection.h: many cleanups, fixes, output method
10127 signatures and headers, typedef and typeref info, compress the metadata
10128 tables, output all the heap streams, cli header etc.
10129 * row-indexes.h: typo fixes.
10131 2001-10-04 Dick Porter <dick@ximian.com>
10133 * object.h: Add a synchronisation mutex struct to MonoObject
10135 * object.c (mono_new_object): Initialise the object
10136 synchronisation mutexes
10138 * icall.c: System.Threading.Monitor internal calls
10140 * threads-pthread.h:
10141 * threads-pthread.c: System.Threading.Monitor internal calls
10143 * threads-types.h: New file, includes the system-specific thread
10146 * threads-pthread-types.h:
10147 * threads-pthread-types.c: New files, handle pthread-specific
10148 synchronisation types
10150 * threads-dummy-types.h:
10151 * threads-dummy-types.c: New files of dummy support for
10152 thread-specific types
10156 * pedump.c: include mono-endian.h not endian.h
10158 * Makefile.am: More threads files.
10159 Name mono-endian.h not endian.h
10161 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
10163 * Makefile.am, reflection.h, reflection.c: move here the reflection related
10164 stuff and implement a few more bits.
10165 * icall.c: a field needs to be dereferenced twice. Do not use the same
10166 name for two variables in the same scope.
10167 * image.c, image.h: cleanups.
10169 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
10171 * class.c (mono_class_metadata_init): bug fix: compute the right size
10173 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
10175 * icall.c: implemented some of the Reflection internalcalls.
10176 * image.c, image.h: start writing out the PE/COFF image.
10177 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
10178 that does the reverse than decode_blob_size ().
10179 * object.c: use mono_metadata_encode_value (). Move here
10180 temporary implementation of mono_string_to_utf8 ().
10181 * rawbuffer.c: make malloc_map static.
10183 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
10185 * metadata.c: fix type comparison for arrays.
10186 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
10187 Added a couple of new classes to monodefaults.
10188 * icall.c: added a couple of Reflection-related internalcalls.
10189 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
10190 Added a byval_arg MonoType to MonoClass.
10192 2001-09-28 Dick Porter <dick@ximian.com>
10195 * threads-pthread.h:
10196 * threads-pthread.c: Implemented internal calls for
10197 LocalDataStoreSlot operations. Applied mutexes around all shared
10198 data. Reworked the thread creation and Start() operations to
10199 avoid a race condition.
10202 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
10204 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
10206 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
10208 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
10210 * class.c, loader.c: warn and return NULL instead of erroring out.
10211 * icall.c: added System.AppDomain::getCurDomain().
10212 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
10214 2001-09-25 Dick Porter <dick@ximian.com>
10216 * threads-pthread.h:
10217 * threads-pthread.c: Implemented timed thread joining and added
10218 System.Threading.Thread::Join_internal internal call
10220 * icall.c: Added System.Threading.Thread::Join_internal internal call
10223 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
10225 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
10227 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
10228 mono_string_intern () to implement the semantics of the ldstr opcode
10229 and the interning of System.Strings.
10230 * icall.c: provide hooks to make String::IsIntern and String::Intern
10233 2001-09-23 Dick Porter <dick@ximian.com>
10236 * threads-dummy.h: New files of dummy threading routines
10238 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
10239 support code based on system specifics
10241 Rename PTHREAD_LIBS to THREAD_LIBS
10243 2001-09-23 Dick Porter <dick@ximian.com>
10245 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
10246 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
10248 (mono_thread_init): Set up a Thread object instance to return when
10249 the main thread calls Thread.CurrentThread
10250 (mono_thread_cleanup): Wait for all subthreads to exit
10252 * icall.c: New internal calls for System.Threading.Thread::Sleep
10253 (including Schedule) and CurrentThread
10255 * threads.h: New file, to insulate thread-specific stuff from the
10258 2001-09-21 Dick Porter <dick@ximian.com>
10260 * threads-pthread.h:
10261 * threads-pthread.c: New file, for handling pthreads-style
10262 threading support. Start() now starts a new thread and executes
10263 the ThreadStart delegate instance.
10265 * icall.c: Added the internalcall for
10266 System.Threading.Thread::Start_internal
10268 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
10270 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
10272 * loader.c: work around the different signatures for delegates
10273 constructors csc generates in compiled code vs the ones compiled in mscorlib.
10275 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
10277 * class.h, class.c: add mono_class_get_field_from_name ().
10278 * *: Fix C comments and other ANSI C issues.
10280 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
10282 * endian.h, assembly.c: fix some endianness issues.
10284 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
10286 * loader.h, load.c: add delegate_class to mono_defaults.
10287 Handle runtime provided methods in mono_get_method ().
10289 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
10291 * loader.c (mono_get_method): use pinvoke for internal call
10293 * icall.c: use pinvoke for internal call
10295 * loader.c (method_from_memberref): set the method name
10297 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
10299 * metadata.c: help the compiler generate better code for
10300 mono_class_from_mono_type ().
10302 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
10304 * class.c (mono_class_metadata_init): delayed computing of the
10305 class size to mono_class_metadata_init ()
10307 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
10309 * class.c, class.h: add an interfaces member to MonoClass.
10310 * image.c, image.h: add assembly_name field to MonoImage
10311 from the assembly table.
10312 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
10314 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
10316 * class.c: Handle Array in mono_class_from_mono_type ().
10317 * metadata.c, pedump.c: some endian fixes.
10319 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
10321 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
10322 * metadata.c: fix small problem introduced with the latest commit.
10324 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
10326 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
10327 We don't need a MonoMetadata pointer anymore to compare signatures in
10328 mono_metadata_signature_equal (), update callers.
10329 Reduced memory usage an number of allocations for MonoMethodHeader and
10330 MonoMethodSignature.
10332 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
10334 * metadata.c: added compare for szarray.
10336 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
10338 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
10339 and add a couple more types to it and mono_defaults. Give an hint on
10340 classes that need implementing in our corlib and are referenced
10343 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
10345 * class.h, class.c: keep track if a class is also an Enum.
10346 * loader.c: Implement a couple more types for use in libffi
10347 marshalling. Gives better diagnostics when failing to dlopen
10348 a library. Set method->klass for P/Invoke methods, too.
10350 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
10352 * class.c, class.h: add a MonoType this_arg to MonoClass that
10353 represents a pointer to an object of the class' type that
10354 can be used by the interpreter and later the type cache.
10355 Add best guess alignment info for valuetype objects.
10357 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
10359 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
10360 into MonoType: one less level of indirection and allocation and
10361 simplifies quite a bit of code. Added cache for MonoTypes that are
10362 used frequently, so that we don't need to allocate them all the time.
10364 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
10366 * class.c (mono_class_create_from_typedef): System.Enum is also a
10367 value type, although it does not derive from System.ValueType
10368 (maybe a bug in the ms compiler?)
10370 * metadata.c (mono_type_size): return the right size for value types
10372 * loader.c (mono_get_method): only initialize method header if not abstract
10374 * class.c (mono_class_from_mono_type): use mono_default values.
10376 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
10378 * *: use MonoClass pointers instead of <type_tokens>
10380 * class.h: new flag: metadata_inited.
10382 * class.c (mono_class_metadata_init): impl.
10383 (mono_class_instance_size): impl.
10384 (mono_class_data_size): impl.
10386 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
10388 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
10389 MonoClass now has the name and name_space fields.
10390 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
10391 mono_get_method () takes and optional MonoClass as argument.
10392 Removed mono_typedef_from_name() and added mono_class_token_from_name()
10393 instead that takes advantage of a map from class names to typedef
10394 tokens in MonoImage.
10396 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
10398 * metadata.c: zero is not a valid alignment boundary.
10399 Merge MONO_TYPE_VOID in default decoding code.
10401 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
10403 * image.h: merged MonoMetadata into MonoImage
10405 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
10406 identify the type of elements.
10408 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
10410 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
10411 * cil-coff.h: split MonoMSDOSHeader and add size info.
10412 * image.c: add some consistency checks.
10413 * metadata.c: fix row size computation: one programmer
10414 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
10415 add explanation for the locator routine.
10416 Fix decoding of size in method header.
10418 2001-08-20 Miguel de Icaza <miguel@ximian.com>
10420 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
10421 (g_concat_dir_and_file): Bring g_concat_dir_and_file
10422 function from gnome-libs. This uses the right path separator
10423 based on the OS, and also works around a bug in some systems where
10424 a double slash is not allowed.
10425 (default_assembly_name_resolver): Use g_concat_dir_and_file
10426 (mono_assembly_open): ditto.
10428 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
10430 * metadata.c (mono_metadata_signature_equal): impl.
10432 * *: void is now a realy MonoType (instead of using NULL)
10434 * metadata.c (do_mono_metadata_parse_type): use
10435 mono_metadata_parse_type to parse void value.
10437 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
10439 * metadata.c, metadata.h: in the signature and method header store
10440 only the space required for holding the loca vars and incoming arguments.
10442 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
10444 * metadata.c (do_mono_metadata_parse_type): treat void like any
10445 other type (instead of assigning NULL);
10447 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
10449 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
10451 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
10453 * image.c (do_mono_image_open): added a cache for arrays.
10455 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
10457 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
10458 decode a single column from a row in a metadata table and changes
10459 to take advantage of it in the typedef locator (gives a nice speed up).
10460 Store offset info for function params.
10462 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
10464 * image.h (MONO_IMAGE_IS_CORLIB): removed
10466 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
10468 * assembly.c: how could mono_assembly_close () had ever worked?
10469 * metadata.c, metadata.h: provide offset info for local vars.
10470 Implement mono_type_size () to take care of alignment as well
10471 as size (it was mono_field_type_size in cli/class.c before).
10473 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
10475 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
10477 * assembly.h (CORLIB_NAME): set to corlib.dll
10479 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
10481 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
10483 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
10484 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
10485 tokentype.h: massive namespace cleanup.
10487 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
10489 * metadata.h, metadata.c: decode exception clauses when parsing method header.
10491 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
10493 * metadata.c (mono_metadata_free_type): added check for type !=
10494 NULL (void) before calling mono_metadata_free_type()
10496 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
10498 * metadata.h, row_indexes.h: added header with enumerations to use
10499 to index in the columns from tables in metadata and to decode coded
10500 tokens: we should start using this instead of embedding magic numbers
10503 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
10505 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
10506 Move metadata_t info from cli_image_info_t to MonoImage, where
10507 it's easily accessible. Changed all the uses accordingly.
10508 Added the method and class caches to MonoImage.
10509 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
10510 and mono_metadata_decode_value () signature to be more consistent
10511 with the other parse functions (and simplify code). Taken advantage
10512 of zero-length array allocation with GCC. Removed reduntant (and
10513 wrong) MonoFieldType struct and use MonoParam instead. Changed
10514 mono_metadata_parse_field_type () to use common code for parsing.
10515 Added mono_metadata_typedef_from_field () and
10516 mono_metadata_typedef_from_method () to lookup a typedef index from a
10517 field or method token.
10518 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
10520 2001-07-23 Miguel de Icaza <miguel@ximian.com>
10522 * metadata.c (mono_metadata_parse_field_type): Implement.
10523 (do_mono_metadata_parse_type): Split engine from
10524 mono_metadata_parse_type, so that we can create smaller structures
10525 for things that just have one pointer to the MonoType (look at
10528 2001-07-20 Miguel de Icaza <miguel@ximian.com>
10530 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
10531 as Jan Gray found out, it is incorrect.
10533 2001-07-18 Miguel de Icaza <miguel@ximian.com>
10535 * assembly.c: Implement asssembly loading. This loads an image
10536 and loads all the referenced assemblies. Come to think of it, we
10537 could always do lazy loading of the assemblies.
10539 * image.c (mono_image_open): Keep loaded images in a hashtable.
10541 * image.h (MonoImage): Add reference count.
10543 2001-07-17 Miguel de Icaza <miguel@ximian.com>
10545 * assembly.c (mono_assembly_open): Keep track of the file name in
10546 case the assembly has no ASSEMBLY table.
10548 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
10551 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
10553 * metadata.c, metadata.h: decode local vars in method header
10554 parse function. Change callers accordingly.
10556 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
10558 * metadata.h, cil-coff.h: protect against multiple inclusion.
10559 Added some new structures to hold information decoded from metadata:
10560 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
10561 and relevant decoding/free functions.
10562 * metadata.c: implement decoding functions. Add warning for out of bounds
10563 index in mono_metadata_locate(). Implement mono_get_method () to retreive
10564 all the info about a method signature and invocation. Remove check on
10565 uninitialized local var in parse_mh() and fix memory leak.
10567 2001-07-12 Miguel de Icaza <miguel@ximian.com>
10569 * metadata.h: More macros.
10571 * tokentype.h: New file.
10573 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
10575 * assembly.c: added a consistency check and initialize
10576 some structures with g_new0().
10577 * metadata.c: fixed a couple more bugs in table size computation
10578 and add other checks for out-of bound access to metadata.
10580 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
10582 * metatada.c: fix bugs computing table sizes. Spew a
10583 warning when index in string heap is out of bounds.
10585 2001-07-04 Miguel de Icaza <miguel@ximian.com>
10587 * metadata.h: Add a couple of macros to manipulate tokens.
10589 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
10591 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
10592 cli_section_tables).
10594 2001-07-01 Miguel de Icaza <miguel@ximian.com>
10596 * metadata.c (mono_metadata_user_string): New function, provides
10597 access to the UserString heap.
10599 2001-06-27 Miguel de Icaza <miguel@ximian.com>
10601 * metadata.c: Add inline documentation.
10603 2001-06-26 Miguel de Icaza <miguel@ximian.com>
10605 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
10608 2001-06-22 Miguel de Icaza <miguel@ximian.com>
10610 * typeattr.h: New file, TypeAttribute flags.
10612 2001-06-21 Miguel de Icaza <miguel@ximian.com>
10614 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
10615 mono_assembly_ensure_section): Section loading code.
10616 (load_section_tables): Load the sections.
10618 * mono/metadata/metadata.c (mono_metadata_locate_token,
10619 mono_metadata_locate): Functions to locate the information
10620 definition given a token or a table and an index.
10621 (mono_metadata_compute_table_bases): New.
10622 (compute_size): New function to compute the sizes of the various
10625 * mono/metadata/metadata.h: Finish listing the different index
10628 * mono/metadata/pedump.c: Improve to dump new information.
10630 2001-06-19 Miguel de Icaza <miguel@ximian.com>
10632 * mono/metadata/metadata.c: Entered all the tables matching
10635 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2