1 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3 * reflection.c: fix start address when copying the public key token.
5 2004-06-23 Martin Baulig <martin@ximian.com>
7 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8 the `exc' object in a static object to put it into the GC's root set.
10 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
12 * reflection.c: make mono_reflection_setup_internal_class ()
13 callable a second time to setup a new parent class.
15 2004-06-23 Dick Porter <dick@ximian.com>
17 * threads.c: Check for WAIT_IO_COMPLETION return values.
19 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
21 * appdomain.c: Removed the g_free on the public key token. Now copy
22 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
23 * assembly.c: Added public key token string value when loading
24 assemblies. Fix bug #60439.
25 * icall.c: Added missing informations (like public key) in
26 GetReferencedAssemblies. Fix #60519.
27 * image.h: Changed definition for public key token from const char*
28 public_tok_value to guchar public_key_token [17];
29 * reflection.c: Updated for changes to public key token.
31 2004-06-22 Lluis Sanchez Gual
33 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
34 for the field in base classes.
36 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
38 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
39 mark headers as not supported, they are installed only for use by the
42 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
44 * *.c, *.h: avoid namespace pollution in public headers.
46 2004-06-21 Martin Baulig <martin@ximian.com>
48 * exception.c (mono_get_exception_security): It's in
49 "System.Security", not in "System".
51 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
52 the exception classes.
54 2004-06-21 Martin Baulig <martin@ximian.com>
56 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
57 Protect the exception object from being finalized.
59 2004-06-21 Martin Baulig <martin@ximian.com>
61 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
64 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
66 * reflection.c: Load the assembly in mono_reflection_type_from_name,
67 if it was not loaded before. Fix parts of #60439.
69 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
71 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
72 code that was broken since Ben's change: wrappers are now
73 dependent on the method signature only again.
75 2004-06-21 Martin Baulig <martin@ximian.com>
77 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
78 added interface support.
80 2004-06-21 Martin Baulig <martin@ximian.com>
82 * class.c (mono_vtable_get_static_field_data): New public method.
84 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
86 * filewatcher.c : Windows build fix to be compliant with API changes.
88 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
90 * class.h, class.c: more accessors.
91 * metadata.h, metadata.c: prepare for hiding MonoType and
92 MonoMethodSignature: people should use the accessors from now on
95 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
97 * *.c, *.h: more API cleanups.
99 2004-06-18 Jackson Harper <jackson@ximian.com>
101 * assembly.c: Trace loading assemblies.
102 * loader.c: Trace loading native libraries.
103 * mono-config.c: Trace loading config files.
105 2004-06-18 Dick Porter <dick@ximian.com>
107 * locales.c: Tell ICU the lengths of strings, it can cope with
108 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
110 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
112 * image.c: swapped name/filename;
114 2004-06-18 Martin Baulig <martin@ximian.com>
116 * mono-debug-debugger.c (write_class): Write the parent class at
117 the end of the header.
119 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
121 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
123 2004-06-17 Raja R Harinath <rharinath@novell.com>
125 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
126 (bundle_obj): New conditional define.
127 (BUILT_SOURCES): Remove.
128 ($(bundle_srcs)): Make parallel-make safe.
129 (libmonoruntime_la_LIBADD): Make unconditional.
130 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
131 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
133 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
135 * culture-info-tables.h: It was inconsistent with the latest
138 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
140 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
143 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
146 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
148 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
149 cleaned up public header threads.h.
151 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
153 * Makefile.am, *.c, *.h: more API cleanups.
155 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
157 * Makefile.am: removed monosn from compilation.
158 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
159 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
160 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
161 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
162 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
163 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
165 2004-06-15 Jackson Harper <jackson@ximian.com>
167 * assembly.c: Make locales lower case when searching the GAC for
168 assemblies. gacutil will always make locales lowercase when
169 installing so this effectively makes them case insensitive.
171 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
173 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
174 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
175 parameter which allows to choose whether the wait can be interrupted or
176 not. Also added the method mono_monitor_enter(), which locks the monitor
177 using an infinite wait and without allowing interruption.
178 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
180 * object.h: Added new fields in MonoThread. suspend_event holds the event
181 used to susped/resume the thread. synch_lock is the lock object to use for
182 modifying the thread state.
183 * threads.c: Use the new synch_lock object for locking, instead of "this",
184 which can generate deadlocks.
185 Moved thread state change in Thread.Sleep and Thread.Join from managed
186 to unmanaged code. This avoids a deadlock when the thread was suspended
187 just after acquiring the thread lock.
188 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
189 Implemented Thread.Suspend using an event instead of ThreadSuspend,
190 which is not fully implemented in the io-layer.
191 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
193 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
195 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
196 threads-types.h: more API cleanups.
198 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
200 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
201 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
202 threadpool.c, threads.c: first pass at the exported API cleanup.
204 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
206 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
208 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
210 * icall.c: added internalGetHome.
212 2004-06-14 Dick Porter <dick@ximian.com>
214 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
215 possible to return successfully when '.' or '..' were the only
216 entries in a directory, but were skipped. The MonoIOStat was not
217 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
220 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
222 * reflection.c: make binaries run on .Net 1.1 by default.
224 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
226 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
228 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
230 * marshal.c: keep track of struct size with explicit layout
233 2004-06-12 Martin Baulig <martin@ximian.com>
235 * mono-debug-debugger.c: Comment out a debugging g_message().
237 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
239 * reflection.c, reflection.h: do not free custom attrs that are cached.
240 * icall.c: use braces to make code clearer.
242 2004-06-11 Martin Baulig <martin@ximian.com>
244 * class.h (MonoInflatedField): New type.
245 (MonoClassField): Replaced `MonoType *generic_type' with
246 `MonoInflatedField *generic_info'.
249 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
251 2004-06-11 Martin Baulig <martin@ximian.com>
253 * reflection.c (mono_image_create_method_token): Correctly encode
256 2004-06-11 Martin Baulig <martin@ximian.com>
258 * metadata.c (mono_metadata_parse_method_signature): When parsing
259 a MethodDef which has VarArgs, also set sentinelpos if we don't
262 2004-06-11 Martin Baulig <martin@ximian.com>
264 * verify.c (mono_method_verify): In CEE_CALL, use
265 mono_method_get_signature() to get the method's signature, unless
266 we're a PInvoke method.
268 2004-06-10 Jackson Harper <jackson@ximian.com>
270 * assembly.c: Use <path>/lib/mono/gac for the extra paths
271 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
272 logical name as the supplied path is just a prefix to the gac not
273 the direct path to it.
275 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
277 * reflection.c: make the token for a created method match
278 the token of the MethodBuilder it was created from
279 (IKVM requires this behaviour now).
281 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
283 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
284 reflection.c, socket-io.c: leak fixes.
286 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
288 * icall.c: handle sentinel pos in vararg methods in position different
291 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
293 * culture-info-tables.h: freshly generated.
295 2004-06-09 Martin Baulig <martin@ximian.com>
297 * loader.c (mono_get_method_constrained): Call `mono_class_init
298 (constrained_class)'.
300 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
302 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
303 any methods. Fixes #59629.
305 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
307 * culture-info-tables.h: reflecting locale-builder updates.
309 2004-06-08 Dick Porter <dick@ximian.com>
312 * locales.c: Fixed compile warnings, including a real bug in
313 CompareInfo_internal_compare.
315 2004-06-08 Dick Porter <dick@ximian.com>
318 (ves_icall_System_Globalization_CompareInfo_internal_index):
319 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
320 Double-check the resuls of usearches, because ICU currently
321 ignores most of the collator settings here. Fixes bug 59720.
323 2004-06-08 Dick Porter <dick@ximian.com>
326 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
327 Fix memory leak and segfault-causing typo. No idea how this one
328 lasted so long without being noticed.
330 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
332 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
333 any methods. Fixes #59629.
335 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
338 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
339 own the critical section before). Removed dead code (that's done
340 in the preload hook).
342 (mono_assembly_load_with_partial_name): call the preload hook.
344 2004-06-08 Martin Baulig <martin@ximian.com>
346 * metadata.c (mono_metadata_signature_alloc): Default
349 * reflection.c (mono_image_get_array_token): Likewise.
351 2004-06-08 Martin Baulig <martin@ximian.com>
353 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
355 * metadata.c (mono_metadata_parse_method_signature): When parsing
356 a MethodDef which has VarArgs, set sentinelpos.
358 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
359 `gint16' since we're using -1 for non-varargs methods.
362 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
363 (method_encode_signature): Added varargs support.
364 (method_builder_encode_signature): Likewise.
365 (mono_image_get_varargs_method_token): New static method.
366 (mono_image_create_method_token): New public method; this is
367 called via an icall instead of mono_image_create_token() when
368 calling a varargs method.
370 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
372 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
374 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
376 * culture-info-tables.h : Reflecting the latest locale-builder that
377 fixed empty array representation ({} to {0}).
379 2004-06-07 Jackson Harper <jackson@ximian.com>
381 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
382 looking up extra gac paths. This allows MONO_GAC_PATH to act
383 exactly like a prefix.
385 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
387 * reflection.c (mono_reflection_type_from_name): Make a copy of the
388 type name before modifying it. Fixes #59405.
390 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
392 * culture-info.h: added fields for "all datetime patterns".
393 * locales.c: ( ves_icall_System_Globalization_CultureInfo
394 _construct_datetime_format ()): fill xxx_patterns fields.
395 * object.h: added fields for "all datetime patterns" to
396 MonoDateTimeFormatInfo.
397 * culture-info-tables.h: reflecting locale-builder updates.
399 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
401 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
402 the event has no add and remove methods. Fixes #59629.
404 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
406 * object.c: Fixed possible integer overflow when allocating large
409 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
411 * culture-info-tables.h: reflecting locale-builder updates.
413 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
415 * culture-info-tables.h: reflecting locale-builder updates.
417 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
419 * culture-info-tables.h: reflecting locale-builder updates.
421 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
423 * threads.c: Made Thread.Sleep abortable.
425 2004-06-02 Martin Baulig <martin@ximian.com>
427 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
429 * debug-mono-symfile.h: Bumped symbol file version number to 37.
431 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
433 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
435 2004-05-30 Jackson Harper <jackson@ximian.com>
437 * reflection.c: Do not hardcode assembly versions or public key
438 tokens anymore. All of this except the corlib section was dead
441 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
443 * object.c (mono_runtime_invoke_array): Automatically create boxed
444 objects for byref valuetypes if needed. Fixes #59300.
446 * object.c (mono_method_return_message_restore): Handle
447 MONO_TYPE_OBJECT as well.
449 2004-05-28 Jackson Harper <jackson@ximian.com>
451 * reflection.c: The modified type encoding was causing build
452 problems. Reverted for now.
454 2004-05-28 Jackson Harper <jackson@ximian.com>
456 * reflection.c/h: Take an assembly ref so that we dont create
457 fully qualified names when encoding types in the same assembly as
458 the custom attribute being emitted.
459 * appdomain.c: Increment version number.
461 2004-05-26 Duncan Mak <duncan@ximian.com>
464 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
465 Set the full version number (major, minor, build, revision).
467 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
469 * marshal.c (emit_struct_conv): increment src/dst after blit
470 (mono_marshal_get_managed_wrapper,
471 mono_marshal_get_native_wrapper): make sure we have marshalling
472 info before marshalling params (info computation affects
475 * class.c (class_compute_field_layout): correctly deal with
477 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
478 value types (as per what windows dows by default)
479 (mono_class_setup_mono_type): System.ValueType is blittable
480 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
483 * marshal.c (mono_marshal_load_type_info): flag types as
484 non-blittable if the native layout doesn't match the managed
487 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
489 * appdomain.c: don't add stuff in the private search path that is
490 above the application base. If application base is not set, there's
491 no private search path.
493 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
495 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
496 byref struct arguments in native->managed marshalling.
498 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
500 * marshal.c (mono_marshal_get_runtime_invoke): correctly
501 cache methods using signature (special case for methods
502 that are value type or string class)
504 * image.c (mono_image_close): clean up allocated GSList's
505 in runtime_invoke_cache.
507 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
509 * mono-config.c: set the correct path for mono_cfg_dir on windows when
510 there's no MONO_CFG_DIR environment variable defined.
512 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
514 * threads.c: windows version must be >= 0x0500 to include OpenThread.
516 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
518 * threadpool.c: Really wait for 500ms after the async call, even if the wait
520 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
521 before waiting for it, and call CloseHandle after the wait to unref it.
522 This will make sure that handles are not disposed too early.
524 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
529 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
532 * object.c: se the application_base only for the domain that runs
533 Main. Fixes bug #59216,
535 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
538 * object.c: only the domain in which Main is run have
539 SetupInformation.ConfigurationFile set, so moved a few lines from
540 appdomain.c to object.c.
542 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
544 * appdomain.c: we tried to load [name].(dll|exe), but according
545 to bug #57710, we must also try [culture]/[name].(dll|exe) and
546 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
547 There's a test case attached to bug #58922.
549 2004-05-27 Dick Porter <dick@ximian.com>
552 * file-io.c: Implemented icalls for locking and unlocking regions
554 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
555 FALSE on error (fixes both compiler warning and real bug.)
557 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
559 * culture-info-tables.h: reflecting locale-builder updates.
561 (Added missing ChangeLog entry for 05/26)
563 2004-05-27 Jackson Harper <jackson@ximian.com>
565 * locales.c: Fix some cut and paste errors.
567 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
569 * mono-config.c: set the correct path for config. directory on windows.
571 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
573 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
576 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
578 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
579 from pinvoke functions.
581 * marshal.c (mono_ftnptr_to_delegate): Implement this.
583 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
585 * culture-info-tables.h: reflecting locale-builder updates.
587 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
589 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
592 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
594 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
595 * icall.c: Modified icalls for RNG.
596 * rand.c|h: Changed RNG interface to allow thread-safe usage under
599 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
601 * locales.c: Fix build.
603 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
605 * culture-info-tables.h: reflecting locale-builder updates.
607 2004-05-25 Jackson Harper <jackson@ximian.com>
609 * locales.c: When creating the current culture use the $LANGs
610 specific culture. So DateTimeFormat and NumberFormat entries are created.
612 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
614 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
615 a char array as parameter.
617 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
619 * image.c: In mono_image_open(), always use an absolute path name to
620 look for already loaded images.
622 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
624 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
625 missing in the windows build (like older cygwin include files).
627 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
629 * icall.c: Fixed check for possible integer overflow in Buffer_
630 BlockCopy icall. Replaced comments style // by /* */.
632 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
634 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
636 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
637 check after MONO_VTADDR. Fixes pinvoke2.exe.
639 * marshal.h marshal.c metadata.h: Add beginnings of support for
640 ftnptr -> delegate marshalling.
642 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
644 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
645 * threads.c: Fix warnings.
647 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
649 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
650 * icall.c: Registered icalls for Suspend and Resume.
651 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
653 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
654 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
655 * process.c: Use WaitForSingleObjectEx.
656 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
658 * threads.c, threads.h: Make use of new Ex wait methods. Improved
659 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
660 for Suspend and Resume. Added new mono_thread_stop, used for stoping
661 background threads. Added basic support for Abort in Windows.
662 Start new threads using a managed delegate invoke wrapper. This wrapper
663 has an interruption checkpoint that is needed since an interruption
664 can be requested before the thread leaves the unmanaged code that starts
666 * marshal.c: Added interruption checkpoint after every native call, and
667 also before managed calls for wrappers called from unmanaged code to
668 go into managed code.
669 * object.h: Added new field in MonoThread to keep track of interruption
672 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
674 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
677 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
684 * rand.c: getenv -> g_getenv (windows!)
686 * process.c: complete_path is also used on non-windows platforms.
688 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
690 * icall.c: new signature for Process_Start.
692 * process.[ch]: new signature for Process_Start. If we're on windows
693 and UseShellExecute is false, we have to search for the program by
694 ourselves if we don't get a full path.
696 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
698 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
699 marshalling and call CleanUpNativeData if needed. Fixes #58646.
701 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
703 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
706 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
708 * process.c: use double quotes to quote program name and arguments on
709 windows. Fixes bug #58575.
711 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
713 * file-io.c: don't return "." and ".." when using windows Find*File.
715 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
717 * marshal.c: Don't pass wrappers to message init because method
718 addressed used to lookup metadata. part of remoting[2|3] fix.
720 2004-05-15 Jackson Harper <jackson@ximian.com>
722 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
723 path is essentially the same as MONO_PATH except that it points to
724 GACs instead of lib directories.
725 * loader.h: The user gac is gone so we dont need function to
727 * mono-config.c: user gac option is now gone.
729 2004-05-15 Jackson Harper <jackson@ximian.com>
731 * culture-info.h: Make defines more consistent, add calendar data
732 to the culture info table.
733 * culture-info-tables.h: Add basic calendar data. Basically
734 everyone gets default gregorian until all the data is
736 * locales.c: Use the new consistent defines. Set calendar data for
737 culture info objects.
738 * object.h: add a field for calendar data to CultureInfo
740 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
742 * image.c: image->runtime_invoke_cache is keyed on signatures now.
743 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
745 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
746 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
747 an extra param that is the pointer of the method to invoke. The IL for
748 the invoke method is no longer specific to the method, but to the
749 signature of the method. Thus, we can share the same code for multiple
750 methods. This reduces the number of methods that have to be compiled.
752 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
754 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
756 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
758 * icall.c: Optimize Buffer.BlockCopy.
760 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
762 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
763 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
764 quote). Changed them to "MMMM yyyy".
766 2004-05-12 Miguel de Icaza <miguel@ximian.com>
769 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
771 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
773 * reflection.h: Updated after changes to managed structures.
775 * appdomain.c: Bump corlib version.
777 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
779 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
782 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
784 * Makefile.am: link to ../os/libmonoos.la on windows.
787 -If MONO_DEBUG, warn about non-existing directories in
789 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
790 compile time variable.
791 -Removed init_default_path and call mono_set_rootdir from
792 libmonoos.a instead (windows only).
794 * assembly.h: declare mono_assembly_getrootdir().
797 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
799 * loader.c: s/getenv/g_getenv/
801 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
803 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
805 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
807 * metadata.h: Add new marshalling conversions.
809 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
812 * reflection.c (mono_reflection_get_type): Lookup the type in all
813 modules of a multi-module assembly. Fixes #58291.
815 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
817 * threads.c: Before aborting a background, set the StopRequested
818 state. This avoids throwing the Abort exception.
819 In mono_thread_manage, don't continue with the shutdown until all
820 aborted threads have actually stopped.
822 2004-05-10 Jackson Harper <jackson@ximian.com>
824 * locales.c: Remove the modifier from culture names.
826 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
828 * Makefile.am: monosn is not installed any more. It has been deprecated
831 2004-05-07 Jackson Harper <jackson@ximian.com>
834 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
835 Fix array construction, add bailout if the length is 0.
837 2004-05-07 Dick Porter <dick@ximian.com>
839 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
840 machine doesn't have a DNS entry. Patch by Urs Muff
841 (umuff@quark.com), fixes bug 57928.
843 2004-05-06 Jackson Harper <jackson@ximian.com>
845 * reflection.c: Handle null PublicTokens properly. alloc mem for
846 assembly names culture so we dont crash when freeing it.
848 2004-05-06 Jackson Harper <jackson@ximian.com>
850 * assembly.c: Check the usergac when loading with partial names.
852 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
854 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
855 does nothing for now (not required for Linux/Windows) but the class
856 library can call it (and a newer or modified runtime could need it).
857 * icall.c: Registred icall.
859 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
861 * loader.c: prints a message on module loading error we set MONO_DEBUG
862 environment variable.
864 2004-05-05 Jackson Harper <jackson@ximian.com>
866 * appdomain.c: Handle PublicKeyToken=null properly.
868 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
870 * environment.c|h: Added icall ves_icall_System_Environment_
871 GetOSVersionString to get the current OS version as a string.
872 * icall.c: Registred icall.
874 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
876 * object.c: in mono_object_get_virtual_method(), take into account that
877 non-virtual methods don't have a slot in the vtable. Check needed when
878 the object is a proxy.
880 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
882 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
883 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
885 * object.c (mono_class_compute_gc_descriptor): Fix warning.
887 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
888 passed when a valuetype is expected.
890 * object.c (mono_unhandled_exception): Only set the exit code if the
891 exception happens in the main thread. Fixes thread5.exe.
893 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
894 invalid names. Fixes #58047.
896 2004-05-03 Jackson Harper <jackson@ximian.com>
898 * assembly.c: This line was committed accidently and is unneeded.
900 2004-05-03 Jackson Harper <jackson@ximian.com>
902 * icall.c: Add new icall for Assembly::LoadWithPartialName
903 * assembly.c/.h: new function that probes the GAC to load partial
904 assembly names by Paolo Molaro.
906 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
908 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
909 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
910 (type_get_fully_qualified_name): Added PublicKeyToken when building a
913 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
915 * appdomain.c: fixed check for 'neutral' culture and removed warning.
916 * reflection.c: fix bug when parsing a full type name and Version is not
917 the last thing in the string.
919 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
921 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
922 crashes when it is freed.
924 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
926 * assembly.c: print the compat warning to stderr.
928 2004-05-01 Miguel de Icaza <miguel@ximian.com>
930 * assembly.c (mono_assembly_load_references): Add a compatibility
931 hack to run old applications that might be still referencing the
932 3300-based assemblies, only do this for System.xxx.
934 2004-05-01 Jackson Harper <jackson@ximian.com>
936 * appdomain.c: If the culture is neutral we set it to "".
938 2004-04-29 Jackson Harper <jackson@ximian.com>
940 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
942 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
944 * string-icalls.c: added low overhead function for copying chars
945 * icall.c: added needed icall for the above function
947 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
949 * icall.c: fix return value of get_global_assembly_cache. Implemented
950 Environment.GetLogicalDrives.
952 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
954 * rand.c: try and talk to egd or prngd
955 for random bytes if opening devices fail.
957 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
959 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
960 alignment for the type using the native alignment of its members
961 instead of using klass->min_align.
963 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
965 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
968 * socket-io.c: added check for sys/aio.h.
970 2004-04-28 Dick Porter <dick@ximian.com>
972 * threads.c: Don't abort a thread thats already aborting, when
973 terminating everything.
975 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
977 * icall.c: added 2 new async calls for Socket.
979 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
982 * threadpool.c: removed unused variable.
984 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
986 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
988 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
990 * locales.c: put back string_invariant_tolower () and
991 string_invariant_toupper ().
993 2004-04-26 David Waite <mass@akuma.org>
998 * unicode.h: remove comma from end of enumeration declarations
1000 2004-04-26 David Waite <mass@akuma.org>
1002 * debug-mono-symfile.h:
1005 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
1008 2004-04-26 Jackson Harper <jackson@ximian.com>
1010 * appdomain.c: Increment version number.
1012 2004-04-26 Jackson Harper <jackson@ximian.com>
1014 * appdomain.c: Set assembly references public token value when
1015 PublicKeyToken is specified, not the hash_value. Free public token
1016 values when free assembly name data. Previously the public key
1017 token was hex decoded, however we are using hex encoded public key
1018 tokens, so this is not neccasary.
1019 * assembly.c: Lookup assemblies in the gac if their public token
1020 value is set. Add function to allow enabling user gac
1021 lookups. Specify whether or not the assembly was loaded from the
1022 GAC. Compare full assembly names when checking the cache for
1023 assemblies (Temporarily disabled see comment in code). Remove
1024 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
1025 specifies trace-loader they get extra info to stdout on the
1026 loading of assemblies.
1027 * image.h: Add a field for an assembly references public token
1028 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
1029 whether an assembly has been loaded from the GAC.
1030 * image.c: Remove a corlib -> mscorlib name mapping.
1031 * loader.h: Add function to enable/disable the user gac.
1032 * mono-config.c: Check if the usergac is enabled in the config
1034 * icall.c: New icall to determine whether or not an assembly has
1035 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
1036 * tabldefs.h: Add constant for assemblyref flag that specifies a
1037 full public key is used instead of a public token.
1038 * reflection.c: Remove mscorlib -> corlib mappings. Set
1039 PublicTokenValue instead of hash value. This value is a hex
1040 string so it does not need to be expanded.
1042 2004-04-26 Martin Baulig <martin@ximian.com>
1044 * mono-debug-debugger.c (mono_debugger_initialize): Set
1045 `mono_debugger_initialized' before calling mono_debug_lock().
1047 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
1049 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
1050 InternalToUpper/InternalToLower.
1051 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
1052 removed invariant culture shortcut. This is now done in managed code.
1053 * locales.c: (string_invariant_toupper/tolower) removed.
1055 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1057 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
1058 Added Poll internal call.
1060 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
1061 call for Poll. Select was too heavy for polling a single socket.
1063 * threadpool.[ch]: added mono_threadpool_cleanup.
1064 * threads.c: use it. Don't use Thread_Abort on windows.
1066 2004-04-23 Martin Baulig <martin@ximian.com>
1068 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
1070 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
1072 * icall.c: Registred new icalls for key pair protection and added an
1073 icall for Environment.GetFolderPath on Windows.
1074 * security.c|h: Added new icalls for key pair protection.
1076 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1078 * socket-io.c: don't display the non-supported family warning for known
1079 families. Now this is not displayed on windows when checking support
1082 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1084 * class.c: don't display the layout warning for static fields.
1086 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
1088 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
1089 * locales.c, locales.h: Added new icalls for culture-specific
1090 Char.ToLower and Char.ToUpper.
1092 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1094 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
1097 2004-04-20 Martin Baulig <martin@ximian.com>
1099 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
1100 of the type name before passing it to mono_reflection_type_from_name().
1102 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
1104 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
1105 encodings here. Fixes #56965.
1107 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
1109 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1110 fix test on strstr result not that I can see anything that
1111 relies on the result.
1113 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
1115 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
1118 * marshal.c (mono_marshal_get_string_encoding): New helper function.
1120 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
1121 function to determine which marshalling to use for strings. Fixes
1124 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
1126 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
1128 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
1130 * icall.c: #include mono-config.h
1132 2004-04-15 Jackson Harper <jackson@ximian.com>
1134 * culture-info-tables.h: Fix date formats for en-US culture.
1136 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
1138 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
1139 ThreadPool.SetMinThreads.
1140 * threadpool.c: Implemented ThreadPool.GetMinThreads and
1141 ThreadPool.SetMinThreads.
1143 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1145 * mono-config.c: also load the .config file in the directory
1146 where the assembly was found.
1148 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
1150 * assembly.c: load per-assembly config files.
1151 * icall.c: decrapified code to get the config dir and moved to
1153 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
1154 per-assembly config files. When doing a dll map lookup give precedence
1155 to the per-assembly data.
1157 2004-04-14 Martin Baulig <martin@ximian.com>
1159 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
1160 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
1161 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
1163 * mono-debugger-debugger.c: While the debugger is locked, remember
1164 whether the symbol tables have changes and send one single
1165 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
1167 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
1169 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
1171 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
1174 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
1175 account when marshalling string arrays. Fixes #56965.
1177 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
1179 * icall.c: Add new icalls mapping for security.
1180 * security.c|h: Add internal calls for WindowsIdentity,
1181 WindowsImpersonationContext and WindowsPrincipal.
1183 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
1185 * class.c: Added comment to ensure the System.MonoDummy class
1186 is removed when no longer necessary
1188 2004-04-13 Miguel de Icaza <miguel@ximian.com>
1190 * appdomain.c: Pass arguments to the bootstraping exceptions to
1191 minimize JITed methods at boot
1193 * metadata.c (mono_exception_from_name_two_strings): Allow for the
1194 second string to be null.
1196 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1197 Change the protocol to minimize the JIT methods at startup. Now
1198 it Returns the internal codepage, if the value of "int_code_page"
1199 is 1 at entry, and we can not compute a suitable code page
1200 number, returns the code page as a string.
1202 2004-04-13 Jackson Harper <jackson@ximian.com>
1204 * culture-info-tables.h: Fix number of decimal digits for all
1207 2004-04-13 Jackson Harper <jackson@ximian.com>
1209 * icall.c: Clairfy out of sync error message. It is not always
1210 your corlib that is out of sync.
1212 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
1214 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
1215 properties when only the set accessor is overriden. Fixes #55874.
1217 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
1219 * assembly.c (mono_assembly_load_references): Make this thread safe.
1222 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
1224 * monosn.c: Add missing initialization calls.
1226 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
1229 ves_icall_System_Globalization_CultureInfo_construct_number_format
1230 Fix g_assert so it compiles on fussier compilers re int/ptr
1233 2004-04-08 Dick Porter <dick@ximian.com>
1236 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
1237 53992. Also rearrange the code so that the internal calls return
1238 an error value and exceptions are thrown from managed code.
1240 * icall.c: Add type info to the socket icalls.
1242 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1244 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
1247 2004-04-07 Martin Baulig <martin@ximian.com>
1249 * class.c (mono_class_from_generic_parameter): Don't default
1250 `klass->parent' to `mono_defaults.object_type'.
1252 2004-04-07 Martin Baulig <martin@ximian.com>
1254 * reflection.c (mono_reflection_initialize_generic_parameter): Set
1255 `param->pklass->reflection_info'.
1257 2004-04-07 Jackson Harper <jackson@ximian.com>
1259 * culture-info-tables.h: Fix date separator symbol.
1261 2004-04-07 Martin Baulig <martin@ximian.com>
1263 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
1264 from System.Type to System.MonoType.
1266 2004-04-07 Martin Baulig <martin@ximian.com>
1269 (MonoReflectionGenericParam): Added `has_reference_type' and
1270 `has_value_type' fields.
1272 * reflection.c (mono_image_get_generic_param_info): Encode the
1273 correct flags if we have the `class' or `struct' constraint.
1275 2004-04-07 Martin Baulig <martin@ximian.com>
1278 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
1280 2004-04-07 Jackson Harper <jackson@ximian.com>
1282 * appdomain.c: Revert extra patches, just wanted to bump the
1285 2004-04-07 Jackson Harper <jackson@ximian.com>
1287 * Makefile.am: Add culture-info private headers.
1288 * icall.c: Add new icalls for contructing locales.
1289 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
1290 * locales.h: Declare new culture info construction methods.
1291 * object.h: Add new fields used to avoid the CultureMap to
1293 * culture-info.h: Definition of structs used in the culture info
1295 * culture-info-tables.h: Autogenerated tables that contain culture
1296 info data. This file was generated with the locale-builder tool.
1297 * appdomain.c: Incement corlib version number.
1299 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
1301 * appdomain.c: (mono_runtime_init) move mono_thread_init
1302 to before mono_object_new calls so critical sections
1303 are initialized before use.
1305 2004-04-07 Martin Baulig <martin@ximian.com>
1308 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
1309 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
1310 (ves_icall_MonoGenericParam_initialize): Removed.
1311 (monogenericparam_icalls): Removed.
1312 (generictypeparambuilder_icalls): Added new table for
1313 System.Reflection.Emit.GenericTypeParameterBuilder.
1316 (mono_reflection_define_generic_parameter): Removed.
1317 (mono_reflection_initialize_generic_parameter): This is now called
1318 from GenericTypeParameterBuilder's .ctor.
1320 2004-04-06 Martin Baulig <martin@ximian.com>
1322 * class.c (mono_class_init): Don't inflate nested classes in a
1324 (mono_type_get_name_recurse): Include the generic arguments for
1325 generic instances and generic type declarations.
1326 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
1327 (_mono_class_get_instantiation_name): Removed.
1328 (mono_class_create_generic): Always use `gklass->name' as our name.
1330 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
1332 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
1333 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
1334 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
1335 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
1336 closed generic methods here.
1339 (mono_reflection_generic_inst_get_nested_types): Removed.
1340 (inflate_mono_method): Copy the generic parameters from the
1341 MonoMethodHeader into out MonoGenericMethod.
1343 2004-04-06 Martin Baulig <martin@ximian.com>
1346 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
1348 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
1350 * reflection.c (build_compressed_metadata): If we have any entries
1351 in the GenericParam, MethodSpec or GenericParamConstraint tables,
1352 set the header version to 1.1.
1354 2004-04-06 Martin Baulig <martin@ximian.com>
1356 * class.c (mono_class_init): If we're a generic instance,
1357 initialize our nested classes, too.
1358 (_mono_class_get_instantiation_name): Deal with the new `!%d'
1361 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1363 * process.c: quote the argument passed to the shell on windows.
1365 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
1367 * threads.c (mono_alloc_special_static_data): Allow this to be
1368 called during startup.
1370 2004-04-02 Martin Baulig <martin@ximian.com>
1373 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
1375 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
1377 * icall.c: Fix build.
1379 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
1381 * Makefile.am: Added security.c|h.
1382 * icall.c: Added icall for get_UserName;
1383 * security.c: New file for security related icalls. Added function
1384 get_UserName for System.Environment (fix #56144).
1385 * security.h: New. Header file for security.c
1387 2004-04-02 Dick Porter <dick@ximian.com>
1389 * icall.c: Deleted the icalls that were obsoleted some time ago
1390 by the ICU string code, and which were mixed into the icall
1391 rearranging. Fixes bug 55969.
1394 * string-icalls.c: Deleted the code that those icalls reference.
1396 2004-04-01 Martin Baulig <martin@ximian.com>
1398 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
1400 * class.c (mono_class_from_generic_parameter): Don't set
1401 TYPE_ATTRIBUTE_INTERFACE.
1402 (my_mono_class_from_generic_parameter): Likewise.
1404 2004-04-01 Martin Baulig <martin@ximian.com>
1406 * loader.c (find_method): Added an optional `MonoClass *ic'
1407 argument to search in a specific interface.
1408 (mono_get_method_constrained): New public function.
1410 2004-04-01 Martin Baulig <martin@ximian.com>
1412 * reflection.c (mono_image_get_generic_field_token): Use the
1413 `handleref' cache here.
1415 2004-04-01 Martin Baulig <martin@ximian.com>
1417 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
1419 * reflection.c (create_generic_typespec): Use the `typespec' hash
1420 here, not the `typeref' one.
1422 2004-04-01 Martin Baulig <martin@ximian.com>
1424 * class.c (mono_class_inflate_generic_type): Moved the
1425 functionality into a new static inflate_generic_type() which
1426 returns NULL if it didn't do anything. Only increment the
1427 `mono_stats.inflated_type_count' if we actually inflated
1429 (mono_class_get_full): Check the classes type to see whether we
1430 need to inflate it; also inflate MONO_TYPE_(M)VAR.
1432 2004-04-01 Jackson Harper <jackson@ximian.com>
1434 * reflection.c: Set culture for assembly references.
1436 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
1438 * reflection.[ch], icall.[ch], Fix support for pinning variables.
1440 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1443 (do_mono_assembly_open): the critical section also covers
1444 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
1446 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1449 (mono_manage_threads): abort the background threads when finishing.
1452 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1454 * gc.c: only close the done_event handle if there was no timeout.
1457 2004-03-30 Martin Baulig <martin@ximian.com>
1459 * icall.c (icall_entries): It's called "System.Activator", not
1460 "System.Activation".
1462 2004-03-30 Martin Baulig <martin@ximian.com>
1464 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
1465 (mono_class_create_from_typespec): Likewise.
1467 2004-03-30 Martin Baulig <martin@ximian.com>
1469 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
1470 `has_ctor_constraint' and `initialized'.
1472 2004-03-30 Martin Baulig <martin@ximian.com>
1474 * reflection.c (encode_new_constraint): New static function to add
1475 the constructor constraint attribute to a type parameter.
1476 (encode_constraints): Call encode_new_constraint() if necessary.
1479 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
1481 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
1483 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
1485 * reflection.c, icall.c: add support for pinning variables.
1487 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
1489 * marshal.c (mono_marshal_get_managed_wrapper):
1490 init bool local with zero rather than null.
1492 2004-03-29 Martin Baulig <martin@ximian.com>
1494 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
1495 the "official" behavior here.
1496 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
1498 2004-03-29 Martin Baulig <martin@ximian.com>
1500 * icall.c: Reflect latest API changes.
1502 2004-03-29 Martin Baulig <martin@ximian.com>
1504 * loader.c (mono_get_method_from_token): Also call
1505 mono_metadata_load_generic_params () for abstract and interface
1506 methods; replace the type arguments in the method signature with
1507 the ones which are loaded from the metadata.
1509 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
1511 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
1512 of the lock is not the current thread. MS.NET don't do it, in spite of
1513 what the documentation says. See bug #56157.
1515 2004-03-28 Martin Baulig <martin@ximian.com>
1517 * class.c (mono_class_init): Don't call init_properties() and
1518 init_events() for generic instances; set `prop->parent' when
1519 inflating properties.
1521 * reflection.c (mono_generic_inst_get_object): Call
1522 `mono_class_init (ginst->klass)'.
1523 (mono_type_get_object): Only create a MonoGenericInst if your
1524 generic type is a TypeBuilder.
1525 (do_mono_reflection_bind_generic_parameters): Only set
1526 `ginst->is_dynamic' if our generic type is a TypeBuilder.
1528 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
1530 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
1533 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1535 * icall.c: added Kill_internal icall.
1536 * process.[ch]: added Kill_internal icall.
1538 2004-03-25 Martin Baulig <martin@ximian.com>
1540 * class.h (MonoStats): Added `generic_instance_count',
1541 `inflated_method_count', `inflated_type_count' and
1542 `generics_metadata_size'.
1544 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1546 * reflection.c: no warnings now.
1548 2004-03-25 Martin Baulig <martin@ximian.com>
1550 * class.c (mono_class_get_full): New public function; does a
1551 mono_class_get(), but also takes a `MonoGenericContext *'.
1553 * loader.c (mono_field_from_memberref): Renamed to
1554 `field_from_memberref', made static and added `MonoGenericContext *'
1556 (mono_field_from_token): Added `MonoGenericInst *' argument.
1557 (method_from_memberef): Likewise.
1558 (mono_get_method_from_token): Likewise.
1559 (mono_get_method_full): New public function; does a
1560 mono_get_method(), but also takes a `MonoGenericContext *'.
1562 * verify.c (mono_method_verify): Get the method's generic context
1563 and pass it to mono_field_from_token(), mono_get_method_full() and
1564 mono_class_get_full().
1566 2004-03-25 Martin Baulig <martin@ximian.com>
1568 * class.c (mono_class_inflate_generic_type): Take a
1569 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
1570 `MonoGenericMethod *'.
1572 2004-03-25 Martin Baulig <martin@ximian.com>
1574 * loader.h (MonoMethodInflated): Store the MonoGenericContext
1575 instead of the MonoGenericMethod here.
1577 2004-03-25 Martin Baulig <martin@ximian.com>
1579 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
1580 each time we create a new MonoGenericInst, we also create a new
1581 context which points back to us.
1583 * class.c (inflate_method): Use `ginst->context' instead of
1584 creating a new context.
1586 * loader.c (method_from_memberref): Use
1587 `klass->generic_inst->context' instead of creating a new context.
1589 2004-03-25 Martin Baulig <martin@ximian.com>
1591 * class.h (MonoGenericContext): New struct.
1592 (MonoGenericMethod): Removed `generic_inst'.
1594 * class.c (mono_class_inflate_generic_method): Take a
1595 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
1597 2004-03-25 Martin Baulig <martin@ximian.com>
1599 * loader.h (MonoMethodInflated): New typedef.
1601 * metadata.h (MonoMethodSignature): Removed `gen_method', make
1602 `generic_param_count' consume just 30 bits, added `is_inflated'
1603 and `has_type_parameters' flags (one bit each).
1605 * class.c (mono_class_inflate_generic_method): Create a
1606 MonoMethodInflated instead of a MonoMethodNormal and set
1607 `is_inflated' in the method signature.
1609 * class.h (MonoGenericMethod): Removed `generic_method'.
1611 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
1613 * image.c: Make sure the name of a MonoImage is always an absolute path.
1614 This fixes bug #54415.
1616 2004-03-24 Martin Baulig <martin@ximian.com>
1618 * class.c (mono_class_setup_vtable): If we're a generic instance,
1619 use our generic type's vtable size.
1621 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
1623 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
1624 MONO_NO_UNLOAD env var as a temporary workaround for unloading
1627 2004-03-23 Martin Baulig <martin@ximian.com>
1629 * class.h (MonoDynamicGenericInst): Added `int count_events' and
1630 `MonoEvent *events'.
1632 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
1633 (typebuilder_icalls): Added "get_event_info"; calls
1634 mono_reflection_event_builder_get_event_info().
1636 * reflection.c (mono_reflection_generic_inst_initialize): Added
1637 `MonoArray *events'.
1638 (mono_reflection_event_builder_get_event_info): New function.
1640 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
1642 * object.h: add mono_type_initialization_init
1644 * object.c (mono_runtime_class_init):
1645 implement class constructor synchronization rules
1646 to cope with threading issues.
1647 add mono_type_initialization_init
1649 * appdomain.c (mono_runtime_init): call
1650 mono_type_initialization_init
1652 * class.h: removing initializing field from MonoVTable
1654 2004-03-23 Martin Baulig <martin@ximian.com>
1656 * class.c (my_mono_class_from_generic_parameter): Use
1657 `param->name' if it's not NULL.
1659 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
1661 * class.c: do not insert non-virtual methods in the vtable.
1662 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
1663 that means the method is non-virtual. This never would have
1666 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
1668 * profiler.c: Added lock for accessing coverage_hash.
1670 2004-03-22 Martin Baulig <martin@ximian.com>
1672 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
1673 `method->method->signature->generic_param_count != 0' to make it
1674 work for interface methods.
1676 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1678 * process.c: quote the string passed to the shell using g_shell_quote.
1680 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1683 (mono_threads_manage): don't remove the finalizer thread and self
1684 from the threads hash table so that mono_thread_manage can be called
1687 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1689 * process.c: quote the arguments when UseShellExecute is true. Fixes
1692 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1694 * threads.c: set mono_thread_detach as a cleanup routine for every
1695 thread. This way it's always executed upon thread termination, either
1696 aborted or finished normally. No more xsp hangs!
1698 2004-03-17 Martin Baulig <martin@ximian.com>
1700 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
1701 `int count_nested' and a `MonoType **nested'.
1703 * reflection.c (mono_reflection_bind_generic_parameters): Moved
1704 most of the functionality into a new static
1705 do_mono_reflection_bind_generic_parameters() and don't take a
1706 `MonoType *nested_in' argument any more. Don't compute nested
1708 (mono_reflection_generic_inst_get_nested_types): New public method
1709 to get nested types.
1711 * class.c (mono_class_create_generic): Set `klass->nested_in' if
1712 we're a nested class.
1714 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
1715 mono_reflection_generic_inst_get_nested_types() to compute the
1718 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
1720 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
1721 descriptive error message under windows.
1723 2004-03-17 Martin Baulig <martin@ximian.com>
1725 * class.c (dup_type): Added `const MonoType *original' argument;
1726 copy the attrs from the original type.
1728 2004-03-17 Martin Baulig <martin@ximian.com>
1730 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
1731 `m->generic_inst_cache' here.
1733 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
1735 * exception.h exception.c: Add stack_overflow_exception.
1737 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1740 (overlapped_callback): call SetEvent *after* invoking the callback.
1741 No need to call CloseHandle.
1743 2004-03-16 Martin Baulig <martin@ximian.com>
1745 * reflection.c (mono_image_get_fieldref_token): Take a
1746 `MonoReflectionField *' instead of a `MonoClassField *' and a
1747 `MonoClass *'; store the `MonoReflectionField *' in the hash.
1749 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1751 * appdomain.c: don't add the culture to the filename we're looking for
1752 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
1754 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1756 * locales.c: don't ignore symbols when doing case insensitive compares.
1757 Thanks Dick! Fixes bug #54046.
1759 * threads.c: surround 'threads' usage with enter/leave in
1762 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
1764 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
1765 implicitly marshalled as [Out]. Fixes #55450.
1767 (mono_marshal_get_runtime_invoke): Zero out the result if there is
1770 2004-03-16 Martin Baulig <martin@ximian.com>
1772 * class.c (mono_class_from_generic_parameter): Use the actual
1775 2004-03-16 Martin Baulig <martin@ximian.com>
1777 * reflection.c (type_get_signature_size): New static function.
1778 Compues the size of the type in a method signature.
1779 (method_get_signature_size): New static function; calls
1780 type_get_signature_size() to compute the actual size of the
1782 (method_encode_signature): Use method_get_signature_size() to get
1783 the signature's size rather than using `nparams * 10'.
1785 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1787 * file-io.h: define here WapiOverlapped on windows. I don't want the
1788 regular OVERLAPPED one.
1791 * threadpool.c: somehow, BindIoCompletionCallback is not found.
1792 Disabling AIO on windows.
1794 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1796 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
1799 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1801 * appdomain.c: upgraded corlib version.
1803 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
1804 and BeginWrite. Allow opening files for asynchrnous operations.
1806 * file-io.h: new struct that maps FileStreamAsyncResult.
1807 * icall.c: added new icalls.
1808 * process.[ch]: support setting child process environment variables
1809 and use the SHELL or COMSPEC when UseShellExecute is true.
1811 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
1812 callback for async. IO is here and also BindHandle.
1814 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
1817 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
1819 * reflection.c (create_custom_attr): Allow len == 0.
1821 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
1822 computation on big-endian machines.
1824 2004-03-13 Martin Baulig <martin@ximian.com>
1826 * class.h (MonoGenericInst): Added `int count_ifaces'.
1828 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
1829 `ginst->count_ifaces' instead `klass->interface_count' since we
1830 may get called before the vtable is created.
1832 * loader.c (mono_method_get_param_names): If we're a generic
1833 instance, return and don't initialize the class.
1835 * reflection.c (mono_reflection_setup_generic_class): Don't call
1836 ensure_runtime_vtable().
1837 (mono_reflection_bind_generic_parameters): Set
1838 `ginst->count_ifaces'.
1840 2004-03-11 Jackson Harper <jackson@ximian.com>
1844 * unicode.h: Remove unused System.Char icalls.
1846 2004-03-11 Miguel de Icaza <miguel@ximian.com>
1848 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
1849 code when we P/Invoke the first library in Windows.Forms, instead
1850 of when we first open the assembly.
1852 * assembly.c: Drop the lookup from here.
1854 2004-03-10 Martin Baulig <martin@ximian.com>
1856 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
1857 class for properties, fields and events. Finally fixes #54945.
1859 2004-03-10 Martin Baulig <martin@ximian.com>
1861 * metadata.c (mono_metadata_class_equal): New static function;
1862 checks whether two generic instances or two generic parameters are
1864 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
1867 2004-03-10 Martin Baulig <martin@ximian.com>
1869 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
1871 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
1872 argument and write it into the `reflection_info' field.
1875 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
1876 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
1878 2004-03-09 Jackson Harper <jackson@ximian.com>
1880 * char-conversions.h: use 8 bits for numeric data its all we need
1881 * icall.c: numeric data is only 8 bits now.
1883 2004-03-09 Martin Baulig <martin@ximian.com>
1885 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
1887 * class.c (init_properties, init_events): Initialize the new
1890 * reflection.c (typebuilder_setup_properties): Likewise.
1891 (typebuilder_setup_events): Likewise.
1893 * reflection.h (MonoEventInfo): Replaced `parent with
1894 `declaring_type' and `reflected_type'.
1896 * icall.c (ves_icall_get_property_info): Distinguish between
1897 declaring and reflected type.
1898 (ves_icall_get_event_info): Likewise.
1900 2004-03-09 Martin Baulig <martin@ximian.com>
1902 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
1903 (ves_icall_Type_GetField): Correctly set field->klass.
1905 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
1907 * loader.h: Fix warning.
1909 2004-03-08 Miguel de Icaza <miguel@ximian.com>
1911 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
1912 library routine if present. Notice that it will still continue
1913 executing even if its missing, for those working on the Gtk#
1914 edition of Windows.Forms.
1916 * assembly.c (do_mono_assembly_open): If loading the
1917 System.Windows.Forms call mono_loader_wini_init.
1919 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
1921 * class.h: Added MonoRemoteClass struct.
1922 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
1923 function for MonoStrings.
1924 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
1925 Added internal call for getting the proxy type.
1926 * marshal.c: Get the type of transparent proxies from its remote_class.
1927 Added methods that generate the IL for type checks and casts:
1928 mono_marshal_get_isinst, mono_marshal_get_castclass,
1929 mono_marshal_get_proxy_cancast.
1930 * marshal.h: Declaration of the previous new methods.
1931 * object.c: Added new moethods for creating and updating MonoRemoteClass
1932 instances: mono_remote_class, mono_upgrade_remote_class,
1933 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
1934 * verify.c: FIx transparent_proxy_fields layout.
1935 * appdomain.c: Bump corlib version.
1937 2004-03-04 Jackson Harper <jackson@ximian.com>
1939 * icall.c: Add icall to access char conversion tables.
1940 * char-conversions.h: Character conversion tables.
1941 * Makefile.am: Add char-conversions.h private header file.
1943 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
1945 * appdomain.c (unload_thread_main): Increase unloading timeout to
1946 10 sec as a temporary workaround for Nant problems.
1948 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
1950 * gc.c: Add checks for GC_enable and GC_disable.
1952 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
1953 (jaak@zd.com.pl). Fix memory corruption in String.Replace
1956 2004-02-27 Martin Baulig <martin@ximian.com>
1958 * reflection.c (mono_reflection_bind_generic_parameters): Take a
1959 `MonoReflectionType *' instead of a `MonoType *'.
1961 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
1963 * gc.c (run_finalize): Avoid finalizing the object representing the
1965 (finalizer_thread): Fix warning.
1967 2004-02-25 Martin Baulig <martin@ximian.com>
1969 * class.c (_mono_class_get_instantiation_name): Added `int offset'
1970 argument for nested types.
1971 (mono_class_create_generic): Added support for nested generictypes.
1973 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
1976 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
1978 * reflection.c (method_encode_signature): Increase the minimum
1979 value of `size' from 10 to 11.
1980 (mono_reflection_bind_generic_parameters): Take `int type_argc'
1981 and `MonoType **types' arguments instead of the `MonoArray
1982 *types'; added `MonoType *nested_in'. Recursively instantiate
1985 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
1987 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
1988 stack_overflow_ex members which are used by exception handling.
1990 * appdomain.c (mono_runtime_init): Initialize the new members.
1992 * gc.c (mono_gc_enable): New helper function.
1993 * gc.c (mono_gc_disable): New helper function.
1995 2004-02-23 Martin Baulig <martin@ximian.com>
1997 * icall.c: I must have been really stupid - make it actually work
2000 2004-02-23 Martin Baulig <martin@ximian.com>
2002 * loader.c (method_from_memberref): Only inflate the method if
2003 it's in another klass.
2005 2004-02-23 Martin Baulig <martin@ximian.com>
2007 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
2008 (mono_class_init): If we're a generic instance and an interface,
2009 compute `class->interface_id'; also create `class->interfaces'
2010 here and inflate them.
2012 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
2014 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
2016 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
2018 2004-02-15 Miguel de Icaza <miguel@ximian.com>
2020 * reflection.c (method_encode_code): Improved the error message
2021 generated by the exception.
2023 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2025 * icall.c: Martin did not do what he said in the ChangeLog for
2026 2004-02-18, but put back the changes for properties and events.
2027 Commenting those changes out again and adding comment to bug #54518.
2029 * process.c: removed warning.
2031 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
2033 * marshal.c (emit_struct_conv): Print an error message instead of
2034 asserting when a type does not have the StructLayout attribute.
2036 2004-02-20 Martin Baulig <martin@ximian.com>
2038 * reflection.c (mono_type_get_object): Also use the cache for
2040 (mono_reflection_bind_generic_parameters): Always compute
2043 2004-02-20 Martin Baulig <martin@ximian.com>
2045 * class.h (MonoGenericMethod): Removed `klass'.
2047 * class.c (mono_class_inflate_generic_method): Added `MonoClass
2050 2004-02-20 Martin Baulig <martin@ximian.com>
2052 * reflection.c (method_encode_methodspec): Actually use the
2053 uninflated signature for the memberref.
2055 2004-02-20 Martin Baulig <martin@ximian.com>
2057 * class.h (MonoGenericMethod): Removed `declaring'.
2059 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
2060 is NULL, compute it here.
2062 2004-02-20 Martin Baulig <martin@ximian.com>
2064 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
2066 * metadata.c (mono_metadata_generic_inst_hash): New method.
2067 (mono_metadata_generic_inst_equal): New method.
2069 * reflection.c (mono_reflection_bind_generic_parameters): Use the
2070 `klass->image->generic_inst_cache' cache to avoid creating
2071 duplicate MonoGenericInst's.
2073 * class.c (mono_class_inflate_generic_type): Use the cache.
2075 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
2077 * object.c: fixed gc descriptor calculation for embedded valuetypes.
2079 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2081 * icall.c: added Socket.WSAIoctl icall.
2083 * socket-io.[ch]: implemented
2084 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
2086 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
2088 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
2090 2004-02-18 Urs C Muff <umuff@quark.com>
2092 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
2093 this work on PPC and other big-endian architectures.
2095 * debug-mono-symfile.h: Prepended the names of all the `guint32'
2096 fields with an underscore to make sure they're only accessed by
2099 2004-02-18 Martin Baulig <martin@ximian.com>
2101 * icall.c: Put the klass->refclass changes back for methods and
2102 fields, but not for properties and events. We're currently not
2103 distinguishing between DeclaringType and ReflectedType for
2104 properties and events, that's what caused the regressions.
2106 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2109 (mono_async_result_new): the handle can be NULL.
2111 * threadpool.c: Use an event instead of a semaphore, don't initialize
2112 it until needed. This saves quite a few semaphores from being created
2113 when using the threadpool.
2115 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
2117 * object.c (mono_string_is_interned_lookup): Fix interning of long
2118 strings. Fixes #54473.
2120 * domain.c (ldstr_equal): Optimize if the two strings are equal.
2122 * icall.c: Revert the klass->refclass changes since they introduce
2123 regressions (bug #54518).
2125 2004-02-18 Martin Baulig <martin@ximian.com>
2127 * class.c (mono_class_init): If we're a generic instance and don't
2128 come from a TypeBuilder, inflate our members here.
2129 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
2130 (mono_class_create_generic): New public method.
2131 (mono_class_initialize_generic): Removed.
2132 (get_instantiation_name): Renamed to
2133 _mono_class_get_instantiation_name() and made it public.
2135 2004-02-18 Martin Baulig <martin@ximian.com>
2137 * class.c (mono_class_inflate_generic_type): Clear the new
2138 instance's `nginst->klass' when inflating a generic instance.
2139 (mono_class_is_subclass_of): Added (basic) support for generic
2142 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
2144 * appdomain.h, domain.c: use a MonoCodeManager instead of a
2145 MonoMempool to hold compiled native code.
2147 2004-02-17 Martin Baulig <martin@ximian.com>
2149 * class.h (MonoDynamicGenericInst): Added `count_properties' and
2152 * reflection.c (mono_reflection_generic_inst_initialize): Added
2153 `MonoArray *properties' argument.
2155 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
2157 2004-02-17 Martin Baulig <martin@ximian.com>
2159 * icall.c (ves_icall_Type_GetFields): Renamed to
2160 ves_icall_Type_GetFields_internal() and added a
2161 `MonoReflectionType *rtype' argument; pass it to
2162 mono_field_get_object() to set the field's "reflected" type.
2163 (ves_icall_Type_GetConstructors): Likewise.
2164 (ves_icall_Type_GetEvents): Likewise.
2165 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
2166 argument; pass it to mono_method_get_object() to set the method's
2169 2004-02-17 Martin Baulig <martin@ximian.com>
2171 * class.h (MonoDynamicGenericInst): New type.
2172 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
2174 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
2175 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
2176 (ves_icall_MonoGenericInst_GetFields): New interncall.
2178 * class.c (mono_class_from_generic): Don't call
2179 mono_class_initialize_generic() if this is a dynamic instance;
2180 ie. it's being created from a TypeBuilder.
2181 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
2182 `class->byval_arg.type'.
2184 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
2185 to `inflate_method' and made static.
2186 (mono_reflection_inflate_field): Removed.
2187 (mono_reflection_generic_inst_initialize): New public method.
2189 * reflection.h (MonoReflectionGenericInst): Removed `methods',
2190 `ctors' and `fields'; added `initialized'.
2192 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
2194 * debug-helpers.c (mono_method_full_name): Fix output for empty
2197 2004-02-12 Martin Baulig <martin@ximian.com>
2199 * class.h (MonoClassField): Added `MonoType *generic_type'.
2201 * reflection.c (mono_image_get_fieldref_token): Added support for
2202 instantiated generic types.
2203 (field_encode_inflated_field): Removed.
2204 (mono_image_get_inflated_field_token): Removed.
2205 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
2207 * reflection.h (MonoReflectionInflatedField): Removed.
2209 2004-02-12 Martin Baulig <martin@ximian.com>
2211 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
2212 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
2214 * reflection.c (mono_image_get_methodspec_token): Take a
2215 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
2216 (mono_image_create_token): Check whether we have a
2217 `method->signature->gen_method' and call
2218 mono_image_get_methodspec_token() if appropriate.
2219 (inflated_method_get_object): Removed.
2220 (mono_reflection_bind_generic_method_parameters): Return a
2221 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
2222 (mono_reflection_inflate_method_or_ctor): Likewise.
2224 * reflection.h (MonoReflectionInflatedMethod): Removed.
2226 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
2228 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
2229 for custom valuetype marshalling.
2231 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
2233 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2235 * icall.c: fixed WSAGetLastError_internal name.
2237 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
2239 * threads.c (mono_thread_attach): Allow this to be called multiple
2242 * threads.c (build_wait_tids): Do not wait for ourselves.
2244 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
2245 appdomain list is empty.
2247 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
2248 memory returned by mono_string_builder_to_utf16, since it points into
2249 managed memory. Thanks to Bernie Solomon for noticing this.
2251 * icall.c: Add AppDomainSetup icalls.
2253 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
2255 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
2258 * reflection.c (reflection_methodbuilder_to_mono_method): Save
2259 custom attributes to the method_aux struct. Also fix array indexes etc.
2261 * loader.c (mono_method_get_param_names): Make dynamic case work again.
2263 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
2265 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
2266 (both static and runtime) and reduce startup time.
2268 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
2270 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
2271 AsAny marshalling conversion instead of crashing.
2273 * marshal.c: Fix warnings.
2275 2004-02-09 Martin Baulig <martin@ximian.com>
2277 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
2279 * reflection.h (MonoReflectionInflatedMethod): Removed the
2280 `declaring' field, it's now in the unmanaged MonoGenericMethod.
2282 * reflection.c (method_encode_methodspec): Removed the `method'
2283 argument; we get it from `gmethod->declaring'.
2284 (inflated_method_get_object): Removed the `declaring' argument.
2286 2004-02-09 Martin Baulig <martin@ximian.com>
2288 * class.h (MonoGenericMethod): New type.
2289 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
2292 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
2293 a `MonoGenericMethod *gen_method' one.
2295 * class.c (mono_class_inflate_generic_type): Take an additional
2296 `MonoGenericMethod * argument. This is only non-NULL if we're
2297 inflating types for a generic method.
2298 (mono_class_inflate_generic_signature): Renamed to
2299 inflate_generic_signature() and made static; take a
2300 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
2301 (inflate_generic_header): Take a `MonoGenericMethod *' argument
2302 instead of a `MonoGenericInst *' one.
2303 (mono_class_inflate_generic_method): Likewise.
2305 * reflection.c (encode_generic_method_sig): Take a
2306 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
2307 (method_encode_methodspec): Likewise.
2308 (inflated_method_get_object): Likewise.
2310 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
2311 field with a `MonoGenericMethod *gmethod' one.
2313 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
2315 * class.h (mono_class_has_parent): add parens to expansion
2318 2004-02-08 Martin Baulig <martin@ximian.com>
2320 * image.h (MonoImage): Removed `generics_cache'.
2322 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
2323 instead of a `MonoType *' argument; removed the `inflate_methods'
2324 argument. Don't inflate methods here.
2326 * loader.c (find_method): If it's a generic instance, call
2327 mono_class_init() on the `sclass->generic_inst->generic_type'.
2329 * metadata.c (mono_type_size): Make this work on uninitialized
2330 generic instances; call it on the `ginst->generic_type's class.
2332 * reflection.c (mono_reflection_bind_generic_parameters): Call
2333 mono_class_from_generic() to create the `ginst->klass'.
2335 2004-02-08 Martin Baulig <martin@ximian.com>
2337 * class.h (MonoClass): Changed type of `generic_inst' from
2338 `MonoType *' to `MonoGenericInst *'.
2340 2004-02-08 Martin Baulig <martin@ximian.com>
2342 * icall.c (ves_icall_Type_BindGenericParameters): Just call
2343 mono_type_get_object(), this is now creating a `MonoGenericInst'
2344 for MONO_TYPE_GENERICINST.
2345 (ves_icall_MonoGenericInst_GetParentType): Likewise.
2346 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
2348 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
2349 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
2350 (inflated_method_get_object): Added `MonoClass *refclass' argument.
2351 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
2354 * reflection.h (MonoReflectionInflatedMethod): Removed
2355 `declaring_type' and `reflected_type'.
2357 2004-02-08 Martin Baulig <martin@ximian.com>
2359 * class.h (MonoGenericInst): Added `MonoType *parent' and
2360 `MonoType **ifaces'.
2362 * reflection.h (MonoReflectionGenericInst): Removed `klass',
2363 `parent' and `interfaces'.
2365 * reflection.c (mono_reflection_bind_generic_parameters): Take a
2366 `MonoType *' argument and return a `MonoType *'.
2369 (ves_icall_MonoGenericInst_GetParentType): New interncall.
2370 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
2372 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
2374 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
2375 valuetype marshalling.
2377 2004-02-06 Martin Baulig <martin@ximian.com>
2380 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
2381 (my_mono_class_from_generic_parameter): Likewise.
2383 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
2385 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
2386 contents of the symbol files lazily.
2388 * object.h (MonoThread): Add 'name' and 'name_len' fields.
2390 * threads.h threads.c icall.c: New icalls for getting and setting the
2393 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
2395 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
2396 Raise an exception when the domain is not found.
2398 2004-02-03 Martin Baulig <martin@ximian.com>
2400 * reflection.c (mono_image_get_methodspec_token): Use the
2401 uninflated signature; fixes gen-33.
2403 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
2405 * gc.c threads.c: Make the finalizer thread a normal managed thread so
2406 the finalizer code can use thread functionality.
2408 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
2409 the finalizer thread.
2411 * threads.c: Make some functions more robust.
2413 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
2415 * metadata.h: Add new marshalling conventions.
2417 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
2418 stringbuilder marshalling. Fixes #53700.
2420 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
2422 * reflection.c (mono_image_get_type_info): Save declarative security
2425 * reflection.c (mono_image_get_field_info): Handle uninitialized
2426 unmanaged fields as well.
2428 * appdomain.c: Bump corlib version.
2430 2004-02-01 Martin Baulig <martin@ximian.com>
2432 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
2433 method type arguments.
2435 2004-01-30 Duncan Mak <duncan@ximian.com>
2437 * marshal.h: Add prototype for
2438 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
2440 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
2443 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
2445 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
2446 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
2448 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
2450 * marshal.c (mono_marshal_get_native_wrapper): Add support for
2451 custom marshalling of valuetypes.
2453 * marshal.c: Fix some warnings.
2455 2004-01-29 Martin Baulig <martin@ximian.com>
2457 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
2458 for generic method parameters.
2460 * reflection.c (method_encode_methodspec): Write the uninflated
2461 signature into the methodspec table.
2462 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
2463 is always the uninflated method.
2464 (reflection_methodbuilder_to_mono_method): Copy the generic
2465 parameters from the MethodBuilder into `header->gen_params'.
2467 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
2469 * class.c (mono_class_from_generic_parameter): Fix warning.
2471 2004-01-27 Martin Baulig <martin@ximian.com>
2473 * class.c (mono_class_from_generic_parameter): Don't create
2474 `klass->methods' here.
2476 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
2478 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
2479 extension since it does not work with libraries named lib<FOO>.dll.so.
2481 2004-01-25 Martin Baulig <martin@ximian.com>
2483 * class.c (mono_class_inflate_generic_type): Added support for
2484 MONO_TYPE_GENERICINST.
2486 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
2487 inflate methods on open constructed types.
2489 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2491 * object.c: fire ProcessExit event in the root AppDomain after running
2492 Main. Fixes bug #53299.
2494 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
2496 * socket-io.c: include the new socket-wrappers.h header.
2497 Use the wrappers instead of the unix socket functions to make the code
2500 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
2502 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
2504 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
2507 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
2509 * reflection.c (mono_image_create_pefile): Handle the case when the
2510 entry point is not a MethodBuilder.
2512 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
2513 field to ReflectionMethod since it is not allways a builder.
2515 * reflection.c (type_get_fully_qualified_name): New helper function to
2516 return the fully qualified name of a type.
2518 * reflection.c (encode_marshal_blob): Always emit the fully qualified
2519 type name for custom marshallers.
2521 * reflection.c (mono_marshal_spec_from_builder): Ditto.
2523 * class.c (mono_class_setup_vtable): If a parent class already
2524 implements an interface, use the implementing methods from that class.
2527 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2529 * threadpool.c: just return instead of ExitThread to allow for thread
2532 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
2534 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
2535 when closing resource modules.
2537 * reflection.c (mono_image_create_pefile): Handle the case when the
2538 entry point is not a MethodBuilder.
2540 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
2541 field to ReflectionMethod since it is not allways a builder.
2543 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
2545 * marshal.c (mono_marshal_get_managed_wrapper):
2546 mono_marshal_alloc takes native int so CONV_I
2549 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
2551 * reflection.c (fixup_cattrs): New function to fixup the methoddef
2552 tokens in the cattr table. Fixes #53108.
2554 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2556 * loader.c: don't trim ".dll" before looking up in the config file.
2557 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
2559 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
2561 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
2562 Return the module which contains the resource as well.
2563 (ves_icall_System_Reflection_Module_Close): New icall.
2565 * appdomain.c: Bump corlib version number.
2567 * image.c (mono_image_addref): New public function.
2569 * assembly.c: Call mono_image_addref.
2571 * reflection.c (mono_module_get_object): Increase reference count of
2574 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
2577 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
2578 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
2579 proper exceptions on DllImport problems.
2581 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
2583 * class.c, metadata.c: eliminate CSIZE macro.
2585 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
2587 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
2588 * object.h: Added async_callback field in MonoAsyncResult.
2589 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
2590 * verify.c: Added async_callback in MonoAsyncResult layout.
2592 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
2594 * reflection.c (mono_reflection_get_custom_attrs): Add support
2597 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
2599 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
2601 (mono_marshal_method_from_wrapper): Add null pointer check.
2603 2004-01-16 Martin Baulig <martin@ximian.com>
2605 * debug-mono-symfile.h: Set version number to 36 and reflect
2606 latest symbol writer changes.
2608 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
2610 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
2611 multi-dimensional arrays.
2612 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
2613 (mono_class_from_mono_type): Use bounded_array_class_get.
2615 * class.c (mono_bounded_array_class_get): New function which takes
2616 a 'bounded' bool argument to distinguish vectors from one dimensional
2619 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
2620 bounded_array_class_get if the array has bounds.
2622 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2623 Search modules loaded using AssemblyBuilder:AddModule as well.
2625 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2627 * appdomain.c: increased corlib version.
2628 * filewatcher.c: removed g_print.
2630 (get_property_info): only allocate what is actually requested.
2631 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
2633 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2635 * Makefile.am: added filewatcher.[ch]
2636 * filewatcher.[ch]: FileSystemWatcher runtime support.
2637 * icall.c: added new FSW icalls.
2639 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
2641 * string-icalls.c: fix stringbuilder regression as suggested by
2642 Iain McCoy <iain@mccoy.id.au>.
2644 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
2646 * process.c (process_read_stringtable_block): Recognize '007f' as
2647 a language neutral stringtable block.
2649 2004-01-12 Patrik Torstensson
2651 * object.h (MonoStringBuilder) : Changed layout to support our
2652 new stringbuilder class.
2653 * marshal.c: Change marshalling to support the new layout of
2655 * appdomain.c: increased version number because new layout of
2658 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
2660 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
2661 assembly name as an string instead of an AssemblyName, since it is
2662 easier to extract info from it.
2664 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
2665 the culture subdirectories too. Fixes #52231.
2667 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2669 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
2670 It takes 2 new parameters with an optional name for the method to look
2671 for and case ignoring info.
2673 * threadpool.c: removed unused variable.
2675 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2677 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
2678 It takes 2 new parameters with an optional name for the property to look
2679 for and case ignoring info.
2682 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
2684 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
2687 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2690 * assembly.c: escape the uri before passing it to g_filename_from_uri.
2693 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
2695 * reflection.c: Add support for more than one unmanaged resource.
2697 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
2698 in field->def_value, as done in all other cases.
2700 * reflection.c (mono_reflection_get_custom_attrs): Add support for
2703 * reflection.c (mono_reflection_create_runtime_class): Remove
2704 errorneous assignment to klass->element_class, since it is already
2705 done in mono_reflection_setup_internal_class.
2707 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2709 * gc.c: added missing LeaveCriticalSection.
2710 * icall.c: indented a couple of lines.
2711 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
2712 if we call EndInvoke inside a callback. Fixes bug #52601.
2714 2004-01-07 Martin Baulig <martin@ximian.com>
2716 * mono-debug-debugger.h
2717 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
2719 2004-01-06 Miguel de Icaza <miguel@ximian.com>
2721 * appdomain.c: Use messages in NotImplementedException.
2723 * exception.c (mono_get_exception_not_implemented): Now this takes
2726 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
2727 exception instead of g_asserting an aborting when something is not
2730 Add some inline docs.
2732 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
2734 * reflection.h: Update after changes to object layout.
2736 * reflection.c: Implement saving of unmanaged aka win32 resources.
2738 * appdomain.c: Bump version number.
2740 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
2741 Handle missing domains gracefully.
2743 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
2745 * file-io.c : On Windows, there are much more invalid_path_chars.
2747 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
2749 * class.h, object.c: prepare for GetType () speedup.
2751 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
2753 * profiler.c: workaround for --profile null reference exception on
2754 cygwin. Patch by Patrik Torstensson.
2756 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
2758 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
2759 make work for unaligned access.
2761 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
2763 * class.c: small cleanup (class->fields [i] -> field).
2764 * image.c: check address of metadata is valid.
2766 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
2768 * assembly.h assembly.c (mono_assembly_loaded): New public function to
2769 search the list of loaded assemblies.
2771 * reflection.c (mono_reflection_type_from_name): Use
2772 mono_assembly_loaded instead of mono_image_loaded.
2774 * reflection.c: Fix warnings.
2776 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
2778 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
2779 is dynamic. This is needed since an assembly can contain both dynamic and
2782 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
2785 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
2787 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
2788 to store modules loaded using AddModule.
2790 * reflection.c (mono_image_fill_file_table): Generalize this so it works
2793 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
2795 * reflection.c (mono_image_fill_export_table_from_module): New function to
2796 fill out the EXPORTEDTYPES table from a module.
2798 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
2799 into a separate function. Also handle loaded non-dynamic modules.
2801 * reflection.c (mono_image_basic_init): Fix memory allocation.
2803 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2805 * assembly.c (mono_assembly_load_references): Make this public.
2807 2003-12-19 Martin Baulig <martin@ximian.com>
2809 * class.c (mono_class_initialize_generic): Made this static, take
2810 a `MonoGenericInst *' instead of a `MonoClass *'.
2811 (mono_class_from_generic): Call mono_class_initialize_generic()
2812 unless we're already initialized or being called from
2813 do_mono_metadata_parse_generic_inst().
2815 * class.h (MonoGenericInst): Added `initialized' and
2816 `init_pending' flags.
2818 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
2819 `mono_class_init (gklass)' or mono_class_initialize_generic()
2820 here; set `generic_inst->init_pending' while parsing the
2823 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
2825 * locales.c: include string.h for memxxx prototypes
2827 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
2829 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
2830 constructor when accessing literal fields.
2832 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
2834 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2836 * reflection.c (assembly_add_resource_manifest): New function to fill
2837 the MANIFESTRESOURCE table.
2839 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
2841 * reflection.h: Update to changes in class layout.
2843 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
2844 Reenable call to mono_runtime_is_shutting_down ().
2846 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
2847 determine if the runtime is shutting down.
2849 2003-12-16 Jackson Harper <jackson@ximian.com>
2851 * icall.c: comment out call to mono_runtime_is_shutting_down to
2854 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
2856 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
2857 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
2859 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
2861 * reflection.c: move definition of swap_with_size
2862 to before its first call
2864 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
2866 * appdomain.c (mono_runtime_is_shutting_down): New public function.
2868 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
2871 * object.c: Fix warnings.
2873 * icall.c (ves_icall_Type_Get...): Only consider inherited static
2874 members if FlattenHierarchy is set.
2876 * reflection.c (mono_image_add_decl_security): New function to emit
2877 declarative security.
2879 * reflection.h reflection.c: Add support for declarative security.
2881 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
2883 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
2885 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
2887 * appdomain.c verify.c: Moved corlib version checking into its own
2888 function in appdomain.c since it needs to create vtables etc.
2890 2003-12-13 Patrik Torstensson <p@rxc.se>
2892 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
2893 instead of unwrapped server.
2895 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
2897 * verify.c (check_corlib): Fix field index.
2899 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
2901 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
2904 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
2906 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
2907 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
2908 cope with sizeof(size_t) != sizeof(guint32).
2910 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2912 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
2915 2003-12-10 Mark Crichton <crichton@gimp.org>
2917 * icall.c: removed the GetNonZeroBytes. We now handle this case
2920 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
2922 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
2924 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
2927 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
2929 * verify.c (check_corlib): Handle the case when the version field is
2930 initialized by a static constructor.
2932 2003-12-08 Patrik Torstensson <p@rxc.se>
2934 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
2936 2003-12-08 Martin Baulig <martin@ximian.com>
2938 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
2939 a MonoReflectionGenericParameter, also take the parameter index
2940 and name as arguments.
2941 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
2942 (ves_icall_MonoGenericParam_initialize): New interncall.
2943 (ves_icall_Type_make_byref_type): New interncall.
2945 * reflection.h (MonoReflectionGenericParam): Derive from
2946 MonoReflectionType, not just from MonoObject. Added `refobj' and
2949 * reflection.c (mono_reflection_define_generic_parameter): Create
2950 and return a new MonoReflectionGenericParam; don't initialize the
2952 (mono_reflection_initialize_generic_parameter): New public method;
2953 initializes the constraints and creates the `param->pklass'.
2955 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
2957 * reflection.h reflection.c: Use the new fields 'num_types',
2958 'num_fields' and 'num_methods' to track the number of types etc.
2960 * verify.c (check_corlib): Check corlib version number.
2962 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
2964 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
2965 function works on all methods.
2967 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
2969 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
2970 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
2971 the custom_type_info flag of the transparent proxy.
2972 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
2973 objects that supports IRemotingTypeInfo.
2974 * object.h: Added custom_type_info field in transparent proxy.
2976 2003-12-06 Martin Baulig <martin@ximian.com>
2978 * class.c (mono_class_create_from_generic): Removed.
2979 (mono_class_from_generic): Check `ginst->klass' before doing
2980 anything else. This is important to fully support "recursive"
2983 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
2984 empty `generic_inst->klass' before doing anything else.
2986 2003-12-06 Dick Porter <dick@ximian.com>
2991 * locales.c: Use C structs to access class fields. Don't do a
2992 conversion between MonoString and UChar because both are
2993 platform-endian UTF-16. Compare now takes startindex and count
2994 parameters. Add a char overload for IndexOf. Speed up the
2995 invariant string IndexOf.
2997 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
2999 * Makefile.am (monosn_LDADD): Fix parallel build.
3001 2003-12-04 Martin Baulig <martin@ximian.com>
3004 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3005 (ves_icall_Type_make_array_type): New interncall.
3007 2003-12-04 Martin Baulig <martin@ximian.com>
3009 * locales.c: also change it in the !HAVE_ICU case.
3011 2003-12-04 Dick Porter <dick@ximian.com>
3014 * locales.c: construct_compareinfo is now in CompareInfo, not
3017 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
3019 * image.c (mono_image_load_file_for_image): Cache loaded images in the
3022 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
3025 * assembly.c (mono_assembly_load_references): Only load references
3028 * class.c (mono_class_from_name): Avoid linear search of the
3031 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
3033 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
3035 * image.h (MonoImage): Add 'field_cache' field.
3037 * loader.c (mono_field_from_token): Cache field lookups.
3039 * reflection.c (mono_module_get_object): Fix name property.
3041 * icall.c (ves_icall_get_enum_info): Update after changes to
3042 mono_metadata_get_constant_index ().
3044 * icall.c: Get rid of get_type_info icall, use a separate icall for
3045 each type property to avoid needless memory allocations. Fixes #51514.
3047 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
3048 to avoid needless binary searches.
3050 * class.c (class_compute_field_layout): Move the initialization of
3051 field->def_value to mono_class_vtable ().
3053 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
3056 * object.c (mono_object_allocate): Make it inline.
3058 * object.c (mono_object_allocate_spec): Make it inline.
3060 2003-12-02 Dick Porter <dick@ximian.com>
3062 * locales.c (create_NumberFormat): NumberFormatInfo construction.
3063 Patch by Mohammad DAMT (mdamt@cdl2000.com).
3065 2003-12-01 Dick Porter <dick@ximian.com>
3067 * threads.c: Fix signature and call in CreateMutex and
3070 2003-12-01 Dick Porter <dick@ximian.com>
3073 * locales.c: Implement string compares and searching
3075 * object.h: Add extra Thread field
3077 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
3079 * reflection.c (fixup_method): Add support for MonoCMethod.
3081 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
3083 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
3085 * reflection.c (assembly_name_to_aname): Allow extra characters in
3086 assembly names. Fixes #51468.
3088 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
3090 * exception.c (mono_exception_from_name_domain): New helper function.
3092 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
3093 exception object in the correct domain.
3095 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
3096 formatting + make a copy a the input data.
3098 * loader.c (mono_get_method_from_token): Methods which contain
3099 native code do not have entries in the ImplMap.
3101 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
3102 Thanks to Gonzalo for spotting this.
3104 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
3105 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
3107 * assembly.h (mono_assembly_load_from): Split the second part of
3108 assembly loading into a new public function.
3110 * exception.h (mono_get_exception_bad_image_format): New function.
3112 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
3114 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3115 Enumerate all modules inside a dynamic assembly. Fixes #51293.
3117 * icall.c: Add new icall for creating dynamic methods.
3119 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
3121 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
3123 * reflection.c (mono_reflection_create_dynamic_method): New icall to
3124 create a dynamic method.
3126 * reflection.c (resolve_object): New helper function.
3128 * reflection.c: Generalize ReflectionMethodBuilder and the functions
3129 which manipulate it so they can also work on dynamic methods.
3131 * reflection.c (reflection_method_builder_to_mono_method): Avoid
3132 creating the MonoReflectionMethodAux structure if it is not needed.
3134 * reflection.h verify.c: Update after changes to object layout.
3136 * reflection.c (method_builder_encode_signature): Fix compilation on
3139 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
3141 * appdomain.h: Added support for context static fields. Added static_data
3142 field to MonoAppContext and renamed thread_static_fields to a more
3143 generic special_static_fields in MonoAppDomain, since it can now contain
3144 context static fields.
3145 * domain.c: Updated hashtable name.
3146 * object.c: Replaced field_is_thread_static() for a more generic
3147 field_is_special_static() which also checks for context static attribute.
3148 In mono_class_vtable(), added support for static context fields.
3149 * threads.c: Changed methods that manage thread static fields to more
3150 generic methods so they can be reused both for thread and context static
3152 * threads.h: Declared some new methods.
3154 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
3156 * reflection.h: Update after changes to the managed types.
3158 * reflection.c (encode_custom_modifiers): New helper function.
3160 * reflection.c (method_encode_signature): Emit custom modifiers.
3162 * reflection.c (field_encode_signature): Emit custom modifiers.
3164 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
3166 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
3168 * icall.c (ves_icall_System_ValueType_Equals): New optimized
3171 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
3174 * object.c (mono_field_get_value_object): New function.
3176 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
3179 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
3181 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
3182 return a preallocated out-of-memory exception instance.
3184 * object.c (out_of_memory): Use the new function.
3186 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
3187 flag is before the custom modifiers. Fixes #49802.
3189 2003-11-16 Martin Baulig <martin@ximian.com>
3191 * class.c (mono_class_is_open_constructed_type): Implemented the
3192 MONO_TYPE_GENERICINST case.
3194 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
3196 * assembly.c (mono_assembly_fill_assembly_name): New function to
3197 fill out the MonoAssemblyName structure.
3198 (mono_assembly_open): Use the new function.
3200 * icall.c (fill_reflection_assembly_name): New helper function.
3202 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
3205 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
3207 2003-11-15 Martin Baulig <martin@ximian.com>
3209 * class.c (mono_class_is_open_constructed_type): New public
3210 function; checks whether a type is an open constructed type,
3211 ie. whether it still contains type parameters.
3212 (mono_class_inflate_generic_type): If we're a type parameter and
3213 the inflated type is also a MONO_TYPE_(M)VAR, return the original
3216 * class.h (MonoGenericInst): Added `guint32 is_open'.
3218 * loader.c (method_from_methodspec): Check whether we're an open
3219 or closed constructed type and set `ginst->is_open'.
3221 * reflection.c (mono_reflection_bind_generic_parameters): Check
3222 whether we're an open or closed constructed type and set
3224 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
3225 from open constructed types.
3227 2003-11-15 Martin Baulig <martin@ximian.com>
3229 * reflection.c (mono_reflection_bind_generic_parameters): If we're
3230 a generic instance (instead of a generic type declaration) with
3231 unbound generic parameters, bind them to our actual types.
3233 2003-11-14 Martin Baulig <martin@ximian.com>
3235 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
3237 * reflection.c (mono_reflection_bind_generic_parameters): If we're
3238 an interface type, populate `res->interfaces' with instantiated
3239 versions of all the interfaces we inherit.
3241 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
3243 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
3244 when MONO_PATH is set but doesn't contain the install dir.
3246 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3249 (ves_icall_Type_GetInterfaces): don't return an interface twice when
3250 it's also implemented in base classes. Fixes bug #50927.
3252 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
3254 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
3255 if this method is called from a finalizer. Fixes #50913.
3257 2003-11-12 Miguel de Icaza <miguel@ximian.com>
3259 * threads.c: Implement VolatileRead/VolatileWrite
3261 * icall.c: Add new icalls for VolatileRead/VolatileWrite
3263 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
3265 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
3266 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
3269 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
3270 from Peter Ross (pro@missioncriticalit.com).
3272 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
3274 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
3276 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
3278 * assembly.c (mono_assembly_load_references): Disable check because it
3279 triggers on older corlibs which lots of people have.
3281 2003-11-12 Jackson Harper <jackson@ximian.com>
3283 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
3284 load corlib.dll if mscorlib.dll is not found.
3285 * assembly.h: Remove corlib name define.
3288 * image.c: Change corlib name to mscorlib.
3290 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
3292 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
3294 2003-11-11 Miguel de Icaza <miguel@ximian.com>
3296 * appdomain.h: Added loader_optimization here to sync with the C#
3297 code, and add disallow_binding_redirects field.
3299 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
3301 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
3303 * reflection.c (mono_image_build_metadata): Fix crash on modules
3306 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
3308 * icall.c (ves_icall_get_method_info): Return callingConvention as
3311 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
3312 namespaces from the EXPORTEDTYPE table as well.
3314 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
3315 from all modules inside the assembly.
3317 2003-11-11 Martin Baulig <martin@ximian.com>
3319 * reflection.c (mono_reflection_bind_generic_parameters): Make
3320 this work for interfaces.
3322 2003-11-11 Martin Baulig <martin@ximian.com>
3324 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
3326 2003-11-11 Martin Baulig <martin@ximian.com>
3328 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
3329 "MonoInflatedMethod" and "MonoInflatedCtor".
3331 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
3333 * reflection.c (resolution_scope_from_image): Use the assembly table
3334 from the manifest module, since other modules don't have it.
3336 * debug-helpers.c (mono_type_full_name): New helper function.
3338 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
3340 * image.c (mono_image_load_file_for_image): New public function which
3341 is a replacement for the load_file_for_image in class.c.
3343 * assembly.c (mono_assembly_load_module): A wrapper for the function
3344 above which does assembly association and reference loading too.
3346 * class.c (mono_class_from_name): Call mono_assembly_load_module.
3348 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3350 * appdomain.c: not all of the attributes for the full assembly name
3351 are required and the order doesn't matter. Fixes bug #50787.
3353 2003-11-10 Dick Porter <dick@ximian.com>
3355 * locales.c: Use platform-endian UTF16
3357 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
3359 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
3361 2003-11-10 Martin Baulig <martin@ximian.com>
3364 (mono_metadata_load_generic_params): Make this actually work.
3366 * reflection.c (mono_reflection_bind_generic_parameters): If our
3367 parent is a generic instance, pass all the `types' to it, no
3368 matter whether it has the same number of type parameters or not.
3370 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
3372 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
3374 * assembly.c (mono_assembly_load_references): Move the image<->assembly
3375 assignment code to this function so it gets called recursively for all
3378 * image.c (load_modules): Remove the assembly assignment since it is
3379 now done by mono_assembly_load_references.
3381 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3382 Add 'module' argument.
3383 (mono_module_get_types): New helper function.
3384 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
3386 2003-11-08 Martin Baulig <martin@ximian.com>
3388 * class.c (mono_class_inflate_generic_method): Interface method
3389 don't have a header.
3391 * reflection.c (mono_image_get_methodspec_token): Take an
3392 additional `MonoGenericInst *' argument instead of reading it from
3393 the header; this is necessary to support interfaces.
3394 (mono_image_create_token): Pass the `MonoGenericInst *' from the
3395 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
3396 (inflated_method_get_object): Take an additional `MonoGenericInst *'
3399 * reflection.h (MonoReflectionInflatedMethod): Added
3400 `MonoGenericInst *ginst'.
3402 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
3404 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
3406 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
3408 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
3410 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
3413 (reflection_methodbuilder_from_method_builder):
3414 (reflection_methodbuilder_from_ctor_builder): New helper functions to
3415 initialize a ReflectionMethodBuilder structure.
3416 (mono_image_get_methodbuilder_token):
3417 (mono_image_get_ctorbuilder_token): New functions to emit memberref
3418 tokens which point to types in another module inside the same assembly.
3420 * reflection.c: Use the new helper functions.
3422 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
3424 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
3425 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
3427 * reflection.c (resolution_scope_from_image): Emit a moduleref if
3430 * reflection.c (mono_image_build_metadata): Emit metadata only for the
3431 current module. Emit the manifest only for the main module.
3433 * reflection.c (mono_image_create_token): Add assertion when a
3434 memberref needs to be created.
3436 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
3438 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
3439 larger buffer for the custom attribute blob. Fixes #50637.
3441 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3443 * threadpool.c: notify listener on async processing handles after
3444 invoking the async callback. Thanks to Zoltan.
3446 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
3448 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
3449 avoid code duplication.
3451 * reflection.h (MonoDynamicImage): New type which is currently unused,
3452 but will be used through the ref.emit code in place of
3453 MonoDynamicAssembly.
3455 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
3458 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
3459 a MonoDynamicImage instead of just a MonoImage.
3461 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
3462 icalls to ModuleBuilder but keep their semantics, so they will work
3463 with moduleb->assemblyb. This will change later.
3465 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
3467 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
3470 * reflection.c (mono_image_build_metadata): Avoid creation of a default
3471 main module, since it is now done by the managed code.
3473 2003-11-03 Martin Baulig <martin@ximian.com>
3475 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
3476 `ginst->klass' here.
3477 (method_encode_methodspec): Don't use the `ginst->generic_method's
3478 klass if it's a generic instance, use `ginst->klass' in this case.
3480 2003-11-03 Martin Baulig <martin@ximian.com>
3482 * reflection.c (mono_image_get_generic_method_param_info):
3483 Removed, use mono_image_get_generic_param_info() instead.
3484 (mono_image_get_type_info): Write the GenericParam table before
3485 the Method table. This is neccessary because in the GenericParam
3486 table, type parameters of the class (ie. '!0' etc.) must come
3487 before the ones from its generic methods (ie. '!!0' etc).
3489 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
3491 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
3493 2003-11-02 Martin Baulig <martin@ximian.com>
3495 * reflection.c (create_generic_typespec): Take a
3496 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
3497 the generic parameters from it.
3499 2003-11-02 Martin Baulig <martin@ximian.com>
3501 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
3502 instead of a `MonoClassField *' since we just need the type.
3503 (create_generic_typespec): New static function. Creates a
3504 TypeSpec token for a generic type declaration.
3505 (mono_image_get_generic_field_token): New static function.
3506 (mono_image_create_token): If we're a FieldBuilder in a generic
3507 type declaration, call mono_image_get_generic_field_token() to get
3510 2003-11-02 Martin Baulig <martin@ximian.com>
3513 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
3514 `MonoReflectionGenericInst *declaring_type' and
3515 `MonoReflectionGenericInst *reflected_type' fields.
3517 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
3518 `MonoReflectionGenericInst *declaring_type' and a
3519 `MonoReflectionGenericInst *reflected_type' argument instead of a
3520 single `MonoReflectionGenericInst *type' one. Set
3521 `res->declaring_type' and `res->reflected_type' from them.
3522 (mono_reflection_inflate_field): Likewise.
3524 2003-11-02 Martin Baulig <martin@ximian.com>
3526 * class.c (mono_class_setup_vtable): Don't store generic methods
3529 2003-11-02 Martin Baulig <martin@ximian.com>
3531 * reflection.h (MonoReflectionGenericInst): Added
3532 `MonoReflectionType *declaring_type'.
3534 * reflection.c (mono_reflection_bind_generic_parameters): Use
3535 `if (tb->parent)' instead of `klass->parent'.
3537 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
3539 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
3540 with an empty ASSEMBLY table.
3542 * reflection.c (mono_image_build_metadata): Avoid using the same loop
3543 variable in the inner and outer loops.
3545 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
3547 * metadata.h (mono_metadata_make_token): Put parentheses around macro
3550 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
3552 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
3553 icalls. Instead, do everything in managed code. This is needed since
3554 it is hard to restore the original domain etc. in unmanaged code in the
3555 presence of undeniable exceptions.
3557 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
3558 New icalls to push and pop appdomain refs.
3560 2003-10-31 Martin Baulig <martin@ximian.com>
3562 * class.c (inflate_generic_type): Renamed to
3563 mono_class_inflate_generic_type() and made it public.
3565 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
3568 * loader.c (mono_field_from_memberref): Also set the retklass for
3571 * fielder.c (mono_image_get_inflated_field_token): New static
3572 method; creates a metadata token for an inflated field.
3573 (mono_image_create_token, fixup_method): Added support for
3574 "MonoInflatedField".
3575 (fieldbuilder_to_mono_class_field): New static function.
3576 (mono_reflection_inflate_field): New public function.
3579 (MonoReflectionGenericInst): Added `MonoArray *fields'.
3580 (MonoReflectionInflatedField): New typedef.
3582 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
3584 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
3585 for Solaris and other platforms without s6_addr16
3587 2003-10-30 Martin Baulig <martin@ximian.com>
3589 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
3590 argument instead of two.
3591 (mono_class_inflate_generic_signature): Likewise.
3592 (inflate_generic_header): Likewise.
3593 (mono_class_inflate_generic_method): Likewise. In addition, if
3594 `ginst->klass' is set, it becomes the new `method->klass'.
3596 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
3599 * reflection.c (encode_generic_method_sig): Write a 0xa as the
3601 (method_encode_methodspec): If we have generic parameters, create
3602 a MethodSpec instead of a MethodRef.
3603 (fixup_method): Added support for "MonoInflatedMethod" and
3605 (mono_image_create_token): Added support for "MonoInflatedMethod"
3606 and "MonoInflatedCtor".
3607 (inflated_method_get_object): New static function; returns a
3608 managed "System.Reflection.MonoInflatedMethod" object.
3609 (mono_reflection_bind_generic_method_parameters): Return a
3610 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
3611 (mono_reflection_inflate_method_or_ctor): Likewise.
3612 (mono_image_get_generic_method_param_info): Initialize unused
3614 (mono_image_get_generic_param_info): Likewise.
3616 * reflection.h (MonoReflectionInflatedMethod): New public
3617 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
3618 "S.R.MonoInflatedCtor" classes.
3620 * loader.c (method_from_memberref): If we're a TypeSpec and it
3621 resolves to a generic instance, inflate the method.
3623 2003-10-28 Dick Porter <dick@ximian.com>
3625 * object.c (mono_runtime_run_main): Convert command-line arguments
3626 into utf8, falling back to the user's locale encoding to do so.
3628 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
3630 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
3633 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
3635 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
3636 up icalls at method definition time. Partially fixes #33569.
3638 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
3640 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
3641 marshalling of arrays. Fixes #50116.
3643 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
3645 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
3646 points to a vtable in the dying appdomain.
3648 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
3649 listeners into unmanaged code inside the lock.
3651 * object.c (mono_class_vtable): Turn off typed allocation in non-root
3652 domains and add some comments.
3654 2003-10-25 Martin Baulig <martin@ximian.com>
3656 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
3658 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
3660 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
3661 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
3662 currently parsing. Create the generic class and store it in
3663 `generic_inst->klass' before parsing the type arguments. This is
3664 required to support "recursive" definitions; see mcs/tests/gen-23.cs
3666 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
3667 to support recursive typespec entries.
3669 * class.c (mono_class_setup_parent): If our parent is a generic
3670 instance, we may get called before it has its name set.
3671 (mono_class_from_generic): Splitted into
3672 mono_class_create_from_generic() and mono_class_initialize_generic().
3674 2003-10-25 Martin Baulig <martin@ximian.com>
3676 * icall.c (ves_icall_Type_BindGenericParameters): Return a
3677 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
3678 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
3679 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
3681 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
3682 (create_typespec): Likewise.
3683 (mono_reflection_bind_generic_parameters): Return a
3684 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
3685 (mono_reflection_inflate_method_or_ctor): New public function.
3687 * reflection.h (MonoReflectionGenericInst): New typedef.
3689 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
3691 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
3692 inside the domain lock. Fixes #49993.
3694 * object.c (mono_class_vtable): When typed allocation is used,
3695 allocate vtables in the GC heap instead of in the mempool, since the
3696 vtables contain GC descriptors which are used by the collector even
3697 after the domain owning the mempool is unloaded.
3699 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
3701 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
3702 reflect what it does. Also invalidate mempools instead of freeing
3703 them if a define is set.
3705 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
3708 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
3709 hold the finalizable objects in this domain.
3711 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
3714 * appdomain.c (mono_domain_set): New function to set the current
3715 appdomain, but only if it is not being unloaded.
3717 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
3718 appdomain which is being unloaded.
3720 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
3721 unloading of the root appdomain.
3723 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
3724 icall to execute a method in another appdomain. Intended as a
3725 replacement for InternalSetDomain, which can confuse the code
3726 generation in the JIT.
3728 * appdomain.c (mono_domain_is_unloading): New function to determine
3729 whenever an appdomain is unloading.
3731 * appdomain.c (mono_domain_unload): New function to correctly unload
3734 * assembly.c (mono_assembly_load_references): Check that an assembly
3735 does not references itself.
3737 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
3738 domain manually, it asks the finalizer thread to do it, then waits for
3739 the result. Also added a timeout.
3741 * icall.c: Register the new icalls.
3743 * threads.h threads.c: Export the mono_gc_stop_world and
3744 mono_gc_start_world functions.
3746 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
3747 function to fill out the mempool with 0x2a.
3749 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
3751 * reflection.h (MonoReflectionMethodAux): New structure to store
3752 information which is rarely used, thus is not in the MonoMethod
3755 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
3758 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
3759 and marshalling info into the aux structure.
3761 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
3762 from the aux structure.
3764 * loader.c (mono_method_get_param_names): Retrieve the param names from
3767 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
3769 * exception.h exception.c: Add AppDomainUnloadedException && fix
3772 2003-10-21 Dick Porter <dick@ximian.com>
3775 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
3776 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
3778 2003-10-21 Martin Baulig <martin@ximian.com>
3780 * reflection.c (mono_reflection_bind_generic_parameters):
3781 `klass->parent' is NULL for interfaces.
3783 2003-10-21 Martin Baulig <martin@ximian.com>
3785 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3787 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
3789 * exception.c (mono_exception_from_name_msg): New helper function for
3790 creating exceptions and initializing their message field.
3792 * exception.c: Simplify functions using the new helper.
3794 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
3797 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
3798 mono_raise_exception, since otherwise gcc doesn't generate the function
3799 epilog for raise_exception, confusing the stack unwinding in the JIT.
3802 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
3803 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
3806 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3808 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
3811 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
3813 * icall.c: Removed GetUninitializedObject method because
3814 AllocateUninitializedClassInstance does the same.
3816 2003-10-18 Martin Baulig <martin@ximian.com>
3818 * class.c (inflate_generic_signature): Renamed to
3819 mono_class_inflate_generic_signature() and made it public.
3820 (my_mono_class_from_generic_parameter): New static function; if we
3821 don't already have the generic parameter's MonoClass, create a
3822 very simple one which is just used internally in the runtime and
3823 not passed back to managed code.
3825 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
3827 * metadata.h (MonoMethodSignature): Moved the
3828 `MonoGenericParam *gen_params' to the MonoMethodHeader.
3829 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
3831 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
3832 ves_icall_MonoMethod_GetGenericArguments(); this is now an
3833 interncall on the MonoMethod class, not on MethodInfo.
3834 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
3835 calling mono_reflection_bind_generic_method_parameters() directly.
3837 * loader.c (mono_method_get_signature): If this is a MethodSpec;
3838 return the already computed `method->signature'.
3839 (method_from_methodspec): New static function to load a method
3840 from a MethodSpec entry.
3841 (mono_get_method_from_token): Call the new method_from_methodspec()
3842 for MethodSpec tokens.
3843 (mono_get_method_from_token): If we're a generic method, load the
3846 * reflection.c (mono_image_get_memberref_token): Allow
3847 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
3849 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
3850 (mono_image_create_token): First check whether it's a generic
3851 method (so we'd need to create a MethodSpec), then do the other
3853 (mono_reflection_bind_generic_method_parameters): Return a
3854 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
3855 called directly from the interncall.
3857 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
3859 * reflection.c (load_public_key): Move loading of the public key
3862 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
3864 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
3867 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
3868 culture, hash_alg and public_key. Fixes #49555.
3870 2003-10-17 Martin Baulig <martin@ximian.com>
3872 * class.h (MonoGenericInst): Moved this declaration here and added
3873 `MonoMethod *generic_method'.
3876 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
3877 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
3879 * metadata.c (mono_metadata_type_equal): Two types of
3880 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
3881 index; ie. don't compare the address of the `MonoGenericParam'
3883 (mono_metadata_load_generic_params): Removed the `MonoMethod
3886 * metadata.h (MonoGenericInst): Moved declaration to class.h.
3887 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
3889 * reflection.c (method_encode_signature): Encode the number of
3891 (encode_generic_method_sig): New static function.
3892 (method_encode_methodspec): New static function; creates an entry
3893 in the MethodSpec table for a generic method.
3894 (mono_image_get_methodspec_token): New static function.
3895 (mono_image_create_token): Call mono_image_get_methodspec_token()
3896 for generic methods.
3897 (mono_reflection_bind_generic_method_parameters): New public
3898 function. Instantiates a generic method.
3900 2003-10-16 Martin Baulig <martin@ximian.com>
3902 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
3903 *gen_params' here from MonoMethodHeader.
3905 * metadata.c (mono_metadata_parse_method_signature): If we have
3906 generic parameters, initialize `method->gen_params' and then set
3907 the correct `type->data.generic_param' in all the parameters.
3909 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
3911 * threads.c (mono_threads_get_default_stacksize): New function to
3912 return the default stacksize.
3914 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
3915 termination of the finalizer thread, since the previous method had
3916 race conditions. Fixes #49628.
3918 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
3919 as for the other managed threads.
3921 2003-10-16 Martin Baulig <martin@ximian.com>
3923 * class.c (inflate_generic_signature): Copy `generic_param_count'
3926 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
3929 * metadata.c (mono_metadata_parse_method_signature): Actually set
3930 the `method->generic_param_count' here.
3931 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
3933 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
3935 * object.h: Add a new field to TypedRef to simplify the implementation
3936 of the REFANY opcodes in the JIT.
3938 * icall.c: Make use of the new field.
3940 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
3943 2003-10-15 Martin Baulig <martin@ximian.com>
3945 * class.c (mono_class_from_gen_param): Renamed to
3946 mono_class_from_generic_parameter() and moved most of the
3947 functionality from mono_reflection_define_generic_parameter()
3948 here; ie. we create a "real" class here.
3949 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
3950 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
3951 previously been called.
3953 * class.h (MonoGenericParam): Moved the declaration of this struct
3954 here from metadata.h and added `MonoMethod *method'.
3956 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
3959 * loader.c (mono_get_method_from_token): If we have any generic
3960 parameters, call mono_metadata_load_generic_params() to read them
3961 from the MONO_TABLE_GENERICPAR.
3963 * metadata.c (mono_metadata_load_generic_params): Added
3964 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
3966 * metadata.h (MonoMethodSignature): Replaced
3967 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
3968 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
3970 * reflection.c (mono_reflection_define_generic_parameter): Moved
3971 most of the functionality into the new
3972 mono_class_from_generic_parameter(); set the `method' field if
3973 we're a method parameter.
3975 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
3977 * marshal.c (emit_struct_conv): if native size is 0
3980 2003-10-14 Martin Baulig <martin@ximian.com>
3982 * icall.c: The generics API has changed in the spec since it was
3983 added to System.Type; these modifications make it match the spec
3985 (ves_icall_Type_GetGenericParameters): Renamed to
3986 `ves_icall_Type_GetGenericArguments'.
3987 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
3988 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
3989 `ves_icall_MonoType_get_HasGenericArguments'.
3990 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
3991 `ves_icall_MonoType_get_IsGenericParameter'.
3992 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
3993 this is no interncall anymore.
3994 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
3995 `ves_icall_TypeBuilder_get_IsGenericParameter'.
3997 2003-10-14 Martin Baulig <martin@ximian.com>
3999 * reflection.c (mono_reflection_bind_generic_parameters): Also
4000 inflate generic methods if we're reading the class from IL.
4002 2003-10-13 Martin Baulig <martin@ximian.com>
4004 * reflection.c (mono_reflection_define_generic_parameter): This
4005 method isn't called directly from the icall anymore; take a
4006 `MonoReflectionAssemblyBuilder *' so we can use this for type and
4007 method generic parameters.
4008 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
4009 (method_builder_encode_signature): Encode generic parameters.
4010 (mono_image_get_method_info): Write generic params to the
4011 MONO_TABLE_GENERICPARAM table.
4013 * reflection.h (MonoReflectionMethodBuilder): Added
4014 `MonoArray *generic_params'.
4016 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
4018 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
4019 wrapper for mono_reflection_define_generic_parameter().
4020 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
4022 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
4024 * marshal.h: Add missing function to fix build.
4026 * marshal.c (mono_marshal_get_native_wrapper): Add support for
4027 the SetLastError pinvoke attribute.
4029 * marshal.c (mono_marshal_set_last_error): New helper function called
4030 by the generated code.
4032 * marshal.c (mono_mb_emit_branch): New helper function.
4034 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
4036 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
4037 classes as parameters and return values of delegates. Fixes #29256.
4039 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
4041 * locales.c: use gint32 in non HAVE_ICU case
4043 2003-10-11 Martin Baulig <martin@ximian.com>
4045 * mono-debug.c (mono_debug_add_method): Added a workaround for
4048 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
4050 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
4051 delegates passed to native code must use the STDCALL calling
4052 convention. Fixes #35987.
4054 2003-10-10 Martin Baulig <martin@ximian.com>
4056 * class.c (inflate_generic_type): If we're inflating for a generic
4057 type instance (and not for a generic method), return
4058 MONO_TYPE_MVAR unchanged.
4060 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4062 * string-icalls.c: Join ignores null strings in the source array.
4063 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
4064 * threads.c: GetAvailableTheads is slightly more accurate.
4066 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
4068 * threads.h threads.c : add mono_threads_set_default_stacksize
4069 and pass default to CreateThread calls.
4071 2003-10-09 Dick Porter <dick@ximian.com>
4075 * locales.c: Internal calls for constructing CultureInfo and
4076 related objects from libicu (if its available.)
4078 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
4080 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
4082 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4084 * threadpool.c: added an argument to async_invoke_thread that is the
4085 item to process, pass the MonoAsyncResult to the thread start function
4086 when creating a new thread. This way we don't need to acquire any lock
4087 when we're creating a new thread. Readded a semaphore for faster
4088 response times (instead of that Sleep i added).
4090 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
4092 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
4093 get daylight change dates better on Windows, fix handling
4094 of platforms without tm_gmtoff.
4096 2003-10-06 Martin Baulig <martin@ximian.com>
4098 * class.c (inflate_generic_method): Renamed to
4099 mono_class_inflate_generic_method() and made public.
4100 (mono_class_init): Don't inflate the generic methods here.
4101 (mono_class_from_generic): Added `gboolean inflate_methods'
4102 argument. Inflate the methods here.
4104 * loader.c (mono_method_get_param_names): Ignore instances of
4105 generic types for the moment.
4107 * reflection.c (fixup_method): Added support for inflated methods.
4108 (mono_image_create_token): Use mono_image_get_methodref_token()
4109 for inflated methods.
4110 (mono_custom_attrs_from_param): Ignore instances of generic types
4112 (mono_reflection_bind_generic_parameters): New public function.
4113 Moved all the functionality from
4114 ves_icall_Type_BindGenericParameters() here and added support for
4116 (mono_reflection_define_generic_parameter): Initialize
4117 `klass->methods' here.
4119 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
4120 functionality into mono_reflection_define_generic_parameter().
4121 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
4122 TypeBuilder, return that TypeBuilder.
4124 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4126 * appdomain.c: removed mono_delegate_semaphore.
4129 (mono_thread_pool_add): moved hash table creation inside and the thread
4130 creation outside of the critical region.
4131 (mono_thread_pool_finish): removed obsolete code.
4132 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
4133 continue or exit the thread depending on the queue.
4135 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
4137 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
4138 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
4139 handle more bool marshalling options
4141 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
4143 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
4144 arrays of structs. Also add a more descriptive error message when
4145 a structure member is marshalled as LPArray.
4147 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
4149 * marshal.c (mono_marshal_get_native_wrapper): Add support for
4150 marshalling arrays of complex types. Fixes #29098. Also remove an
4151 usused and incomplete function.
4153 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
4155 * gc.c: report heap_size - free_bytes as total memory allocated
4158 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
4160 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
4161 fix timezone handling problems on Windows.
4163 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
4164 asserts when the year is outside the range handled by ms the functions.
4166 * class.c (setup_interface_offsets): If the class is an interface,
4167 fill out its interface_offsets slot.
4169 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4171 * threadpool.c: mark threadpool threads as background.
4173 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
4175 * decimal.c - define DECINLINE to nothing if not using GCC
4177 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
4179 * assembly.c: More refcount fixes.
4181 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4183 * string-icalls.c: if we're not trimming, return the same string.
4184 When not splitting, don't create a new string.
4186 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4189 (mono_image_open): increment the ref_count inside the critical section.
4191 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
4193 * image.c (mono_image_open): Fix reference counting bug.
4195 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
4197 * marshal.c (mono_marshal_type_size) struct alignment changed for
4198 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
4199 64bits. Avoid leak in mono_marshal_get_native_wrapper when
4200 mono_lookup_pinvoke_call throws.
4202 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
4204 * reflection.c (mono_reflection_parse_type): Fix #49114.
4206 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
4207 temporary workaround for cygwin header problem.
4209 * object.c (mono_object_isinst): Synchronize this with the code
4210 generated by the JIT for casts.
4212 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
4214 * reflection.c (encode_type): Fix #38332.
4216 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
4218 * marshal.c (mono_marshal_method_from_wrapper): New function to return
4219 the original method from the wrapper method.
4221 2003-09-25 Martin Baulig <martin@ximian.com>
4223 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
4224 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
4225 (ves_icall_Type_get_IsGenericInstance): New interncall.
4227 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
4229 * object.c: fix cast warning in big endian code.
4231 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
4233 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
4235 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4237 * assembly.c: don't call check_env from mono_assembly_load. It's
4238 already done once in mono_assemblies_init and may cause headaches when
4239 multiple threads are loading assemblies.
4241 2003-09-19 Martin Baulig <martin@ximian.com>
4243 * reflection.c (mono_reflection_define_generic_parameter): Don't
4244 allocate `klass->methods', set `klass->flags' to
4245 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
4247 2003-09-18 Martin Baulig <martin@ximian.com>
4249 * class.c (mono_class_init): Don't create `class->methods' if it's
4250 already initialized.
4252 * metadata.c (mono_metadata_load_generic_params): Make this
4255 * reflection.c (mono_reflection_define_generic_parameter): Set
4256 parent class and interfaces from the constraints.
4258 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
4259 to keep this struct in sync with the declaration in TypeBuilder.cs.
4261 2003-09-17 Martin Baulig <martin@ximian.com>
4263 * metadata.h (MonoType): Replaced the data's `int type_param'
4264 field with `MonoGenericParam *generic_param'.
4265 (MonoGenericParam): Added `MonoClass *klass'.
4267 * class.c (mono_class_from_gen_param): Removed the
4268 `MonoImage *image' and `int type_num' arguments.
4270 * metadata.c (mono_metadata_parse_generic_param): New static
4271 method; creates a MonoGenericParam which just contains the index.
4272 (do_mono_metadata_parse_type): Call
4273 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
4276 * reflection.c (mono_image_typedef_or_ref): Generic type
4277 parameters may be in the same assembly, but never use a typedef
4279 (mono_reflection_define_generic_parameter): We're now creating a
4280 "real" class for the type parameter; it's now safe to call
4281 mono_class_from_mono_type() on the class'es type, it'll do the
4284 2003-09-16 Martin Baulig <martin@ximian.com>
4286 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
4287 `symfile->range_entry_size' and `symfile->class_entry_size' here;
4288 the `symfile' data structure must be fully initialized before it
4289 gets added to the table.
4291 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
4293 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
4295 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
4296 class init trampolines.
4298 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
4300 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
4301 to the built-in profiler to turn off time and allocation profiling
4304 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
4306 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
4309 * debug-helpers.c (mono_method_full_name): Print the wrapper type
4310 in human readable form.
4312 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
4314 * reflection.c icall.c: Fixed warnings.
4316 * image.c (load_class_names): Use a temporary hash table to hold the
4317 namespaces in order to avoid doing many string comparisons.
4319 * image.h: Fix typo.
4321 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
4322 Pass NULL instead of g_direct_equal to the GHashTable constructor
4323 since the NULL case is short-circuited inside g_hash_table_lookup,
4324 leading to better performance.
4326 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
4327 obtain the first custom attribute for a given index. Depends on the
4328 CustomAttribute table being sorted by the parent field.
4330 * reflection.c (mono_custom_attrs_from_index): Use the new function
4331 for better performance.
4333 2003-09-07 Martin Baulig <martin@ximian.com>
4335 * class.c (mono_class_init): If we're a generic instance, inflate
4336 all our methods instead of loading them from the image.
4337 (mono_class_from_generic): Set `class->methods = gklass->methods'.
4339 2003-09-07 Martin Baulig <martin@ximian.com>
4341 * mono-debug-debugger.c: Added support for constructors.
4343 2003-09-06 Martin Baulig <martin@ximian.com>
4345 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
4348 * reflection.c (mono_reflection_setup_generic_class): Call
4349 ensure_runtime_vtable() to create the vtable.
4351 2003-09-05 Martin Baulig <martin@ximian.com>
4353 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
4356 2003-09-04 Martin Baulig <martin@ximian.com>
4358 * reflection.c (mono_reflection_define_generic_parameter): Generic
4359 parameters start with zero.
4361 2003-09-04 Martin Baulig <martin@ximian.com>
4363 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4365 * reflection.h (MonoReflectionGenericParam): New typedef.
4366 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
4367 the generic parameters from the managed TypeBuilder.
4369 * reflection.c (mono_reflection_define_generic_parameter): New function.
4370 (mono_reflection_create_runtime_class): Encode generic parameters.
4371 (mono_reflection_setup_generic_class): New function; this is
4372 called after adding adding all generic params to the TypeBuilder.
4373 (encode_type): Added MONO_TYPE_VAR.
4375 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
4377 * class.h class.c (mono_class_needs_cctor_run): Moved this method
4380 * assembly.h assembly.c: Moved the AOT loading code into an assembly
4383 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
4385 * reflection.h reflection.c class.h class.c: Delete duplicate
4386 definition of mono_type_get_name () from reflection.c and export the
4389 * class.c: Class loading fixes from Bernie Solomon
4390 (bernard@ugsolutions.com).
4392 * reflection.c: Endianness fixes from Bernie Solomon
4393 (bernard@ugsolutions.com).
4395 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
4397 * assembly.h assembly.c: Define a file format version for AOT
4400 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
4402 * appdomain.h (MonoJitInfo): New field to determine whenever the
4403 code is domain neutral.
4405 2003-08-31 Miguel de Icaza <miguel@ximian.com>
4407 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
4409 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
4411 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
4412 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
4413 Avoid caching the result since strings must be domain specific. Fixes
4416 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
4418 * marshal.c (mono_marshal_init): Make this callable multiple times
4419 since it is hard to find a correct place to call it.
4421 * object.c (mono_runtime_class_init): Execute static constructors in
4422 the correct appdomain.
4424 * image.c (build_guid_table): Handle the case when multiple images have
4427 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4429 * icall.c: added a couple of icalls for System.Web.
4431 2003-08-28 Martin Baulig <martin@ximian.com>
4433 * icall.c (ves_icall_Type_BindGenericParameters): Use
4434 `klass->generic_inst' instead of `&klass->byval_arg' in the
4435 mono_type_get_object() call. The returned type must be
4436 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
4438 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
4442 * object.c (mono_class_proxy_vtable): Make it thread safe.
4444 * pedump.c: Fix warning.
4446 * object.c appdomain.h: Get rid of metadata_section.
4447 It is no longer needed and it was causing deadlocks with domain->lock.
4449 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
4451 2003-08-26 Martin Baulig <martin@ximian.com>
4453 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
4455 2003-08-26 Martin Baulig <martin@ximian.com>
4457 * pedump.c (main): Call mono_metadata_init(),
4458 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
4459 and mono_loader_init().
4461 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
4463 * loader.h: Add missing include to fix build.
4465 * image.h: mono_image_load_references is no more.
4467 * assembly.c: Reworked assembly loading to make it really thread safe.
4468 After these changes, the assembly returned by mono_assembly_open is
4469 fully initialized, i.e. all its references assemblies are loaded.
4471 * assembly.c (mono_image_load_references): Renamed to
4472 mono_assembly_load_references, and made private, since clients no
4473 longer need to call it.
4475 * class.c: Removed calls to mono_assembly_load_references, since it was
4476 a source of deadlocks.
4478 * loader.h loader.c class.h class.c: Protect data structures using a
4479 new lock, the loader lock.
4481 * class.c (mono_class_setup_vtable): Create temporary hash tables and
4482 GPtrArrays only when needed.
4484 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
4485 into empty structures by mcs. Fixes pinvoke7.cs.
4487 * domain.c (mono_init): Call a new initialization function.
4489 * appdomain.c (mono_runtime_init): Call the new initializer function
4490 of the marshal module.
4492 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
4493 inserted into empty structures by mcs. Fixes pinvoke7.cs.
4495 * marshal.h marshal.c: Added locks around the wrapper caches to make
4496 this module thread safe.
4498 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
4499 this argument. Fixes pinvoke1.exe.
4501 2003-08-25 Lluis Sanchez <lluis@ximian.com>
4503 * object.h: Added call_type field to MonoMethodMessage and the corresponding
4504 enumeration of values. Removed fields to store remote call output values in
4505 MonoAsyncResult. Not needed any more.
4506 * object.c: Initialize call_type and async_result fields in mono_message_init.
4507 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
4508 dispatching the message.
4509 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
4510 async call to finish. To do it use a message with EndInvoke call type.
4512 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
4514 * loader.h loader.c (mono_method_hash_marhal_info): New function which
4515 determines whenever a method has marshalling info.
4517 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4519 * assembly.c: fix the build on windows.
4521 2003-08-22 Lluis Sanchez <lluis@ximian.com>
4523 * object.cs: Fixed bug #47785.
4525 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
4527 * string-icalls.c (StringReplace): If their are no occurances of
4528 the old string found return a reference to the supplied
4529 string. This saves some memory and matches MS behavoir.
4531 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4533 * socket-io.c: fixed compilation for systems that define AF_INET6
4534 and don't define SOL_IP/SOL_IPV6.
4536 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
4538 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
4539 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
4541 * rawbuffer.c rawbuffer.h: Make this module thread safe.
4543 * domain.c: Make this module thread safe.
4545 * domain.c (mono_init): Call new initialization function.
4547 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
4548 reference types too. Fixes #38812.
4550 * image.c (mono_image_init): Fixed warnings.
4552 * class.c (mono_class_from_typeref): Handle assembly load failure
4555 * appdomain.c (add_assemblies_to_domain): Handle the case when
4556 the references of an assembly are not yet loaded.
4558 * metadata.c image.c assembly.c: Moved initialization of global
4559 variables to a separate function called at startup since lazy
4560 initialization of these variables is not thread safe.
4562 * image.c assembly.c: Made this module thread safe by adding locks in
4563 the appropriate places.
4565 * domain.c (mono_init): Call the new initialization functions of the
4568 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
4570 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
4571 make a direct call. It is proxy's work to make the call asynchronous.
4572 mono_delegate_end_invoke(): If the targe is a proxy, just collect
4574 * object.cs: mono_method_call_message_new(): read AsyncResult and
4575 state object from parameters list, if this info is requested.
4576 * object.h: Added fields to store remote call output values in
4577 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
4579 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
4581 * object.h: add needed fields to MonoThread.
4582 * threads.c, threads.h: allow registering a function to cleanup data
4583 allocated per thread by the JIT.
4585 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
4587 * loader.h: portability fix by Bernie Solomon
4588 * <bernard@ugsolutions.com>.
4590 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
4592 * reflection.h reflection.c (mono_param_get_objects): Changed this to
4593 return a MonoArray. This simplifies the code and also ensures that
4594 the cache allways contains an object reference as a value.
4596 * icall.c (ves_icall_get_parameter_info): Simplified using the new
4599 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4601 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
4602 fixes a problem with byte ordering when getting the address family for
4605 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
4607 * .cvsignore: Added monosn.
4609 * reflection.h reflection.c loader.c: Added support for parameter
4610 marshalling to dynamically created types. Fixes #47295.
4612 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
4614 * rand.c: remove useless warnings.
4616 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
4618 * class.c: implemented ldtoken for methods and fieldrefs.
4620 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4622 * threadpool.c: when mono_async_invoke was called, no one took care of
4623 monitoring the queue. So if the method invoked took some time and we
4624 got new async invoke requests after 500 ms (the thread created waited
4625 that long in WaitForSingleObject), the new async invoke was not called
4626 until the previous one finished.
4628 This is fixed now. Thanks to Totte for helping with it.
4630 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4632 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
4634 2003-08-11 Martin Baulig <martin@ximian.com>
4636 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
4638 2003-08-06 Martin Baulig <martin@ximian.com>
4640 * mono-debug-debugger.c: Added support for static fields,
4641 properties and methods.
4643 2003-08-06 Martin Baulig <martin@ximian.com>
4645 * mono-debug-debugger.c: Don't store the MonoString's vtable to
4646 make this work for applications with multiple application domains.
4648 2003-08-04 Martin Baulig <martin@ximian.com>
4650 * mono-debug-debugger.c: Completely reworked the type support; the
4651 most important thing is that we're now just using one single
4652 `MonoType' instance per type.
4654 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
4656 * mono-endian.h, mono-endian.c, icall.c: Added icall
4657 ves_icall_System_Double_AssertEndianity to assert double word endianity
4658 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
4660 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
4662 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
4663 support, icalls and fixes.
4665 2003-07-31 Miguel de Icaza <miguel@ximian.com>
4667 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
4668 classes that are a punctuation character in .NET is not the same a
4671 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
4673 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
4675 2003-07-29 Miguel de Icaza <miguel@ximian.com>
4677 * icall.c: Add new MemCopy internalcall.
4678 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
4679 Simplified code; It is not necessary to handle all the cases here,
4680 as the C# code takes care of it. Only handle the case of the name
4681 resource embedded into the assembly.
4683 Changed signature to return the data pointer and the size of the
4686 2003-07-26 Miguel de Icaza <miguel@ximian.com>
4688 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
4689 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
4691 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
4693 * socket-io.c: ignore EINTR error in select.
4695 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
4697 * class.h, class.c: removed unused subclasses field in MonoClass.
4699 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
4701 * icall.c: improve fix of get_base_definition(). If the parent class
4702 doesn't have the mehod, look at the parent of the parent.
4703 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
4704 to check if a parameter is an in or out parameter
4705 (PARAM_ATTRIBUTE_IN is not set by default).
4706 mono_method_return_message_restore(): Use mono_class_value_size to
4707 get the size of a value type. mono_type_stack_size (parameterType)
4708 does not return the correct value if parameterType is byRef.
4709 mono_load_remote_field(), mono_load_remote_field_new(),
4710 mono_store_remote_field(), mono_store_remote_field_new():
4711 raise exception if the remote call returns an exception.
4713 2003-07-28 Martin Baulig <martin@ximian.com>
4715 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
4716 method. This is a wrapper around mono_runtime_invoke() which
4717 boxes the instance object if neccessary.
4719 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
4721 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
4722 metadata.h, row-indexes.h, verify.c: first cut of generics support.
4724 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
4726 * icall.c: disable mcs bug workaround.
4728 2003-07-21 Miguel de Icaza <miguel@ximian.com>
4730 * object.c (mono_runtime_class_init): Take the metadata_section
4731 mutex before obtaining the domain mutex.
4733 * appdomain.h: Added definition of metadata_section mutex here.
4735 * object.c: define metadata_mutex here.
4737 2003-07-24 Ravi Pratap <ravi@ximian.com>
4739 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
4742 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
4744 * reflection.c: Fix bug #46669
4746 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4751 * object.h: fill in the type name for TypeLoadException.
4753 2003-07-23 Ravi Pratap <ravi@ximian.com>
4755 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
4756 relationship between TypeBuilders while compiling corlib) and bug
4757 45993 (Array types returned from the runtime while compiling
4758 corlib were from the loaded corlib).
4760 2003-07-22 Martin Baulig <martin@ximian.com>
4762 * mono-debug-debugger.c: Reworked the type support a bit more;
4763 distinguish between types and classes.
4765 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
4767 * icall.c: add IsArrayImpl icall.
4769 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
4771 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
4772 initializing real_size only once. Also fix bug #46602.
4774 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
4776 * object.c: Renamed mono_metadata_section to metadata_section.
4778 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
4780 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
4781 empty array if the type is an array. Fixed.
4782 ves_icall_MonoMethod_get_base_definition: if the base method
4783 is abstract, get the MethodInfo from the list of methods of
4785 * reflection.c: ParameterInfo.PositionImpl should be zero-based
4786 and it was 1-based. Fixed in mono_param_get_objects.
4788 2003-07-20 Martin Baulig <martin@ximian.com>
4790 * mono-debug.h: Set version number to 31.
4791 (mono_debug_init): Added `MonoDomain *' argument.
4793 * mono-debug-debugger.c: Reworked the type support; explicitly
4794 tell the debugger about builtin types; pass the `klass' address to
4797 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
4799 * image.c: Allow new metadata tables to be loaded without a
4800 warning. Also update the warning message to give the new constant value.
4802 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
4804 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
4805 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
4806 array type representation changes.
4808 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
4810 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
4811 on Environment.Exit () call.
4813 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
4815 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
4816 requires a matching corlib.
4818 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
4820 * Changelog: My editor decided to add a CR to each line. Sorry about that.
4821 Committed again without the CRs.
4823 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
4825 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
4826 getting it from the "this" socket instance. Did not work
4827 if the socket is a subclass of Socket.
4828 Also fixed bug #35371.
4830 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
4832 * metadata.c: fixed size for TypedByRef.
4833 * loader.c: when searching for a method, consider the vararg amrker.
4834 * unicode.c, decimal.c: constify some arrays.
4836 2003-07-15 Dick Porter <dick@ximian.com>
4838 * socket-io.c: Fixed compilation for gcc < 3.2.
4840 Fixed compilation for machines that don't have AF_INET6 (thanks to
4841 Bernie Solomon <bernard@ugsolutions.com> for that part.)
4843 Fixed compile warnings.
4845 Fixed formatting and line endings.
4847 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
4850 * socket-io.c: Added IPv6 support.
4852 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
4854 * class.c (mono_class_is_assignable_from): New function to implement
4855 the is_assignable_from logic. Used by mono_object_isinst,
4856 Type::IsAssignableFrom () and the interpreter.
4858 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
4859 Object, even interfaces.
4861 * object.c (mono_object_isinst): Implement in terms of
4864 * icall.c (ves_icall_type_is_assignable_from): New icall.
4866 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
4868 * domain.c (foreach_domain): fix compiler warning.
4870 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
4872 * image.c (load_metadata_ptrs): use g_strndup because strndup is
4873 not available on all plattforms
4875 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
4877 * image.h image.c: Store the metadata version string in MonoImage.
4878 * icall.c: New icall to retrieve the image version.
4879 * reflection.c (create_dynamic_image): Fill in the image version field
4880 * reflection.c (build_compressed_metadata): Use the image version
4881 from the image structure.
4883 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4885 * appdomain.c: modified comment.
4886 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
4887 That will be its last iteration when mono_gc_cleanup is called from
4888 mono_runtime_cleanup and before the domain is unloaded.
4892 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
4894 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
4897 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
4899 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
4900 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
4901 Bernie Solomon <bernard@ugsolutions.com>.
4903 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
4905 * object.c, object.h: provide mono_object_new_fast() for faster
4906 allocation in some special cases.
4908 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
4910 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
4911 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
4913 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
4915 * threadpool.c: fix leaks.
4917 2003-07-01 Dick Porter <dick@ximian.com>
4919 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
4920 using MonoGHashTables. Fixes threadpool bug posted to list.
4922 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
4924 * image.h, image.c: added support to load an assembly from a byte array.
4925 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
4926 assembly bundle support.
4928 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
4930 * threadpool.c (mono_thread_pool_add): keep a reference to the
4931 AsyncResult to prevent GC
4933 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
4935 * class.c: leak fix.
4937 2003-06-25 Dick Porter <dick@ximian.com>
4939 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
4940 for the async object, the WaitHandle object will close the handle.
4943 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
4945 * class.c: in mono_array_class_get (), lookup from the hash with the
4946 same type we insert: this works around a bug in
4947 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
4948 lluis. The real fix will have to wait for after the release.
4950 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
4952 * icall.c: fix memory leak when getting type members.
4954 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
4956 * reflection.c: added more pubtoken special cases.
4958 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
4960 * class.c: handle field offset correctly when class size
4961 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
4963 2003-06-20 Martin Baulig <martin@ximian.com>
4965 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
4968 2003-06-20 Martin Baulig <martin@ximian.com>
4970 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
4972 2003-06-20 Martin Baulig <martin@ximian.com>
4974 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
4975 just distinguish between variables in registers and variables at
4976 an offset relative to a register.
4978 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4980 * icall.c: #ifdef out latest changes until mcs is fixed.
4982 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
4984 * icall.c: return members in metadata order.
4986 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
4988 * icall.c: avoid infinite loop in GetTimeZoneData.
4990 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
4992 * icall.c: added Marshal.Prelink/All icalls.
4994 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
4996 * object.c, object.h: fix warnings and do some overflow checking
4997 when creating arrays.
4999 2003-06-17 Dick Porter <dick@ximian.com>
5002 * file-io.c: File attributes need to be tweaked slightly when
5003 passed from the managed to the w32 world.
5005 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
5006 * profiler.h profiler-private.h profiler.c: Rework last patch
5007 based on suggestion by Paolo.
5009 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
5011 * profiler.h profiler-private.h profiler.c: Added infrastructure for
5012 instruction level coverage data collection.
5013 * profiler.h profiler.c (: Added new callback function which can be
5014 used by the profiler to limit which functions should have coverage
5016 * profiler.c (mono_profiler_load): Call g_module_build_path to
5017 generate the file name of the profiler library.
5019 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5021 * profiler.c, profiler.h, profiler-private.h: added basic block
5022 coverage profiling API.
5024 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
5026 * reflection.c (mono_reflection_create_runtime_class): Add support
5027 for events in dynamically generated code.
5029 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
5032 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5034 * icall.c: when getting timezone info, return reasonable values if we
5035 can't get the actual data.
5037 2003-06-14 Dick Porter <dick@ximian.com>
5039 * threads.c (start_wrapper): Remove the reference to the thread
5040 object in the TLS data, so the thread object can be finalized.
5041 This won't be reached if the thread threw an uncaught exception,
5042 so those thread handles will stay referenced :-( (This is due to
5043 missing support for scanning thread-specific data in the Boehm GC
5044 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
5046 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
5048 * reflection.c: ensure streams and tables are first allocated with
5049 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
5051 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5053 * icall.c: fixed GetElementType for byrefs (bug# 44792).
5055 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
5057 * reflection.c (mono_reflection_create_runtime_class): Add support for
5058 properties to dynamically created classes.
5059 * reflection.c: Fix a few places where non-MonoObjects were inserted
5060 into the tokens hashtable.
5062 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5064 * object.c: some support to handle out of memory exceptions.
5066 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
5068 * marshal.c (mono_marshal_get_native_wrapper): support reference
5071 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5073 * object.h, object.c: more portability stuff from Bernie Solomon.
5074 Unexport mono_object_allocate(). Added mono_object_unbox ().
5075 Set exitcode when an unhandled exception is thrown.
5077 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
5079 * marshal.c (mono_marshal_get_native_wrapper): use custom
5080 marshaler for return types.
5082 2003-06-10 Dick Porter <dick@ximian.com>
5084 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
5085 ip_mreq is available
5087 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
5089 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
5090 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
5091 by Bernie Solomon <bernard@ugsolutions.com>.
5093 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
5095 * gc.c (mono_gc_init): Avoid error message on shutdown when
5096 GC_DONT_GC=1 is used.
5098 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
5099 New icall to return the GUID of a module.
5101 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5103 * class.c: ensure instance size always includes the parent's size
5104 even whem class size is set explicitly (fixes bug#44294).
5106 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5108 * profiler.h, profiler.c: made the simple profiler thread-safe,
5109 get more accurate timing info. Allow the loading of an
5110 externally-developed profiler module.
5112 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
5114 * marshal.c (mono_marshal_get_native_wrapper): improved
5115 class/byref arguments.
5116 (mono_marshal_get_native_wrapper): better string marshaling support.
5118 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
5120 * class.c: ensure .pack and .size are handled correctly and
5121 simplified layout of static fields.
5123 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
5126 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
5128 * loader.c (mono_lookup_pinvoke_call): look for modules in the
5129 current directory (fix bug 44008)
5131 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
5133 * marshal.c (mono_marshal_get_native_wrapper): started support for
5135 (mono_delegate_to_ftnptr): consider marshalling specifications
5137 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
5139 * reflection.c, reflection.h: emit custom marshal info.
5141 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5143 * object.c: free the GError.
5144 * icall.c: added CloseEvent_internal.
5146 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
5149 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
5151 * loader.c (mono_method_get_signature): Add support for dynamic
5154 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
5156 * reflection.c: fixed bug #43905.
5158 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5160 * class.c, domain.c, icall.c, metadata.h, object.h: support for
5161 handling TypedReference and ArgIterator.
5162 * loader.c, loader.h: added function to get signature at call site.
5164 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5166 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
5167 data readonly. Buglets and warning fixes. Some MethodSpec support.
5169 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5171 * class.h, class.c, object.c: remove relative numbering support.
5173 2003-05-26 Miguel de Icaza <miguel@ximian.com>
5175 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
5176 free the string, until we get a chance to fix Gtk#
5178 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5180 * marshal.c: revert last patch.
5182 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
5184 * icall.c: updates for new mono_class_vtable() not calling
5185 the type constructor anymore.
5187 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
5189 * object.h, object.c: separate vtable creation from type
5190 initialization. Make running the .cctor thread safe.
5192 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
5194 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
5196 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
5198 * loader.c (mono_get_method): consider calling convention
5200 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
5202 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
5203 to return the invisible global type for a module.
5205 * reflection.c (mono_image_build_metadata): Emit global fields too.
5207 2003-05-20 Peter Williams <peterw@ximian.com>
5209 * loader.c (mono_lookup_internal_call): Add a few newlines.
5211 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
5213 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
5216 * appdomain.c (set_domain_search_path): Recalculate search path when
5217 AppDomainSetup.PrivateBinPath changes.
5219 * object.c (mono_class_compute_gc_descriptor): It turns out some
5220 parts of the class libs (like System.Thread) holds pointers to
5221 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
5222 to treat native int a pointer type here.
5224 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
5226 * appdomain.h, domain.c: add hashtable for jump target resolution.
5228 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
5230 * reflection.h reflection.c icall.c: Added new icalls
5231 GetManifestResourceInfoInternal, GetModulesInternal and support
5234 2003-05-16 Dick Porter <dick@ximian.com>
5238 * file-io.c: Implement System.IO.MonoIO::GetTempPath
5240 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
5242 * object.c: mono_store_remote_field: little fix to previous patch.
5244 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5246 * class.c: add constructors to array classes.
5247 * icall.c: special case array construction for InternalInvoke (),
5249 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
5251 * class.h class.c reflection.c object.c: Added support for field
5252 defaults in dynamically generated classes.
5254 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
5256 * reflection.c: properly encode charset for ddlimport.
5258 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
5260 * threads.c: allow compiling without GC.
5262 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5264 * appdomain.h, object.c, object.h, threads.c, threads.h: added
5265 handling of thread static data.
5267 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5269 * reflection.h, reflection.c: added mono_custom_attrs_free ().
5271 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
5273 * class.c (mono_array_class_get): always set the serializable flags
5274 (mono_array_class_get): always set the SEALED attribute for array types
5276 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
5278 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
5279 attributes (fix for bug 42021).
5281 2003-05-12 Dick Porter <dick@ximian.com>
5283 * gc.c: Don't run finalizers when the finalizer thread is
5284 finishing up, because the default domain has already been
5287 2003-05-11 Miguel de Icaza <miguel@ximian.com>
5289 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
5290 value is null, we should throw an exception. This is slightly
5291 different than the other conventions used for the constructor.
5293 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5295 * socket-io.c: fixed windows build.
5297 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5299 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
5301 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
5303 * object.c (mono_string_new_wrapper): Compatibility fix for MS
5306 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
5308 * class.c (mono_class_layout_fields): Add experimental GC aware
5309 auto layout facility. Requires class library changes to work correctly.
5311 (mono_class_setup_vtable): Avoid overriding explicit interface
5312 method implementations. Fixes iface3.exe test.
5314 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
5316 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
5317 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
5319 * metadata.h: Add new type classification macro which determines
5320 whenever the type holds an object reference.
5322 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
5324 * marshal.c (mono_marshal_get_native_wrapper): cleanups
5326 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
5328 * gc.c (finalizer_thread): Work around a GC bug.
5330 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
5332 * marshal.c (emit_struct_conv): allow unions
5334 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
5336 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
5338 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
5340 2003-05-06 Martin Baulig <martin@ximian.com>
5342 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
5344 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5347 (Select_internal): allow NULLs, don't create arrays if not needed.
5348 Coupled with Socket.cs changes.
5351 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
5352 register a finalizer for it that will close the semaphore handle. This
5353 fixes the leak and make Lupus' test run with > 4080 loops.
5355 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
5357 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
5358 Jerome Laban (bug #42287)
5360 2003-05-02 Martin Baulig <martin@ximian.com>
5362 * debug-mono-symfile.h
5363 (MonoSymbolFile): Moved declaration into mono-debug.h.
5364 (MonoDebugMethodJitInfo): Likewise.
5365 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
5367 (_mono_debug_address_from_il_offset): Take a
5368 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
5371 (MonoDebugDomainData): New struct.
5372 (mono_debug_get_domain_data): New function.
5373 (mono_debug_add_method): Take an additional `MonoDomain *'
5375 (mono_debug_source_location_from_address): Likewise.
5376 (mono_debug_il_offset_from_address): Likewise.
5377 (mono_debug_address_from_il_offset): Likewise.
5379 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
5381 * reflection.c: one more check for null type in custom attrs.
5383 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5385 * reflection.c: avoid warning (comparison is always false due to limited
5386 range of data type).
5388 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5390 * icall.c: throw an exception in Type.GetField if the argument 'name'
5393 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
5395 * reflection.c: fixed handling of enums in named arguments to custom
5396 attributes (bug #42123).
5398 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
5400 * reflection.c: use the right array element type and handle
5401 a null for a Type argument, too.
5403 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
5405 * reflection.c: handle arrays as arguments to custom attributes.
5407 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
5409 * reflection.c: handle a string value in a custom attr
5410 ctor that takes an object.
5412 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
5414 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
5417 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
5419 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
5421 2003-04-27 Martin Baulig <martin@ximian.com>
5423 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
5424 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
5425 MONO_DEBUGGER_EVENT_BREAKPOINT.
5426 (mono_breakpoint_trampoline_code): Removed.
5427 (mono_debugger_event_handler): The last argument is now a
5429 (mono_debugger_insert_breakpoint_full): Removed the
5430 `use_trampoline' argument.
5431 (mono_debugger_method_has_breakpoint): Likewise.
5432 (mono_debugger_trampoline_breakpoint_callback): Renamed to
5433 mono_debugger_breakpoint_callback(); take the method and
5434 breakpoint number as arguments.
5436 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
5438 * metadata.c: fix off by one when loading parameters attributes.
5440 2003-04-24 Martin Baulig <martin@ximian.com>
5442 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
5444 2003-04-24 Martin Baulig <martin@ximian.com>
5446 * mono-debug-debugger.c: Moved all code which interacts with the
5449 * debug-mono-symfile.c: This code now just deals with the symbol
5450 file itself, the debugger code is now in mono-debug-debugger.c.
5452 2003-04-23 Martin Baulig <martin@ximian.com>
5454 * mono-debug.c (mono_debug_source_location_from_il_offset):
5455 New method; like mono_debug_source_location_from_address(), but
5456 takes an IL offset instead of a machine address.
5458 2003-04-23 Martin Baulig <martin@ximian.com>
5460 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
5461 `line' field; this is now computed by the debugger.
5463 2003-04-23 Martin Baulig <martin@ximian.com>
5465 * mono-debug.[ch]: New files. This is the new debugging interface.
5467 * mono-debug-debugger.[ch]: New files. Moved all code which
5468 interacts with the Mono Debugger here.
5470 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
5472 * domain.c (mono_init): initialize mono_defaults.monitor_class
5474 2003-04-21 Miguel de Icaza <miguel@ximian.com>
5476 * reflection.c (method_encode_code): Add a spicy exception to help
5477 future compiler authors.
5479 2003-04-21 Martin Baulig <martin@ximian.com>
5482 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
5483 Make this work with relative pathnames; g_filename_to_uri() needs
5484 an absolute filename.
5486 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
5488 * icall.c: Track name changes in Object and ValueType.
5490 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
5492 * metadata.c (mono_type_stack_size): size should be a multiple of
5495 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5498 (internal_domain_finalize): moved into mono_domain_finalize. No need
5499 to create another thread because the finalizers will be run in the
5502 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
5503 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
5504 to be run (MS does this too).
5506 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
5508 * object.c (mono_class_compute_gc_descriptor): Update comment.
5510 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
5512 * image.h: Add synchronized wrapper cache.
5514 * image.c (do_mono_image_open): Initialize cache.
5516 * reflection.c (create_dynamic_mono_image): Initialize cache.
5518 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5520 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
5521 ves_icall_System_Buffer_ByteLengthInternal.
5523 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5525 * reflection.c: setup klass->nested_in earlier. Allow
5526 a dash in the assembly name.
5528 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
5530 * metadata.c (mono_type_to_unmanaged): dont access
5531 type->data.klass for MONO_TYPE_OBJECT
5532 (mono_type_to_unmanaged): consider System.Delegate class
5534 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
5536 * class.c: just setup supertypes in the proper place instead of
5537 initializing the full element class for arrays.
5539 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
5541 * class.c: ensure the element class of arrays is initialized.
5542 Setup the supertype info for array classes, too.
5544 2003-04-14 Miguel de Icaza <miguel@ximian.com>
5546 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
5548 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5550 * Makefile.am: re-added -m option when running cygpath. This way,
5551 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
5553 * mono-config.c: same codepath for locating mono config file for WIN32
5555 * assembly.c: if mono_assembly_setrootdir is called, don't override
5558 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5560 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
5561 MONO_ASSEMBLIES variable.
5563 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
5565 * icall.c: added Assembly::GetNamespaces() icall.
5567 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5569 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
5571 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
5573 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
5574 * object.c: fixed bug in the construction of vtable for proxies
5576 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
5578 * object.c (mono_array_new): Mark mono_array_new as an icall.
5580 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5582 * class.c: fixed test for public method when overriding interfaces.
5585 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
5587 * appdomain.h, domain.c: added mono_domain_foreach() to
5588 be able to access the currently loaded appdomains.
5589 * object.c: make string interning work across sppdomains.
5590 Mark some functions for use as icalls.
5592 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
5594 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
5596 * reflection.h reflection.c: Allocate long living data using
5597 GC_MALLOC_ATOMIC so the collector does not need to scan it.
5599 * reflection.c: Double the allocation size in streams instead of
5600 increasing it, to prevent unneccesary copying on large assemblies.
5602 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
5603 creation if the assembly does not have the Run flag set.
5605 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
5607 * class.h: avoid the C++ keywords in header files (Jerome Laban
5608 spotted and fixed this).
5610 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5613 (mono_unhandled_exception): fill in the arguments for the
5614 UnhandledException event. Only trigger that event for the default
5615 domain (as MS does).
5617 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
5619 * object.c: Improve typed allocation stuff based on suggestions from
5620 Paolo. Also turn it on if the GC library supports it.
5622 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
5624 * object.c object.h class.h: Added experimental typed allocation
5625 facility using the interfaces in gc_gcj.h.
5627 * os/gc_wrapper.h: Added new include files.
5629 2003-04-03 Martin Baulig <martin@ximian.com>
5631 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
5632 which is not yet enabled by default.
5634 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
5636 (mono_gc_lock, mono_gc_unlock): New static functions.
5638 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
5639 functions; stop/start the world for the garbage collector. This
5640 is using the windows API; we need to complete the SuspendThread()/
5641 ResumeThread() implementation in the io-layer to make this work on Unix.
5642 (mono_gc_push_all_stacks): New public function; tells the garbage
5643 collector about the stack pointers from all managed threads.
5645 2003-04-03 Martin Baulig <martin@ximian.com>
5647 * object.h (MonoThread): Added `gpointer stack_ptr'.
5649 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
5651 2003-04-03 Martin Baulig <martin@ximian.com>
5653 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
5655 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
5657 * reflection.c (typebuilder_setup_fields): Initialize field.first and
5660 2003-04-02 Miguel de Icaza <miguel@ximian.com>
5662 * loader.c (mono_lookup_internal_call): Report the corlib that is
5665 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
5667 * icall.c (ves_icall_type_GetTypeCode): fixed check for
5668 System.DBNull (it's class not valuetype).
5670 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
5672 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
5673 if the array method was already assigned a token (fixes bug#40646).
5675 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
5677 * reflection.c (mono_reflection_get_type): Attempt type resolve even
5678 if no assembly is given.
5680 2003-04-01 Miguel de Icaza <miguel@ximian.com>
5682 * metadata.h: Added the new tables.
5684 * row-indexes.h: Added definitions for new tables.
5686 * metadata.c: Add schemas for new tables, and add support for
5687 computing the sizes of them.
5689 * class.c: Update for handling the new type cases.
5691 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
5693 * metadata.h (MONO_TYPE_IS_VOID): new macro
5695 2003-03-31 Martin Baulig <martin@ximian.com>
5697 * threads.h (MonoThreadCallbacks): Added `thread_created'.
5699 * threads.c (mono_thread_new_init): Call `thread_created' in the
5700 mono_thread_callbacks.
5702 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
5704 * loader.h: added marshalbyrefobject_class to mono_defaults
5705 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
5706 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
5707 generation of output parameters.
5708 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
5709 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
5710 contextbound and the target object belongs to the context of the caller.
5711 * object.h: added context and unwrapped_server variables in MonoRealProxy.
5712 * object.c: Implemented support for interfaces and abstract classes
5713 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
5714 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
5716 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
5718 * class.h class.c (mono_class_is_subclass_of): New function.
5720 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
5721 routines for most common case (calls from ArrayList::ToArray).
5723 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
5724 routine so programs which call Environment::Exit() can be profiled.
5726 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
5727 Added MONO_ARCH_SAVE_REGS.
5729 * icall.c (ves_icall_type_is_subtype_of): Use new function.
5731 2003-03-29 Miguel de Icaza <miguel@ximian.com>
5733 * blob.h: Add a couple of new MonoType types definitions.
5735 * tabledefs.h: Add a couple of new call convs.
5737 2003-03-27 Zoltan Varga <vargaz@freemail.h>
5739 * reflection.h (MonoReflectionDynamicAssembly): track changes in
5740 the layout of the class.
5742 * reflection.c (alloc_table): double the size on overflow to avoid
5743 unnecessary copying.
5745 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
5746 avoid filling out metadata tables and blobs. Also set mb->ilgen to
5747 null so it can be garbage collected.
5749 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
5751 * reflection.c (mono_reflection_get_type): Return the resolved type
5752 only if it is in the assembly we searched.
5754 * reflection.c (ensure_runtime_vtable): Initialize method slots.
5756 * class.c (mono_class_setup_vtable): Set the slot of the overriding
5759 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5762 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
5763 the right one is 'file:///blah', but MS allows it.
5765 (mono_assembly_open): allow 'file://blah'
5767 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
5769 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
5771 * socket-io.c: fixes bug #40310.
5773 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
5775 * reflection.c (mono_reflection_parse_type): handle deeply nested
5778 * reflection.c (mono_image_create_token): Use unique token values
5779 since they will be put into a hash table.
5781 * class.c (mono_class_setup_vtable): If a method occurs in more than
5782 one place in the vtable, and it gets overriden, then change the
5783 other occurances too.
5785 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
5786 object as return type.
5788 2003-03-22 Pedro MartÃnez Juliá <yoros@wanadoo.es>
5790 * icall.c: Deleted "ToString" implementation for double and float
5791 because they are full implemented in managed code.
5793 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
5795 * reflection.c, reflection.h: implemented and exported functions
5796 to retrieve info about custom attributes.
5798 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5800 * appdomain.c: moved Uri handling to assembly.c
5801 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
5802 work when using a file Uri in *nix and windows.
5804 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
5805 GetReferencedAssemblies.
5807 2003-03-18 Dick Porter <dick@ximian.com>
5809 * icall.c: Rename a couple of internal calls
5811 * threads.c: Set the thread state to Stopped when a thread exits.
5814 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
5816 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
5819 * object.c (mono_class_vtable): fix warning.
5821 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
5823 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
5825 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
5827 (method_encode_clauses): Create exception info structures in the right
5829 (mono_reflection_setup_internal_class): Initialize supertypes field.
5831 * class.c object.c: Handle interfaces which implement other interfaces
5834 * class.h class.c: Move the supertypes array initialization code into
5835 a separate function so it can be used for dynamic types too. Also call
5836 it earlier, in mono_class_init(), since it can be used before the
5837 type is initialized.
5839 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5843 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
5848 * object.c: remove warnings.
5850 2003-03-13 Martin Baulig <martin@ximian.com>
5852 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
5853 (MonoDebugLexicalBlockEntry): New types.
5855 * debug-mono-symfile.c
5856 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
5858 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5860 * process.c: ret can be any non-zero value accroding to MS doc.
5862 2003-03-07 Miguel de Icaza <miguel@ximian.com>
5864 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
5865 fixing a warning for a miss-used prototype, would have cause
5866 random memory corruption.
5868 2003-03-07 Martin Baulig <martin@ximian.com>
5870 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
5871 getting really annoying ....
5873 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
5875 * reflection.c (fixup_method): added support for array methods.
5877 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
5879 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
5880 (pointed out by Michael Adams).
5882 2003-03-04 Dick Porter <dick@ximian.com>
5884 * icall.c: Temporarily reverted the Double and Single ToString()
5885 change, because it broke nunit.
5887 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
5889 * object.h, threads.h: make include files compatible with C++
5890 (patch by Jerome Laban <jlaban@wanadoo.fr>).
5892 2003-03-04 Pedro MartÃnez Juliá <yoros@wanadoo.es>
5894 * icall.c: Erased ToString helper functions for Double and Single.
5895 Now, that implementations ar all in managed code (Double and Single
5898 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
5900 * appdomain.c: Added method for initializing the default context of
5901 a domain. Added internal call for getting the default context.
5902 * appdomain.h: Added context variable in MonoDomain struct.
5903 * domain.c: mono_domain_set also sets the default context of the domain
5904 * icall.c: Mapped internal method InternalGetDefaultContext.
5905 * object.c: mono_object_get_virtual_method returns always a remoting
5906 wrapper if the object is a transparent proxy.
5907 mono_runtime_invoke_array: when creating an object by calling the
5908 constructor, if the created object is a proxy, then the constructor should
5909 be called using the a remoting wrapper.
5911 2003-03-03 Dick Porter <dick@ximian.com>
5913 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
5914 variable so it compiles on solaris. Problem spotted by
5915 Christopher Taylor <ct@cs.clemson.edu>
5917 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5920 (get_info_from_assembly_name): don't leak value.
5923 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
5926 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
5928 * assembly.c: export mono_image_load_references ().
5929 * class.c: handle function pointers. mono_class_from_name() now
5930 supports nested type names directly.
5932 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
5934 * reflection.h reflection.c: Encode already created dynamic methods
5935 and fields correctly as a DEF instead of a REF.
5937 * reflection.c: Get rid of the force_ref argument to
5938 mono_image_typedef_or_ref since it was wrong in the first place.
5940 * string-icalls.c: add error checking to string constructors according
5943 * reflection.c: Emit types in the order their TypeBuilders were
5944 created. Previously, a new table index was assigned to each type before
5945 the tables were emitted. This was wrong because the signature blob
5946 might already refer to a type by its original table index.
5948 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
5950 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
5953 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5955 * Makefile.am: make assemblies dir have \ instead of / on windows.
5957 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
5959 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
5960 iterate over the NESTEDCLASS table using a linear search since the
5961 table is not guaranteed to be sorted by the secondary key.
5963 * class.c (mono_class_create_from_typedef): fixed up call to
5964 mono_metadata_nesting_typedef.
5966 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
5968 * marshal.c (mono_string_to_byvalstr): clear the memory as
5969 suggested by Jerome Laban <jlaban@wanadoo.fr>
5971 2003-02-26 Dick Porter <dick@ximian.com>
5973 * process.c: Cope with padding in .rsrc blocks
5975 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
5977 * metadata.h: reverted the filter_len change, it breaks reflection
5979 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
5981 * metadata.h: added a new field to store the filter_len
5984 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
5986 * reflection.c: handle custom attributes for types and members
5987 created with Reflection.Emit (bug#38422).
5989 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
5991 * reflection.c: define RTSpecialName automatically for constructors for
5992 compatibility with MS.NET.
5994 * reflection.c (mono_reflection_create_runtime_class): initialize
5995 nested_in field of dynamically created classes.
5997 2003-02-22 Martin Baulig <martin@ximian.com>
5999 * debug-mono-symfile.h: Incremented version number.
6001 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
6003 * object.h icall.c process.c: fix warnings.
6005 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
6007 * appdomain.h appdomain.c:
6008 (mono_domain_try_type_resolve): split the
6009 name_or_tb argument into a name and a tb argument.
6010 (mono_domain_has_type_resolve): new function to check whenever the
6011 application has registered a TypeResolve event handler.
6013 * icall.c reflection.h reflection.c: move the type resolve logic into
6014 mono_reflection_get_type () so it will be invoked when
6015 Assembly::GetType () is called.
6018 (mono_reflection_get_type): renamed to get_type_internal.
6019 (mono_reflection_get_type): fixed type name generation so it works
6020 for nested types too.
6021 (mono_reflection_get_type): call has_type_resolve () to avoid the
6022 costly type name generation if there is no resolve event handler.
6024 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6026 * class.c, image.c: load exported types from file references.
6028 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
6030 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
6031 used to cache the managed methods used to create proxies and make
6032 remote invocation of methods.
6033 * class.h: Added in MonoVTable a flag to indicate that a class needs
6034 to be remotely created.
6035 * object.c: Modified the method mono_class_vtable(). It now initializes
6036 the remote flag of the vtable. Modified mono_object_new_specific(),
6037 so now it checks the remote flag.
6038 * icall.c: Added a couple of internal methods, one for enabling instance
6039 creation interception for a type, and one for creating objects bypassing
6042 2003-02-18 Martin Baulig <martin@ximian.com>
6044 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
6045 New interncall to get a method's metadata token.
6047 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
6048 New interncall for the debugger.
6050 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
6052 * class.c (mono_class_setup_vtable): allocate supertype array
6054 2003-02-18 Martin Baulig <martin@ximian.com>
6056 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
6058 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6061 (assembly_name_to_aname): jump over unknown properties (i've found
6062 something like: 'type, assembly, version=xxx, custom=null, public...',
6063 so now will ignore custom=null and still get the rest of the values).
6065 2003-02-17 Dick Porter <dick@ximian.com>
6067 * threads.c: Have Thread.Start() wait for a semaphore to signal
6068 that the thread has set up all its local data. This fixes bug
6069 34323, where Abort() raced the new thread's TLS data.
6071 Also removes the handle_store() call from start_wrapper, because
6072 threads are now always created suspended and there is no longer a
6073 race between the parent and child threads to store the info.
6075 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
6077 * image.c: explain the #- heap issue in a message, hopefully
6078 avoiding FAQs on mono-list.
6080 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6083 (GetEntryAssembly): if the domain has not invoked
6084 AppDomain.ExecuteAssembly yet, return the assembly of the default
6087 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
6089 * class.c (mono_ldtoken): make it work in dynamic assemblies.
6091 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
6093 * metadata.c, reflection.c: simple speedup to type hash
6096 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
6098 * image.c, image.h, class.c, assembly.c: move module loading
6099 to MonoImage. When loading metadata, consider alignemnet from
6100 the start of metadata, not from the metadata address in memory.
6102 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
6104 * reflection.c (mono_reflection_get_custom_attrs): Added support for
6105 AssemblyBuilder objects. Factored out custom attribute creation into
6106 a separate function.
6107 (create_custom_attr): new function to create custom attributes.
6109 2003-02-12 Miguel de Icaza <miguel@ximian.com>
6111 * Makefile.am: Got tired of typing the full pathname to pedump.
6112 Until there is another option, am installing this.
6114 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
6116 * class.c (class_compute_field_layout): always set field->parent
6117 (mono_ldtoken): use mono_defaults.fieldhandle_class;
6119 2003-02-11 Dick Porter <dick@ximian.com>
6122 * monitor.c: Rewrote Monitor, making lock much faster and
6123 Pulse/Wait work as specified. Also uses much fewer handles, and only
6124 creates them as needed.
6126 * exception.c: Added SynchronizationLockException
6128 * threads.c: Deleted old Monitor implementation. The new one is
6131 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
6133 * class.c: handled TypedReference type code. Set the correct size for
6134 class data. Setup interface_offsets for interface classes, too.
6136 2003-02-09 Martin Baulig <martin@ximian.com>
6138 * debug-mono-symfile.h: Reflect latest symbol writer changes.
6140 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
6142 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
6143 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
6144 * object.c: fixed mono_object_get_virtual_method () for interfaces.
6145 * verify.c: check for code that runs after the end of the method.
6147 2003-02-08 Pedro MartÃnez Juliá <yoros@wanadoo.es>
6149 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
6150 "System.Math::Round2".
6151 * sysmath.h: Added Floor, Round and Round2 definitions.
6152 * sysmath.c: Modified certain functions that were not 100% compliant
6153 with MS.NET (math precision) and added the implementation of Floor,
6156 2003-02-07 Martin Baulig <martin@ximian.com>
6158 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
6160 2003-02-07 Martin Baulig <martin@ximian.com>
6162 * debug-mono-symfile.c: Reflected latest symwriter changes.
6163 (mono_debug_create_mono_symbol_file): Removed.
6164 (mono_debug_open_mono_symbol_file): Take an argument which
6165 specifies whether to create a dynamic symbol file.
6167 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
6169 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
6171 2003-02-05 Martin Baulig <martin@ximian.com>
6173 * reflection.c (mono_image_build_metadata): Make this public,
6174 protect it against being called multiple times, don't create
6175 resources and don't build the compressed metadata here.
6176 (mono_image_create_pefile): Do this here.
6179 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
6181 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6183 * socket-io.c: fixed bug #36322.
6185 2003-02-06 Piers Haken <piersh@friskit.com>
6189 * debug-mono-symfile.c:
6195 * socket-io.c: warning cleanups
6197 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
6199 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
6200 function. works like remoting invoke, but does a check for the Proxy first.
6202 2003-02-05 Miguel de Icaza <miguel@ximian.com>
6204 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
6206 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
6208 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
6210 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
6211 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
6213 * object.c (mono_store_remote_field_new): used by the new jit
6214 instead of mono_store_remote_field
6215 (mono_load_remote_field_new): used by the new jit
6216 instead of mono_load_remote_field
6218 2003-02-05 Patrik Torstensson
6220 * appdomain.c: changed unload to take the domain id instead
6223 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
6226 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6228 * appdomain.c: don't look for assemblies in ApplicationBase if
6229 PrivateBinPathProbe is set.
6231 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6233 * object.c: make the first argument in main_args contain the absolute
6234 path to the assembly. Fixes bug #37511.
6236 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6238 * icall.c: get correct UTC offset for countries not using daylight
6239 time saving. Fixes bug #30030.
6241 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6243 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
6244 and 1 are the family).
6246 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
6248 * icall.c (ves_icall_InternalExecute): removed wrong assertion
6250 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
6252 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
6254 * reflection.c: added support for SignatureHelper tokens, which is
6255 needed by the Calli opcode.
6257 * reflection.h: track changes to SignatureHelper class.
6259 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
6261 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6263 * appdomain.c: fixed loading assemblies from PrivateBinPath.
6265 2003-02-03 Patrik Torstensson
6266 * appdomain.[c|h], domain.c :
6267 - Added support for getting a domain via domain id
6268 - Support for setting and getting domain from System.AppDomain
6269 (used in cross appdomain channel)
6270 - Added support for get/set for a MonoAppContext on a thread
6271 (Context class in System.Runtime.Remoting.Contexts),
6272 - Removed hack in Get/SetData and ExecuteAssembly.
6274 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
6275 the managed world to get control when a proxy is created.
6277 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
6279 2003-02-03 Miguel de Icaza <miguel@ximian.com>
6282 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6283 Populate the codebase field as well.
6285 2003-02-02 Martin Baulig <martin@ximian.com>
6287 * debug-mono-symfile.c
6288 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
6289 (mono_debug_symfile_add_method): Allow interncalls.
6291 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6293 * icall.c: throw parse exception if strtod fails or the string is empty.
6295 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
6297 * marshal.c: handle object type separately from defined
6300 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
6302 * marshal.c: handle NATIVE_LPSTR for strings when it's
6303 explicitly specified.
6305 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
6307 * reflection.c, reflection.h, icall.c: setup the reflection
6308 handle cache for ModuleBuilders and AssemblyBuilders.
6310 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
6312 * reflection.c (reflection_methodbuilder_to_mono_method): set
6315 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6317 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
6319 2003-01-29 Dick Porter <dick@ximian.com>
6321 * threads.c: No need for the fake_thread kludge now that Thread
6322 doesn't run a class constructor
6324 2003-01-29 Dick Porter <dick@ximian.com>
6326 * threads.c: Use g_direct_hash instead of the rather bogus
6329 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
6331 * marshal.c (mono_marshal_get_native_wrapper): add check for null
6333 (mono_marshal_get_struct_to_ptr): generate valid IL code
6334 (mono_marshal_get_ptr_to_struct): generate valid IL code
6335 (*): correctly set sig->pinvoke, we need to memdup the signature
6338 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6340 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
6341 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
6343 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
6345 * profiler.c: provide more callers information.
6347 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
6349 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
6351 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
6353 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
6355 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6357 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
6358 exception instead of going into an infinite loop on dates which it
6361 * string-icalls.c (ves_icall_System_String_get_Chars): raise
6362 out-of-range exception if needed.
6364 * class.c (mono_class_setup_vtable): allow a virtual method to provide
6365 an implementation for an interface method and to override an inherited
6366 method at the same time.
6367 Imagine a scenario when a virtual method is used to override a
6368 virtual abstract method in a parent class, and this same method
6369 provides an implementation for an method inherited from an interface.
6370 In this case, the interface resolution code will set im->slot, which
6371 means that the virtual method override pass will skip this method
6372 which means a pointer to the abstract method inherited from the parent
6373 will remain in the vtable of this non-abstract class.
6375 * class.c: (mono_class_setup_vtable): continue search for a real
6376 method if only an abstract method is found.
6378 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
6380 * reflection.c: add size to encoding for ByValStr and ByValArray
6381 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
6383 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6385 * class.c (mono_class_setup_vtable): pass the override info as an
6388 * class.c (mono_class_setup_vtable): set the slot of overriding methods
6391 * reflection.c (ensure_runtime_vtable); add support for method
6394 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6396 * reflection.c (resolution_scope_from_image): Hack to work to work with
6399 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
6400 added a 'force_ref' argument to force this function to allways return
6401 a TypeRef. This is needed by mono_image_get_memberref_token ().
6403 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6405 * reflection.c (mono_image_get_type_info): interfaces really don't have
6408 * reflection.c (mono_image_basic_init): fill out missing fields of
6411 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
6412 dynamic assemblies. This is required so dynamic assemblies show up in
6413 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
6414 Type::GetType() etc. This is consistent with MS behaviour.
6416 * image.c image.h reflection.c: add newly created classes to the name
6417 cache so mono_class_get () will find them.
6419 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
6421 First part of changes to get IKVM.NET running under mono.
6423 * appdomain.h, appdomain.c: added new function
6424 mono_domain_try_type_resolve() which will emit TypeResolve events.
6425 This function will call AppDomain::DoTypeResolve to do the actual work.
6427 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
6428 moved existing code dealing with dynamic tokens to a new function
6429 called mono_reflection_lookup_dynamic_token (). This function will
6430 raise TypeResolve events when appropriate. Since reflection.c is not
6431 part of libmetadata, a new hook function called
6432 mono_lookup_dynamic_token() is added to class.c which will call this.
6434 * assembly.h assembly.c: make the invoke_load_hook function public,
6435 so it can be called for dynamic assemblies.
6437 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
6439 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
6442 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
6443 MonoGHashTable, since it contains pointers to objects which the GC
6446 * assembly.c (search_loaded): remove unused variable.
6448 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
6450 * object.c: fixed issue exposed by gcc-generated IL programs
6451 that use RVA data for pointers.
6453 2003-01-25 Martin Baulig <martin@ximian.com>
6455 * threads.c (start_wrapper): Moved the initialization of
6456 `start_func' above the mono_new_thread_init() call to which we
6457 pass it as argument.
6459 2003-01-24 Martin Baulig <martin@ximian.com>
6461 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
6462 the MonoThread pointer.
6464 2003-01-21 Miguel de Icaza <miguel@ximian.com>
6466 * icall.c: Rename `PowImpl' to Pow.
6468 2003-01-23 Dick Porter <dick@ximian.com>
6470 * threads.c (start_wrapper): Create a Thread object if needed, so
6471 the Main() thread can do the class initialisation in a subthread
6472 that has been set up to allow managed code execution.
6474 Pass the thread ID instead of the MonoThread pointer to the thread
6475 start and attach callbacks. This change is required, because the
6476 jit thread start callback must be called _before_ the Thread
6477 object can be created.
6479 (mono_thread_init): Removed much object creation code that is no
6480 longer needed. No managed code is called from here now.
6482 * object.c (mono_runtime_exec_managed_code): Create a subthread
6483 for Main, and call back to the runtime to use it.
6484 Set the exit code when Main exits.
6486 * gc.c: Make sure domain finalisation happens in a subthread.
6487 Re-enable threaded GC, fixing bug 31333 (again).
6489 * environment.c: System.Environment internall calls (so far just
6490 ExitCode is here, the others are still in icall.c)
6492 * appdomain.c (mono_runtime_cleanup): All threads running managed
6493 code should have finished before mono_runtime_cleanup() is
6494 reached, so no need to clean up threads.
6496 2003-01-22 Martin Baulig <martin@ximian.com>
6498 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
6499 `gpointer func' arguments.
6500 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
6501 but added `MonoThread *thread' argument.
6502 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
6504 * threads.c (mono_new_thread_init): Added `gpointer func' argument
6505 and pass it to the mono_thread_start_cb callback.
6506 (mono_install_thread_callbacks): New public function to install a
6507 set of callbacks which are set by the debugger.
6508 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
6510 2003-01-22 Martin Baulig <martin@ximian.com>
6512 * Makefile.am: Install debug-mono-symfile.h.
6514 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
6516 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
6518 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
6520 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
6521 * class.c (mono_ptr_class_get): correctly set access levels of pointers
6522 (mono_array_class_get): correctly set access levels of arrays
6524 2003-01-20 Patrik Torstensson
6525 * image.h (MonoAssemblyName): changed major, minor, build, revision
6526 from signed to unsigned.
6528 2003-01-20 sean kasun <skasun@azstarnet.com>
6530 * reflection.c (load_cattr_value): Now this handles
6531 MONO_TYPE_SZARRAY. Fixes bug #35629
6533 2003-01-20 Miguel de Icaza <miguel@ximian.com>
6535 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
6538 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6540 * decimal.c: fixed bug #26056.
6542 2003-01-17 Martin Baulig <martin@ximian.com>
6544 * gc.c: Raise an ExecutionEngineException instead of using g_error().
6546 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6549 (mono_get_exception_type_initialization): new function.
6551 * object.c: throw a TypeInitializationException when an exception is
6552 thrown invoking the class constructor.
6554 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6556 * reflection.c: fixed attribute reading.
6558 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6561 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
6562 provided, look for the type in the calling assembly and then in
6563 mscorlib; if the assembly name is provided, only try that one.
6565 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
6567 * object.c: register the vtable before there is a chance it's
6568 queried again recursively.
6570 2003-01-13 Duncan Mak <duncan@ximian.com>
6572 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
6575 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
6577 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
6579 2003-01-11 Martin Baulig <martin@ximian.com>
6581 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
6582 this to 20 for the release.
6584 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
6586 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
6588 * loader.c (mono_method_get_marshal_info): bug fix
6590 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
6591 structures with explicit layout
6593 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
6595 * profiler.c: made the output more readable (and sorted).
6596 Added caller information for the allocation profiler.
6598 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
6600 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
6602 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6604 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
6607 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
6609 * object.c, profiler.h, profiler.c, profiler-private.h:
6610 Added object allocation profiler.
6612 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
6614 * reflection.h, reflection.c: handle global methods.
6615 Compress blob entries.
6617 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
6619 * marshal.c: fix compilation.
6621 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
6623 * loader.c (mono_method_get_marshal_info): impl.
6625 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
6627 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6629 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
6630 for reference types.
6632 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
6634 * loader.c: fixed off by one error in loaded parameter names.
6636 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
6638 * marshal.c (mono_marshal_get_icall_wrapper): like
6639 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
6640 instead of a MonoMethod.
6642 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6644 * decimal.c: fixed bug #36537.
6646 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
6648 * marshal.c: throw a missing method exception if a
6649 P/Invoke method is not found.
6651 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
6653 * icall.c: allow a null this for constructors.
6655 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
6657 * icall.c: raise the proper exceptions if the arguments to the
6658 internal Invoke are incorrect.
6660 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
6662 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
6664 2003-01-03 Martin Baulig <martin@ximian.com>
6666 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
6668 2002-12-31 Martin Baulig <martin@ximian.com>
6670 * debug-mono-symfile.c: Completely rewrote the type section.
6671 Instead of using individual malloc()ed fields, we use one big
6672 continuous memory area and offsets into this area.
6673 See the comments in the source code for details.
6675 2002-12-30 Martin Baulig <martin@ximian.com>
6677 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
6679 2002-12-30 Martin Baulig <martin@ximian.com>
6681 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
6682 line number table in this data blob instead of using an external
6685 2002-12-28 Martin Baulig <martin@ximian.com>
6687 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
6689 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
6691 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
6692 as a boxed return type.
6694 2002-12-21 Miguel de Icaza <miguel@ximian.com>
6697 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
6698 g_build_filename to properly get separators on the filename created.
6700 * object.h: Small change, introduce MonoMarshalByRefObject to
6701 track the layout of that structure in the C# universe as we make
6704 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
6706 * object.c: removed assert to allow static fields on interfaces.
6707 * loader.c: a TypeSpec may be used for any type, not just arrays.
6709 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
6711 * class.c, class.h: added mono_class_array_element_size ().
6712 Ignore static methods in interfaces.
6714 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6716 * threads.c: fixed the build under cygwin.
6718 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
6720 * reflection.c: handle nullref constants. Allocate keys for
6721 reflection handles with the GC.
6723 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
6725 * threads.c, threads.h: added mono_thread_get_abort_signal()
6726 to get a suitable signal for thread abort.
6728 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
6730 * metadata.c: fix handling of ExportedType table.
6732 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6734 * icall.c: added WriteWindowsDebugString internal call.
6736 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6738 * reflection.h: added fields to match C# implementation.
6740 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6742 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
6744 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
6746 * gc.h, gc-internal.h: Rename header for GC internal calls to
6747 gc-internal.h from gc.h as to not clash with Boehm GC having its
6748 header installed as <gc.h> in outside include paths.
6749 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
6750 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
6752 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6754 * icall.c: assign minor, build and revision in FillName.
6756 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
6758 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
6759 Added support for running code generated by Reflection.Emit.
6761 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6763 * appdomain.c: check for NULL argument in LoadFrom.
6765 2002-12-10 Dick Porter <dick@ximian.com>
6767 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
6769 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6771 * appdomain.c: fix buglet when building exe file name. Handle full
6772 assembly name (needed after latest changes to AssemblyName).
6774 (mono_image_close): free some hashtables.
6776 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
6778 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
6779 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
6780 on some systems (redhat 7.3)
6782 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
6784 * threads.c: delete the critical section of a sync block,
6785 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
6787 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
6789 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
6791 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6793 * appdomain.[ch]: handle the assembly preload event to try loading the
6794 assemblies using the paths we have in the current domain.
6796 * assembly.[ch]: created an assembly preload hook that is called to try
6797 loading the assembly by other means that the ones provided here.
6799 * domain.c: initialize the domain search path.
6801 From now on, assemblies (TODO: except corlib and System) are loaded
6802 according to these rules when using mono_assembly_load ():
6804 1. It tries to load the assembly from the ApplicationBase
6805 of the current domain appending .dll and .exe (TODO: have to
6806 try loading from name/name.dll and name/name.exe).
6808 2. It tries the search path specified in PrivateBinPath for the
6809 current domain (if any).
6811 3. Previous behavior.
6813 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
6815 * icall.c: implemented GetInterfaceMap() related icall.
6816 * domain.c, loader.h: load MethodInfo in mono_defaults.
6818 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
6820 * gc.c: disable the finalizer thread for now, untill all the issues
6821 with it are resolved.
6823 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
6825 * string-icalls.c: handle embedded nulls in string ctor when the
6826 length is specified.
6828 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
6830 * class.c: look for explicit interface implementation in parent
6833 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
6835 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
6837 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
6839 * gc.c: protect handles with a critical section.
6841 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6844 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
6845 parameters. If no assembly specified, try getting the type from all
6846 the assemblies in the current domain, else, load the assembly and get
6849 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6851 * marshal.c: applied patch from Aleksey Demakov that fixes
6852 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
6854 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6856 * icall.c: fixed get_location.
6858 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
6860 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
6861 declarations to make it work with older gcc.
6863 * loader.c (mono_get_method): set signature->pinvoke for native calls
6865 2002-11-20 Dick Porter <dick@ximian.com>
6867 * threads.c (mono_thread_init): Set the main thread's handle
6869 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
6871 * gc.c: allow compilation without GC support. Changed to match the
6874 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
6876 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
6878 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
6880 * reflection.c: set a public key token on the core assemblies.
6882 2002-11-18 Dick Porter <dick@ximian.com>
6884 * threads.c: Split out some thread initialisation so that other
6885 files can set the start callback function.
6887 * gc.c: Run finalisers in a separate thread, to avoid stack
6888 overflow. Fixes bug 31333.
6890 * appdomain.c: Set up GC finalisation thread.
6894 * domain.c: Use gc.h macros for GC_malloc
6896 2002-11-15 Dick Porter <dick@ximian.com>
6900 * appdomain.c: Removed mono_runtime_init_with_attach(),
6901 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
6902 merging the extra parameter with the existing function. Removed
6903 unneeded code in mono_thread_attach().
6905 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
6907 * image.c (mono_image_loaded_by_guid): a method to get loaded
6909 (load_metadata_ptrs): we store the guid as string.
6911 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
6913 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
6915 * metadata.c (mono_guid_to_string): imported method form Zoltan
6916 Varga (slightly modified)
6918 * assembly.c (mono_assembly_open): load precompiled code
6920 * loader.h (MonoMethod): we store the method token for use in the
6923 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6925 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
6926 the hook function called when an assembly is loaded.
6928 * domain.c: Modified file.
6929 (mono_domain_assembly_load): removed hash table insertion of assemblies.
6933 2002-11-07 Miguel de Icaza <miguel@ximian.com>
6935 * reflection.c: Map PEFileKind to the value expected by the WinNT
6938 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6940 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
6941 Read until the buffer is filled completely.
6943 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6945 * icall.c: implemented MonoType.InternalGetEvent ().
6947 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6949 * appdomain.c: implemented InitAppDomainSetup. Delayed
6950 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
6953 * assembly.c: base_dir is now an absolute path ending with
6956 * icall.c: modified get_location according to the above changes.
6958 * object.c: init AppDomain.SetupInformation for the default domain after
6959 we have the entry assembly.
6961 * domain.c: when unloading a domain, setup = NULL.
6963 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
6965 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
6967 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
6969 * object.h, object.c: introduced mono_object_get_virtual_method ()
6970 to lookup the method invoked on an object when a callvirt is done on
6972 * icall.c: make MethodInfo::Invoke() always do a virtual call.
6974 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6976 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
6977 current domain when loaded an assembly and failed to load it.
6979 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
6981 2002-10-31 Dick Porter <dick@ximian.com>
6985 * file-io.c: Return the error status in a parameter, as the
6986 GetLastError() value has long since been blown away if we try and
6987 look it up in a subsequent internal call invocation. Delete the
6988 GetLastError() internal call, because it's useless.
6990 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
6992 * class.[ch]: added cast_class to fix bug 29517
6994 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
6996 * marshal.c: create valid IL code in the filter clause:
6997 the new JIT is less forgiving:-)
6999 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7001 * icall.c: removed get_property internal call.
7003 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
7005 * appdomain.h domain.c: Added an ID to appdomains.
7007 * threads.c threads.h icall.c: Implement icall
7008 Thread:GetDomainID(), and remove unused icall
7009 CurrentThreadDomain_internal.
7011 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7013 * icall.c: Don't recurse through the base types in GetConstructor.
7016 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
7018 * mempool.h, mempool.c: added mono_mempool_empty() and
7019 mono_mempool_stats().
7021 2002-10-23 Dick Porter <dick@ximian.com>
7025 * icall.c: Added MonoIO.GetFileType internal call
7027 2002-10-17 Dick Porter <dick@ximian.com>
7029 * appdomain.c (mono_runtime_cleanup): Don't signal the async
7030 delegate semaphore before waiting for all threads to finish,
7031 because new threads can also call async delegates. Fixes bug
7034 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
7035 of 3 seconds, in case another async job is queued. (This part is
7036 needed because the bug fix reintroduced the 3s exit lag.) This
7037 makes the mono_runtime_shutdown flag superfluous.
7039 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
7041 * reflection.c: include ehader size in method section headers.
7042 Really check for suplicated modules entries.
7044 2002-10-17 Martin Baulig <martin@gnome.org>
7046 * debug-mono-symfile.c: Added back support for locals.
7048 2002-10-14 Martin Baulig <martin@gnome.org>
7050 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
7053 2002-10-14 Martin Baulig <martin@gnome.org>
7055 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
7056 mono_class_get() instead of looking in the class cache.
7058 2002-10-13 Martin Baulig <martin@gnome.org>
7060 * debug-mono-symfile.c: Set version number to 28, include the
7061 signature in method names.
7063 2002-10-13 Martin Baulig <martin@gnome.org>
7065 * debug-mono-symfile.h: Set version number to 27.
7067 2002-10-11 Martin Baulig <martin@gnome.org>
7069 * gc.c: Don't register/unregister NULL pointers as disappearing links.
7071 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7073 * metadata.c, metadata.h: added helper function to allocate signatures.
7075 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7077 * icall.c: added internal call to get the location of machine.config.
7079 2002-10-08 Martin Baulig <martin@gnome.org>
7081 * debug-mono-symfile.c: Ignore classes with a pending init for the
7084 2002-10-03 Dick Porter <dick@ximian.com>
7086 * threads.c: Freebsd pthread_t is a pointer
7088 2002-10-03 Dick Porter <dick@ximian.com>
7090 * socket-io.c: Implemented GetHostName_internal
7092 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7095 (mono_config_parse_file): don't leak the text.
7097 2002-10-02 Martin Baulig <martin@gnome.org>
7099 * debug-mono-symfile.c: Added support for methods.
7101 2002-10-01 Martin Baulig <martin@gnome.org>
7103 * debug-mono-symfile.c: Don't emit methods and line numbers for
7104 the dynamic symbol file, just write the type table. We can easily
7105 have an external helper program which creates a symbol file for an
7108 2002-10-01 Dick Porter <dick@ximian.com>
7110 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
7111 Only add the handle to the cleanup array when we're about to
7112 launch the thread. Bug 31425 deadlocked when the test was run on
7115 2002-10-01 Martin Baulig <martin@gnome.org>
7117 * debug-mono-symfile.c: Added support for properties.
7119 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7121 * reflection.c: unaligned store fix from Mark Crichton
7122 <crichton@gimp.org>.
7124 2002-09-27 Martin Baulig <martin@gnome.org>
7126 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
7129 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
7131 * assembly.h, assembly.c: use a sane API to hook into the assembly
7132 loading process instead of a useless special-purpouse hack
7133 (ngen needs a hook, too, for example).
7135 2002-09-27 Dick Porter <dick@ximian.com>
7137 * threads.c (mono_thread_init): Call GetCurrentProcess() so
7138 io-layer can set up some process handle info. Not needed on w32,
7139 but doesn't hurt either.
7141 * process.c: Pass the program name in the second parameter to
7142 CreateProcess, so the path is searched. Include the working
7143 directory. Implemented process name, process enumeration, and some
7144 process detail internal calls.
7146 * icall.c: Added internal calls for process lookup, and some
7149 2002-09-26 Martin Baulig <martin@gnome.org>
7151 * assembly.c (mono_install_open_assembly_hook): New global
7152 function to install a function to be invoked each time a new
7154 (mono_assembly_open): Run this callback function if set.
7156 * debug-mono-symfile.c: Put back line numbers for the dynamic
7157 symbol file and also record the .il file as source file. This
7158 allows us to install the temporary symbol file as `file.dbg' just
7159 like a compiler-generated one.
7161 2002-09-26 Nick Zigarovich <nick@chemlab.org>
7163 * Corrected typo in gc.c (BOHEM vs BOEHM).
7165 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7167 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
7168 GetProperties. Also avoid calling g_slist_length in GetProperties and
7171 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7173 * reflection.c: avoid unaligned stores (bug spotted by
7174 Mark Crichton <crichton@gimp.org>).
7176 2002-09-25 Martin Baulig <martin@gnome.org>
7178 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
7179 instead of guint64 for addresses and added prologue/epilogue info.
7181 2002-09-25 Martin Baulig <martin@gnome.org>
7183 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
7184 store line number info. For the dynamic symbol file, we only need
7185 to provide the JIT generated dynamic line number info for the dynamic
7188 2002-09-25 Martin Baulig <martin@gnome.org>
7190 * debug-mono-symfile.h: Incremented version number.
7192 2002-09-24 Martin Baulig <martin@gnome.org>
7194 * class.c (mono_debugger_class_init_func): New global function
7196 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
7199 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
7200 function. This is called via the mono_debugger_class_init_func
7201 hook to add all types to the dynamic type table.
7202 (ves_icall_MonoDebugger_GetType): New interncall to get a class
7203 from its metadata token.
7205 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
7206 New interncall for the debugger.
7208 2002-09-24 Nick Drochak <ndrochak@gol.com>
7210 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
7211 before using it in case it is null.
7213 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7215 * metadata.c: allow custom modifiers in local var signatures
7216 (bug spotted by Zoltan Varga).
7218 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
7220 * class.c: deal with the <Module> class that may have a NULL vtable.
7223 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7225 * image.c, image.h: more strong name helpers.
7226 * monosn.c: more work: convert pem keys to cryptoapi format.
7228 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
7230 * string-icalls.c: speedup IndexOf.
7232 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7234 * icall.c: updates from Zoltan.2.Varga@nokia.com.
7236 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
7238 * icall.c: cleanup: use mono_object_domain ().
7240 2002-09-23 Martin Baulig <martin@gnome.org>
7242 * debug-mono-symfile.c: Improved type support.
7244 2002-09-22 Martin Baulig <martin@gnome.org>
7246 * debug-mono-symfile.c: Added support for reference types and strings.
7248 2002-09-22 Martin Baulig <martin@gnome.org>
7250 * debug-mono-symfile.c: Started to work on the type table.
7252 2002-09-21 Martin Baulig <martin@gnome.org>
7254 * debug-mono-symfile.c: Largely reworked the symbol table format.
7255 The symbol table is now incrementally updated each time a new
7256 method is added. We're now also using our own magic and version
7257 so that you don't need to recompile all your classes if the
7258 dynamic table changes.
7259 (mono_debug_update_mono_symbol_file): Removed.
7260 (mono_debug_symfile_add_method): New function to add a method.
7262 2002-09-21 Martin Baulig <martin@gnome.org>
7265 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
7268 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
7269 New interncall to get a method from its metadata token.
7271 2002-09-21 Martin Baulig <martin@gnome.org>
7273 * debug-mono-symfile.c: Create type table.
7275 2002-09-20 Martin Baulig <martin@gnome.org>
7277 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
7279 2002-09-20 Martin Baulig <martin@gnome.org>
7281 * debug-mono-symfile.c: Provide information about params and locals.
7283 2002-09-20 Martin Baulig <martin@gnome.org>
7285 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
7288 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
7289 interncall to get a method from its metadata token.
7291 2002-09-20 Martin Baulig <martin@gnome.org>
7293 * debug-mono-symfile.c: Added a few checks for method->header
7294 being non-NULL. This should never happen, but for the moment
7295 let's use a g_warning() rather than a g_assert().
7297 2002-09-19 Mark Crichton <crichton@gimp.org>
7299 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
7300 even if support for it isn't present. Added an #ifdef to fix this.
7302 * socket-io.c: Added checks back for Solaris support.
7304 2002-09-19 Martin Baulig <martin@gnome.org>
7306 * debug-mono-symfile.c (read_string, write_string): Reflect latest
7307 changes in the symbol file format.
7309 2002-09-18 Martin Baulig <martin@gnome.org>
7311 * debug-mono-symfile.c: Set version number to 21.
7313 2002-09-18 Dick Porter <dick@ximian.com>
7315 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
7316 on netbsd. Fixes bug 30051.
7318 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7321 (set_version_from_string): little fix.
7323 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7325 * monosn.c, Makefile.am: added strong name utility.
7326 * reflection.h, reflection.c: implemented delayed signing,
7327 locale, version and hash id assembly attributes.
7329 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
7331 * loader.c, metadata.c: load param attributes in signatures.
7333 2002-09-16 Martin Baulig <martin@gnome.org>
7335 * debug-mono-symfile.c: Added string table with all method names.
7337 2002-09-14 Martin Baulig <martin@gnome.org>
7339 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
7342 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
7344 * reflection.c: record the public key token of referenced assemblies.
7346 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7348 * image.c, image.h: added functions to get the strong name and the
7349 public key of an assembly.
7350 * pedump.c: use them.
7352 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
7354 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
7356 2002-09-12 Miguel de Icaza <miguel@ximian.com>
7358 * marshal.c (mono_marshal_get_managed_wrapper): Added
7361 2002-09-11 Martin Baulig <martin@gnome.org>
7363 * gc.c: Call GC_unregister_disappearing_link() on all links when
7364 finalizing them, this is necessary to aviod a crash in boehm's
7367 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
7369 * gc.c: handle GetTarget for finalized objects spotted and fixed by
7372 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
7374 * icall.c: implemented MonoType::Module.
7375 * reflection.c, reflection.h: mono_module_get_object () from
7376 Tomi Pakarinen <tomi.pakarinen@welho.com>.
7378 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
7380 * icall.c: ignore overridden methods in GetMethods ().
7381 Fix for FieldInfo::SetValue().
7382 * object.c: handle float/double in runtime invoke.
7384 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
7386 * object.c: allow a constructor to be called again on an object.
7388 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7390 * class.h, class.c: move field layout code to it's own function and
7391 export it. Get an interface id earlier. Move fields in MonoClass
7392 so they are more cache friendly and align the bitfields.
7393 * loader.c: temporary handle get_param_names() for a runtime method.
7394 * reflection.c, reflection.h: more code to handle runtime creation of
7397 2002-09-09 Martin Baulig <martin@gnome.org>
7399 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
7400 signature with the pinvoke field being set for the actual call.
7402 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7404 * icall.c: removed some unused icalls. Start of map of glib charsets
7405 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
7407 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
7409 * debug-helpers.c: break infinite loop (found and fixed by
7410 Holger Arnold <harnold@gmx.de>).
7412 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
7414 * icall.c: target may be null in create_delegate.
7416 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7418 * marshal.c: handle a boolean return type.
7420 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7422 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
7424 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
7426 * gc.c: fix weakreferences.
7428 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
7430 * icall.c: added icall to get default codepage.
7432 2002-09-03 Dick Porter <dick@ximian.com>
7435 * threads.c: Use MonoThread instead of MonoObject where
7438 Store running thread objects in a hash table, so that we have all
7439 the info to hand when waiting for them to finish
7440 (means we don't need OpenThread() any more, so mingw builds should
7441 be fully functional again.)
7444 * object.h: Added thread ID to MonoThread
7446 2002-09-03 Martin Baulig <martin@gnome.org>
7448 * icall.c (System.Reflection.Assembly::get_location): New interncall.
7450 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7452 * icall.c: fixed leak in get_temp_path. Thanks lupus.
7454 2002-09-03 Martin Baulig <martin@gnome.org>
7456 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
7457 argument to store the end address of the disassembled instruction.
7459 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
7460 here from debug-symfile.h.
7461 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
7462 JIT into this struct.
7463 (MonoSymbolFile): Added `char *image_file' field.
7464 (MonoDebugGetMethodFunc): Removed.
7465 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
7466 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
7467 (mono_debug_find_method): New method.
7469 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
7470 create a full symbol file.
7471 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
7472 and static symbol files.
7473 (mono_debug_find_method): The symbol file keeps an internal method hash,
7474 call this to get a MonoDebugMethodInfo from a MonoMethod.
7476 * debug-symfile.[ch]: Removed.
7478 2002-08-29 Miguel de Icaza <miguel@ximian.com>
7480 * image.c (do_mono_image_open): Remove linker version check.
7482 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
7484 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
7485 wrappers for instance methods.
7487 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7489 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
7491 2002-08-28 Dick Porter <dick@ximian.com>
7493 * Makefile.am: Export HOST_CC for w32 builds
7495 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7497 * file-io.c process.c: MonoString are null terminated, no
7498 need for mono_string_to_utf16() anymore.
7500 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7502 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
7504 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
7506 * icall.c, reflection.h: speedup System.MonoType.
7508 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7510 * reflection.c: allow null as the value of a string argument in
7511 custom attributes constructors.
7513 2002-08-27 Martin Baulig <martin@gnome.org>
7515 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
7516 `trampoline_address' field.
7518 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
7520 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
7521 check (fixes bug #29486)
7523 2002-08-27 Martin Baulig <martin@gnome.org>
7525 * debug-mono-symfile.c: Changed the file format in a way that allows us
7526 open it read-only and to use a specially malloced area for all the
7527 dynamic data. We can now also generate a symbol file on-the-fly if we're
7528 debugging IL code and there is no MCS generated symbol file for it.
7530 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
7532 * object.c: added a define for a good string and array
7533 creation speedup (not enabled by default because we need to deal with
7536 2002-08-26 Martin Baulig <martin@gnome.org>
7538 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
7539 function to create a dynamic symbol file. This is used by the
7540 debugger to create a symbol file for IL code on-the-fly.
7542 2002-08-26 Martin Baulig <martin@gnome.org>
7544 * loader.c (mono_lookup_pinvoke_call): Include the error message
7545 from g_module_error() in the error message.
7547 2002-08-24 Martin Baulig <martin@gnome.org>
7549 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
7550 function to update the symbol file. The symbol file is mmap()ed
7551 writable, but private. This allows us to install the symbol file
7552 together with the assembly.
7554 2002-08-24 Martin Baulig <martin@gnome.org>
7556 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
7557 but they can read the new symbol file format which mcs is now creating.
7559 * debug-symfile.c (mono_debug_find_source_location): Moved to
7560 debug-mono-symfile.c; this is now operating on the new symbol file.
7562 2002-08-23 Martin Baulig <martin@gnome.org>
7564 * debug-helpers.c (mono_method_desc_from_method): New function to get
7565 a MonoMethodDesc from a MonoMethod.
7567 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
7569 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
7570 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
7572 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
7574 * string-icalls.[ch]: make helper methods static.
7576 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7578 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
7579 types to it and to SetValueInternal.
7581 * object.c: Moved handle_enum label to its proper place. This was the
7584 This time i compiled mcs and gtk-sharp and they both work.
7586 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7588 * icall.c: reverted partially my previous patch until
7589 object.c:set_value handles enums correcly.
7591 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7594 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
7595 (ves_icall_System_Environment_get_MachineName): removed warning when
7596 compiling under cygwin.
7598 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7600 * object.c: fixed field_get_value() for reference types.
7602 2002-08-22 Dick Porter <dick@ximian.com>
7604 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
7605 Don't free a buffer while it's still needed. Patch from Jonathan
7606 Liger <Jonathan.liger@wanadoo.fr>
7608 2002-08-21 Miguel de Icaza <miguel@ximian.com>
7610 * icall.c (ves_icall_System_Environment_get_Platform): Add new
7613 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
7615 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
7616 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
7618 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
7619 we call unmanaged code which throws exceptions.
7621 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
7623 * appdomain.h: added per-domain entry_assembly.
7624 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
7626 * icall.c: Assembly::GetEntryAssembly icall.
7627 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
7628 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
7630 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
7632 * appdomain.h, gc.c: added mono_domain_finalize ().
7634 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7637 (mono_print_unhandled_exception): changed g_warning by g_printerr
7638 because g_log has a 1024 characters limit (yeah, i got a big stack
7639 trace). Don't print exception name, that should be in ToString
7642 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7644 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
7645 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
7647 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7650 (mono_print_unhandled_exception): after previous commit, i realized
7651 that MS calls ToString on the exception. I changed this function to
7652 do that. This way we get stack_trace for free.
7654 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7657 (mono_print_unhandled_exception): invoke Message property instead of
7658 getting 'message' field from Exception. Don't allocate memory for
7659 'trace' and 'message' if not needed.
7661 2002-08-18 Dick Porter <dick@ximian.com>
7663 * unicode.c: Fix asserts to match Encoder.cs checks
7665 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7667 * marshal.c: fix unaligned store issue and a few wrong
7668 opcode argument types.
7670 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7672 * icall.c: added GetUninitializedObjectInternal internal call.
7674 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
7676 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
7677 to the right domain.
7679 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
7681 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
7683 * class.c (class_compute_field_layout): set blittable to false for Strings
7685 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
7687 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7689 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
7690 first chunk of code to create types at runtime. Code to
7691 handle ReflectedType/DeclaringType. Make reflection handles
7694 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
7696 * class.c: set correct name in arrays.
7698 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
7700 * appdomain.c (mono_domain_transfer_object): make it work with
7701 valuetypes. bug fixes.
7703 2002-08-12 Dick Porter <dick@ximian.com>
7705 * object.h: Rename some parameters to avoid c++ keywords (Patch
7706 from Joseph Wenninger <kde@jowenn.at>)
7708 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
7710 * icall.c: added icall to implement Assembly.GetFile*.
7712 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
7714 * reflection.h, reflection.c: code to embed managed resources.
7716 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
7718 * class.c: move all the type size stuff into
7719 class_compute_field_layout().
7721 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
7723 * class.c: ensure enums have always the correct instance size.
7724 * unicode.c: remove wrong assert.
7726 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
7728 * assembly.c: fix mem corruption issue.
7729 * image.h, image.c: added mono_image_get_resource () to access
7731 * icall.c: implemented Assembly.EntryPoint property and some
7732 Managed Resources related internalcalls.
7735 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7737 * image.c, image.h: impemented mono_image_get_entry_point ().
7738 * appdomain.c: use mono_image_get_entry_point.
7740 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
7742 * reflection.c: support the object type argument when loading
7745 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
7747 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
7748 String as return type.
7750 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
7752 * reflection.c: fix encoding of named args for custom attrs to match
7753 the ms implementation. Read them back when instantiating custom
7756 2002-08-02 Radek Doulik <rodo@ximian.com>
7758 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
7759 by Dietmar as quick fix
7760 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
7761 16 as stack size, used on more places as quick fix before Dietmar
7762 will fix it properly
7764 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
7766 * object.h, object.c: added accessors for fields and properties.
7768 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
7770 * class.c, class.h: made mono_class_get_field_from_name ()
7771 loop on parent types.
7772 Added mono_class_get_property_from_name ().
7774 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7776 * class.c, class.h: move the code to setup the type vtable in its own
7777 function so that it can be reused also for types created at runtime.
7778 Eliminate the "class" identifier from the header file.
7779 * reflection.c: setup the vtable for enums so that we can create
7780 objects for use in SetConstant ().
7782 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
7784 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
7785 instead of the delegate itself as this pointer (bug #28383)
7787 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
7789 * marshal.c (mono_marshal_get_managed_wrapper): added return type
7792 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7794 * loader.c: don't set the pinvoke bit on icalls.
7796 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
7798 * debug-helpers.c (mono_method_full_name): only print a number to
7799 indicate wrapper type (so that the output is more readable in traces).
7801 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
7803 * class.c (mono_class_init): include method override patch from Paolo
7805 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
7807 * icall.c: fixed GetTypeCode().
7809 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
7811 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
7812 use real delegate invoke function to make it work with multicast
7813 delegates (fix bug# 28291).
7815 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7817 * object.c: load constant strings.
7819 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7821 * reflection.c: no magic numbers.
7822 * tabledefs.h: security action enum.
7824 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7826 * assembly.c: fix possible memory corruption.
7828 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
7830 * reflection.h, reflection.c: added support for linking resources.
7831 * verify.c: check we have an updated corlib.
7833 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
7835 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
7837 (mono_marshal_string_array): null terminate unmanaged string arrays.
7838 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
7840 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7842 * icall.c: Type.GetType () can now return also types from the
7845 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
7847 * loader.h, loader.c: stack walking support.
7848 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
7851 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
7853 * marshal.c: added optimisations for blittable types
7855 * class.c (mono_array_class_get): do not set blittable attribute on arrays
7856 (mono_class_setup_mono_type): set blittable attribute for single
7859 * marshal.c (mono_string_utf8_to_builder): impl.
7860 (mono_string_builder_to_utf8): impl.
7861 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
7863 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
7865 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
7866 (mono_marshal_get_managed_wrapper): impl. byref types
7868 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7871 (search_method): don't display debug message.
7873 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
7875 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
7877 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
7879 * appdomain.c: set the missing filename when throwing exception.
7881 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
7883 * metadata.c (mono_type_size): code cleanup
7884 (mono_type_stack_size): removed some test code
7886 2002-07-21 Miguel de Icaza <miguel@ximian.com>
7888 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
7889 mono_get_exception_file_not_found now.
7891 * exception.c (mono_exception_from_name_two_strings): New version
7892 that will call a constructor with two string arguments.
7893 (mono_get_exception_file_not_found): New helper routine, used to
7894 report file-not-found errors.
7896 2002-07-20 Dick Porter <dick@ximian.com>
7899 * process.c: Pass file handles to CreateProcess
7903 * file-io.c: Implemented CreatePipe
7905 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
7907 * metadata.c (mono_get_param_info): set alignment for value types
7909 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7911 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
7912 Constify mono_domain_assembly_open().
7913 * loader.c: handle null namespace in icalls.
7915 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
7917 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
7918 (emit_str_to_ptr_conv): marshal object as structs
7920 * metadata.c (mono_type_to_unmanaged): marshal object as structs
7922 * marshal.c (mono_marshal_get_runtime_invoke): support value types
7924 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
7926 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
7927 (mono_marshal_get_native_wrapper): we an now return value types
7929 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7931 * verify.c: more checks implemented.
7933 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
7935 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
7937 (mono_marshal_get_native_wrapper): allow byref arguments
7938 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
7939 impl. PtrToStringXXX methods
7940 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
7941 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
7942 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
7943 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
7944 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
7946 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7948 * reflection.c: fix buglet in parsing an assembly name.
7950 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
7952 * marshal.c (emit_ptr_to_str_conv): first impl.
7954 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
7956 * object.c, class.h: cache the vtable in the class as suggested by
7957 vargaz@freemail.hu (Zoltan Varga).
7959 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7961 * class.h, loader.c: added mono_field_from_token().
7962 * verify.c: first cut of type checking code.
7964 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
7966 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
7968 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
7970 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
7972 (mono_marshal_get_remoting_invoke): impl.
7973 (mono_delegate_begin_invoke): impl.
7974 (mono_mb_emit_save_args): impl.
7975 (mono_delegate_end_invoke): impl.
7976 (mono_marshal_get_delegate_begin_invoke):
7977 (mono_marshal_get_delegate_end_invoke):
7978 (mono_marshal_get_delegate_invoke): generate a special name for
7979 those methods (including the signature) and associate them whith
7982 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
7985 (mono_reflection_type_from_name): now it has a MonoImage parameter
7986 which is used as the default image to search the type in. If the image
7987 is NULL or getting the type from it fails, it defaults to corlib.
7989 * icall.c: changed 1 call to mono_reflection_type_from_name to match
7992 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7994 * reflection.c: update the parameter table index.
7996 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
7998 * domain.c: don't include the mark byte in the string hash.
8000 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8002 * icall.cs: icall for Type.GetTypeCode ().
8003 * verify: a couple of fixes and disabled local initialization checks.
8005 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
8007 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
8009 * debug-helpers.c (mono_method_full_name): print the type of the
8012 * metadata.c (mono_signature_hash): a hash function for signatures
8013 (mono_signature_hash): better hash algorithm
8015 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
8017 * debug-helpers.c (mono_method_full_name): this can now generate
8018 method names with signatures
8020 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
8021 method dont have this pointers.
8023 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
8025 * reflection.c: fixup typebuilder tokens.
8026 * image.c: fix buglet.
8027 * marshal.h: remove whitespace.
8028 * metadata.h, metadata.c: reinstate code that was removed.
8029 * verify.c: handle catch directives and fix another couple of bugs.
8031 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
8033 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
8034 (mono_marshal_get_native_wrapper): make it comp. with the old code
8035 (mono_marshal_get_native_wrapper): support boolean
8036 (mono_marshal_get_managed_wrapper): support more types
8038 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
8040 * class.c (class_compute_field_layout): compute class->blittable attribute.
8042 2002-07-09 Dick Porter <dick@ximian.com>
8044 * threads.c: Make the thread cleaning up cope with threads that
8047 2002-07-08 Radek Doulik <rodo@ximian.com>
8049 * reflection.c (method_encode_code): use non-translated values to
8050 compute finally_start, this fixes exception handling on ppc, yay!
8052 * decimal.h (struct signscale): fix endianess
8054 2002-07-07 Radek Doulik <rodo@ximian.com>
8056 * reflection.c: swap box_val and not val
8058 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
8060 * reflection.c, reflection.h: handle full assembly info in type name.
8061 Handle Type arguments when loading custom attributes.
8062 * icall.c: updated to use new mono_reflection_type_from_name () method.
8064 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8067 (method_from_memberref): also print assembly name when method not found.
8069 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8072 (ves_icall_TypeGetProperties): fixed bug #27473.
8074 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8076 * reflection.c: display image name and token when cannot find the
8077 .ctor for an attribute.
8079 2002-07-05 Martin Baulig <martin@gnome.org>
8081 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8083 2002-07-04 Dick Porter <dick@ximian.com>
8085 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
8086 compile on mingw. This will cause mingw builds to not wait for
8087 subthreads to terminate after the main thread does. I've lodged a
8088 bug with the mingw developers for them to wrap OpenThread().
8090 2002-07-03 Dick Porter <dick@ximian.com>
8092 * threads.c: Store thread IDs instead of handles, because
8093 GetCurrentThread() returns a pseudohandle and therefore stores
8094 useless values. mono_thread_cleanup() continues checking the
8095 array of threads until it is empty, to cope with subthreads
8096 spawning new threads after the main thread has finished.
8100 * profiler-private.h: Pass the thread ID to thread profiler
8101 functions, instead of a handle
8103 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8105 * verify.c: fixes to make it more usable.
8106 * pedump.c: added --verify code to verify IL code in an assembly.
8108 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8110 * reflection.c: turn errors into warnings to allow compiling corlib.
8112 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8114 * reflection.c: add special cases to compile corlib.
8116 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8118 * reflection.c: handle properties with only a set method.
8120 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8122 * opcodes.h: add enum with opcodes in opval order.
8124 2002-07-01 Dick Porter <dick@ximian.com>
8127 * object.c (mono_runtime_run_main): Removed unneeded argument
8129 2002-06-28 Martin Baulig <martin@gnome.org>
8131 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8133 2002-06-27 Dick Porter <dick@ximian.com>
8135 * threads.c: Store the handle in both the parent thread and in the
8136 subthread, to minimise the time between starting a new thread and
8139 2002-06-26 Dick Porter <dick@ximian.com>
8141 * appdomain.c (mono_runtime_cleanup): Close the socket library
8142 after all the threads have finished, not before
8144 2002-06-26 Martin Baulig <martin@gnome.org>
8146 * debug-symfile.c (mono_debug_find_source_location): Added
8147 `guint32 *line_number' argument. If it's not NULL, store the line number
8148 there and return the file name without the line number.
8150 2002-06-25 Dick Porter <dick@ximian.com>
8154 * process.c: Process forking and other support functions
8156 2002-06-25 Dick Porter <dick@ximian.com>
8158 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
8159 things dont happen when the image is closed.
8160 (mono_image_lookup_resource): Walk the resource section looking
8161 for a particular entry
8163 * cil-coff.h: PE resource section decoding
8165 2002-06-25 Dick Porter <dick@ximian.com>
8169 (mono_assembly_foreach): Accessor functions to walk the list of
8171 (mono_assembly_set_main):
8172 (mono_assembly_get_main): Process methods need to know which
8173 assembly is the "main" one
8175 * object.c (mono_runtime_run_main): Record the main assembly
8177 * debug-helpers.c: Fix typo
8179 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
8181 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
8182 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
8184 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
8186 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
8188 2002-06-21 Miguel de Icaza <miguel@ximian.com>
8190 * image.c (do_mono_image_open): Initialize reference count,
8191 otherwise we leak the MonoImage.
8193 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8195 * reflection.c: small tweak to handle self-hosting.
8197 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8199 * reflection.c: fix type name parse code.
8201 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8203 * reflection.c: break out of the loop.
8204 * image.c: special case corlib.
8206 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8208 * reflection.c: add all the custom attrs at the end to ensure the
8209 ctors have been properly initialized when the attributes are defined
8210 in the current assembly.
8212 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8214 * reflection.c: handle correctly multiple-nested types.
8216 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
8218 * row-indexes.h: fix typos.
8219 * reflection.c: adjust for typos and fix method_def_or_ref
8220 encoding in MethodImpl table.
8222 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8224 * reflection.c: fix entry point patching (thanks Serge!).
8226 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
8228 * verify.c: add check for System.Exception
8230 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8232 * image.c, class.c: minifix for code just c&p'ed.
8233 * reflection.c: warning fix.
8234 * object.h, loader.h, domain.c: load also StringBuilder.
8236 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8238 * marshal.h, marshal.c: some support code to handle complex marshaling.
8240 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8242 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
8243 Better signatures with vtable error dump.
8245 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
8247 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
8249 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
8251 * icall.c (ves_icall_Type_GetField): impl.
8253 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8255 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
8256 to retrieve a marshal description blob for a field or param.
8258 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8260 * reflection.h, reflection.c: change order of nested type emission
8261 to avoid table corruption. The NestedTypes table is sorted.
8262 * icall.c: change order of GetConstructor results to workaround mcs bug.
8264 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8266 * reflection.h, reflection.c: handle field and param marshal
8269 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8271 * icall.c, marshal.c marshal.h: more Marshal class implementation.
8273 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8275 * reflection.c: fix call convention.
8277 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8279 * reflection.h, reflection.c: mono_image_get_memberref_token()
8280 takes a type instead of a class, now. Added
8281 mono_image_get_array_token() to create tokens for the special
8282 multi-dim array methods.
8284 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8286 * assembly.c: handle modules (no assembly table). Split
8287 loading references in its own function.
8288 * class.c: handle moduleref resolution scope.
8289 * image.c, image.h: cache module name in image.
8291 2002-06-07 Martin Baulig <martin@gnome.org>
8293 * reflection.c (mono_image_get_type_info): Only add a class layout entry
8294 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
8296 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
8298 * icall.c: more signature fixes that used uint instead of int.
8300 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8302 * reflection.c: fixed signature of field refs.
8304 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8306 * class.c, reflection.c: handle typerefs of nested types
8307 (both on read and when writing files).
8309 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
8311 * icall.c: fix method signatures that tried to workaround the previous
8314 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
8316 * debug-helpers.c: fix typo.
8318 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8320 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
8321 rewrote the PE/COFF writing code (our programs are understood by the
8324 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8326 * gc.c, gc.h, icall.c: weakreference support.
8328 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8330 * Makefile.am, mono-config.c: use $(sysconfdir).
8332 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8334 * icall.c: changed default precision of Double.ToString() to 15.
8335 Fixed memory leak. Unified with Single.ToString.
8337 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
8339 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
8341 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8343 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
8344 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
8345 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
8348 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8350 * debug-symfile.c, sysmath.c: yet more compilation fixes.
8352 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8354 * reflection.c, socket-io.c: more compilation fixes.
8356 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8358 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
8359 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
8360 unicode.c: warning and compiler compatibility fixes.
8362 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8364 * class.h, metadata.c: fixed warnings/compilation errors.
8366 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
8368 * Makefile.am, mono-config.c, mono-config.h: configuration file
8370 * loader.c, loader.h: make Dll mapping configurable at runtime in the
8371 config file. Export methods to insert and lookup mappings.
8373 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8375 * reflection.c: handle types and boxed objects in custom attr
8378 2002-05-30 Martin Baulig <martin@gnome.org>
8381 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
8383 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
8385 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
8386 to lookup the implmap row for a P/Invoke method.
8387 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
8388 P/Invoke method from the runtime on an as needed basis.
8390 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
8392 * metadata.c (mono_metadata_parse_signature): impl.
8394 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8396 * class.c: handle .pack directive.
8398 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8400 * object.c: initialize static fields with RVA data.
8402 2002-05-25 Martin Baulig <martin@gnome.org>
8405 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
8407 2002-05-24 Martin Baulig <martin@gnome.org>
8410 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
8411 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
8412 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
8414 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8416 * object.c: special case string ctros in invoke.
8417 * gc.c: silly whitespace changes.
8419 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
8421 * threadpool.[ch]: impl. a threadpool that can
8422 be used by mint and mono.
8424 2002-05-22 Martin Baulig <martin@gnome.org>
8426 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
8427 The first argument is now a `MonoReflectionModuleBuilder *', the return
8428 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
8429 `methods' field to get the method builder. The `token' argument is the
8432 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
8433 invalid characters instead of g_assert_not_reached()ing. This seems
8434 to be the behaviour of mscorlib.
8436 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
8438 * object.c (mono_runtime_invoke_array): applied patch from Rachel
8439 Hestilow to fix bug #25104
8441 2002-05-21 Martin Baulig <martin@gnome.org>
8443 * debug-symfile.c (mono_debug_find_source_location): New function.
8444 Looks up an IL offset in the line number table and returns the source
8445 location as a string.
8447 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8450 (mono_double_ToStringImpl): changed %f by %g until we have something
8453 2002-05-21 Nick Drochak <ndrochak@gol.com>
8455 * icall.c : Use different name for Math.Pow's icall. Needed to check
8456 parameters first in C#.
8458 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8460 * icall.c, reflection.h: added icall to get info about an event.
8462 2002-05-20 Radek Doulik <rodo@ximian.com>
8464 * object.c (mono_value_box): don't use memcpy for boxing on BIG
8466 (mono_value_box): don't use memcpy for small sizes on
8467 architectures with unaligned access
8469 2002-05-20 Martin Baulig <martin@gnome.org>
8471 * reflection.c (mono_reflection_setup_internal_class): Don't crash
8472 if `tb->parent == NULL'.
8473 (mono_reflection_create_internal_class): New function. This is
8474 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
8477 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
8480 2002-05-19 Martin Baulig <martin@gnome.org>
8482 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
8483 argument to get the length, don't default to the array length.
8485 2002-05-18 Miguel de Icaza <miguel@ximian.com>
8487 * assembly.c (mono_assembly_setrootdir): New function used to
8488 override the MONO_ASSEMBLIES directory.
8490 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8492 * icall.c: ValueType_GetHashCode() initialize local var.
8494 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8496 * reflection.c: sort custom attributes table.
8498 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8500 * reflection.c: support named args in custom attributes (write support).
8502 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
8504 * reflection.c: fix finally position calculation.
8506 2002-05-15 Radek Doulik <rodo@ximian.com>
8508 * reflection.c: fixed endianess at many places
8510 * icall.c (ves_icall_InitializeArray): comment out debug msg
8512 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
8514 * object.c (mono_unhandled_exception): new function to handle
8515 unhandled exceptions.
8516 (mono_unhandled_exception): call the UnhandledException event.
8517 (mono_runtime_delegate_invoke): impl.
8519 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
8521 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
8522 returns the RVA, not the direct pointer to the data. Handle the case
8523 when the class size is fixed.
8525 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8527 * reflection.c: fix some endianess issues.
8529 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
8531 * object.c (mono_runtime_invoke): is now able to catch exceptions.
8533 * threads.c (mono_thread_init): added a callback which is invoked
8536 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
8538 * icall.c: make GetHashCode return non-negative values.
8540 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
8542 * object.c, icall.c, gc.c: revert to address-based hashcode.
8544 2002-05-13 Miguel de Icaza <miguel@ximian.com>
8546 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
8548 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8550 * icall.c, class.c: special case <Module>.
8552 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
8554 * icall.c: fix bug in GetNow().
8556 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
8558 * object.c (mono_runtime_class_init): make sure that we call all
8559 static class constructors.
8561 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8563 * reflection.c: sort methodsemantics table.
8565 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8567 * reflection.h, reflection.c: honour init locals setting.
8569 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
8571 * icall.c: copied Double ToStringImpl for Single ToStringImpl
8573 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8575 * reflection.c: support ContructorBuilders in attribute blob creation.
8577 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8579 * reflection.c: some changes to build a binary that can be run
8580 directly in windows.
8582 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
8584 * loader.c: print a big message when an icall can't be found.
8586 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8588 * string-icalls.c: fix bug 24248.
8590 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
8592 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
8593 icall.c, reflection.h: separate assembly loading by pathname and by
8594 assembly name. Use the MONO_PATH env var to search for assemblies.
8596 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8598 * assembly.c, image.h: add some support for assemblies
8599 with multiple modules.
8600 * class.c, class.h: export mono_class_from_typeref().
8601 * loader.c: remove duplicated code and use mono_class_from_typeref(),
8604 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8606 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
8607 documentation says (the ECMA one is correct).
8609 2002-05-02 Dick Porter <dick@ximian.com>
8611 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
8612 Don't name the synchronisation mutex.
8614 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
8617 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
8618 Make the prototypes match.
8619 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
8623 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
8624 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
8625 all systems have tm.tm_zone, so use strftime() with %Z to print
8626 the timezone abreviation into a temp string.
8628 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
8629 rather than mono_array_addr() on a MonoString on Big Endian
8632 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
8634 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
8637 2002-04-30 Dick Porter <dick@ximian.com>
8639 * socket-io.c: Cope with SOCKET being an integer rather than a
8642 * threads.c: Added Thread_free_internal, to deal with thread
8643 handle cleanup. Moved calls to handle_store() and handle_remove()
8644 to start_wrapper(), so each can only be called once. Allocate
8645 synchronisation blocks with GC_malloc(), and use GC finalisation
8646 to close the handles.
8648 * icall.c: added System.Threading.Thread::Thread_free_internal
8650 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8652 * icall.c: support Environment.Exit, CommandLineArgs().
8654 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8656 * object.c, object.h: added mono_runtime_run_main () and
8657 mono_runtime_get_main_args () for use in System.Environment.
8659 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8661 * gc.c: fix thinko, enable actual finalization since the jit is now
8664 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8666 * gc.c, object.c: take into account that an object may be offset wrt the address
8667 returned by GC_malloc().
8669 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
8671 * image.c: handle files without entries in the assembly table (modules).
8673 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
8675 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
8676 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
8677 allowed to be null when it's System.Object class setup.
8679 2002-04-27 Martin Baulig <martin@gnome.org>
8681 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
8682 if `tb->parent == NULL' rather than crashing.
8684 2002-04-28 Nick Drochak <ndrochak@gol.com>
8686 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
8687 calling acos() where asin() should have been called.
8689 2002-04-26 Martin Baulig <martin@gnome.org>
8691 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
8692 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
8693 there's a subdirectory called `System', but we don't want to read that
8694 subdirectory as an assembly.
8696 2002-04-25 Martin Baulig <martin@gnome.org>
8698 * debug-symfile.c: Reflect latest MonoString changes.
8700 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8702 * rand.c, rand.h: instance method icalls need to have an explicit
8703 this pointer as first argument in the C implementation.
8705 2002-04-25 Nick Drochak <ndrochak@gol.com>
8707 * icall.c: Fix typo in map for GetNonZeroBytes
8709 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
8711 * string-icalls.c : String does now passes unit tests without any
8712 errors, the following changes has been made:
8714 Implemented replace methods.
8715 Renaming of methods to (try) follow the standard.
8716 Fixed compare ordinal
8717 Made all memory allocated directly to function instead of via icall function.
8718 Small performance fix in is_in_array function
8720 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
8722 c (mono_string_Internal_ctor_charp_int_int):
8723 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
8724 sindex < 0, throw ArgumentOutOfRangeException instead of
8725 ArgumentNullException.
8727 Added new check for length == 0, however
8728 I need to make it return String.Empty from the C code.
8730 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
8731 that calculate the length for us here.
8733 (mono_string_Internal_ctor_sbytep_int_int): Replaced
8734 mono_string_new_utf16 with mono_string_new, since value is utf8.
8736 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8738 * object.c: register the object for finalization if needed.
8739 Allocate one more char in the string for the terminating 0 char.
8741 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8743 * class.c, class.h, image.c: check if a type implemenst a destructor.
8744 Use the proper key for array class lookups.
8745 * icall.c: register the icalls in the System.GC class.
8746 * gc.c, gc.h: GC-related functions and icalls.
8748 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8752 * unicode.c: free some strings gotten from mono_string_to_utf8 and
8753 changed a couple of free () by g_free ().
8755 * decimal.c: one-liner in the comments for decimal2string ().
8757 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
8759 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
8761 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
8763 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
8764 * object.c (mono_runtime_invoke_array) : handle null in params
8766 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
8768 * string-icalls.c: fixed bug in split (one off bug)
8770 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
8772 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
8773 * icalls.c: added String::Equals as internal method
8775 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
8777 * threads.c: fixed bug in the double interlocked functions
8779 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
8781 * threads.c: implemented all of the new interlocked icalls.
8782 * string-icalls.c: fix a bug in insert.
8783 * icalls.c: added the icalls for interlocked, removed old string functions.
8785 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8787 * loader.c: fix off-by-one error when reading argument names.
8789 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8791 * profiler.c: win32 counter implementation (untested).
8792 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
8793 (the latter needs testing and more complete impl. from win32 folks).
8795 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
8797 * object.c: mono_array_new_full workaround mono_array_class_get
8800 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8802 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
8803 * object.h (mono_string_chars): Changed casting type.
8805 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8807 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
8808 method signatures to use gunichar2 instead of gint16.
8810 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
8812 * object.h, object.c: domain-specific versions of mono_object_new and
8815 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
8817 * object.c: changed String layout
8819 * string-icalls.c (mono_string_Internal_ctor_chara): added
8820 internal string constructors.
8822 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
8824 * threads.c: pass 'this' to the thread start routine.
8826 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8828 * string-icalls.c: fix IndexOf and LastIndexOf. Now
8829 InternalCompareStr don't call twice mono_string_cmp_char for the last
8830 character. Improved performance in mono_string_cmp_char.
8832 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8834 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
8835 code into its own library: libmonoruntime.
8837 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
8839 * object.h, object.c: changed array format so that szarrays do not
8840 require a bounds structure.
8841 * icall.c, appdomain.c: support for new szarray format.
8843 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
8845 * metadata.c: compare also the retuns type when comparing signatures:
8846 we didn't do this as an optimization since really overloaded methods
8847 must differ also in the arguments, but this doesn't work with
8848 low-level IL code (or when using explicit conversion operators: see
8849 bug#23498 for an example).
8851 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8853 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
8855 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8857 * icall.c: make MonoType::GetElementType its own icall.
8859 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8861 * icall.c: remove MonoMethod_get_Name().
8862 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
8865 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8867 * string-icalls.c: optimized a few methods.
8869 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
8871 * icall.c: added all new string internal calls
8872 * string-icalls.c: added, new string internal call implementation.
8873 * object.c: added mono_string_new_size for allocating a string a size
8875 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
8877 * object.c (mono_object_isinst): use the same code as in the
8878 optimized x86 version.
8880 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8882 * profiler.c: TSC-based timer code (faster and more accurate).
8883 Not hooked up in configure, yet (set USE_X86TSC to 1).
8885 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
8887 * profiler.c, profiler.h: track time spent compiling methods.
8888 * threads.c: track thread creation/destruction.
8890 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
8892 * profiler.c, profiler.h, profiler-private.h: profiling interface
8893 and sample implementation. Moved here so that it can be used also by
8896 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
8898 * reflection.c, reflection.h: keep types and other handles separate in
8899 the hash tables for referred tokens. Add guid for modules.
8901 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
8903 * assembly.c: fix bugs found with valgrind.
8904 * metadata.h, metadata.c: added mono_metadata_guid_heap().
8906 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
8908 * threads: added icall support for getting current domain for
8911 2002-04-13 Martin Baulig <martin@gnome.org>
8913 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
8914 (MonoDebugVarInfo): Added `index' field for register based addresses.
8915 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
8916 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
8917 `MonoDebugVarInfo *params' and `guint32 this_offset' with
8918 `MonoDebugVarInfo *this_var'.
8920 * debug-symfile.c (relocate_variable): New static function to write
8921 a location description for a local variable or method parameter.
8923 2002-04-12 Martin Baulig <martin@gnome.org>
8925 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
8926 stack offset and begin/end scope address of a local variable.
8927 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
8928 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
8929 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
8931 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
8932 Added new relocation types for start/end scope of a local variable.
8934 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8936 * object.h: add mono_object_domain() macro.
8937 * reflection.c: handle typespecs.
8938 * icall.c: MonoMethod::get_Name() implementation.
8940 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8942 * icall.c: String::GetHashCode() icall implementation.
8944 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8946 * icall.c: String::IndexOfAny icall.
8947 * object.c, object.h: make array->max_length more useful.
8948 Intrduced mono_object_class() and mono_string_length() macros.
8950 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8952 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
8953 instead of g_unichar_isdigit.
8955 2002-04-11 Nick Drochak <ndrochak@gol.com>
8957 * icall.c: Implement a simple Double.ToString().
8959 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8961 * appdomain.h: only io-layer.h is supposed to be included.
8962 * icall.c: explicitly import environ. Fix warning.
8964 2002-04-10 Nick Drochak <ndrochak@gol.com>
8966 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
8967 return true even if it's not Daylight Savings time.
8968 Only return false for the case where the function isn't
8969 implemented for a plaform (read Windows).
8971 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8973 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
8976 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
8978 * mempool.c (mono_mempool_alloc): only use g_malloc when
8979 absolutely necessary.
8981 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
8983 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
8985 * class.c (mono_class_vtable): use domain mempool to allocate vtable
8986 (mono_class_proxy_vtable): use domain mempool
8988 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8990 * appdomain.h, appdomain.c: split initialization that requires the
8991 execution engine support into mono_runtime_init().
8993 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
8995 * class.c (mono_class_init): don't include vtable inside MonoClass
8996 to save some memory, gather some statistics.
8997 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
8999 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9001 * icall.c: internalcall implementation for ValueType.Equals().
9003 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
9005 * object.c (mono_message_init): moved
9006 (mono_runtime_exec_main): new arch. independent impl.
9007 (mono_runtime_invoke_array): new method - like
9008 mono_runtime_invoke, but you can pass an array of objects.
9009 (mono_remoting_invoke): new arch. independent impl.
9010 (mono_message_invoke): new arch. independent impl.
9011 (mono_runtime_class_init): new arch. independent impl.
9012 (mono_runtime_object_init): new arch. independent impl.
9014 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9016 * metadata.c, object.c, reflection.c: documented the exported
9019 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
9021 * icall.c: simpler code to pass the assembly builder data to corlib.
9022 Implement GetNestedTypes() internalcall.
9024 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9026 * class.c: warn if a type can't be loaded.
9028 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
9030 * image.h: typedef MonoImageOpenStatus
9031 * types.h: removed unused file
9033 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
9035 * icall.c: Enum_ToObject accepts enum value arguments.
9037 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9039 * class.c: move initialization of properties, events and nested
9040 classes, so that they happen for interfaces, too.
9042 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9044 * icall.c: cleanup some ugly casts in Array_SetValue*.
9046 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9048 * icall.c: the values array fro enums is of the correct type, now.
9049 Implement (correctly) getFullName instead of assQualifiedName for
9051 * reflection.h, reflection.c: added mono_type_get_name ().
9053 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9055 * assembly.c, image.h: for each MonoImage, record from wich assembly
9057 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
9058 Make Type.Assembly work.
9060 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
9062 * debug-symfile.h: use char* instead of gpointer to avoid
9065 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
9067 * icall.c (ves_icall_InternalExecute): impl. FielSetter
9068 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
9070 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
9072 * icall.c (mono_message_init): impl. (code cleanup)
9073 (ves_icall_InternalExecute): impl. FieldGetter
9075 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
9076 defined we call all (non-static)methods through the vtable.
9078 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
9080 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
9081 finalizer even though the memory is still referenced (and the chunk of
9082 memory is not freed).
9084 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
9086 * assembly.c: fix brokeness.
9088 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
9090 * class.c: kill some warnings. Check explicit interface method
9091 implementation also without considering the namespace.
9092 Load also literal strings in static class data.
9094 2002-03-29 Miguel de Icaza <miguel@ximian.com>
9096 * assembly.c (default_assembly_name_resolver): Kill memory leak.
9097 (default_assembly_name_resolver): Make the resolver take the
9098 "base" directory where the assembly was originally defined, so we
9099 can load DLLs that are in the same directory as the assembly that
9100 is being referenced.
9102 2002-03-28 Dick Porter <dick@ximian.com>
9108 * unicode.c: Warning cleanups
9110 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
9112 * object.h, reflection.h: use the correct type instead of MonoObject.
9114 2002-03-28 Martin Baulig <martin@gnome.org>
9116 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
9117 (mono_debug_update_symbol_file): Initialize classes if necessary.
9119 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
9121 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
9122 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
9124 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
9126 * assembly.h: fix function prototype.
9127 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
9128 * mono-endian.h: use const cast.
9130 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
9132 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
9134 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
9136 * loader.c: don't assert when a typeref can't be loaded, give
9137 a chance to the runtime to trow an exception instead.
9138 * loader.h: fix warning.
9140 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
9142 * class.c (mono_class_proxy_vtable): added proxy support
9144 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
9146 * icall.c: removed last of PAL calls, added System.Environment
9147 * file-io.h, file-io.c: MonoIO implementation
9148 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
9150 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
9152 * appdomain.c: do not use the byte marker in ldstr table lookup.
9153 * debug-helpers.c: allow two ':' to separate class and method name.
9154 * object.c: allocate arrays bounds with the GC, too.
9155 * verify: add a few more checks.
9157 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
9159 * reflection.c: output also literal strings. Allocate parameter data
9160 with GC_malloc() (thanks, Martin, for catching this!).
9162 2002-03-26 Martin Baulig <martin@gnome.org>
9164 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
9165 include the `this' offset in the `param_offsets'.
9167 2002-03-25 Martin Baulig <martin@gnome.org>
9169 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
9170 mono_debug_get_class() function to get the classes. Added new
9171 relocation types for arrays and strings.
9172 (mono_debug_get_class): New static function to search in all
9173 referenced assemblies for a metadata token.
9175 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
9177 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
9179 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
9180 hold gc-allocated objects. Make the string heap a stream like the
9181 others. Removed duplicated code when writing stream info.
9182 Added asserts to catch possible buffer overflows. Set the sorted map
9183 for tables that need sorting. Added some documentation.
9185 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
9187 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
9188 for interned strings and vtables.
9190 2002-03-24 Martin Baulig <martin@gnome.org>
9192 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
9193 it in the array since it was created with g_slist_prepend().
9195 2002-03-24 Martin Baulig <martin@gnome.org>
9197 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
9198 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
9199 (mono_debug_method_from_token): Renamed to
9200 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
9201 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
9203 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
9206 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
9208 2002-03-24 Martin Baulig <martin@gnome.org>
9210 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
9211 (mono_debug_method_from_token): New func.
9213 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
9214 New interncall, calls mono_debug_local_type_from_signature().
9215 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
9216 calls mono_debug_method_from_token().
9218 2002-03-23 Martin Baulig <martin@gnome.org>
9220 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
9221 specifies the number of bytes to be converted, not the array size.
9222 Return the number of chars, not the number of bytes.
9223 (ves_icall_iconv_get_chars): The `byteCount' argument
9224 specifies the number of bytes to be converted, not the array size.
9226 2002-03-23 Martin Baulig <martin@gnome.org>
9228 * reflection.h (MonoReflectionSigHelper): New type.
9230 * reflection.c (mono_reflection_sighelper_get_signature_local),
9231 (mono_reflection_sighelper_get_signature_local): New functions.
9233 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
9234 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
9237 2002-03-23 Martin Baulig <martin@gnome.org>
9239 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
9240 is_writeable is set.
9241 (mono_raw_buffer_update): New function to write the modified map
9244 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
9246 * debug-symfile.c (mono_debug_update_symbol_file): Call
9247 mono_raw_buffer_update() when done writing.
9249 2002-03-23 Martin Baulig <martin@gnome.org>
9251 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
9253 * debug-symfile.c: Added support for arguments and local variables.
9255 2002-03-23 Dick Porter <dick@ximian.com>
9257 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
9258 protected by ifdefs, hence breaking the w32 build.
9260 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9262 * object.c: implement is_interned() the right way.
9264 2002-03-21 Martin Baulig <martin@gnome.org>
9266 * debug-symfile.[ch]: New files to handle debugging information
9267 files. There's also support to dynamically update these symbol
9268 files to include machine dependent information.
9270 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
9272 * threads.c (mono_thread_create): new function to create thread
9275 2002-03-20 Martin Baulig <martin@gnome.org>
9277 * icall.c (ves_icall_InternalInvoke): Create a new object if the
9278 method is a constructor.
9279 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
9280 points to ves_icall_InternalInvoke().
9282 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
9284 * file-io.c: Flush shouldn't throw exceptions.
9286 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
9288 * file-io.c: FileStream flush support; FileSetLength now
9289 restores file pointer.
9291 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
9293 * class.c: set image for pointer classes.
9295 2002/03/19 Nick Drochak <ndrochak@gol.com>
9297 * sysmath.c: Forgot one.
9299 2002-03-18 Miguel de Icaza <miguel@ximian.com>
9301 * sysmath.c: Avoid redefining existing names.
9303 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
9305 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
9306 handled by runtime as icall rather than dllimport from libm.so
9307 * file-io.c, file-io.h: fixed handle argument type.
9309 2002-03-18 Dick Porter <dick@ximian.com>
9311 * reflection.c (mono_image_get_type_info): rename interface to
9312 iface, because of "#define interface struct" on windows.
9314 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
9316 * class.c, class.h: rename and export mono_ptr_class_get().
9317 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
9318 * reflection.c, reflection.h, icall.c: better/saner type name
9319 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
9322 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
9324 * class.c (mono_class_init): removed hardcoded GHC_SLOT
9326 * icall.c (ves_icall_InternalInvoke): impl.
9328 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
9330 * reflection.c: output the interface map table, too.
9332 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
9334 * class.c (class_compute_field_layout): separate computation of
9337 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
9339 * icall.c: added System.Buffer support.
9340 * file-io.c: moved file icalls from PAL to FileStream.
9342 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
9344 * icall.c (ves_icall_System_Object_GetHashCode): impl.
9346 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
9348 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
9350 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
9352 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
9354 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
9356 * debug-helpers.{c,h}: moved here from monograph some useful functions
9357 to locate a method by name/signature in a class or image. Included
9358 also a small and flexible IL disassembler.
9360 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
9362 * reflection.c: fixup tokens in methods with small header size, too.
9364 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
9366 * object.c (mono_string_to_utf8): remove assert(!error), instead
9369 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
9371 * icall.c: update to the new mono_Array_class_get interface.
9373 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
9375 * appdomain.c, object.c: Boehm-GC enable.
9376 * icall.c: make get_data_chunk() support split data requests.
9377 Ensure a class is initialized in more cases. Return only the first
9378 property found in GetProperties() or the compiler gets confused.
9379 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
9380 * reflection.h, reflection.c: add fixup mechanism for field and method
9381 tokens. Initialize assembly->typeref in a single place. Output
9382 properties after events. Support custom attributes for events, too.
9383 Typo fix for paramter custom attrs.
9385 2002-03-07 Martin Baulig <martin@gnome.org>
9387 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
9389 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
9391 * class.c (mono_array_class_get): fix. for multi. dim. arrays
9393 2002-03-06 Martin Baulig <martin@gnome.org>
9395 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
9396 non-zero lower bounds. See testcases #F10-#F13.
9398 2002-03-05 Martin Baulig <martin@gnome.org>
9400 * exception.c (mono_get_exception_argument_out_of_range): New exception.
9402 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
9403 ves_icall_System_Array_GetValue(), only calculate the absolute array position
9405 (ves_icall_System_Array_SetValue): Likewise.
9406 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
9407 as argument and does the actual work. This function is used when copying a
9408 multi-dimensional array.
9409 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
9410 now do all the widening conversions of value types.
9411 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
9413 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9415 * class.c: remove some magic numbers and use the smbolic names,
9416 instead. Added init_events() to load event info at class init time.
9417 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
9418 and mono_metadata_methods_from_event().
9419 * reflection.h, reflection.c: added support for writing out the evnets
9420 related information.
9422 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
9424 * reflection.h, icall.c: use a different method (GetInterfaces)
9425 to gather interface info and add isbyref, isprimitive and
9426 ispointer to the ves_icall_get_type_info() return value.
9428 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
9430 * class.h: stared adding support for events.
9431 * icall.c: split find_members implementation. Added debug icall to get
9432 the address of an object.
9433 * reflection.c: handle TypeBuilders in mono_type_get_object().
9435 2002-03-01 Martin Baulig <martin@gnome.org>
9437 * icall.c (ves_icall_System_Array_GetLength): This must throw an
9438 ArgumentOutOfRangeException(), not an ArgumentException().
9439 (ves_icall_System_Array_GetLowerBound): Likewise.
9440 (ves_icall_System_Array_GetValue): Improved argument checking.
9441 (ves_icall_System_Array_SetValue): Improved argument checking.
9443 2002-03-01 Martin Baulig <martin@gnome.org>
9445 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
9446 called with invalid arguments rather than just dying with g_assert().
9447 (ves_icall_System_Array_SetValue): Likewise.
9448 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
9449 raise a NotImplementedException instead.
9450 (ves_icall_System_Array_GetLength): Added argument checking.
9451 (ves_icall_System_Array_GetLowerBound): Added argument checking.
9453 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
9455 * object.h (mono_assert): new macros mono_assert and
9456 mono_assert_not_reached
9458 2002-02-28 Martin Baulig <martin@gnome.org>
9460 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
9461 and "System::String::IsInterned" to "System::String::_IsInterned".
9463 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
9465 * icall.c: remove hacks for typebuilder. Added icall to create a
9466 modified type from a tybebuilder.
9467 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
9468 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
9469 to create a backing MonoClass for a TypeBuilder.
9471 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
9473 * class.c, class.h: more refactoring of class init.
9474 Export mono_class_setup_mono_type() and mono_class_setup_parent().
9476 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
9478 * marshal.c, marshal.h: start of marshaling interface.
9480 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
9482 * icall.c: fix order in assembly qualified name icall.
9484 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
9486 * class.c: do not free str, since we store it in the hash table.
9487 * reflection.h: add label field to MonoILExceptionInfo.
9488 * reflection.c: handle references to more than one assembly. Handle
9489 case when there isn't a module created in the assembly.
9491 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
9493 * class.c: Fix typo. Start refactoring of class init code.
9495 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
9497 * appdomain.c: exit with 1 on error.
9498 * class.c: we already have the name in MonoClassField.
9499 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
9500 MonoStreamHeader instead of an offset of image->raw_metadata.
9502 2002-02-26 Miguel de Icaza <miguel@ximian.com>
9504 * appdomain.c (mono_init): Be even more descriptive about the error.
9506 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
9508 * appdomain.c: give the user an informative message when corlib can't
9511 2002-02-26 Martin Baulig <martin@gnome.org>
9513 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
9514 New icall to get the time zone data.
9516 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
9518 * reflection.c: set virtual and raw size of section correctly.
9519 * threads.c: transfer domain information to newly created threads.
9521 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
9523 * class.c: when instancing a class in a domain, load the default
9524 vaules for static fields from the constant table. Fix System.Enum to
9526 * icall.c: implement Object::GetType() internalcall. Implemented
9527 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
9528 Fixed checking of binding flags in find_members().
9529 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
9530 * reflection.c: handle enumerations when writing to the constant
9531 table. Use a different object cache for types.
9534 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
9536 * object.c (mono_object_isinst): fix for arrays
9538 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
9540 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
9542 * object.c: don't use mprotect () and fix intern pool hash table
9543 lookup for big endian systems.
9545 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
9547 * icall.c: change type_is_subtype_of () signature.
9549 2002-02-21 Mark Crichton <crichton@gimp.org>
9551 * rand.c, rand.h: Added random number generator for
9552 System.Security.Cryptography classes.
9554 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
9556 * icall.c: Added System.Security.Cryptography calls.
9558 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
9560 * class.c, icall.c, metadata.c: better support for pointer types.
9561 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
9562 * reflection.c: Add support for getting custom attrs for properties
9563 and simplify some code.
9565 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
9567 * icall.c: change getToken () and add custom attribute GetBlob()helper
9569 * reflection.h: add custom attrs array to the reflection builder structures.
9570 * reflection.c: encode and emit custom attributes for all the relevant
9571 reflection objects. Cache fieldref and methodref tokens. Change
9572 mono_image_create_token() interface to take a MonoDynamicAssembly.
9573 More complete custom attributes decoder. Load custom attributes for
9574 Assembly, Field, Method and Constructor objects, too. Make the
9575 returned array an Attribute[] one, not object[]. Added
9576 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
9577 custom attribute constructor.
9579 2002-02-20 Dick Porter <dick@ximian.com>
9583 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
9584 problem code out for now).
9586 2002-02-19 Radek Doulik <rodo@ximian.com>
9588 * object.c (mono_ldstr): use hash table to avoid multiple swapping
9590 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
9592 * icall.c: register the GetCustomAttributes method.
9593 * object.c, object.h: add mono_string_new_len ().
9594 * reflection.h, reflection.c: added mono_runtime_invoke(),
9595 mono_install_runtime_invoke(). Added
9596 mono_reflection_get_custom_attrs () to load custom attributes and
9597 create the attribute objects.
9599 2002-02-19 Dick Porter <dick@ximian.com>
9600 * threads-dummy-types.c:
9601 * threads-dummy-types.h:
9604 * threads-pthread-types.c:
9605 * threads-pthread-types.h:
9606 * threads-pthread.c:
9607 * threads-pthread.h: Deleted obsolete files
9609 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
9611 * class.c (mono_class_vtable): runtime init the class when we
9612 allocate static class data.
9614 * icall.c (ves_icall_System_Array_SetValue): check for null values.
9616 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
9617 and String - but we will need generic marshalling support in the
9619 (mono_init): set the domain name in a ms compatible way
9621 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
9624 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
9626 * object.c (mono_array_clone): use alloca() instead of g_malloc
9629 * appdomain.c (mono_domain_unload): impl.
9631 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
9633 * appdomain.c, object.c: fix intern pool implementation.
9634 * class.c: fix alignment code.
9636 2002-02-16 Radek Doulik <rodo@ximian.com>
9638 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
9639 and s2 > s1, just copy lower bytes to be compatible with little
9640 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
9641 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
9643 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
9644 force big_endian to be 1 for big endian machines
9645 (ves_icall_iconv_new_decoder): ditto
9647 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
9649 * socket-io.c (convert_sockopt_level_and_name): If the system
9650 doesn't define SOL_IP or SOL_TCP, get them by hand using
9651 getprotobyname() and caching the values (because this could be a
9653 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
9654 Use the appropriate struct when the system does support it. Ie,
9655 not all systems have struct ip_mreqn so use struct ip_mreq when
9658 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
9660 * reflection.c: handle finally clauses.
9662 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
9664 * socket-io.c: use g_snprintf() instead of snprintf.
9666 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
9668 * reflection.c (mono_param_get_objects): Cast second argument to
9669 mono_method_get_param_names to a const char** to silence the
9672 * appdomain.c (mono_domain_assembly_open): Put parens around the
9673 truth statement in the for-loop.
9675 * unicode.c (iconv_convert): Got rid of a compiler warning about
9676 int i being unused when the system has a new iconv.
9677 (iconv_get_length): Same.
9679 * image.c (load_class_names): Cast the second argument to
9680 g_hash_table_insert() to char* to hush compiler warnings about the
9682 (mono_image_open): Same here.
9684 * socket-io.c: Don't conditionally include sys/filio.h or
9685 sys/sockio.h here anymore since we now get them from
9687 (inet_pton): If the system doesn't support inet_aton, implement
9688 using inet_addr and also #define INADDR_NONE if it isn't defined
9691 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
9693 * metadata.c, metadata.h: added function to get packing and size info
9695 * reflection.h, reflection.c: handle field RVA data. Save info about
9696 the table layout if needed. Assign typedef indexes to all the types
9697 before dumping the info about them to avoid forward reference problems.
9699 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
9701 * socket-io.c (convert_sockopt_level_and_name): ifdef
9702 SO_ACCEPTCONN because it is not defined on my system (old debian)
9704 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
9706 * opcode.c: use stddef.h to get NULL.
9708 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
9710 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
9711 for FIONBIO, FIONREAD and SIOCATMARK.
9712 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
9713 define INADDR_NONE and besides, inet_addr() is deprecated and
9714 should not be used. Use inet_pton() instead - it also has the
9715 added bonus that it can easily handle IPv6 addresses as well.
9716 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
9718 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
9720 * decimal.c: remove _MSC_VER conditional.
9722 2002-02-13 Dick Porter <dick@ximian.com>
9725 * icall.c: Internal calls for Blocking, Select, Shutdown,
9726 GetSocketOption and SetSocketOption
9728 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9730 * assembly.cs: better resolver: use it instead of some kludgy
9733 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
9735 * reflection.c: the best way to speed-up the compiler is to avoid
9738 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
9740 * class.c (mono_class_vtable): changed the object layout
9741 (obj->vtable->class).
9742 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
9744 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9746 * assembly.c: look for assemblies in the assembly dir, too.
9748 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
9750 * class.c: fix thinko in mono_class_from_type().
9752 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
9754 * exception.h, exception.c: added TypeLoadException.
9755 * object.h, object.c: added mono_array_clone ().
9756 * icall.c: handle throwOnError in AssemblyGetType().
9757 Added Array.Clone().
9758 * opcode.h, opcode.c: use a single value for the opcode val.
9759 Compile fix for non-gcc compilers.
9761 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
9763 * opcodes.c, opcodes.h: export interesting info about opcodes.
9765 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
9767 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
9770 * class.c (class_compute_field_layout): set element_class for enums
9771 (mono_class_create_from_typedef): set element_class for normal classes
9773 * icall.c (ves_icall_System_Enum_get_value): impl.
9775 * class.c (mono_class_create_from_typedef): do not set valuetype
9776 flag for System.ValueType and System.Enum
9778 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
9780 * unicode.c (iconv_convert): fix big endian problem.
9782 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
9784 * class.c: add asserts if we are ever going to scribble over memory.
9785 * socket-io.c: not all systems have AF_IRDA defined.
9787 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
9789 * class.c (class_compute_field_layout): do not consider static
9790 fields to compute alignment
9792 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
9794 * appdomain.c (mono_appdomain_get): impl.
9795 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
9797 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
9799 * icall.c: ignore "file://" prefix when loading an assembly.
9801 2002-01-23 Dick Porter <dick@ximian.com>
9805 * Makefile.am: Added socket support
9807 2002-01-23 Miguel de Icaza <miguel@ximian.com>
9809 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
9810 code back. This should return the assemblies that are loaded by
9811 the runtime on behalf of an application domain.
9813 The current implementation is still broken, it just returns every
9814 assembly loaded, but until we get real applications domain this
9817 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
9819 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
9822 2002-01-23 Miguel de Icaza <miguel@ximian.com>
9824 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
9825 the mono_class_from_name lookup.
9826 (ves_icall_get_parameter_info): ditto.
9827 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
9829 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
9831 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
9833 * class.c: load also nested classes on class init.
9834 System.ValueType instance methods gets passed boxed
9835 values, unless methods in derived classed that get a pointer to the
9837 * icall.c: use better name parsing code in GetType().
9838 * image.c, image.h: add mono_image_loaded ().
9839 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
9840 * reflection.c, reflection.h: added mono_reflection_parse_type().
9842 2002-01-22 Veronica De Santis <veron78@interfree.it>
9844 * icall.c : Added mapping of internal calls for Manual and Auto reset events
9845 * threads.c : Added the implementation of internal calls for events
9846 * threads.h : Added prototypes of internal calls for events
9848 2002-01-21 Radek Doulik <rodo@ximian.com>
9850 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
9852 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
9854 * class.c (mono_class_init): set min_align to 1 (instead of 0)
9855 (mono_class_value_size): use min_align
9857 2002-01-20 Dick Porter <dick@ximian.com>
9860 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
9861 so it compiles on w32.
9863 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
9865 * metadata.c (mono_type_stack_size): impl.
9867 * class.c (mono_class_get_field): impl. memberref token
9869 2002-01-16 Veronica De Santis <veron78@@interfree.it>
9871 * icall.h : Added the internal calls mapping for CreateMutex_internal
9872 and ReleaseMutex_internal.
9873 * threads.h : Added the prototype of mutexes internal calls.
9874 * threads.c : Added the implementations of mutexes internal calls.
9876 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
9878 * metaparse.h: removed unused file.
9879 * reflection.c, reflection.h: added stream_data_align () function
9880 to align data in streams and keep stream aligned. Add support for
9881 exception support in method headers.
9883 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
9885 * unicode.c: make iconv_convert () return the number of bytess written
9886 in the output buffer.
9888 2002-01-15 Dick Porter <dick@ximian.com>
9889 * threads.c: Make the runtime's idea of infinite timeouts coincide
9890 with the class library's
9892 Fix a particularly egregious bug in mono_thread_cleanup(). That
9893 code was so utterly bogus it must have been written on a Monday.
9895 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
9897 * reflection.h: add subtypes field to TypeBuilder.
9898 * reflection.c: encode constants for literal fields.
9899 Handle subtypes. Fix user string token (and add a zero byte)
9902 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
9904 * class.c (mono_class_init): bug fix: assign slot numbers for
9907 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
9909 * reflection.c: don't try to output a code RVA for abstract methods.
9910 Small fixes for method header format. Output parameter info to the
9911 ParamDef table. Save method overriding info to MethodImpl table.
9912 Fix property support. Allow typedef.extends to be a type in the
9914 * verify.c: fix off-by-one error.
9916 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
9918 * class.c: fix mono_class_from_mono_type () for szarray types.
9919 Remove unused cache check in mono_class_from_type_spec().
9920 * icall.c: *type_from_name () functions handle simple arrays and byref.
9921 * reflection.c: handle byref and szarray types. Handle methods without
9922 body (gets P/Invoke compilation working). Handle types and fields in
9924 * reflection.h: add rank to MonoTypeInfo.
9926 2002-01-10 Dick Porter <dick@ximian.com>
9928 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
9931 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
9933 * icall.c: initialize class in type_from_handle ().
9934 Loop also in parent classes for get_method ().
9935 * reflection.c: properly encode class and valuetype types.
9936 Start on encoding TypeBuilder types. Handle fieldrefs.
9937 Use correct length when registering a user string.
9938 Handle ConstructorBuilder and MonoMethod in get_token ().
9939 Make mono_type_get_object () aware of cached types.
9940 * object.c: back out change to mono_string_new ().
9942 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
9943 * object.c: mono_string_new should return a NULL when the string
9944 passed in is NULL -- not try to deference it.
9946 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
9948 * icall.c: hack to make IsSubType work for TypeBuilders.
9949 * reflection.c: emit constructors before methods.
9950 Retrieve param names in mono_param_get_objects().
9952 2002/01/05 Nick Drochak <ndrochak@gol.com>
9954 * Makefile.am: fix list of headers and sources so automake 1.5
9955 doesn't complain. Removed \# at end of list.
9957 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
9959 * reflection.c: get token for a method ref. Set return type of
9960 constructor to void.
9961 * loader.c: debug message.
9962 * class.c: typo fix.
9964 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
9966 * icall.c: fix array init with rank > 1. FindMembers
9967 loops in parent class as well.
9968 * image.c: do not insert nested types in name cache.
9969 * reflection.c: warning fix.
9970 * reflection.h: add override method (for interface impl).
9972 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
9974 * metadata.c: fix customattr decoding.
9976 2001-12-21 Miguel de Icaza <miguel@ximian.com>
9978 * rawbuffer.cs: Added native Win32 implementation, avoids using
9979 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
9981 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
9983 * class.c: make the low-level routines handle the cache.
9985 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
9987 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
9989 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
9991 * class.c: fix mono_array_element_size() for objects.
9992 * class.h, class.c: add properties to MonoClass and load them
9994 * icall.c: check with isinst() when assigning a value to an array
9995 instead of requiring the classes to match exactly.
9996 Implemented icall for System.Type::GetType().
9997 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
9998 enums. Handle bindingflags when looking for methods and fields.
9999 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
10000 and mono_metadata_methods_from_property().
10001 * reflection.h, reflection.c: added structures for propreties,
10002 parameters and enums. Implemented mono_property_get_object() and
10003 mono_param_get_objects().
10005 2001-12-18 Dick Porter <dick@ximian.com>
10007 * file-io.c: Use mono_string_to_utf16() instead of
10008 mono_string_chars()
10010 * object.c: Added mono_string_to_utf16(), which copies the non
10011 NULL-terminated MonoString into a new double-null-terminated
10014 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
10016 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
10018 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
10020 * file-io.c: raise exceptions if handle is invalid.
10022 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
10024 * assembly.c: yet another check for mscorlib.
10025 * class.c, class.h: load nesting info for classes.
10026 * icall.c: many new functions to support the Reflection classes.
10027 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
10028 * reflection.h, reflection.c: mono_image_create_token(),
10029 mono_assembly_get_object(), mono_type_get_object(),
10030 mono_method_get_object(), mono_field_get_object(): methods to return
10031 objects that parallel the C representation of assemblies, types,
10034 2001-12-11 Dick Porter <dick@ximian.com>
10037 * file-io.c: Internal calls for file IO.
10039 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
10041 * tabledefs.h: missing FileAttributes.
10042 * verify.h, verify.c: use is_valid_string () to simplify and check for
10043 valid strings more correctly. Fix warnings and speeling.
10044 Check more tables: Filed, File, ModuleRef, StandAloneSig.
10045 Check code: branches, maxstack, method calls.
10047 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
10049 * object.c (mono_object_allocate): removed static, so that the jit
10050 can allocate value types.
10052 * icall.c (ves_icall_System_DateTime_GetNow): impl.
10054 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10056 * class.c: init enum types right away and register the
10057 token->MonoClass map in mono_class_create_from_typedef ().
10058 * verify.h, verify.c: first cut of the verifier.
10059 * pedump.c: add --verify switch to verify metadata tables.
10060 * tabledefs.h: add some missing enums.
10062 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
10064 * class.c (mono_install_runtime_class_init): impl.
10065 (mono_class_init): renamed mono_class_metadata_init to
10066 mono_class_init, also removed the metadata_inited flag
10068 * object.c (mono_object_isinst): use faster algorithm
10070 2001-11-30 Radek Doulik <rodo@ximian.com>
10072 * mono-endian.h: reverted last change
10073 added function prototypes
10075 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
10076 add mono-endian.c back
10078 * mono-endian.c: returned back, as Paolo pointed out, it's needed
10079 for unaligned access, I've mistaked it with endianess. I am
10081 (mono_read16): fix reverted endianess
10082 (mono_read64): ditto
10083 (mono_read32): ditto
10085 2001-11-30 Dick Porter <dick@ximian.com>
10087 * exception.c: Implement mono_exception_from_name()
10089 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
10091 * metadata.h, metadata.c: remove params_size and locals_size and their
10092 calculation from the metadata code: they are only usefult to the
10095 2001-11-29 Radek Doulik <rodo@ximian.com>
10097 * object.c (mono_ldstr): swap bytes here, it's probably not the
10098 best place, but works for me now, I'll redo it once I know mono
10099 better, also note that I add PROT_WRITE and don't reset back, also
10100 note that it's only affects big endians, so x86 should be OK
10102 * mono-endian.h (read16): use just glib macros for both endians
10104 * mono-endian.c: removed as glib macros are used in in
10105 mono-endian.h so we don't need to care about endianess for read
10106 macros as glib does that for us already
10108 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
10110 * class.h, class.h: take minimum alignment into consideration so
10111 that the fields of a class remain aligned also when in an array.
10113 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10115 * loader.h, loader.c: add mono_method_get_param_names().
10116 * class.c: 0-init class fields.
10118 2001-11-26 Dick Porter <dick@ximian.com>
10122 * threads.c: New file that handles System.Threading on all platforms
10125 * object.h: Remove the synchronisation struct from MonoObject,
10126 replace it with a pointer that gets initialised on demand
10128 * Makefile.am: Replace all the system-specific threading code with
10129 a single file that uses the new wrapper library
10131 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
10133 * class.c, class.h: add mono_install_trampoline() so that the runtime
10134 can register a function to create a trampoline: removes the ugly
10135 requirement that a runtime needed to export arch_create_jit_trampoline.
10136 * object.h, object.c: added mono_install_handler() so that the runtime
10137 can install an handler for exceptions generated in C code (with
10138 mono_raise_exception()). Added C struct for System.Delegate.
10139 * pedump.c: removed arch_create_jit_trampoline.
10140 * reflection.c: some cleanups to allow registering user strings and
10141 later getting a token for methodrefs and fieldrefs before the assembly
10143 * row-indexes.h: updates and fixes from the new ECMA specs.
10145 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
10147 * class.h, class.c: add enum_basetype field to MonoClass.
10148 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
10149 to get index in the constant table reated to a field, param or
10151 * reflection.h, reflection.c: handle constructors. Set public-key and
10152 version number of the built assembly to 0.
10153 * row-indexes.h: update from new ECMA spec.
10155 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
10157 * class.h, class.c: add a max_interface_id to MonoClass.
10158 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
10159 since it's used to do that. Added mono_type_type_from_obj().
10160 Make GetType() return NULL instead of segfaulting if the type was not
10161 found. Handle simple arrays in assQualifiedName.
10162 * object.h: add a struct to represent an Exception.
10163 * reflection.c: output call convention in method signature.
10164 Add code to support P/Invoke methods and fixed offsets for fields.
10166 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
10168 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
10170 * icall.c: use mono_array_addr instead of array->vector: fixes the
10171 reflection image writing.
10172 * reflection.c: init call convention byte to 0 in method signature.
10173 Encode the property signature. Don't output property-related methods
10174 twice. Really process the properties for a type (don't cast a field to
10175 a property, my mom always told me that).
10176 Fix 64 bit issues in pointer alignment in a different and more
10179 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
10181 * loader.h: Removed type class from MonoDefaults, added monotype
10183 * loader.c: Loaded MonoType, removed loading of Type
10185 * icall.c (my_mono_new_object): Now returns a System.MonoType,
10186 and fills in System.Type._impl with a RuntimeTypeHandle rather
10187 than the actual MonoClass *
10189 (ves_icall_type_from_handle): change from type_class to
10192 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
10195 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
10198 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
10200 (ves_icall_System_Reflection_Assembly_GetType): implemented
10202 (ves_icall_System_MonoType_assQualifiedName): implemented
10204 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
10206 2001-11-09 Miguel de Icaza <miguel@ximian.com>
10208 * assembly.c (mono_assembly_open): Implement a cache for the
10211 (mono_assembly_close): only destroy the assembly when the last
10214 2001-11-09 Dick Porter <dick@ximian.com>
10216 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
10218 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
10220 * class.c (mono_class_metadata_init): bug fix: compute the right slot
10222 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
10224 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
10225 from Martin Weindel.
10226 * object.h: add mono_string_chars ().
10228 2001-11-07 Miguel de Icaza <miguel@ximian.com>
10230 * reflection.c (build_compressed_metadata): Eliminates warnings
10231 and uses 64-bit clean code.
10233 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
10234 (mono_type_equal): Change signature to eliminate warnings.
10236 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10238 * icall.c, loader.c: remove the internalcall array constructors.
10239 Changes to match the new MonoArray structure.
10240 * object.h, object.c: an array object doesn't allocate an extra
10241 vector. Add mono_array_new_full () to create jagged arrays easily.
10243 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
10245 * metadata.h, metadata.c: add mono_metadata_field_info () to
10246 retreive all the info about a field from vairous tables.
10247 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
10248 * class.h, class.c: augment MonoClassField with more info.
10249 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
10250 policy and load a field's RVA if needed.
10252 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
10254 * class.c (mono_class_metadata_init): create a trampoline for all
10255 virtual functions instead of actually compiling them.
10257 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
10259 * class.h, class.c: include name in MonoClassField.
10260 * class.c: fix fundamental type of System.Object and System.String.
10261 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
10263 * icall.c: remove internalcalls for the Reflection stuff that is now
10265 * loader.c: mono_field_from_memberref () implementation.
10266 * mono-endian.c: thinko (s/struct/union/g).
10267 * object.c, object.h: make the mono_string_* prototypes actually use
10268 MonoString instead of MonoObject.
10269 * reflection.c, reflection.h: updates for changes in the reflection
10270 code in corlib: we use C structures that map to the actual C# classes.
10271 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
10272 fat method header if needed and use the info from the ILGenerator for
10273 methods. Handle fields in types. Misc fixes.
10275 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
10277 * class.c (mono_class_metadata_init): bug fix: always allocate
10278 space for static class data
10280 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
10282 * class.c (mono_compute_relative_numbering): use relative
10283 numbering to support fast runtime type checks.
10285 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
10287 * class.c (mono_class_create_from_typeref): added debugging output
10288 to print class name when MonoDummy is returned instead of real class
10290 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
10292 * class.c (mono_class_metadata_init): interface offset table now
10293 contains pointers into the vtable - this is more efficient for the jit
10295 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
10297 * class.c (mono_class_metadata_init): use a temporary vtable (the
10298 old algorithm only worked for the interpreter, but not for the jit)
10300 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
10302 * loader.c (method_from_memberref): use mono_class_get to get the
10303 class of an array instead of using System.Array directly.
10304 (mono_get_method): also add MEMBERREF methods to the method cache
10305 which usefull for arrays.
10307 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
10309 * pedump.c (arch_compile_method): added to compute vtable entry
10311 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
10312 number of interfaces.
10314 * class.h: merged MonoArrayClass into MonoClass
10316 * class.c (mono_class_create_from_typedef): compute the vtable size and
10317 allocate space to include the vtable inside MonoClass
10318 (mono_class_metadata_init): initialize the vtable
10320 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
10322 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
10323 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
10324 * image.c: endian fixes by Laurent Rioux.
10325 * object.h, object.c: rename MonoStringObject to MonoString and
10326 MonoArrayObject to MonoArray. Change some function names to conform to
10327 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
10328 guint16* as first argument, so don't use char*.
10329 Provide macros to do the interesting things on arrays in a portable way.
10330 * threads-pthread.c: updates for the API changes and #include <sched.h>
10331 (required for sched_yield()).
10332 * icall.c: updates for the API changes above.
10333 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
10334 platforms that need them.
10336 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
10338 * class.c: set the correct type for all the fundamental
10339 type when loading the class.
10341 2001-10-05 Dick Porter <dick@ximian.com>
10343 * threads-pthread.c (pthread_mutex_timedlock): Simple
10344 compatibility version for C libraries that lack this call.
10346 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
10348 * class.c: MonoTypes stored in MonoClass are stored as
10349 fundamental MonoTypes when the class represents a
10350 fundamental type (System.Int32, ...).
10351 The TypeHandle return by ldtoken is a MonoType*.
10352 * icall.c: ves_icall_get_data_chunk () write out all the
10353 PE/COFF stuff. Implement ves_icall_define_method (),
10354 ves_icall_set_method_body (), ves_icall_type_from_handle ().
10355 * image.c: properly skip unknown streams.
10356 * loader.h, loader.c: add type_class to mono_defaults.
10357 * metadata.c, metadata.h: export compute_size () as
10358 mono_metadata_compute_size () with a better interface.
10359 Typo and C&P fixes.
10360 * pedump.c: don't try to print the entry point RVA if there is no entry point.
10361 * reflection.c, reflection.h: many cleanups, fixes, output method
10362 signatures and headers, typedef and typeref info, compress the metadata
10363 tables, output all the heap streams, cli header etc.
10364 * row-indexes.h: typo fixes.
10366 2001-10-04 Dick Porter <dick@ximian.com>
10368 * object.h: Add a synchronisation mutex struct to MonoObject
10370 * object.c (mono_new_object): Initialise the object
10371 synchronisation mutexes
10373 * icall.c: System.Threading.Monitor internal calls
10375 * threads-pthread.h:
10376 * threads-pthread.c: System.Threading.Monitor internal calls
10378 * threads-types.h: New file, includes the system-specific thread
10381 * threads-pthread-types.h:
10382 * threads-pthread-types.c: New files, handle pthread-specific
10383 synchronisation types
10385 * threads-dummy-types.h:
10386 * threads-dummy-types.c: New files of dummy support for
10387 thread-specific types
10391 * pedump.c: include mono-endian.h not endian.h
10393 * Makefile.am: More threads files.
10394 Name mono-endian.h not endian.h
10396 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
10398 * Makefile.am, reflection.h, reflection.c: move here the reflection related
10399 stuff and implement a few more bits.
10400 * icall.c: a field needs to be dereferenced twice. Do not use the same
10401 name for two variables in the same scope.
10402 * image.c, image.h: cleanups.
10404 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
10406 * class.c (mono_class_metadata_init): bug fix: compute the right size
10408 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
10410 * icall.c: implemented some of the Reflection internalcalls.
10411 * image.c, image.h: start writing out the PE/COFF image.
10412 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
10413 that does the reverse than decode_blob_size ().
10414 * object.c: use mono_metadata_encode_value (). Move here
10415 temporary implementation of mono_string_to_utf8 ().
10416 * rawbuffer.c: make malloc_map static.
10418 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
10420 * metadata.c: fix type comparison for arrays.
10421 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
10422 Added a couple of new classes to monodefaults.
10423 * icall.c: added a couple of Reflection-related internalcalls.
10424 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
10425 Added a byval_arg MonoType to MonoClass.
10427 2001-09-28 Dick Porter <dick@ximian.com>
10430 * threads-pthread.h:
10431 * threads-pthread.c: Implemented internal calls for
10432 LocalDataStoreSlot operations. Applied mutexes around all shared
10433 data. Reworked the thread creation and Start() operations to
10434 avoid a race condition.
10437 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
10439 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
10441 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
10443 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
10445 * class.c, loader.c: warn and return NULL instead of erroring out.
10446 * icall.c: added System.AppDomain::getCurDomain().
10447 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
10449 2001-09-25 Dick Porter <dick@ximian.com>
10451 * threads-pthread.h:
10452 * threads-pthread.c: Implemented timed thread joining and added
10453 System.Threading.Thread::Join_internal internal call
10455 * icall.c: Added System.Threading.Thread::Join_internal internal call
10458 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
10460 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
10462 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
10463 mono_string_intern () to implement the semantics of the ldstr opcode
10464 and the interning of System.Strings.
10465 * icall.c: provide hooks to make String::IsIntern and String::Intern
10468 2001-09-23 Dick Porter <dick@ximian.com>
10471 * threads-dummy.h: New files of dummy threading routines
10473 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
10474 support code based on system specifics
10476 Rename PTHREAD_LIBS to THREAD_LIBS
10478 2001-09-23 Dick Porter <dick@ximian.com>
10480 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
10481 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
10483 (mono_thread_init): Set up a Thread object instance to return when
10484 the main thread calls Thread.CurrentThread
10485 (mono_thread_cleanup): Wait for all subthreads to exit
10487 * icall.c: New internal calls for System.Threading.Thread::Sleep
10488 (including Schedule) and CurrentThread
10490 * threads.h: New file, to insulate thread-specific stuff from the
10493 2001-09-21 Dick Porter <dick@ximian.com>
10495 * threads-pthread.h:
10496 * threads-pthread.c: New file, for handling pthreads-style
10497 threading support. Start() now starts a new thread and executes
10498 the ThreadStart delegate instance.
10500 * icall.c: Added the internalcall for
10501 System.Threading.Thread::Start_internal
10503 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
10505 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
10507 * loader.c: work around the different signatures for delegates
10508 constructors csc generates in compiled code vs the ones compiled in mscorlib.
10510 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
10512 * class.h, class.c: add mono_class_get_field_from_name ().
10513 * *: Fix C comments and other ANSI C issues.
10515 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
10517 * endian.h, assembly.c: fix some endianness issues.
10519 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
10521 * loader.h, load.c: add delegate_class to mono_defaults.
10522 Handle runtime provided methods in mono_get_method ().
10524 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
10526 * loader.c (mono_get_method): use pinvoke for internal call
10528 * icall.c: use pinvoke for internal call
10530 * loader.c (method_from_memberref): set the method name
10532 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
10534 * metadata.c: help the compiler generate better code for
10535 mono_class_from_mono_type ().
10537 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
10539 * class.c (mono_class_metadata_init): delayed computing of the
10540 class size to mono_class_metadata_init ()
10542 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
10544 * class.c, class.h: add an interfaces member to MonoClass.
10545 * image.c, image.h: add assembly_name field to MonoImage
10546 from the assembly table.
10547 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
10549 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
10551 * class.c: Handle Array in mono_class_from_mono_type ().
10552 * metadata.c, pedump.c: some endian fixes.
10554 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
10556 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
10557 * metadata.c: fix small problem introduced with the latest commit.
10559 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
10561 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
10562 We don't need a MonoMetadata pointer anymore to compare signatures in
10563 mono_metadata_signature_equal (), update callers.
10564 Reduced memory usage an number of allocations for MonoMethodHeader and
10565 MonoMethodSignature.
10567 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
10569 * metadata.c: added compare for szarray.
10571 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
10573 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
10574 and add a couple more types to it and mono_defaults. Give an hint on
10575 classes that need implementing in our corlib and are referenced
10578 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
10580 * class.h, class.c: keep track if a class is also an Enum.
10581 * loader.c: Implement a couple more types for use in libffi
10582 marshalling. Gives better diagnostics when failing to dlopen
10583 a library. Set method->klass for P/Invoke methods, too.
10585 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
10587 * class.c, class.h: add a MonoType this_arg to MonoClass that
10588 represents a pointer to an object of the class' type that
10589 can be used by the interpreter and later the type cache.
10590 Add best guess alignment info for valuetype objects.
10592 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
10594 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
10595 into MonoType: one less level of indirection and allocation and
10596 simplifies quite a bit of code. Added cache for MonoTypes that are
10597 used frequently, so that we don't need to allocate them all the time.
10599 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
10601 * class.c (mono_class_create_from_typedef): System.Enum is also a
10602 value type, although it does not derive from System.ValueType
10603 (maybe a bug in the ms compiler?)
10605 * metadata.c (mono_type_size): return the right size for value types
10607 * loader.c (mono_get_method): only initialize method header if not abstract
10609 * class.c (mono_class_from_mono_type): use mono_default values.
10611 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
10613 * *: use MonoClass pointers instead of <type_tokens>
10615 * class.h: new flag: metadata_inited.
10617 * class.c (mono_class_metadata_init): impl.
10618 (mono_class_instance_size): impl.
10619 (mono_class_data_size): impl.
10621 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
10623 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
10624 MonoClass now has the name and name_space fields.
10625 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
10626 mono_get_method () takes and optional MonoClass as argument.
10627 Removed mono_typedef_from_name() and added mono_class_token_from_name()
10628 instead that takes advantage of a map from class names to typedef
10629 tokens in MonoImage.
10631 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
10633 * metadata.c: zero is not a valid alignment boundary.
10634 Merge MONO_TYPE_VOID in default decoding code.
10636 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
10638 * image.h: merged MonoMetadata into MonoImage
10640 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
10641 identify the type of elements.
10643 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
10645 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
10646 * cil-coff.h: split MonoMSDOSHeader and add size info.
10647 * image.c: add some consistency checks.
10648 * metadata.c: fix row size computation: one programmer
10649 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
10650 add explanation for the locator routine.
10651 Fix decoding of size in method header.
10653 2001-08-20 Miguel de Icaza <miguel@ximian.com>
10655 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
10656 (g_concat_dir_and_file): Bring g_concat_dir_and_file
10657 function from gnome-libs. This uses the right path separator
10658 based on the OS, and also works around a bug in some systems where
10659 a double slash is not allowed.
10660 (default_assembly_name_resolver): Use g_concat_dir_and_file
10661 (mono_assembly_open): ditto.
10663 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
10665 * metadata.c (mono_metadata_signature_equal): impl.
10667 * *: void is now a realy MonoType (instead of using NULL)
10669 * metadata.c (do_mono_metadata_parse_type): use
10670 mono_metadata_parse_type to parse void value.
10672 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
10674 * metadata.c, metadata.h: in the signature and method header store
10675 only the space required for holding the loca vars and incoming arguments.
10677 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
10679 * metadata.c (do_mono_metadata_parse_type): treat void like any
10680 other type (instead of assigning NULL);
10682 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
10684 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
10686 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
10688 * image.c (do_mono_image_open): added a cache for arrays.
10690 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
10692 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
10693 decode a single column from a row in a metadata table and changes
10694 to take advantage of it in the typedef locator (gives a nice speed up).
10695 Store offset info for function params.
10697 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
10699 * image.h (MONO_IMAGE_IS_CORLIB): removed
10701 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
10703 * assembly.c: how could mono_assembly_close () had ever worked?
10704 * metadata.c, metadata.h: provide offset info for local vars.
10705 Implement mono_type_size () to take care of alignment as well
10706 as size (it was mono_field_type_size in cli/class.c before).
10708 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
10710 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
10712 * assembly.h (CORLIB_NAME): set to corlib.dll
10714 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
10716 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
10718 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
10719 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
10720 tokentype.h: massive namespace cleanup.
10722 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
10724 * metadata.h, metadata.c: decode exception clauses when parsing method header.
10726 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
10728 * metadata.c (mono_metadata_free_type): added check for type !=
10729 NULL (void) before calling mono_metadata_free_type()
10731 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
10733 * metadata.h, row_indexes.h: added header with enumerations to use
10734 to index in the columns from tables in metadata and to decode coded
10735 tokens: we should start using this instead of embedding magic numbers
10738 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
10740 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
10741 Move metadata_t info from cli_image_info_t to MonoImage, where
10742 it's easily accessible. Changed all the uses accordingly.
10743 Added the method and class caches to MonoImage.
10744 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
10745 and mono_metadata_decode_value () signature to be more consistent
10746 with the other parse functions (and simplify code). Taken advantage
10747 of zero-length array allocation with GCC. Removed reduntant (and
10748 wrong) MonoFieldType struct and use MonoParam instead. Changed
10749 mono_metadata_parse_field_type () to use common code for parsing.
10750 Added mono_metadata_typedef_from_field () and
10751 mono_metadata_typedef_from_method () to lookup a typedef index from a
10752 field or method token.
10753 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
10755 2001-07-23 Miguel de Icaza <miguel@ximian.com>
10757 * metadata.c (mono_metadata_parse_field_type): Implement.
10758 (do_mono_metadata_parse_type): Split engine from
10759 mono_metadata_parse_type, so that we can create smaller structures
10760 for things that just have one pointer to the MonoType (look at
10763 2001-07-20 Miguel de Icaza <miguel@ximian.com>
10765 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
10766 as Jan Gray found out, it is incorrect.
10768 2001-07-18 Miguel de Icaza <miguel@ximian.com>
10770 * assembly.c: Implement asssembly loading. This loads an image
10771 and loads all the referenced assemblies. Come to think of it, we
10772 could always do lazy loading of the assemblies.
10774 * image.c (mono_image_open): Keep loaded images in a hashtable.
10776 * image.h (MonoImage): Add reference count.
10778 2001-07-17 Miguel de Icaza <miguel@ximian.com>
10780 * assembly.c (mono_assembly_open): Keep track of the file name in
10781 case the assembly has no ASSEMBLY table.
10783 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
10786 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
10788 * metadata.c, metadata.h: decode local vars in method header
10789 parse function. Change callers accordingly.
10791 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
10793 * metadata.h, cil-coff.h: protect against multiple inclusion.
10794 Added some new structures to hold information decoded from metadata:
10795 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
10796 and relevant decoding/free functions.
10797 * metadata.c: implement decoding functions. Add warning for out of bounds
10798 index in mono_metadata_locate(). Implement mono_get_method () to retreive
10799 all the info about a method signature and invocation. Remove check on
10800 uninitialized local var in parse_mh() and fix memory leak.
10802 2001-07-12 Miguel de Icaza <miguel@ximian.com>
10804 * metadata.h: More macros.
10806 * tokentype.h: New file.
10808 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
10810 * assembly.c: added a consistency check and initialize
10811 some structures with g_new0().
10812 * metadata.c: fixed a couple more bugs in table size computation
10813 and add other checks for out-of bound access to metadata.
10815 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
10817 * metatada.c: fix bugs computing table sizes. Spew a
10818 warning when index in string heap is out of bounds.
10820 2001-07-04 Miguel de Icaza <miguel@ximian.com>
10822 * metadata.h: Add a couple of macros to manipulate tokens.
10824 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
10826 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
10827 cli_section_tables).
10829 2001-07-01 Miguel de Icaza <miguel@ximian.com>
10831 * metadata.c (mono_metadata_user_string): New function, provides
10832 access to the UserString heap.
10834 2001-06-27 Miguel de Icaza <miguel@ximian.com>
10836 * metadata.c: Add inline documentation.
10838 2001-06-26 Miguel de Icaza <miguel@ximian.com>
10840 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
10843 2001-06-22 Miguel de Icaza <miguel@ximian.com>
10845 * typeattr.h: New file, TypeAttribute flags.
10847 2001-06-21 Miguel de Icaza <miguel@ximian.com>
10849 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
10850 mono_assembly_ensure_section): Section loading code.
10851 (load_section_tables): Load the sections.
10853 * mono/metadata/metadata.c (mono_metadata_locate_token,
10854 mono_metadata_locate): Functions to locate the information
10855 definition given a token or a table and an index.
10856 (mono_metadata_compute_table_bases): New.
10857 (compute_size): New function to compute the sizes of the various
10860 * mono/metadata/metadata.h: Finish listing the different index
10863 * mono/metadata/pedump.c: Improve to dump new information.
10865 2001-06-19 Miguel de Icaza <miguel@ximian.com>
10867 * mono/metadata/metadata.c: Entered all the tables matching
10870 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2