2003-02-27 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / ChangeLog
1 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
2
3         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
4         change.
5         
6 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7
8         * Makefile.am: make assemblies dir have \ instead of / on windows.
9
10 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
11
12         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
13         iterate over the NESTEDCLASS table using a linear search since the
14         table is not guaranteed to be sorted by the secondary key.
15
16         * class.c (mono_class_create_from_typedef): fixed up call to
17         mono_metadata_nesting_typedef.
18         
19 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
20
21         * marshal.c (mono_string_to_byvalstr): clear the memory as
22         suggested by Jerome Laban <jlaban@wanadoo.fr>
23
24 2003-02-26  Dick Porter  <dick@ximian.com>
25
26         * process.c: Cope with padding in .rsrc blocks
27
28 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
29
30         * metadata.h: reverted the filter_len change, it breaks reflection
31         
32 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
33
34         * metadata.h: added a new field to store the filter_len
35         
36
37 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
38
39         * reflection.c: handle custom attributes for types and members
40         created with Reflection.Emit (bug#38422).
41
42 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
43
44         * reflection.c: define RTSpecialName automatically for constructors for
45         compatibility with MS.NET.
46
47         * reflection.c (mono_reflection_create_runtime_class): initialize
48         nested_in field of dynamically created classes.
49
50 2003-02-22  Martin Baulig  <martin@ximian.com>
51
52         * debug-mono-symfile.h: Incremented version number.
53
54 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
55
56         * object.h icall.c process.c: fix warnings.
57
58 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
59
60         * appdomain.h appdomain.c:
61         (mono_domain_try_type_resolve): split the 
62         name_or_tb argument into a name and a tb argument.
63         (mono_domain_has_type_resolve): new function to check whenever the
64         application has registered a TypeResolve event handler.
65         
66         * icall.c reflection.h reflection.c: move the type resolve logic into
67         mono_reflection_get_type () so it will be invoked when 
68         Assembly::GetType () is called.
69
70         * reflection.c:
71         (mono_reflection_get_type): renamed to get_type_internal.
72         (mono_reflection_get_type): fixed type name generation so it works 
73         for nested types too.
74         (mono_reflection_get_type): call has_type_resolve () to avoid the 
75         costly type name generation if there is no resolve event handler.
76
77 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
78
79         * class.c, image.c: load exported types from file references.
80
81 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
82
83         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables\r
84           used to cache the managed methods used to create proxies and make \r
85           remote invocation of methods.
86         * class.h: Added in MonoVTable a flag to indicate that a class needs \r
87           to be remotely created.\r
88         * object.c: Modified the method mono_class_vtable(). It now initializes \r
89           the remote flag of the vtable. Modified mono_object_new_specific(), \r
90           so now it checks the remote flag.
91         * icall.c: Added a couple of internal methods, one for enabling instance \r
92           creation interception for a type, and one for creating objects bypassing\r
93           the remote check.\r
94
95 2003-02-18  Martin Baulig  <martin@ximian.com>
96
97         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
98         New interncall to get a method's metadata token.
99
100         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
101         New interncall for the debugger.
102
103 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
104
105         * class.c (mono_class_setup_vtable): allocate supertype array
106
107 2003-02-18  Martin Baulig  <martin@ximian.com>
108
109         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
110
111 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
112
113         * reflection.c:
114         (assembly_name_to_aname): jump over unknown properties (i've found
115         something like: 'type, assembly, version=xxx, custom=null, public...',
116         so now will ignore custom=null and still get the rest of the values).
117
118 2003-02-17  Dick Porter  <dick@ximian.com>
119
120         * threads.c: Have Thread.Start() wait for a semaphore to signal
121         that the thread has set up all its local data.  This fixes bug
122         34323, where Abort() raced the new thread's TLS data.
123
124         Also removes the handle_store() call from start_wrapper, because
125         threads are now always created suspended and there is no longer a
126         race between the parent and child threads to store the info.
127
128 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
129
130         * image.c: explain the #- heap issue in a message, hopefully
131         avoiding FAQs on mono-list.
132
133 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
134
135         * icall.c:
136         (GetEntryAssembly): if the domain has not invoked
137         AppDomain.ExecuteAssembly yet, return the assembly of the default
138         AppDomain.
139
140 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
141
142         * class.c (mono_ldtoken): make it work in dynamic assemblies.
143
144 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
145
146         * metadata.c, reflection.c: simple speedup to type hash
147         and equals code.
148
149 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
150
151         * image.c, image.h, class.c, assembly.c: move module loading
152         to MonoImage. When loading metadata, consider alignemnet from
153         the start of metadata, not from the metadata address in memory.
154
155 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
156
157         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
158         AssemblyBuilder objects. Factored out custom attribute creation into
159         a separate function.
160         (create_custom_attr): new function to create custom attributes.
161
162 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
163
164         * Makefile.am: Got tired of typing the full pathname to pedump.
165         Until there is another option, am installing this.
166
167 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
168
169         * class.c (class_compute_field_layout): always set field->parent 
170         (mono_ldtoken): use mono_defaults.fieldhandle_class;
171
172 2003-02-11  Dick Porter  <dick@ximian.com>
173
174         * threads-types.h:
175         * monitor.c: Rewrote Monitor, making lock much faster and
176         Pulse/Wait work as specified.  Also uses much fewer handles, and only
177         creates them as needed.
178
179         * exception.c: Added SynchronizationLockException
180
181         * threads.c: Deleted old Monitor implementation.  The new one is
182         in a new file.
183
184 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
185
186         * class.c: handled TypedReference type code. Set the correct size for
187         class data. Setup interface_offsets for interface classes, too.
188
189 2003-02-09  Martin Baulig  <martin@ximian.com>
190
191         * debug-mono-symfile.h: Reflect latest symbol writer changes.
192
193 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
194
195         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
196         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
197         * object.c: fixed mono_object_get_virtual_method () for interfaces.
198         * verify.c: check for code that runs after the end of the method.
199
200 2003-02-08  Pedro Martínez Juliá  <yoros@wanadoo.es>
201
202         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
203         "System.Math::Round2".
204         * sysmath.h: Added Floor, Round and Round2 definitions.
205         * sysmath.c: Modified certain functions that were not 100% compliant
206         with MS.NET (math precision) and added the implementation of Floor,
207         Round and Round2.
208
209 2003-02-07  Martin Baulig  <martin@ximian.com>
210
211         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
212
213 2003-02-07  Martin Baulig  <martin@ximian.com>
214
215         * debug-mono-symfile.c: Reflected latest symwriter changes.
216         (mono_debug_create_mono_symbol_file): Removed.
217         (mono_debug_open_mono_symbol_file): Take an argument which
218         specifies whether to create a dynamic symbol file.
219
220 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
221
222         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
223
224 2003-02-05  Martin Baulig  <martin@ximian.com>
225
226         * reflection.c (mono_image_build_metadata): Make this public,
227         protect it against being called multiple times, don't create
228         resources and don't build the compressed metadata here.
229         (mono_image_create_pefile): Do this here.
230
231         * icall.c
232         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
233
234 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
235
236         * socket-io.c: fixed bug #36322.
237
238 2003-02-06  Piers Haken <piersh@friskit.com>
239
240         * appdomain.[ch]:
241         * class.h:
242         * debug-mono-symfile.c:
243         * icall.c:
244         * loader.c:
245         * mono-config.c:
246         * monosn.c:
247         * reflection.c:
248         * socket-io.c: warning cleanups
249
250 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
251
252         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
253         function. works like remoting invoke, but does a check for the Proxy first.
254
255 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
256
257         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
258
259 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
260
261         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
262         array of pointers.
263         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
264         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
265
266         * object.c (mono_store_remote_field_new): used by the new jit
267         instead of mono_store_remote_field
268         (mono_load_remote_field_new): used by the new jit
269         instead of mono_load_remote_field
270
271 2003-02-05  Patrik Torstensson
272
273         * appdomain.c: changed unload to take the domain id instead
274         of domain
275         
276         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
277
278
279 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
280
281         * appdomain.c: don't look for assemblies in ApplicationBase if
282         PrivateBinPathProbe is set.
283
284 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
285
286         * object.c: make the first argument in main_args contain the absolute
287         path to the assembly. Fixes bug #37511.
288
289 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
290
291         * icall.c: get correct UTC offset for countries not using daylight
292         time saving. Fixes bug #30030.
293
294 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
295
296         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
297         and 1 are the family).
298
299 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
300
301         * icall.c (ves_icall_InternalExecute): removed wrong assertion
302
303         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
304
305 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
306
307         * reflection.c: added support for SignatureHelper tokens, which is
308         needed by the Calli opcode.
309
310         * reflection.h: track changes to SignatureHelper class.
311
312         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
313
314 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
315
316         * appdomain.c: fixed loading assemblies from PrivateBinPath.
317
318 2003-02-03  Patrik Torstensson
319         * appdomain.[c|h], domain.c : 
320          - Added support for getting a domain via domain id
321          - Support for setting and getting domain from System.AppDomain 
322            (used in cross appdomain channel)
323          - Added support for get/set for a MonoAppContext on a thread 
324            (Context class in System.Runtime.Remoting.Contexts),
325          - Removed hack in Get/SetData and ExecuteAssembly.
326         
327         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
328         the managed world to get control when a proxy is created.
329 \r
330         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
331         
332 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
333
334         * icall.c
335         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
336         Populate the codebase field as well.
337
338 2003-02-02  Martin Baulig  <martin@ximian.com>
339
340         * debug-mono-symfile.c
341         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
342         (mono_debug_symfile_add_method): Allow interncalls.
343
344 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
345
346         * icall.c: throw parse exception if strtod fails or the string is empty.
347
348 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
349
350         * marshal.c: handle object type separately from defined
351         class types.
352
353 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
354
355         * marshal.c: handle NATIVE_LPSTR for strings when it's
356         explicitly specified.
357
358 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
359
360         * reflection.c, reflection.h, icall.c: setup the reflection
361         handle cache for ModuleBuilders and AssemblyBuilders.
362
363 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
364
365         * reflection.c (reflection_methodbuilder_to_mono_method): set
366         pinvoke flag
367
368 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
369
370         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
371
372 2003-01-29  Dick Porter  <dick@ximian.com>
373
374         * threads.c: No need for the fake_thread kludge now that Thread
375         doesn't run a class constructor
376         
377 2003-01-29  Dick Porter  <dick@ximian.com>
378
379         * threads.c: Use g_direct_hash instead of the rather bogus
380         g_int_hash
381
382 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
383
384         * marshal.c (mono_marshal_get_native_wrapper): add check for null
385         (fix pinvoke12.exe)
386         (mono_marshal_get_struct_to_ptr): generate valid IL code
387         (mono_marshal_get_ptr_to_struct): generate valid IL code
388         (*): correctly set sig->pinvoke, we need to memdup the signature
389         to do that
390
391 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
392
393         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
394         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
395
396 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
397
398         * profiler.c: provide more callers information.
399
400 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
401
402         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
403
404         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
405
406         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
407
408 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
409
410         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
411         exception instead of going into an infinite loop on dates which it 
412         can't yet handle.
413
414         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
415         out-of-range exception if needed.
416
417         * class.c (mono_class_setup_vtable): allow a virtual method to provide
418         an implementation for an interface method and to override an inherited
419         method at the same time. 
420         Imagine a scenario when a virtual method is used to override a
421         virtual abstract method in a parent class, and this same method 
422         provides an implementation for an method inherited from an interface. 
423         In this case, the interface resolution code will set im->slot, which 
424         means that the virtual method override pass will skip this method 
425         which means a pointer to the abstract method inherited from the parent
426         will remain in the vtable of this non-abstract class.
427
428         * class.c: (mono_class_setup_vtable): continue search for a real 
429         method if only an abstract method is found.     
430
431 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
432
433         * reflection.c: add size to encoding for ByValStr and ByValArray
434         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
435
436 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
437
438         * class.c (mono_class_setup_vtable): pass the override info as an
439         argument.
440
441         * class.c (mono_class_setup_vtable): set the slot of overriding methods
442         correctly.
443         
444         * reflection.c (ensure_runtime_vtable); add support for method 
445         overrides.
446         
447 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
448
449         * reflection.c (resolution_scope_from_image): Hack to work to work with
450         dynamic assemblies.
451
452         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
453         added a 'force_ref' argument to force this function to allways return 
454         a TypeRef. This is needed by mono_image_get_memberref_token ().
455         
456 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
457
458         * reflection.c (mono_image_get_type_info): interfaces really don't have
459         a parent.
460
461         * reflection.c (mono_image_basic_init): fill out missing fields of
462         image structure.
463
464         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
465         dynamic assemblies. This is required so dynamic assemblies show up in
466         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
467         Type::GetType() etc. This is consistent with MS behaviour.
468
469         * image.c image.h reflection.c: add newly created classes to the name 
470         cache so mono_class_get () will find them.      
471
472 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
473
474         First part of changes to get IKVM.NET running under mono.
475         
476         * appdomain.h, appdomain.c: added new function 
477         mono_domain_try_type_resolve() which will emit TypeResolve events. 
478         This function will call AppDomain::DoTypeResolve to do the actual work.
479
480         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
481         moved existing code dealing with dynamic tokens to a new function 
482         called mono_reflection_lookup_dynamic_token (). This function will 
483         raise TypeResolve events when appropriate. Since reflection.c is not 
484         part of libmetadata, a new hook function called 
485         mono_lookup_dynamic_token() is added to class.c which will call this.
486
487         * assembly.h assembly.c: make the invoke_load_hook function public,
488         so it can be called for dynamic assemblies.
489
490         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
491
492         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
493         type isn't found.
494
495         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
496         MonoGHashTable, since it contains pointers to objects which the GC 
497         needs to track.
498
499         * assembly.c (search_loaded): remove unused variable.
500         
501 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
502
503         * object.c: fixed issue exposed by gcc-generated IL programs
504         that use RVA data for pointers.
505
506 2003-01-25  Martin Baulig  <martin@ximian.com>
507
508         * threads.c (start_wrapper): Moved the initialization of
509         `start_func' above the mono_new_thread_init() call to which we
510         pass it as argument.
511
512 2003-01-24  Martin Baulig  <martin@ximian.com>
513
514         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
515         the MonoThread pointer.
516
517 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
518
519         * icall.c: Rename `PowImpl' to Pow.
520
521 2003-01-23  Dick Porter  <dick@ximian.com>
522
523         * threads.c (start_wrapper): Create a Thread object if needed, so
524         the Main() thread can do the class initialisation in a subthread
525         that has been set up to allow managed code execution.
526
527         Pass the thread ID instead of the MonoThread pointer to the thread
528         start and attach callbacks.  This change is required, because the
529         jit thread start callback must be called _before_ the Thread
530         object can be created.
531         
532         (mono_thread_init): Removed much object creation code that is no
533         longer needed.  No managed code is called from here now.
534
535         * object.c (mono_runtime_exec_managed_code): Create a subthread
536         for Main, and call back to the runtime to use it.
537         Set the exit code when Main exits.
538
539         * gc.c: Make sure domain finalisation happens in a subthread.
540         Re-enable threaded GC, fixing bug 31333 (again).
541
542         * environment.c: System.Environment internall calls (so far just
543         ExitCode is here, the others are still in icall.c)
544
545         * appdomain.c (mono_runtime_cleanup): All threads running managed
546         code should have finished before mono_runtime_cleanup() is
547         reached, so no need to clean up threads.
548
549 2003-01-22  Martin Baulig  <martin@ximian.com>
550
551         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
552         `gpointer func' arguments.      
553         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
554         but added `MonoThread *thread' argument.
555         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
556
557         * threads.c (mono_new_thread_init): Added `gpointer func' argument
558         and pass it to the mono_thread_start_cb callback.
559         (mono_install_thread_callbacks): New public function to install a
560         set of callbacks which are set by the debugger.
561         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
562
563 2003-01-22  Martin Baulig  <martin@ximian.com>
564
565         * Makefile.am: Install debug-mono-symfile.h.
566
567 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
568
569         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
570
571 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
572
573         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
574         * class.c (mono_ptr_class_get): correctly set access levels of pointers
575         (mono_array_class_get): correctly set access levels of arrays
576
577 2003-01-20      Patrik Torstensson
578         * image.h (MonoAssemblyName): changed major, minor, build, revision
579         from signed to unsigned.
580
581 2003-01-20  sean kasun <skasun@azstarnet.com>
582
583         * reflection.c (load_cattr_value): Now this handles
584         MONO_TYPE_SZARRAY.  Fixes bug #35629
585
586 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
587
588         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
589         integer value
590
591 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
592
593         * decimal.c: fixed bug #26056.
594
595 2003-01-17  Martin Baulig  <martin@ximian.com>
596
597         * gc.c: Raise an ExecutionEngineException instead of using g_error().
598
599 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
600
601         * exception.[ch]:
602         (mono_get_exception_type_initialization): new function.
603
604         * object.c: throw a TypeInitializationException when an exception is
605         thrown invoking the class constructor.
606
607 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
608
609         * reflection.c: fixed attribute reading.
610
611 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
612
613         * icall.c:
614         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
615         provided, look for the type in the calling assembly and then in
616         mscorlib; if the assembly name is provided, only try that one.
617
618 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
619
620         * object.c: register the vtable before there is a chance it's
621         queried again recursively.
622
623 2003-01-13  Duncan Mak  <duncan@ximian.com>
624
625         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
626         gc-internal.h. 
627         
628 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
629
630         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
631
632 2003-01-11  Martin Baulig  <martin@ximian.com>
633
634         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
635         this to 20 for the release.
636
637 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
638
639         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
640
641         * loader.c (mono_method_get_marshal_info): bug fix
642
643         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
644         structures with explicit layout
645
646 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
647
648         * profiler.c: made the output more readable (and sorted). 
649         Added caller information for the allocation profiler.
650
651 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
652
653         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
654
655 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
656
657         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
658         to get value types.
659         
660 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
661
662         * object.c, profiler.h, profiler.c, profiler-private.h:
663         Added object allocation profiler.
664
665 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
666
667         * reflection.h, reflection.c: handle global methods.
668         Compress blob entries.
669
670 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
671
672         * marshal.c: fix compilation.
673
674 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
675
676         * loader.c (mono_method_get_marshal_info): impl.
677
678         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
679
680 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
681
682         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
683         for reference types.
684
685 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
686
687         * loader.c: fixed off by one error in loaded parameter names.
688
689 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
690
691         * marshal.c (mono_marshal_get_icall_wrapper): like
692         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
693         instead of a MonoMethod.
694
695 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
696
697         * decimal.c: fixed bug #36537.
698
699 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
700
701         * marshal.c: throw a missing method exception if a
702         P/Invoke method is not found.
703
704 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
705
706         * icall.c: allow a null this for constructors.
707
708 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
709
710         * icall.c: raise the proper exceptions if the arguments to the
711         internal Invoke are incorrect.
712
713 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
714
715         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
716
717 2003-01-03  Martin Baulig  <martin@ximian.com>
718
719         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
720
721 2002-12-31  Martin Baulig  <martin@ximian.com>
722
723         * debug-mono-symfile.c: Completely rewrote the type section.
724         Instead of using individual malloc()ed fields, we use one big
725         continuous memory area and offsets into this area.
726         See the comments in the source code for details.
727
728 2002-12-30  Martin Baulig  <martin@ximian.com>
729
730         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
731
732 2002-12-30  Martin Baulig  <martin@ximian.com>
733
734         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
735         line number table in this data blob instead of using an external
736         pointer.
737
738 2002-12-28  Martin Baulig  <martin@ximian.com>
739
740         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
741
742 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
743
744         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
745         as a boxed return type.
746
747 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
748
749         * appdomain.c
750         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
751         g_build_filename to properly get separators on the filename created.
752
753         * object.h: Small change, introduce MonoMarshalByRefObject to
754         track the layout of that structure in the C# universe as we make
755         changes there.
756
757 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
758
759         * object.c: removed assert to allow static fields on interfaces.
760         * loader.c: a TypeSpec may be used for any type, not just arrays.
761
762 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
763
764         * class.c, class.h: added mono_class_array_element_size ().
765         Ignore static methods in interfaces.
766
767 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
768
769         * threads.c: fixed the build under cygwin.
770
771 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
772
773         * reflection.c: handle nullref constants. Allocate keys for
774         reflection handles with the GC.
775
776 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
777
778         * threads.c, threads.h: added mono_thread_get_abort_signal()
779         to get a suitable signal for thread abort.
780
781 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
782
783         * metadata.c: fix handling of ExportedType table.
784
785 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
786
787         * icall.c: added WriteWindowsDebugString internal call.
788
789 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
790
791         * reflection.h: added fields to match C# implementation.
792
793 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
794
795         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
796
797 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
798
799         * gc.h, gc-internal.h: Rename header for GC internal calls to
800         gc-internal.h from gc.h as to not clash with Boehm GC having its
801         header installed as <gc.h> in outside include paths.
802         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
803         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
804
805 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
806
807         * icall.c: assign minor, build and revision in FillName.
808
809 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
810
811         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
812         Added support for running code generated by Reflection.Emit.
813
814 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
815
816         * appdomain.c: check for NULL argument in LoadFrom.
817
818 2002-12-10  Dick Porter  <dick@ximian.com>
819
820         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
821
822 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
823
824         * appdomain.c: fix buglet when building exe file name.  Handle full
825         assembly name (needed after latest changes to AssemblyName).
826         * image.c:
827         (mono_image_close): free some hashtables.
828
829 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
830
831         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
832         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
833         on some systems (redhat 7.3) 
834
835 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
836
837         * threads.c: delete the critical section of a sync block,
838         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
839
840 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
841
842         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
843
844 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
845
846         * appdomain.[ch]: handle the assembly preload event to try loading the
847         assemblies using the paths we have in the current domain.
848
849         * assembly.[ch]: created an assembly preload hook that is called to try
850         loading the assembly by other means that the ones provided here.
851
852         * domain.c: initialize the domain search path.
853
854         From now on, assemblies (TODO: except corlib and System) are loaded
855         according to these rules when using mono_assembly_load ():
856
857                 1. It tries to load the assembly from the ApplicationBase
858                 of the current domain appending .dll and .exe (TODO: have to
859                 try loading from name/name.dll and name/name.exe).
860
861                 2. It tries the search path specified in PrivateBinPath for the
862                 current domain (if any).
863
864                 3. Previous behavior.
865
866 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
867
868         * icall.c: implemented GetInterfaceMap() related icall.
869         * domain.c, loader.h: load MethodInfo in mono_defaults.
870
871 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
872
873         * gc.c: disable the finalizer thread for now, untill all the issues
874         with it are resolved.
875
876 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
877
878         * string-icalls.c: handle embedded nulls in string ctor when the
879         length is specified.
880
881 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
882
883         * class.c: look for explicit interface implementation in parent
884         classes, too.
885
886 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
887
888         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
889
890 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
891
892         * gc.c: protect handles with a critical section.
893
894 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
895
896         * icall.c:
897         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
898         parameters. If no assembly specified, try getting the type from all
899         the assemblies in the current domain, else, load the assembly and get
900         the type from it.
901
902 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
903
904         * marshal.c: applied patch from Aleksey Demakov that fixes
905         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
906
907 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
908
909         * icall.c: fixed get_location.
910
911 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
912
913         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
914         declarations to make it work with older gcc. 
915
916         * loader.c (mono_get_method): set signature->pinvoke for native calls
917
918 2002-11-20  Dick Porter  <dick@ximian.com>
919
920         * threads.c (mono_thread_init): Set the main thread's handle
921
922 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
923
924         * gc.c: allow compilation without GC support. Changed to match the
925         mono coding style.
926
927 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
928
929         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
930
931 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
932
933         * reflection.c: set a public key token on the core assemblies.
934
935 2002-11-18  Dick Porter  <dick@ximian.com>
936
937         * threads.c: Split out some thread initialisation so that other
938         files can set the start callback function.
939
940         * gc.c: Run finalisers in a separate thread, to avoid stack
941         overflow.  Fixes bug 31333.
942
943         * appdomain.c: Set up GC finalisation thread.
944
945         * reflection.c: 
946         * object.c: 
947         * domain.c: Use gc.h macros for GC_malloc
948         
949 2002-11-15  Dick Porter  <dick@ximian.com>
950
951         * threadpool.c: 
952         * threads.c:
953         * appdomain.c: Removed mono_runtime_init_with_attach(),
954         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
955         merging the extra parameter with the existing function.  Removed
956         unneeded code in mono_thread_attach().
957
958 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
959
960         * image.c (mono_image_loaded_by_guid): a method to get loaded
961         images by guid. 
962         (load_metadata_ptrs): we store the guid as string.
963
964 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
965
966         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
967
968         * metadata.c (mono_guid_to_string): imported method form Zoltan
969         Varga (slightly modified)
970
971         * assembly.c (mono_assembly_open): load precompiled code
972
973         * loader.h (MonoMethod): we store the method token for use in the
974         aot compiler. 
975
976 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
977
978         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
979         the hook function called when an assembly is loaded.
980         
981         * domain.c: Modified file.
982         (mono_domain_assembly_load): removed hash table insertion of assemblies.
983
984         Fixes bug #33196.
985
986 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
987
988         * reflection.c: Map PEFileKind to the value expected by the WinNT
989         image loader. 
990
991 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
992
993         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
994         Read until the buffer is filled completely.
995
996 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
997
998         * icall.c: implemented MonoType.InternalGetEvent ().
999
1000 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1001
1002         * appdomain.c: implemented InitAppDomainSetup. Delayed
1003         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
1004         the entry_assembly.
1005
1006         * assembly.c: base_dir is now an absolute path ending with
1007         G_DIR_SEPARATOR.
1008
1009         * icall.c: modified get_location according to the above changes.
1010
1011         * object.c: init AppDomain.SetupInformation for the default domain after
1012         we have the entry assembly.
1013
1014         * domain.c: when unloading a domain, setup = NULL.
1015
1016 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
1017
1018         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
1019
1020 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
1021
1022         * object.h, object.c: introduced mono_object_get_virtual_method ()
1023         to lookup the method invoked on an object when a callvirt is done on
1024         a method.
1025         * icall.c: make MethodInfo::Invoke() always do a virtual call.
1026
1027 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1028
1029         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
1030         current domain when loaded an assembly and failed to load it.
1031
1032         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
1033
1034 2002-10-31  Dick Porter  <dick@ximian.com>
1035
1036         * icall.c: 
1037         * file-io.h: 
1038         * file-io.c: Return the error status in a parameter, as the
1039         GetLastError() value has long since been blown away if we try and
1040         look it up in a subsequent internal call invocation.  Delete the
1041         GetLastError() internal call, because it's useless.
1042
1043 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
1044
1045         * class.[ch]: added cast_class to fix bug 29517
1046
1047 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
1048
1049         * marshal.c: create valid IL code in the filter clause:
1050         the new JIT is less forgiving:-)
1051
1052 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1053
1054         * icall.c: removed get_property internal call.
1055
1056 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
1057
1058         * appdomain.h domain.c: Added an ID to appdomains.
1059         
1060         * threads.c threads.h icall.c: Implement icall
1061         Thread:GetDomainID(), and remove unused icall 
1062         CurrentThreadDomain_internal.
1063
1064 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1065
1066         * icall.c: Don't recurse through the base types in GetConstructor.
1067         Fixes bug #32063. 
1068
1069 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
1070
1071         * mempool.h, mempool.c: added mono_mempool_empty() and
1072         mono_mempool_stats().
1073
1074 2002-10-23  Dick Porter  <dick@ximian.com>
1075
1076         * file-io.c: 
1077         * file-io.h: 
1078         * icall.c: Added MonoIO.GetFileType internal call
1079
1080 2002-10-17  Dick Porter  <dick@ximian.com>
1081
1082         * appdomain.c (mono_runtime_cleanup): Don't signal the async
1083         delegate semaphore before waiting for all threads to finish,
1084         because new threads can also call async delegates.  Fixes bug
1085         32004.
1086
1087         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
1088         of 3 seconds, in case another async job is queued.  (This part is
1089         needed because the bug fix reintroduced the 3s exit lag.)  This
1090         makes the mono_runtime_shutdown flag superfluous.
1091
1092 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
1093
1094         * reflection.c: include ehader size in method section headers.
1095         Really check for suplicated modules entries.
1096
1097 2002-10-17  Martin Baulig  <martin@gnome.org>
1098
1099         * debug-mono-symfile.c: Added back support for locals.
1100
1101 2002-10-14  Martin Baulig  <martin@gnome.org>
1102
1103         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
1104         MONO_TYPE_VOID.
1105
1106 2002-10-14  Martin Baulig  <martin@gnome.org>
1107
1108         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
1109         mono_class_get() instead of looking in the class cache. 
1110
1111 2002-10-13  Martin Baulig  <martin@gnome.org>
1112
1113         * debug-mono-symfile.c: Set version number to 28, include the
1114         signature in method names.
1115
1116 2002-10-13  Martin Baulig  <martin@gnome.org>
1117
1118         * debug-mono-symfile.h: Set version number to 27.
1119
1120 2002-10-11  Martin Baulig  <martin@gnome.org>
1121
1122         * gc.c: Don't register/unregister NULL pointers as disappearing links.
1123
1124 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
1125
1126         * metadata.c, metadata.h: added helper function to allocate signatures.
1127
1128 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1129
1130         * icall.c: added internal call to get the location of machine.config.
1131
1132 2002-10-08  Martin Baulig  <martin@gnome.org>
1133
1134         * debug-mono-symfile.c: Ignore classes with a pending init for the
1135         moment.
1136
1137 2002-10-03  Dick Porter  <dick@ximian.com>
1138
1139         * threads.c: Freebsd pthread_t is a pointer
1140
1141 2002-10-03  Dick Porter  <dick@ximian.com>
1142
1143         * socket-io.c: Implemented GetHostName_internal
1144
1145 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1146
1147         * mono-config.c:
1148         (mono_config_parse_file): don't leak the text.
1149
1150 2002-10-02  Martin Baulig  <martin@gnome.org>
1151
1152         * debug-mono-symfile.c: Added support for methods.
1153
1154 2002-10-01  Martin Baulig  <martin@gnome.org>
1155
1156         * debug-mono-symfile.c: Don't emit methods and line numbers for
1157         the dynamic symbol file, just write the type table.  We can easily
1158         have an external helper program which creates a symbol file for an
1159         IL file.        
1160
1161 2002-10-01  Dick Porter  <dick@ximian.com>
1162
1163         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
1164         Only add the handle to the cleanup array when we're about to
1165         launch the thread.  Bug 31425 deadlocked when the test was run on
1166         mono under w32.
1167
1168 2002-10-01  Martin Baulig  <martin@gnome.org>
1169
1170         * debug-mono-symfile.c: Added support for properties.
1171
1172 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
1173
1174         * reflection.c: unaligned store fix from Mark Crichton
1175         <crichton@gimp.org>.
1176
1177 2002-09-27  Martin Baulig  <martin@gnome.org>
1178
1179         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
1180         New interncall.
1181
1182 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
1183
1184         * assembly.h, assembly.c: use a sane API to hook into the assembly
1185         loading process instead of a useless special-purpouse hack
1186         (ngen needs a hook, too, for example).
1187
1188 2002-09-27  Dick Porter  <dick@ximian.com>
1189
1190         * threads.c (mono_thread_init): Call GetCurrentProcess() so
1191         io-layer can set up some process handle info.  Not needed on w32,
1192         but doesn't hurt either.
1193
1194         * process.c: Pass the program name in the second parameter to
1195         CreateProcess, so the path is searched.  Include the working
1196         directory. Implemented process name, process enumeration, and some
1197         process detail internal calls.
1198         
1199         * icall.c: Added internal calls for process lookup, and some
1200         process details
1201
1202 2002-09-26  Martin Baulig  <martin@gnome.org>
1203
1204         * assembly.c (mono_install_open_assembly_hook): New global
1205         function to install a function to be invoked each time a new
1206         assembly is loaded.
1207         (mono_assembly_open): Run this callback function if set.
1208
1209         * debug-mono-symfile.c: Put back line numbers for the dynamic
1210         symbol file and also record the .il file as source file.  This
1211         allows us to install the temporary symbol file as `file.dbg' just
1212         like a compiler-generated one.
1213
1214 2002-09-26  Nick Zigarovich <nick@chemlab.org>
1215
1216         * Corrected typo in gc.c (BOHEM vs BOEHM).
1217
1218 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1219
1220         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
1221         GetProperties. Also avoid calling g_slist_length in GetProperties and
1222         GetMethods.
1223
1224 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
1225
1226         * reflection.c: avoid unaligned stores (bug spotted by
1227         Mark Crichton  <crichton@gimp.org>).
1228
1229 2002-09-25  Martin Baulig  <martin@gnome.org>
1230
1231         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
1232         instead of guint64 for addresses and added prologue/epilogue info.
1233
1234 2002-09-25  Martin Baulig  <martin@gnome.org>
1235
1236         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
1237         store line number info.  For the dynamic symbol file, we only need
1238         to provide the JIT generated dynamic line number info for the dynamic
1239         symbol file.
1240
1241 2002-09-25  Martin Baulig  <martin@gnome.org>
1242
1243         * debug-mono-symfile.h: Incremented version number.
1244
1245 2002-09-24  Martin Baulig  <martin@gnome.org>
1246
1247         * class.c (mono_debugger_class_init_func): New global function
1248         pointer variable.
1249         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
1250         call it.
1251
1252         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
1253         function.  This is called via the mono_debugger_class_init_func
1254         hook to add all types to the dynamic type table.
1255         (ves_icall_MonoDebugger_GetType): New interncall to get a class
1256         from its metadata token.
1257
1258         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
1259         New interncall for the debugger.
1260
1261 2002-09-24  Nick Drochak <ndrochak@gol.com>
1262
1263         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
1264         before using it in case it is null.
1265         
1266 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
1267
1268         * metadata.c: allow custom modifiers in local var signatures
1269         (bug spotted by Zoltan Varga).
1270
1271 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
1272
1273         * class.c: deal with the <Module> class that may have a NULL vtable.
1274         Eliminate warnings.
1275
1276 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
1277
1278         * image.c, image.h: more strong name helpers.
1279         * monosn.c: more work: convert pem keys to cryptoapi format.
1280
1281 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
1282
1283         * string-icalls.c: speedup IndexOf.
1284
1285 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
1286
1287         * icall.c: updates from Zoltan.2.Varga@nokia.com.
1288
1289 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
1290
1291         * icall.c: cleanup: use mono_object_domain ().
1292
1293 2002-09-23  Martin Baulig  <martin@gnome.org>
1294
1295         * debug-mono-symfile.c: Improved type support.
1296
1297 2002-09-22  Martin Baulig  <martin@gnome.org>
1298
1299         * debug-mono-symfile.c: Added support for reference types and strings.
1300
1301 2002-09-22  Martin Baulig  <martin@gnome.org>
1302
1303         * debug-mono-symfile.c: Started to work on the type table.
1304
1305 2002-09-21  Martin Baulig  <martin@gnome.org>
1306
1307         * debug-mono-symfile.c: Largely reworked the symbol table format.
1308         The symbol table is now incrementally updated each time a new
1309         method is added.  We're now also using our own magic and version
1310         so that you don't need to recompile all your classes if the
1311         dynamic table changes.
1312         (mono_debug_update_mono_symbol_file): Removed.
1313         (mono_debug_symfile_add_method): New function to add a method.
1314
1315 2002-09-21  Martin Baulig  <martin@gnome.org>
1316
1317         * icall.c
1318         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
1319         New interncall.
1320
1321         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
1322         New interncall to get a method from its metadata token.
1323
1324 2002-09-21  Martin Baulig  <martin@gnome.org>
1325
1326         * debug-mono-symfile.c: Create type table.
1327
1328 2002-09-20  Martin Baulig  <martin@gnome.org>
1329
1330         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
1331
1332 2002-09-20  Martin Baulig  <martin@gnome.org>
1333
1334         * debug-mono-symfile.c: Provide information about params and locals.
1335
1336 2002-09-20  Martin Baulig  <martin@gnome.org>
1337
1338         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
1339         New interncall.
1340
1341         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
1342         interncall to get a method from its metadata token.
1343
1344 2002-09-20  Martin Baulig  <martin@gnome.org>
1345
1346         * debug-mono-symfile.c: Added a few checks for method->header
1347         being non-NULL.  This should never happen, but for the moment
1348         let's use a g_warning() rather than a g_assert().
1349
1350 2002-09-19  Mark Crichton  <crichton@gimp.org>
1351
1352         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
1353         even if support for it isn't present.  Added an #ifdef to fix this.
1354
1355         * socket-io.c: Added checks back for Solaris support.
1356
1357 2002-09-19  Martin Baulig  <martin@gnome.org>
1358
1359         * debug-mono-symfile.c (read_string, write_string): Reflect latest
1360         changes in the symbol file format.
1361
1362 2002-09-18  Martin Baulig  <martin@gnome.org>
1363
1364         * debug-mono-symfile.c: Set version number to 21.
1365
1366 2002-09-18  Dick Porter  <dick@ximian.com>
1367
1368         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
1369         on netbsd.  Fixes bug 30051.
1370
1371 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1372
1373         * reflection.c:
1374         (set_version_from_string): little fix.
1375
1376 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
1377
1378         * monosn.c, Makefile.am: added strong name utility.
1379         * reflection.h, reflection.c: implemented delayed signing,
1380         locale, version and hash id assembly attributes.
1381
1382 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
1383
1384         * loader.c, metadata.c: load param attributes in signatures.
1385
1386 2002-09-16  Martin Baulig  <martin@gnome.org>
1387
1388         * debug-mono-symfile.c: Added string table with all method names.
1389
1390 2002-09-14  Martin Baulig  <martin@gnome.org>
1391
1392         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
1393         fast method lookup.
1394
1395 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
1396
1397         * reflection.c: record the public key token of referenced assemblies.
1398
1399 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
1400
1401         * image.c, image.h: added functions to get the strong name and the
1402         public key of an assembly.
1403         * pedump.c: use them.
1404
1405 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
1406
1407         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
1408
1409 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
1410
1411         * marshal.c (mono_marshal_get_managed_wrapper): Added
1412         MONO_TYPE_BOOLEAN 
1413
1414 2002-09-11  Martin Baulig  <martin@gnome.org>
1415
1416         * gc.c: Call GC_unregister_disappearing_link() on all links when
1417         finalizing them, this is necessary to aviod a crash in boehm's
1418         finalize handler.
1419
1420 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
1421
1422         * gc.c: handle GetTarget for finalized objects spotted and fixed by
1423         nick@chemlab.org.
1424
1425 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
1426
1427         * icall.c: implemented MonoType::Module.
1428         * reflection.c, reflection.h: mono_module_get_object () from
1429         Tomi Pakarinen <tomi.pakarinen@welho.com>.
1430
1431 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
1432
1433         * icall.c: ignore overridden methods in GetMethods ().
1434         Fix for FieldInfo::SetValue().
1435         * object.c: handle float/double in runtime invoke.
1436
1437 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
1438
1439         * object.c: allow a constructor to be called again on an object.
1440
1441 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
1442
1443         * class.h, class.c: move field layout code to it's own function and
1444         export it. Get an interface id earlier. Move fields in MonoClass
1445         so they are more cache friendly and align the bitfields.
1446         * loader.c: temporary handle get_param_names() for a runtime method.
1447         * reflection.c, reflection.h: more code to handle runtime creation of
1448         types.
1449
1450 2002-09-09  Martin Baulig  <martin@gnome.org>
1451
1452         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
1453         signature with the pinvoke field being set for the actual call.
1454
1455 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
1456
1457         * icall.c: removed some unused icalls. Start of map of glib charsets
1458         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
1459
1460 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
1461
1462         * debug-helpers.c: break infinite loop (found and fixed by
1463         Holger Arnold <harnold@gmx.de>).
1464
1465 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
1466
1467         * icall.c: target may be null in create_delegate.
1468
1469 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
1470
1471         * marshal.c: handle a boolean return type.
1472
1473 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
1474
1475         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
1476
1477 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
1478
1479         * gc.c: fix weakreferences.
1480
1481 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
1482
1483         * icall.c: added icall to get default codepage.
1484
1485 2002-09-03  Dick Porter  <dick@ximian.com>
1486
1487         * threads.h: 
1488         * threads.c: Use MonoThread instead of MonoObject where
1489         apropriate.
1490
1491         Store running thread objects in a hash table, so that we have all
1492         the info to hand when waiting for them to finish
1493         (means we don't need OpenThread() any more, so mingw builds should
1494         be fully functional again.)
1495
1496         * verify.c:
1497         * object.h: Added thread ID to MonoThread
1498
1499 2002-09-03  Martin Baulig  <martin@gnome.org>
1500
1501         * icall.c (System.Reflection.Assembly::get_location): New interncall.
1502
1503 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1504
1505         * icall.c: fixed leak in get_temp_path. Thanks lupus.
1506
1507 2002-09-03  Martin Baulig  <martin@gnome.org>
1508
1509         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
1510         argument to store the end address of the disassembled instruction.
1511
1512         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
1513         here from debug-symfile.h.
1514         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
1515         JIT into this struct.
1516         (MonoSymbolFile): Added `char *image_file' field.
1517         (MonoDebugGetMethodFunc): Removed.
1518         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
1519         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
1520         (mono_debug_find_method): New method.
1521
1522         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
1523         create a full symbol file.
1524         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
1525         and static symbol files.
1526         (mono_debug_find_method): The symbol file keeps an internal method hash,
1527         call this to get a MonoDebugMethodInfo from a MonoMethod.
1528
1529         * debug-symfile.[ch]: Removed.
1530
1531 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
1532
1533         * image.c (do_mono_image_open): Remove linker version check.
1534
1535 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
1536
1537         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
1538         wrappers for instance methods.
1539         
1540 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1541
1542         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
1543
1544 2002-08-28  Dick Porter  <dick@ximian.com>
1545
1546         * Makefile.am: Export HOST_CC for w32 builds
1547
1548 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
1549
1550         * file-io.c process.c: MonoString are null terminated, no
1551         need for mono_string_to_utf16() anymore.
1552
1553 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
1554
1555         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
1556
1557 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
1558
1559         * icall.c, reflection.h: speedup System.MonoType.
1560
1561 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
1562
1563         * reflection.c: allow null as the value of a string argument in
1564         custom attributes constructors.
1565
1566 2002-08-27  Martin Baulig  <martin@gnome.org>
1567
1568         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
1569         `trampoline_address' field.
1570
1571 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
1572
1573         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
1574         check (fixes bug #29486) 
1575
1576 2002-08-27  Martin Baulig  <martin@gnome.org>
1577
1578         * debug-mono-symfile.c: Changed the file format in a way that allows us
1579         open it read-only and to use a specially malloced area for all the
1580         dynamic data.  We can now also generate a symbol file on-the-fly if we're
1581         debugging IL code and there is no MCS generated symbol file for it.
1582
1583 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
1584
1585         * object.c: added a define for a good string and array
1586         creation speedup (not enabled by default because we need to deal with
1587         the synch stuff).
1588
1589 2002-08-26  Martin Baulig  <martin@gnome.org>
1590
1591         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
1592         function to create a dynamic symbol file.  This is used by the
1593         debugger to create a symbol file for IL code on-the-fly.
1594
1595 2002-08-26  Martin Baulig  <martin@gnome.org>
1596
1597         * loader.c (mono_lookup_pinvoke_call): Include the error message
1598         from g_module_error() in the error message.
1599
1600 2002-08-24  Martin Baulig  <martin@gnome.org>
1601
1602         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
1603         function to update the symbol file.  The symbol file is mmap()ed
1604         writable, but private.  This allows us to install the symbol file
1605         together with the assembly.
1606
1607 2002-08-24  Martin Baulig  <martin@gnome.org>
1608
1609         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
1610         but they can read the new symbol file format which mcs is now creating.
1611
1612         * debug-symfile.c (mono_debug_find_source_location): Moved to
1613         debug-mono-symfile.c; this is now operating on the new symbol file.
1614
1615 2002-08-23  Martin Baulig  <martin@gnome.org>
1616
1617         * debug-helpers.c (mono_method_desc_from_method): New function to get
1618         a MonoMethodDesc from a MonoMethod.
1619
1620 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
1621
1622         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
1623         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
1624
1625 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
1626
1627         * string-icalls.[ch]: make helper methods static.
1628
1629 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1630
1631         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
1632         types to it and to SetValueInternal.
1633
1634         * object.c: Moved handle_enum label to its proper place. This was the
1635         f... bug! ;-)
1636
1637         This time i compiled mcs and gtk-sharp and they both work.
1638
1639 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1640
1641         * icall.c: reverted partially my previous patch until 
1642         object.c:set_value handles enums correcly.
1643
1644 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1645
1646         * icall.c:
1647         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
1648         (ves_icall_System_Environment_get_MachineName): removed warning when
1649         compiling under cygwin.
1650
1651 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
1652
1653         * object.c: fixed field_get_value() for reference types.
1654
1655 2002-08-22  Dick Porter  <dick@ximian.com>
1656
1657         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
1658         Don't free a buffer while it's still needed.  Patch from Jonathan
1659         Liger <Jonathan.liger@wanadoo.fr>
1660
1661 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
1662
1663         * icall.c (ves_icall_System_Environment_get_Platform): Add new
1664         internal call.
1665
1666 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
1667
1668         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
1669         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
1670
1671         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
1672         we call unmanaged code which throws exceptions.
1673
1674 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
1675
1676         * appdomain.h: added per-domain entry_assembly.
1677         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
1678         arguments.
1679         * icall.c: Assembly::GetEntryAssembly icall.
1680         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
1681         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
1682
1683 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
1684
1685         * appdomain.h, gc.c: added mono_domain_finalize ().
1686
1687 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1688
1689         * object.c:
1690         (mono_print_unhandled_exception): changed g_warning by g_printerr
1691         because g_log has a 1024 characters limit (yeah, i got a big stack
1692         trace). Don't print exception name, that should be in ToString 
1693         returned string.
1694
1695 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1696
1697         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
1698         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
1699
1700 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1701
1702         * object.c:
1703         (mono_print_unhandled_exception): after previous commit, i realized
1704         that MS calls ToString on the exception. I changed this function to
1705         do that. This way we get stack_trace for free.
1706
1707 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1708
1709         * object.c:
1710         (mono_print_unhandled_exception): invoke Message property instead of
1711         getting 'message' field from Exception. Don't allocate memory for
1712         'trace' and 'message' if not needed.
1713
1714 2002-08-18  Dick Porter  <dick@ximian.com>
1715
1716         * unicode.c: Fix asserts to match Encoder.cs checks
1717
1718 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
1719
1720         * marshal.c: fix unaligned store issue and a few wrong
1721         opcode argument types.
1722
1723 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1724
1725         * icall.c: added GetUninitializedObjectInternal internal call.
1726
1727 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
1728
1729         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
1730         to the right domain.
1731
1732 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
1733
1734         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
1735
1736         * class.c (class_compute_field_layout): set blittable to false for Strings
1737
1738         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
1739
1740 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
1741
1742         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
1743         first chunk of code to create types at runtime. Code to
1744         handle ReflectedType/DeclaringType. Make reflection handles
1745         domain specific.
1746
1747 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
1748
1749         * class.c: set correct name in arrays.
1750
1751 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
1752
1753         * appdomain.c (mono_domain_transfer_object): make it work with
1754         valuetypes. bug fixes.
1755
1756 2002-08-12  Dick Porter  <dick@ximian.com>
1757
1758         * object.h: Rename some parameters to avoid c++ keywords (Patch
1759         from Joseph Wenninger <kde@jowenn.at>)
1760
1761 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
1762
1763         * icall.c: added icall to implement Assembly.GetFile*.
1764
1765 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
1766
1767         * reflection.h, reflection.c: code to embed managed resources.
1768
1769 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
1770
1771         * class.c: move all the type size stuff into
1772         class_compute_field_layout().
1773
1774 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
1775
1776         * class.c: ensure enums have always the correct instance size.
1777         * unicode.c: remove wrong assert.
1778
1779 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
1780
1781         * assembly.c: fix mem corruption issue.
1782         * image.h, image.c: added mono_image_get_resource () to access
1783         managed resources.
1784         * icall.c: implemented Assembly.EntryPoint property and some
1785         Managed Resources related internalcalls.
1786
1787
1788 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
1789
1790         * image.c, image.h: impemented mono_image_get_entry_point ().
1791         * appdomain.c: use mono_image_get_entry_point.
1792
1793 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
1794
1795         * reflection.c: support the object type argument when loading
1796         custom attributes.
1797
1798 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
1799
1800         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
1801         String as return type.
1802
1803 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
1804
1805         * reflection.c: fix encoding of named args for custom attrs to match
1806         the ms implementation. Read them back when instantiating custom
1807         attributes.
1808
1809 2002-08-02  Radek Doulik  <rodo@ximian.com>
1810
1811         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
1812         by Dietmar as quick fix
1813         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
1814         16 as stack size, used on more places as quick fix before Dietmar
1815         will fix it properly
1816
1817 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
1818
1819         * object.h, object.c: added accessors for fields and properties.
1820
1821 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
1822
1823         * class.c, class.h: made mono_class_get_field_from_name ()
1824         loop on parent types.
1825         Added mono_class_get_property_from_name ().
1826
1827 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
1828
1829         * class.c, class.h: move the code to setup the type vtable in its own
1830         function so that it can be reused also for types created at runtime.
1831         Eliminate the "class" identifier from the header file.
1832         * reflection.c: setup the vtable for enums so that we can create
1833         objects for use in SetConstant ().
1834
1835 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
1836
1837         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
1838         instead of the delegate itself as this pointer (bug #28383)
1839
1840 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
1841
1842         * marshal.c (mono_marshal_get_managed_wrapper): added return type
1843         conversions.
1844
1845 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
1846
1847         * loader.c: don't set the pinvoke bit on icalls.
1848
1849 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
1850
1851         * debug-helpers.c (mono_method_full_name): only print a number to
1852         indicate wrapper type (so that the output is more readable in traces).
1853
1854 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
1855
1856         * class.c (mono_class_init): include method override patch from Paolo
1857
1858 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
1859
1860         * icall.c: fixed GetTypeCode().
1861
1862 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
1863
1864         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
1865         use real delegate invoke function to make it work with multicast
1866         delegates (fix bug# 28291).
1867
1868 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
1869
1870         * object.c: load constant strings.
1871
1872 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
1873
1874         * reflection.c: no magic numbers.
1875         * tabledefs.h: security action enum.
1876
1877 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
1878
1879         * assembly.c: fix possible memory corruption.
1880
1881 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
1882
1883         * reflection.h, reflection.c: added support for linking resources.
1884         * verify.c: check we have an updated corlib.
1885
1886 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
1887
1888         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
1889         string arrays.
1890         (mono_marshal_string_array): null terminate unmanaged string arrays.
1891         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
1892
1893 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
1894
1895         * icall.c: Type.GetType () can now return also types from the
1896         calling assembly.
1897
1898 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
1899
1900         * loader.h, loader.c: stack walking support.
1901         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
1902         GetCallingAssembly.
1903
1904 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
1905
1906         * marshal.c: added optimisations for blittable types 
1907
1908         * class.c (mono_array_class_get): do not set blittable attribute on arrays
1909         (mono_class_setup_mono_type): set blittable attribute for single
1910         and double.
1911
1912         * marshal.c (mono_string_utf8_to_builder): impl.
1913         (mono_string_builder_to_utf8): impl.
1914         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
1915
1916 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
1917
1918         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
1919         (mono_marshal_get_managed_wrapper): impl. byref types
1920
1921 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1922
1923         * icall.c:
1924         (search_method): don't display debug message. 
1925
1926 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
1927
1928         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
1929
1930 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
1931
1932         * appdomain.c: set the missing filename when throwing exception.
1933
1934 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
1935
1936         * metadata.c (mono_type_size): code cleanup
1937         (mono_type_stack_size): removed some test code
1938
1939 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
1940
1941         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
1942         mono_get_exception_file_not_found now.
1943
1944         * exception.c (mono_exception_from_name_two_strings): New version
1945         that will call a constructor with two string arguments. 
1946         (mono_get_exception_file_not_found): New helper routine, used to
1947         report file-not-found errors.
1948
1949 2002-07-20  Dick Porter  <dick@ximian.com>
1950
1951         * process.h:
1952         * process.c: Pass file handles to CreateProcess
1953         
1954         * icall.c:
1955         * file-io.h:
1956         * file-io.c: Implemented CreatePipe
1957
1958 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
1959
1960         * metadata.c (mono_get_param_info): set alignment for value types
1961
1962 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
1963
1964         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
1965         Constify mono_domain_assembly_open().
1966         * loader.c: handle null namespace in icalls.
1967
1968 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
1969
1970         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
1971         (emit_str_to_ptr_conv): marshal object as structs
1972
1973         * metadata.c (mono_type_to_unmanaged): marshal object as structs
1974
1975         * marshal.c (mono_marshal_get_runtime_invoke): support value types
1976
1977 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
1978
1979         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
1980         (mono_marshal_get_native_wrapper): we an now return value types
1981
1982 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
1983
1984         * verify.c: more checks implemented.
1985
1986 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
1987
1988         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
1989         (fix bug #27695)
1990         (mono_marshal_get_native_wrapper): allow byref arguments
1991         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
1992         impl. PtrToStringXXX methods
1993         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
1994         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
1995         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
1996         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
1997         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
1998
1999 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
2000
2001         * reflection.c: fix buglet in parsing an assembly name.
2002
2003 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
2004
2005         * marshal.c (emit_ptr_to_str_conv): first impl.
2006
2007 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
2008
2009         * object.c, class.h: cache the vtable in the class as suggested by
2010         vargaz@freemail.hu (Zoltan Varga).
2011
2012 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
2013
2014         * class.h, loader.c: added mono_field_from_token().
2015         * verify.c: first cut of type checking code.
2016
2017 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
2018
2019         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
2020
2021 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
2022
2023         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
2024         (fix bug #27782)
2025         (mono_marshal_get_remoting_invoke): impl.
2026         (mono_delegate_begin_invoke): impl.
2027         (mono_mb_emit_save_args): impl.
2028         (mono_delegate_end_invoke): impl.
2029         (mono_marshal_get_delegate_begin_invoke):
2030         (mono_marshal_get_delegate_end_invoke):
2031         (mono_marshal_get_delegate_invoke): generate a special name for
2032         those methods (including the signature) and associate them whith
2033         the delegate class. 
2034
2035 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
2036
2037         * reflection.[ch]: 
2038         (mono_reflection_type_from_name): now it has a MonoImage parameter
2039         which is used as the default image to search the type in. If the image
2040         is NULL or getting the type from it fails, it defaults to corlib.
2041
2042         * icall.c: changed 1 call to mono_reflection_type_from_name to match
2043         new parameter.
2044
2045 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
2046
2047         * reflection.c: update the parameter table index.
2048
2049 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
2050
2051         * domain.c: don't include the mark byte in the string hash.
2052
2053 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
2054
2055         * icall.cs: icall for Type.GetTypeCode ().
2056         * verify: a couple of fixes and disabled local initialization checks.
2057
2058 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
2059
2060         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
2061
2062         * debug-helpers.c (mono_method_full_name): print the type of the
2063         runtime wrapper
2064
2065         * metadata.c (mono_signature_hash): a hash function for signatures
2066         (mono_signature_hash): better hash algorithm
2067
2068         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
2069
2070         * debug-helpers.c (mono_method_full_name): this can now generate
2071         method names with signatures
2072
2073         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
2074         method dont have this pointers.
2075
2076 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
2077
2078         * reflection.c: fixup typebuilder tokens.
2079         * image.c: fix buglet.
2080         * marshal.h: remove whitespace.
2081         * metadata.h, metadata.c: reinstate code that was removed.
2082         * verify.c: handle catch directives and fix another couple of bugs.
2083
2084 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
2085
2086         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
2087         (mono_marshal_get_native_wrapper): make it comp. with the old code
2088         (mono_marshal_get_native_wrapper): support boolean
2089         (mono_marshal_get_managed_wrapper): support more types
2090
2091 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
2092
2093         * class.c (class_compute_field_layout): compute class->blittable attribute.
2094
2095 2002-07-09  Dick Porter  <dick@ximian.com>
2096
2097         * threads.c: Make the thread cleaning up cope with threads that
2098         call ExitThread()
2099
2100 2002-07-08  Radek Doulik  <rodo@ximian.com>
2101
2102         * reflection.c (method_encode_code): use non-translated values to
2103         compute finally_start, this fixes exception handling on ppc, yay!
2104
2105         * decimal.h (struct signscale): fix endianess
2106
2107 2002-07-07  Radek Doulik  <rodo@ximian.com>
2108
2109         * reflection.c: swap box_val and not val
2110
2111 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
2112
2113         * reflection.c, reflection.h: handle full assembly info in type name.
2114         Handle Type arguments when loading custom attributes.
2115         * icall.c: updated to use new mono_reflection_type_from_name () method.
2116
2117 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2118
2119         * loader.c:
2120         (method_from_memberref): also print assembly name when method not found.
2121
2122 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2123
2124         * icall.c:
2125         (ves_icall_TypeGetProperties): fixed bug #27473. 
2126
2127 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2128
2129         * reflection.c: display image name and token when cannot find the
2130         .ctor for an attribute.
2131
2132 2002-07-05  Martin Baulig  <martin@gnome.org>
2133
2134         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
2135
2136 2002-07-04  Dick Porter  <dick@ximian.com>
2137
2138         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
2139         compile on mingw.  This will cause mingw builds to not wait for
2140         subthreads to terminate after the main thread does.  I've lodged a
2141         bug with the mingw developers for them to wrap OpenThread().
2142
2143 2002-07-03  Dick Porter  <dick@ximian.com>
2144
2145         * threads.c: Store thread IDs instead of handles, because
2146         GetCurrentThread() returns a pseudohandle and therefore stores
2147         useless values.  mono_thread_cleanup() continues checking the
2148         array of threads until it is empty, to cope with subthreads
2149         spawning new threads after the main thread has finished.
2150
2151         * profiler.h:
2152         * profiler.c:
2153         * profiler-private.h: Pass the thread ID to thread profiler
2154         functions, instead of a handle
2155
2156 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
2157
2158         * verify.c: fixes to make it more usable.
2159         * pedump.c: added --verify code to verify IL code in an assembly.
2160
2161 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
2162
2163         * reflection.c: turn errors into warnings to allow compiling corlib.
2164
2165 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
2166
2167         * reflection.c: add special cases to compile corlib.
2168
2169 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
2170
2171         * reflection.c: handle properties with only a set method.
2172
2173 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
2174
2175         * opcodes.h: add enum with opcodes in opval order.
2176
2177 2002-07-01  Dick Porter  <dick@ximian.com>
2178         
2179         * object.h:
2180         * object.c (mono_runtime_run_main): Removed unneeded argument
2181
2182 2002-06-28  Martin Baulig  <martin@gnome.org>
2183
2184         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
2185
2186 2002-06-27  Dick Porter  <dick@ximian.com>
2187
2188         * threads.c: Store the handle in both the parent thread and in the
2189         subthread, to minimise the time between starting a new thread and
2190         storing its ID.
2191
2192 2002-06-26  Dick Porter  <dick@ximian.com>
2193
2194         * appdomain.c (mono_runtime_cleanup): Close the socket library
2195         after all the threads have finished, not before
2196
2197 2002-06-26  Martin Baulig  <martin@gnome.org>
2198
2199         * debug-symfile.c (mono_debug_find_source_location): Added
2200         `guint32 *line_number' argument.  If it's not NULL, store the line number
2201         there and return the file name without the line number.
2202
2203 2002-06-25  Dick Porter  <dick@ximian.com>
2204
2205         * icall.c:
2206         * process.h:
2207         * process.c: Process forking and other support functions
2208
2209 2002-06-25  Dick Porter  <dick@ximian.com>
2210
2211         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
2212         things dont happen when the image is closed.
2213         (mono_image_lookup_resource): Walk the resource section looking
2214         for a particular entry
2215
2216         * cil-coff.h: PE resource section decoding
2217
2218 2002-06-25  Dick Porter  <dick@ximian.com>
2219         
2220         * assembly.h:
2221         * assembly.c: 
2222         (mono_assembly_foreach): Accessor functions to walk the list of
2223         loaded assemblies
2224         (mono_assembly_set_main):
2225         (mono_assembly_get_main): Process methods need to know which
2226         assembly is the "main" one
2227
2228         * object.c (mono_runtime_run_main): Record the main assembly
2229
2230         * debug-helpers.c: Fix typo
2231
2232 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
2233
2234         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
2235         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
2236
2237 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
2238
2239         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
2240
2241 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
2242
2243         * image.c (do_mono_image_open): Initialize reference count,
2244         otherwise we leak the MonoImage.
2245
2246 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
2247
2248         * reflection.c: small tweak to handle self-hosting.
2249
2250 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
2251
2252         * reflection.c: fix type name parse code.
2253
2254 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
2255
2256         * reflection.c: break out of the loop.
2257         * image.c: special case corlib.
2258
2259 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
2260
2261         * reflection.c: add all the custom attrs at the end to ensure the
2262         ctors have been properly initialized when the attributes are defined
2263         in the current assembly.
2264
2265 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
2266
2267         * reflection.c: handle correctly multiple-nested types.
2268
2269 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
2270
2271         * row-indexes.h: fix typos.
2272         * reflection.c: adjust for typos and fix method_def_or_ref
2273         encoding in MethodImpl table.
2274
2275 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
2276
2277         * reflection.c: fix entry point patching (thanks Serge!).
2278
2279 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
2280
2281         * verify.c: add check for System.Exception
2282
2283 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
2284
2285         * image.c, class.c: minifix for code just c&p'ed.
2286         * reflection.c: warning fix.
2287         * object.h, loader.h, domain.c: load also StringBuilder.
2288
2289 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
2290
2291         * marshal.h, marshal.c: some support code to handle complex marshaling.
2292
2293 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
2294
2295         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
2296         Better signatures with vtable error dump.
2297
2298 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
2299
2300         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
2301
2302 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
2303
2304         * icall.c (ves_icall_Type_GetField): impl.
2305
2306 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
2307
2308         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
2309         to retrieve a marshal description blob for a field or param.
2310
2311 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
2312
2313         * reflection.h, reflection.c: change order of nested type emission
2314         to avoid table corruption. The NestedTypes table is sorted.
2315         * icall.c: change order of GetConstructor results to workaround mcs bug.
2316
2317 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
2318
2319         * reflection.h, reflection.c: handle field and param marshal
2320         information.
2321
2322 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
2323
2324         * icall.c, marshal.c marshal.h: more Marshal class implementation.
2325
2326 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
2327
2328         * reflection.c: fix call convention.
2329
2330 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
2331
2332         * reflection.h, reflection.c: mono_image_get_memberref_token()
2333         takes a type instead of a class, now. Added
2334         mono_image_get_array_token() to create tokens for the special
2335         multi-dim array methods.
2336
2337 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
2338
2339         * assembly.c: handle modules (no assembly table). Split
2340         loading references in its own function.
2341         * class.c: handle moduleref resolution scope.
2342         * image.c, image.h: cache module name in image.
2343
2344 2002-06-07  Martin Baulig  <martin@gnome.org>
2345
2346         * reflection.c (mono_image_get_type_info): Only add a class layout entry
2347         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
2348
2349 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
2350
2351         * icall.c: more signature fixes that used uint instead of int.
2352
2353 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
2354
2355         * reflection.c: fixed signature of field refs.
2356
2357 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
2358
2359         * class.c, reflection.c: handle typerefs of nested types
2360         (both on read and when writing files).
2361
2362 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
2363
2364         * icall.c: fix method signatures that tried to workaround the previous
2365         typo, d'oh!
2366
2367 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
2368
2369         * debug-helpers.c: fix typo.
2370
2371 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
2372
2373         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
2374         rewrote the PE/COFF writing code (our programs are understood by the
2375         ms runtime, now).
2376
2377 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
2378
2379         * gc.c, gc.h, icall.c: weakreference support.
2380
2381 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
2382
2383         * Makefile.am, mono-config.c: use $(sysconfdir).
2384
2385 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
2386
2387         * icall.c: changed default precision of Double.ToString() to 15.
2388         Fixed memory leak. Unified with Single.ToString.
2389
2390 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
2391
2392         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
2393
2394 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
2395
2396         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
2397         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
2398         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
2399         and myself.
2400
2401 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
2402
2403         * debug-symfile.c, sysmath.c: yet more compilation fixes.
2404
2405 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
2406
2407         * reflection.c, socket-io.c: more compilation fixes.
2408
2409 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
2410
2411         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
2412         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
2413         unicode.c: warning and compiler compatibility fixes.
2414
2415 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
2416
2417         * class.h, metadata.c: fixed warnings/compilation errors.
2418
2419 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
2420
2421         * Makefile.am, mono-config.c, mono-config.h: configuration file
2422         support routines.
2423         * loader.c, loader.h: make Dll mapping configurable at runtime in the
2424         config file. Export methods to insert and lookup mappings.
2425
2426 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
2427
2428         * reflection.c: handle types and boxed objects in custom attr
2429         constructors.
2430
2431 2002-05-30  Martin Baulig  <martin@gnome.org>
2432
2433         * debug-symfile.c
2434         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
2435
2436 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
2437
2438         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
2439         to lookup the implmap row for a P/Invoke method.
2440         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
2441         P/Invoke method from the runtime on an as needed basis.
2442
2443 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
2444
2445         * metadata.c (mono_metadata_parse_signature): impl.
2446
2447 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
2448
2449         * class.c: handle .pack directive.
2450
2451 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
2452
2453         * object.c: initialize static fields with RVA data.
2454
2455 2002-05-25  Martin Baulig  <martin@gnome.org>
2456
2457         * debug-symfile.c
2458         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
2459
2460 2002-05-24  Martin Baulig  <martin@gnome.org>
2461
2462         * debug-symfile.c
2463         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
2464         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
2465         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
2466
2467 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
2468
2469         * object.c: special case string ctros in invoke.
2470         * gc.c: silly whitespace changes.
2471
2472 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
2473
2474         * threadpool.[ch]: impl. a threadpool that can
2475         be used by mint and mono.
2476
2477 2002-05-22  Martin Baulig  <martin@gnome.org>
2478
2479         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
2480         The first argument is now a `MonoReflectionModuleBuilder *', the return
2481         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
2482         `methods' field to get the method builder.  The `token' argument is the
2483         unfixed token.
2484
2485         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
2486         invalid characters instead of g_assert_not_reached()ing.  This seems
2487         to be the behaviour of mscorlib.
2488
2489 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
2490
2491         * object.c (mono_runtime_invoke_array): applied patch from Rachel
2492         Hestilow to fix bug #25104
2493
2494 2002-05-21  Martin Baulig  <martin@gnome.org>
2495
2496         * debug-symfile.c (mono_debug_find_source_location): New function.
2497         Looks up an IL offset in the line number table and returns the source
2498         location as a string.
2499
2500 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2501
2502         * icall.c:
2503         (mono_double_ToStringImpl): changed %f by %g until we have something
2504         better.
2505
2506 2002-05-21  Nick Drochak  <ndrochak@gol.com>
2507
2508         * icall.c : Use different name for Math.Pow's icall.  Needed to check
2509         parameters first in C#.
2510
2511 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
2512
2513         * icall.c, reflection.h: added icall to get info about an event.
2514
2515 2002-05-20  Radek Doulik  <rodo@ximian.com>
2516
2517         * object.c (mono_value_box): don't use memcpy for boxing on BIG
2518         endian
2519         (mono_value_box): don't use memcpy for small sizes on
2520         architectures with unaligned access
2521
2522 2002-05-20  Martin Baulig  <martin@gnome.org>
2523
2524         * reflection.c (mono_reflection_setup_internal_class): Don't crash
2525         if `tb->parent == NULL'.
2526         (mono_reflection_create_internal_class): New function.  This is
2527         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
2528         for enum types.
2529
2530         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
2531         New interncall.
2532
2533 2002-05-19  Martin Baulig  <martin@gnome.org>
2534
2535         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
2536         argument to get the length, don't default to the array length.
2537
2538 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
2539
2540         * assembly.c (mono_assembly_setrootdir): New function used to
2541         override the MONO_ASSEMBLIES directory.
2542
2543 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
2544
2545         * icall.c: ValueType_GetHashCode() initialize local var.
2546
2547 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
2548
2549         * reflection.c: sort custom attributes table.
2550
2551 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
2552
2553         * reflection.c: support named args in custom attributes (write support).
2554
2555 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
2556
2557         * reflection.c: fix finally position calculation.
2558
2559 2002-05-15  Radek Doulik  <rodo@ximian.com>
2560
2561         * reflection.c: fixed endianess at many places
2562
2563         * icall.c (ves_icall_InitializeArray): comment out debug msg
2564
2565 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
2566
2567         * object.c (mono_unhandled_exception): new function to handle
2568         unhandled exceptions.
2569         (mono_unhandled_exception): call the UnhandledException event.
2570         (mono_runtime_delegate_invoke): impl.
2571
2572 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
2573
2574         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
2575         returns the RVA, not the direct pointer to the data. Handle the case
2576         when the class size is fixed.
2577
2578 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
2579
2580         * reflection.c: fix some endianess issues.
2581
2582 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
2583
2584         * object.c (mono_runtime_invoke): is now able to catch exceptions.
2585
2586         * threads.c (mono_thread_init): added a callback which is invoked
2587         at thread start.
2588
2589 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
2590         
2591         * icall.c: make GetHashCode return non-negative values.
2592
2593 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
2594
2595         * object.c, icall.c, gc.c: revert to address-based hashcode.
2596
2597 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
2598
2599         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
2600
2601 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
2602
2603         * icall.c, class.c: special case <Module>.
2604
2605 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
2606
2607         * icall.c: fix bug in GetNow().
2608
2609 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
2610
2611         * object.c (mono_runtime_class_init): make sure that we call all
2612         static class constructors.
2613
2614 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
2615
2616         * reflection.c: sort methodsemantics table.
2617
2618 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
2619
2620         * reflection.h, reflection.c: honour init locals setting.
2621
2622 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
2623
2624         * icall.c: copied Double ToStringImpl for Single ToStringImpl
2625
2626 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
2627
2628         * reflection.c: support ContructorBuilders in attribute blob creation.
2629
2630 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
2631
2632         * reflection.c: some changes to build a binary that can be run
2633         directly in windows.
2634
2635 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
2636
2637         * loader.c: print a big message when an icall can't be found.
2638
2639 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2640
2641         * string-icalls.c: fix bug 24248.
2642
2643 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
2644
2645         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
2646         icall.c, reflection.h: separate assembly loading by pathname and by
2647         assembly name. Use the MONO_PATH env var to search for assemblies.
2648
2649 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
2650
2651         * assembly.c, image.h: add some support for assemblies
2652         with multiple modules.
2653         * class.c, class.h: export mono_class_from_typeref().
2654         * loader.c: remove duplicated code and use mono_class_from_typeref(),
2655         instead.
2656
2657 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
2658
2659         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
2660         documentation says (the ECMA one is correct).
2661
2662 2002-05-02  Dick Porter  <dick@ximian.com>
2663
2664         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
2665         Don't name the synchronisation mutex.
2666
2667 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
2668
2669         * rand.c
2670         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
2671         Make the prototypes match.
2672         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
2673         Same.
2674
2675         * icall.c
2676         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
2677         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
2678         all systems have tm.tm_zone, so use strftime() with %Z to print
2679         the timezone abreviation into a temp string.
2680
2681         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
2682         rather than mono_array_addr() on a MonoString on Big Endian
2683         machines.
2684
2685 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
2686
2687         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
2688         fix bug 24041
2689
2690 2002-04-30  Dick Porter  <dick@ximian.com>
2691
2692         * socket-io.c: Cope with SOCKET being an integer rather than a
2693         pointer now.
2694
2695         * threads.c: Added Thread_free_internal, to deal with thread
2696         handle cleanup.  Moved calls to handle_store() and handle_remove()
2697         to start_wrapper(), so each can only be called once.  Allocate
2698         synchronisation blocks with GC_malloc(), and use GC finalisation
2699         to close the handles.
2700
2701         * icall.c: added System.Threading.Thread::Thread_free_internal
2702
2703 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
2704
2705         * icall.c: support Environment.Exit, CommandLineArgs().
2706
2707 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
2708
2709         * object.c, object.h: added mono_runtime_run_main () and
2710         mono_runtime_get_main_args () for use in System.Environment.
2711
2712 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
2713
2714         * gc.c: fix thinko, enable actual finalization since the jit is now
2715         fixed.
2716
2717 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
2718
2719         * gc.c, object.c: take into account that an object may be offset wrt the address
2720         returned by GC_malloc().
2721
2722 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
2723
2724         * image.c: handle files without entries in the assembly table (modules).
2725
2726 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
2727
2728         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
2729         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
2730         allowed to be null when it's System.Object class setup.
2731
2732 2002-04-27  Martin Baulig  <martin@gnome.org>
2733
2734         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
2735         if `tb->parent == NULL' rather than crashing.
2736
2737 2002-04-28  Nick Drochak  <ndrochak@gol.com>
2738
2739         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
2740         calling acos() where asin() should have been called.
2741
2742 2002-04-26  Martin Baulig  <martin@gnome.org>
2743
2744         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
2745         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
2746         there's a subdirectory called `System', but we don't want to read that
2747         subdirectory as an assembly.
2748
2749 2002-04-25  Martin Baulig  <martin@gnome.org>
2750
2751         * debug-symfile.c: Reflect latest MonoString changes.
2752
2753 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
2754
2755         * rand.c, rand.h: instance method icalls need to have an explicit
2756         this pointer as first argument in the C implementation.
2757
2758 2002-04-25  Nick Drochak <ndrochak@gol.com>
2759
2760         * icall.c: Fix typo in map for GetNonZeroBytes
2761
2762 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
2763
2764         * string-icalls.c : String does now passes unit tests without any 
2765         errors, the following changes has been made:
2766         
2767         Implemented replace methods.
2768         Renaming of methods to (try) follow the standard.
2769         Fixed compare ordinal
2770         Made all memory allocated directly to function instead of via icall function.
2771         Small performance fix in is_in_array function
2772                         
2773  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
2774
2775         c (mono_string_Internal_ctor_charp_int_int):
2776         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
2777         sindex < 0, throw ArgumentOutOfRangeException instead of
2778         ArgumentNullException.
2779
2780         Added new check for length == 0, however
2781         I need to make it return String.Empty from the C code.
2782         
2783         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
2784         that calculate the length for us here.
2785         
2786         (mono_string_Internal_ctor_sbytep_int_int): Replaced
2787         mono_string_new_utf16 with mono_string_new, since value is utf8.
2788
2789 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
2790
2791         * object.c: register the object for finalization if needed.
2792         Allocate one more char in the string for the terminating 0 char.
2793
2794 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
2795
2796         * class.c, class.h, image.c: check if a type implemenst a destructor.
2797         Use the proper key for array class lookups.
2798         * icall.c: register the icalls in the System.GC class.
2799         * gc.c, gc.h: GC-related functions and icalls.
2800
2801 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2802
2803         * icall.c:
2804         * socket-io.c:
2805         * unicode.c: free some strings gotten from mono_string_to_utf8 and
2806         changed a couple of free () by g_free ().
2807
2808         * decimal.c: one-liner in the comments for decimal2string ().
2809
2810 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
2811
2812         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
2813
2814 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
2815
2816         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
2817         * object.c (mono_runtime_invoke_array) : handle null in params
2818
2819 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
2820
2821         * string-icalls.c: fixed bug in split (one off bug)
2822
2823 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
2824
2825         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
2826         * icalls.c: added String::Equals as internal method
2827
2828 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
2829
2830         * threads.c: fixed bug in the double interlocked functions
2831
2832 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
2833
2834         * threads.c: implemented all of the new interlocked icalls.
2835         * string-icalls.c: fix a bug in insert.
2836         * icalls.c: added the icalls for interlocked, removed old string functions.
2837         
2838 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
2839
2840         * loader.c: fix off-by-one error when reading argument names.
2841
2842 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
2843
2844         * profiler.c: win32 counter implementation (untested).
2845         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
2846         (the latter needs testing and more complete impl. from win32 folks).
2847
2848 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
2849
2850         * object.c: mono_array_new_full workaround mono_array_class_get
2851         problem.
2852
2853 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
2854
2855         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
2856         * object.h (mono_string_chars): Changed casting type.
2857
2858 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
2859
2860         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
2861                            method signatures to use gunichar2 instead of gint16.
2862
2863 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
2864
2865         * object.h, object.c: domain-specific versions of mono_object_new and
2866         mono_array_new.
2867
2868 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
2869
2870         * object.c: changed String layout
2871
2872         * string-icalls.c (mono_string_Internal_ctor_chara): added
2873         internal string constructors.
2874
2875 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
2876
2877         * threads.c: pass 'this' to the thread start routine.
2878
2879 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2880
2881         * string-icalls.c: fix IndexOf and LastIndexOf. Now
2882         InternalCompareStr don't call twice mono_string_cmp_char for the last
2883         character. Improved performance in mono_string_cmp_char.
2884
2885 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
2886
2887         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
2888         code into its own library: libmonoruntime.
2889
2890 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
2891
2892         * object.h, object.c: changed array format so that szarrays do not
2893         require a bounds structure.
2894         * icall.c, appdomain.c: support for new szarray format.
2895
2896 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
2897
2898         * metadata.c: compare also the retuns type when comparing signatures:
2899         we didn't do this as an optimization since really overloaded methods
2900         must differ also in the arguments, but this doesn't work with
2901         low-level IL code (or when using explicit conversion operators: see
2902         bug#23498 for an example).
2903
2904 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
2905
2906         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
2907
2908 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
2909
2910         * icall.c: make MonoType::GetElementType its own icall.
2911
2912 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
2913
2914         * icall.c: remove MonoMethod_get_Name().
2915         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
2916         object.
2917
2918 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
2919
2920         * string-icalls.c: optimized a few methods.
2921
2922 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
2923
2924         * icall.c: added all new string internal calls
2925         * string-icalls.c: added, new string internal call implementation.
2926         * object.c: added mono_string_new_size for allocating a string a size
2927
2928 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
2929
2930         * object.c (mono_object_isinst): use the same code as in the
2931         optimized x86 version.
2932
2933 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
2934
2935         * profiler.c: TSC-based timer code (faster and more accurate).
2936         Not hooked up in configure, yet (set USE_X86TSC to 1).
2937
2938 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
2939
2940         * profiler.c, profiler.h: track time spent compiling methods.
2941         * threads.c: track thread creation/destruction.
2942
2943 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
2944
2945         * profiler.c, profiler.h, profiler-private.h: profiling interface
2946         and sample implementation. Moved here so that it can be used also by
2947         the jit.
2948
2949 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
2950
2951         * reflection.c, reflection.h: keep types and other handles separate in
2952         the hash tables for referred tokens. Add guid for modules.
2953
2954 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
2955
2956         * assembly.c: fix bugs found with valgrind.
2957         * metadata.h, metadata.c: added mono_metadata_guid_heap().
2958
2959 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
2960
2961         * threads: added icall support for getting current domain for
2962                    the thread.
2963  
2964 2002-04-13  Martin Baulig  <martin@gnome.org>
2965
2966         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
2967         (MonoDebugVarInfo): Added `index' field for register based addresses.
2968         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
2969         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
2970         `MonoDebugVarInfo *params' and `guint32 this_offset' with
2971         `MonoDebugVarInfo *this_var'.
2972
2973         * debug-symfile.c (relocate_variable): New static function to write
2974         a location description for a local variable or method parameter.
2975
2976 2002-04-12  Martin Baulig  <martin@gnome.org>
2977
2978         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
2979         stack offset and begin/end scope address of a local variable.
2980         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
2981         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
2982         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
2983
2984         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
2985         Added new relocation types for start/end scope of a local variable.
2986
2987 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
2988
2989         * object.h: add mono_object_domain() macro.
2990         * reflection.c: handle typespecs.
2991         * icall.c: MonoMethod::get_Name() implementation.
2992
2993 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
2994
2995         * icall.c: String::GetHashCode() icall implementation.
2996
2997 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
2998
2999         * icall.c: String::IndexOfAny icall.
3000         * object.c, object.h: make array->max_length more useful.
3001         Intrduced mono_object_class() and mono_string_length() macros.
3002
3003 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3004
3005         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
3006         instead of g_unichar_isdigit.
3007
3008 2002-04-11  Nick Drochak  <ndrochak@gol.com>
3009
3010         * icall.c: Implement a simple Double.ToString().
3011
3012 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
3013
3014         * appdomain.h: only io-layer.h is supposed to be included.
3015         * icall.c: explicitly import environ. Fix warning.
3016
3017 2002-04-10  Nick Drochak  <ndrochak@gol.com>
3018
3019         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
3020                 return true even if it's not Daylight Savings time.
3021                 Only return false for the case where the function isn't
3022                 implemented for a plaform (read Windows).
3023
3024 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
3025
3026         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
3027         data with a mutex.
3028
3029 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
3030
3031         * mempool.c (mono_mempool_alloc): only use g_malloc when
3032         absolutely necessary.
3033
3034 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
3035
3036         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
3037
3038         * class.c (mono_class_vtable): use domain mempool to allocate vtable
3039         (mono_class_proxy_vtable): use domain mempool
3040
3041 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
3042
3043         * appdomain.h, appdomain.c: split initialization that requires the
3044         execution engine support into mono_runtime_init().
3045
3046 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
3047
3048         * class.c (mono_class_init): don't include vtable inside MonoClass
3049         to save some memory, gather some statistics.
3050         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
3051
3052 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
3053
3054         * icall.c: internalcall implementation for ValueType.Equals().
3055
3056 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
3057
3058         * object.c (mono_message_init): moved 
3059         (mono_runtime_exec_main): new arch. independent impl.
3060         (mono_runtime_invoke_array): new method - like
3061         mono_runtime_invoke, but you can pass an array of objects.
3062         (mono_remoting_invoke): new arch. independent impl.
3063         (mono_message_invoke): new arch. independent impl.
3064         (mono_runtime_class_init): new arch. independent impl.
3065         (mono_runtime_object_init): new arch. independent impl.
3066
3067 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
3068
3069         * metadata.c, object.c, reflection.c: documented the exported
3070         functions.
3071
3072 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
3073
3074         * icall.c: simpler code to pass the assembly builder data to corlib.
3075         Implement GetNestedTypes() internalcall.
3076
3077 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
3078
3079         * class.c: warn if a type can't be loaded.
3080
3081 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
3082
3083         * image.h: typedef MonoImageOpenStatus
3084         * types.h: removed unused file
3085         
3086 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
3087
3088         * icall.c: Enum_ToObject accepts enum value arguments.
3089
3090 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
3091
3092         * class.c: move initialization of properties, events and nested
3093         classes, so that they happen for interfaces, too.
3094
3095 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
3096
3097         * icall.c: cleanup some ugly casts in Array_SetValue*.
3098
3099 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
3100
3101         * icall.c: the values array fro enums is of the correct type, now.
3102         Implement (correctly) getFullName instead of assQualifiedName for
3103         MonoType.
3104         * reflection.h, reflection.c: added mono_type_get_name ().
3105
3106 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
3107
3108         * assembly.c, image.h: for each MonoImage, record from wich assembly
3109         it was loaded.
3110         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
3111         Make Type.Assembly work.
3112
3113 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
3114
3115         * debug-symfile.h: use char* instead of gpointer to avoid
3116         unnecessary casts.
3117
3118         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
3119
3120         * icall.c (ves_icall_InternalExecute): impl. FielSetter
3121         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
3122
3123 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
3124
3125         * icall.c (mono_message_init): impl. (code cleanup)
3126         (ves_icall_InternalExecute): impl. FieldGetter
3127
3128         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
3129         defined we call all (non-static)methods through the vtable. 
3130
3131 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
3132
3133         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
3134         finalizer even though the memory is still referenced (and the chunk of
3135         memory is not freed).
3136
3137 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
3138
3139         * assembly.c: fix brokeness.
3140
3141 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
3142
3143         * class.c: kill some warnings. Check explicit interface method
3144         implementation also without considering the namespace.
3145         Load also literal strings in static class data.
3146
3147 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
3148
3149         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
3150         (default_assembly_name_resolver): Make the resolver take the
3151         "base" directory where the assembly was originally defined, so we
3152         can load DLLs that are in the same directory as the assembly that
3153         is being referenced.
3154
3155 2002-03-28  Dick Porter  <dick@ximian.com>
3156
3157         * file-io.h: 
3158         * file-io.c:
3159         * socket-io.c: 
3160         * unicode.h: 
3161         * unicode.c: Warning cleanups
3162
3163 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
3164
3165         * object.h, reflection.h: use the correct type instead of MonoObject.
3166
3167 2002-03-28  Martin Baulig  <martin@gnome.org>
3168
3169         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
3170         (mono_debug_update_symbol_file): Initialize classes if necessary.
3171
3172 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
3173
3174         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
3175         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
3176
3177 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
3178
3179         * assembly.h: fix function prototype.
3180         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
3181         * mono-endian.h: use const cast.
3182
3183 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
3184
3185         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
3186
3187 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
3188
3189         * loader.c: don't assert when a typeref can't be loaded, give
3190         a chance to the runtime to trow an exception instead.
3191         * loader.h: fix warning.
3192
3193 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
3194
3195         * class.c (mono_class_proxy_vtable): added proxy support
3196
3197 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
3198
3199         * icall.c: removed last of PAL calls, added System.Environment
3200         * file-io.h, file-io.c: MonoIO implementation
3201         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
3202
3203 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
3204
3205         * appdomain.c: do not use the byte marker in ldstr table lookup.
3206         * debug-helpers.c: allow two ':' to separate class and method name.
3207         * object.c: allocate arrays bounds with the GC, too.
3208         * verify: add a few more checks.
3209
3210 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
3211
3212         * reflection.c: output also literal strings. Allocate parameter data
3213         with GC_malloc() (thanks, Martin, for catching this!).
3214
3215 2002-03-26  Martin Baulig  <martin@gnome.org>
3216
3217         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
3218         include the `this' offset in the `param_offsets'.
3219
3220 2002-03-25  Martin Baulig  <martin@gnome.org>
3221
3222         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
3223         mono_debug_get_class() function to get the classes. Added new
3224         relocation types for arrays and strings.
3225         (mono_debug_get_class): New static function to search in all
3226         referenced assemblies for a metadata token.
3227
3228         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
3229
3230 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
3231
3232         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
3233         hold gc-allocated objects. Make the string heap a stream like the
3234         others. Removed duplicated code when writing stream info.
3235         Added asserts to catch possible buffer overflows. Set the sorted map
3236         for tables that need sorting. Added some documentation.
3237
3238 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
3239
3240         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
3241         for interned strings and vtables.
3242
3243 2002-03-24  Martin Baulig  <martin@gnome.org>
3244
3245         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
3246         it in the array since it was created with g_slist_prepend().
3247
3248 2002-03-24  Martin Baulig  <martin@gnome.org>
3249
3250         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
3251         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
3252         (mono_debug_method_from_token): Renamed to
3253         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
3254         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
3255
3256         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
3257         relocation types.
3258
3259         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
3260
3261 2002-03-24  Martin Baulig  <martin@gnome.org>
3262
3263         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
3264         (mono_debug_method_from_token): New func.
3265
3266         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
3267         New interncall, calls mono_debug_local_type_from_signature().
3268         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
3269         calls mono_debug_method_from_token().
3270
3271 2002-03-23  Martin Baulig  <martin@gnome.org>
3272
3273         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
3274         specifies the number of bytes to be converted, not the array size.
3275         Return the number of chars, not the number of bytes.
3276         (ves_icall_iconv_get_chars): The `byteCount' argument
3277         specifies the number of bytes to be converted, not the array size.
3278
3279 2002-03-23  Martin Baulig  <martin@gnome.org>
3280
3281         * reflection.h (MonoReflectionSigHelper): New type.
3282
3283         * reflection.c (mono_reflection_sighelper_get_signature_local),
3284         (mono_reflection_sighelper_get_signature_local): New functions.
3285
3286         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
3287         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
3288         interncalls.
3289
3290 2002-03-23  Martin Baulig  <martin@gnome.org>
3291
3292         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
3293         is_writeable is set.
3294         (mono_raw_buffer_update): New function to write the modified map
3295         back to disk.
3296
3297         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
3298
3299         * debug-symfile.c (mono_debug_update_symbol_file): Call
3300         mono_raw_buffer_update() when done writing.
3301
3302 2002-03-23  Martin Baulig  <martin@gnome.org>
3303
3304         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
3305
3306         * debug-symfile.c: Added support for arguments and local variables.
3307
3308 2002-03-23  Dick Porter  <dick@ximian.com>
3309
3310         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
3311         protected by ifdefs, hence breaking the w32 build.
3312
3313 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
3314
3315         * object.c: implement is_interned() the right way.
3316
3317 2002-03-21  Martin Baulig  <martin@gnome.org>
3318
3319         * debug-symfile.[ch]: New files to handle debugging information
3320         files. There's also support to dynamically update these symbol
3321         files to include machine dependent information.
3322
3323 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
3324
3325         * threads.c (mono_thread_create): new function to create thread
3326         from C
3327
3328 2002-03-20  Martin Baulig  <martin@gnome.org>
3329
3330         * icall.c (ves_icall_InternalInvoke): Create a new object if the
3331         method is a constructor.
3332         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
3333         points to ves_icall_InternalInvoke().
3334
3335 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
3336
3337         * file-io.c: Flush shouldn't throw exceptions.
3338
3339 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
3340
3341         * file-io.c: FileStream flush support; FileSetLength now
3342         restores file pointer.
3343
3344 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
3345
3346         * class.c: set image for pointer classes.
3347
3348 2002/03/19  Nick Drochak <ndrochak@gol.com>
3349
3350         * sysmath.c: Forgot one.
3351
3352 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
3353
3354         * sysmath.c: Avoid redefining existing names.
3355
3356 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
3357
3358         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
3359         handled by runtime as icall rather than dllimport from libm.so
3360         * file-io.c, file-io.h: fixed handle argument type.
3361
3362 2002-03-18  Dick Porter  <dick@ximian.com>
3363
3364         * reflection.c (mono_image_get_type_info): rename interface to
3365         iface, because of "#define interface struct" on windows.
3366
3367 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
3368
3369         * class.c, class.h: rename and export mono_ptr_class_get().
3370         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
3371         * reflection.c, reflection.h, icall.c: better/saner type name
3372         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
3373         method signatures.
3374
3375 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
3376
3377         * class.c (mono_class_init): removed hardcoded GHC_SLOT
3378
3379         * icall.c (ves_icall_InternalInvoke): impl.
3380
3381 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
3382
3383         * reflection.c: output the interface map table, too.
3384
3385 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
3386
3387         * class.c (class_compute_field_layout): separate computation of 
3388         static field layout
3389
3390 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
3391
3392         * icall.c: added System.Buffer support.
3393         * file-io.c: moved file icalls from PAL to FileStream.
3394
3395 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
3396
3397         * icall.c (ves_icall_System_Object_GetHashCode): impl.
3398
3399 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
3400
3401         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
3402
3403 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
3404
3405         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
3406
3407 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
3408
3409         * debug-helpers.{c,h}: moved here from monograph some useful functions
3410         to locate a method by name/signature in a class or image. Included
3411         also a small and flexible IL disassembler.
3412
3413 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
3414
3415         * reflection.c: fixup tokens in methods with small header size, too.
3416
3417 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
3418
3419         * object.c (mono_string_to_utf8): remove assert(!error), instead
3420         print a warning. 
3421
3422 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
3423
3424         * icall.c: update to the new mono_Array_class_get interface.
3425
3426 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
3427
3428         * appdomain.c, object.c: Boehm-GC enable.
3429         * icall.c: make get_data_chunk() support split data requests.
3430         Ensure a class is initialized in more cases. Return only the first
3431         property found in GetProperties() or the compiler gets confused. 
3432         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
3433         * reflection.h, reflection.c: add fixup mechanism for field and method
3434         tokens. Initialize assembly->typeref in a single place. Output
3435         properties after events. Support custom attributes for events, too.
3436         Typo fix for paramter custom attrs.
3437
3438 2002-03-07  Martin Baulig  <martin@gnome.org>
3439
3440         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
3441
3442 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
3443
3444         * class.c (mono_array_class_get): fix. for multi. dim. arrays
3445
3446 2002-03-06  Martin Baulig  <martin@gnome.org>
3447
3448         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
3449         non-zero lower bounds. See testcases #F10-#F13.
3450
3451 2002-03-05  Martin Baulig  <martin@gnome.org>
3452
3453         * exception.c (mono_get_exception_argument_out_of_range): New exception.
3454
3455         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
3456         ves_icall_System_Array_GetValue(), only calculate the absolute array position
3457         here.
3458         (ves_icall_System_Array_SetValue): Likewise.
3459         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
3460         as argument and does the actual work. This function is used when copying a
3461         multi-dimensional array.
3462         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
3463         now do all the widening conversions of value types.
3464         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
3465
3466 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
3467
3468         * class.c: remove some magic numbers and use the smbolic names,
3469         instead. Added init_events() to load event info at class init time.
3470         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
3471         and mono_metadata_methods_from_event().
3472         * reflection.h, reflection.c: added support for writing out the evnets
3473         related information.
3474
3475 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
3476
3477         * reflection.h, icall.c: use a different method (GetInterfaces)
3478         to gather interface info and add isbyref, isprimitive and
3479         ispointer to the ves_icall_get_type_info() return value.
3480
3481 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
3482
3483         * class.h: stared adding support for events.
3484         * icall.c: split find_members implementation. Added debug icall to get
3485         the address of an object.
3486         * reflection.c: handle TypeBuilders in mono_type_get_object().
3487
3488 2002-03-01  Martin Baulig  <martin@gnome.org>
3489
3490         * icall.c (ves_icall_System_Array_GetLength): This must throw an
3491         ArgumentOutOfRangeException(), not an ArgumentException().
3492         (ves_icall_System_Array_GetLowerBound): Likewise.
3493         (ves_icall_System_Array_GetValue): Improved argument checking.
3494         (ves_icall_System_Array_SetValue): Improved argument checking.
3495
3496 2002-03-01  Martin Baulig  <martin@gnome.org>
3497
3498         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
3499         called with invalid arguments rather than just dying with g_assert().
3500         (ves_icall_System_Array_SetValue): Likewise.
3501         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
3502         raise a NotImplementedException instead.
3503         (ves_icall_System_Array_GetLength): Added argument checking.
3504         (ves_icall_System_Array_GetLowerBound): Added argument checking.
3505
3506 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
3507
3508         * object.h (mono_assert): new macros mono_assert and
3509         mono_assert_not_reached
3510
3511 2002-02-28  Martin Baulig  <martin@gnome.org>
3512
3513         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
3514         and "System::String::IsInterned" to "System::String::_IsInterned".
3515
3516 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
3517
3518         * icall.c: remove hacks for typebuilder. Added icall to create a
3519         modified type from a tybebuilder.
3520         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
3521         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
3522         to create a backing MonoClass for a TypeBuilder.
3523
3524 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
3525
3526         * class.c, class.h: more refactoring of class init.
3527         Export mono_class_setup_mono_type() and mono_class_setup_parent().
3528
3529 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
3530
3531         * marshal.c, marshal.h: start of marshaling interface.
3532
3533 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
3534
3535         * icall.c: fix order in assembly qualified name icall.
3536
3537 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
3538
3539         * class.c: do not free str, since we store it in the hash table.
3540         * reflection.h: add label field to MonoILExceptionInfo.
3541         * reflection.c: handle references to more than one assembly. Handle
3542         case when there isn't a module created in the assembly.
3543
3544 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
3545
3546         * class.c: Fix typo. Start refactoring of class init code.
3547
3548 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
3549
3550         * appdomain.c: exit with 1 on error.
3551         * class.c: we already have the name in MonoClassField.
3552         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
3553         MonoStreamHeader instead of an offset of image->raw_metadata.
3554
3555 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
3556
3557         * appdomain.c (mono_init): Be even more descriptive about the error.
3558
3559 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
3560
3561         * appdomain.c: give the user an informative message when corlib can't
3562         be loaded.
3563
3564 2002-02-26  Martin Baulig  <martin@gnome.org>
3565
3566         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
3567         New icall to get the time zone data.
3568
3569 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
3570
3571         * reflection.c: set virtual and raw size of section correctly.
3572         * threads.c: transfer domain information to newly created threads.
3573
3574 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
3575
3576         * class.c: when instancing a class in a domain, load the default
3577         vaules for static fields from the constant table. Fix System.Enum to
3578         not be an enum.
3579         * icall.c: implement Object::GetType() internalcall. Implemented
3580         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
3581         Fixed checking of binding flags in find_members().
3582         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
3583         * reflection.c: handle enumerations when writing to the constant
3584         table. Use a different object cache for types.
3585
3586
3587 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
3588
3589         * object.c (mono_object_isinst): fix for arrays
3590
3591         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
3592
3593 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
3594
3595         * object.c: don't use mprotect ()  and fix intern pool hash table
3596         lookup for big endian systems.
3597
3598 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
3599
3600         * icall.c: change type_is_subtype_of () signature.
3601
3602 2002-02-21  Mark Crichton  <crichton@gimp.org>
3603
3604         * rand.c, rand.h: Added random number generator for
3605         System.Security.Cryptography classes.
3606
3607         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
3608
3609         * icall.c: Added System.Security.Cryptography calls.
3610
3611 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
3612
3613         * class.c, icall.c, metadata.c: better support for pointer types.
3614         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
3615         * reflection.c: Add support for getting custom attrs for properties
3616         and simplify some code.
3617
3618 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
3619
3620         * icall.c: change getToken () and add custom attribute GetBlob()helper
3621         method.
3622         * reflection.h: add custom attrs array to the reflection builder structures.
3623         * reflection.c: encode and emit custom attributes for all the relevant
3624         reflection objects. Cache fieldref and methodref tokens. Change
3625         mono_image_create_token() interface to take a MonoDynamicAssembly.
3626         More complete custom attributes decoder. Load custom attributes for
3627         Assembly, Field, Method and Constructor objects, too. Make the
3628         returned array an Attribute[] one, not object[]. Added
3629         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
3630         custom attribute constructor.
3631
3632 2002-02-20  Dick Porter  <dick@ximian.com>
3633
3634         * icall.c:
3635         * rawbuffer.c:
3636         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
3637         problem code out for now).
3638
3639 2002-02-19  Radek Doulik  <rodo@ximian.com>
3640
3641         * object.c (mono_ldstr): use hash table to avoid multiple swapping
3642
3643 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
3644
3645         * icall.c: register the GetCustomAttributes method.
3646         * object.c, object.h: add mono_string_new_len ().
3647         * reflection.h, reflection.c: added mono_runtime_invoke(),
3648         mono_install_runtime_invoke(). Added
3649         mono_reflection_get_custom_attrs () to load custom attributes and
3650         create the attribute objects.
3651
3652 2002-02-19  Dick Porter  <dick@ximian.com>
3653         * threads-dummy-types.c:
3654         * threads-dummy-types.h:
3655         * threads-dummy.c:
3656         * threads-dummy.h:
3657         * threads-pthread-types.c:
3658         * threads-pthread-types.h:
3659         * threads-pthread.c:
3660         * threads-pthread.h:  Deleted obsolete files
3661
3662 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
3663
3664         * class.c (mono_class_vtable): runtime init the class when we
3665         allocate static class data.
3666
3667         * icall.c (ves_icall_System_Array_SetValue): check for null values.
3668
3669         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
3670         and String - but we will need generic marshalling support in the
3671         future. 
3672         (mono_init): set the domain name in a ms compatible way
3673
3674         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
3675         String[].
3676
3677 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
3678
3679         * object.c (mono_array_clone): use alloca() instead of g_malloc  
3680         for sizes
3681
3682         * appdomain.c (mono_domain_unload): impl.
3683
3684 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
3685
3686         * appdomain.c, object.c: fix intern pool implementation.
3687         * class.c: fix alignment code.
3688
3689 2002-02-16  Radek Doulik  <rodo@ximian.com>
3690
3691         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
3692         and s2 > s1, just copy lower bytes to be compatible with little
3693         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
3694         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
3695
3696         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
3697         force big_endian to be 1 for big endian machines 
3698         (ves_icall_iconv_new_decoder): ditto
3699
3700 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
3701
3702         * socket-io.c (convert_sockopt_level_and_name): If the system
3703         doesn't define SOL_IP or SOL_TCP, get them by hand using
3704         getprotobyname() and caching the values (because this could be a
3705         slow operation).
3706         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
3707         Use the appropriate struct when the system does support it. Ie,
3708         not all systems have struct ip_mreqn so use struct ip_mreq when
3709         appropriate.
3710
3711 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
3712
3713         * reflection.c: handle finally clauses.
3714
3715 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
3716
3717         * socket-io.c: use g_snprintf() instead of snprintf.
3718
3719 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
3720
3721         * reflection.c (mono_param_get_objects): Cast second argument to
3722         mono_method_get_param_names to a const char** to silence the
3723         compiler warning.
3724
3725         * appdomain.c (mono_domain_assembly_open): Put parens around the
3726         truth statement in the for-loop.
3727
3728         * unicode.c (iconv_convert): Got rid of a compiler warning about
3729         int i being unused when the system has a new iconv.
3730         (iconv_get_length): Same.
3731
3732         * image.c (load_class_names): Cast the second argument to
3733         g_hash_table_insert() to char* to hush compiler warnings about the
3734         arg being a const.
3735         (mono_image_open): Same here.
3736
3737         * socket-io.c: Don't conditionally include sys/filio.h or
3738         sys/sockio.h here anymore since we now get them from
3739         io-layer/io-layer.h
3740         (inet_pton): If the system doesn't support inet_aton, implement
3741         using inet_addr and also #define INADDR_NONE if it isn't defined
3742         by the system.
3743
3744 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
3745
3746         * metadata.c, metadata.h: added function to get packing and size info
3747         of a typedef.
3748         * reflection.h, reflection.c: handle field RVA data. Save info about
3749         the table layout if needed. Assign typedef indexes to all the types
3750         before dumping the info about them to avoid forward reference problems.
3751
3752 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
3753
3754         * socket-io.c (convert_sockopt_level_and_name): ifdef
3755         SO_ACCEPTCONN because it is not defined on my system (old debian)
3756
3757 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
3758
3759         * opcode.c: use stddef.h to get NULL.
3760
3761 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
3762
3763         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
3764         for FIONBIO, FIONREAD and SIOCATMARK.
3765         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
3766         define INADDR_NONE and besides, inet_addr() is deprecated and
3767         should not be used. Use inet_pton() instead - it also has the
3768         added bonus that it can easily handle IPv6 addresses as well.
3769         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
3770
3771 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
3772
3773         * decimal.c: remove _MSC_VER conditional.
3774
3775 2002-02-13  Dick Porter  <dick@ximian.com>
3776
3777         * socket-io.c: 
3778         * icall.c: Internal calls for Blocking, Select, Shutdown,
3779         GetSocketOption and SetSocketOption
3780
3781 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
3782
3783         * assembly.cs: better resolver: use it instead of some kludgy
3784         code.
3785
3786 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
3787
3788         * reflection.c: the best way to speed-up the compiler is to avoid
3789         infinite loops.
3790
3791 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
3792
3793         * class.c (mono_class_vtable): changed the object layout
3794         (obj->vtable->class). 
3795         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
3796
3797 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
3798
3799         * assembly.c: look for assemblies in the assembly dir, too.
3800
3801 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
3802
3803         * class.c: fix thinko in mono_class_from_type().
3804
3805 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
3806
3807         * exception.h, exception.c: added TypeLoadException.
3808         * object.h, object.c: added mono_array_clone ().
3809         * icall.c: handle throwOnError in AssemblyGetType().
3810         Added Array.Clone().
3811         * opcode.h, opcode.c: use a single value for the opcode val.
3812         Compile fix for non-gcc compilers.
3813
3814 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
3815
3816         * opcodes.c, opcodes.h: export interesting info about opcodes.
3817
3818 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
3819
3820         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
3821         icalls. 
3822
3823         * class.c (class_compute_field_layout): set element_class for enums
3824         (mono_class_create_from_typedef): set element_class for normal classes
3825
3826         * icall.c (ves_icall_System_Enum_get_value): impl.
3827
3828         * class.c (mono_class_create_from_typedef): do not set valuetype
3829         flag for System.ValueType and System.Enum
3830
3831 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
3832
3833         * unicode.c (iconv_convert): fix big endian problem.
3834
3835 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
3836
3837         * class.c: add asserts if we are ever going to scribble over memory.
3838         * socket-io.c: not all systems have AF_IRDA defined.
3839
3840 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
3841
3842         * class.c (class_compute_field_layout): do not consider static
3843         fields to compute alignment
3844
3845 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
3846
3847         * appdomain.c (mono_appdomain_get): impl.
3848         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
3849
3850 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
3851
3852         * icall.c: ignore "file://" prefix when loading an assembly.
3853
3854 2002-01-23  Dick Porter  <dick@ximian.com>
3855
3856         * socket-io.c:
3857         * icall.c:
3858         * Makefile.am: Added socket support
3859
3860 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
3861
3862         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
3863         code back.  This should return the assemblies that are loaded by
3864         the runtime on behalf of an application domain. 
3865
3866         The current implementation is still broken, it just returns every
3867         assembly loaded, but until we get real applications domain this
3868         will do.
3869
3870 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
3871
3872         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
3873         AppDomain object.
3874
3875 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
3876
3877         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
3878         the mono_class_from_name lookup.
3879         (ves_icall_get_parameter_info): ditto.
3880         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
3881         method.
3882         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
3883
3884 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
3885
3886         * class.c: load also nested classes on class init.
3887         System.ValueType instance methods gets passed boxed
3888         values, unless methods in derived classed that get a pointer to the
3889         data.
3890         * icall.c: use better name parsing code in GetType().
3891         * image.c, image.h: add mono_image_loaded ().
3892         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
3893         * reflection.c, reflection.h: added mono_reflection_parse_type().
3894
3895 2002-01-22  Veronica De Santis <veron78@interfree.it>
3896
3897         * icall.c : Added mapping of internal calls for Manual and Auto reset events
3898         * threads.c : Added the implementation of internal calls for events
3899         * threads.h : Added prototypes of internal calls for events
3900         
3901 2002-01-21  Radek Doulik  <rodo@ximian.com>
3902
3903         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
3904
3905 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
3906
3907         * class.c (mono_class_init): set min_align to 1 (instead of 0)
3908         (mono_class_value_size): use min_align
3909
3910 2002-01-20  Dick Porter  <dick@ximian.com>
3911
3912         * threads.h:
3913         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
3914         so it compiles on w32.
3915
3916 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
3917
3918         * metadata.c (mono_type_stack_size): impl.
3919
3920         * class.c (mono_class_get_field): impl. memberref token
3921
3922 2002-01-16 Veronica De Santis <veron78@@interfree.it>
3923
3924         * icall.h : Added the internal calls mapping for CreateMutex_internal
3925                     and ReleaseMutex_internal.
3926         * threads.h : Added the prototype of mutexes internal calls.
3927         * threads.c : Added the implementations of mutexes internal calls.
3928
3929 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
3930
3931         * metaparse.h: removed unused file.
3932         * reflection.c, reflection.h: added stream_data_align () function 
3933         to align data in streams and keep stream aligned. Add support for
3934         exception support in method headers.
3935
3936 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
3937
3938         * unicode.c: make iconv_convert () return the number of bytess written
3939         in the output buffer.
3940
3941 2002-01-15  Dick Porter  <dick@ximian.com>
3942         * threads.c: Make the runtime's idea of infinite timeouts coincide
3943         with the class library's
3944
3945         Fix a particularly egregious bug in mono_thread_cleanup(). That
3946         code was so utterly bogus it must have been written on a Monday.
3947
3948 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
3949
3950         * reflection.h: add subtypes field to TypeBuilder.
3951         * reflection.c: encode constants for literal fields.
3952         Handle subtypes. Fix user string token (and add a zero byte)
3953         at the end.
3954         
3955 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
3956
3957         * class.c (mono_class_init): bug fix: assign slot numbers for
3958         abstract methods.
3959
3960 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
3961
3962         * reflection.c: don't try to output a code RVA for abstract methods.
3963         Small fixes for method header format. Output parameter info to the
3964         ParamDef table. Save method overriding info to MethodImpl table.
3965         Fix property support. Allow typedef.extends to be a type in the
3966         building assembly.
3967         * verify.c: fix off-by-one error.
3968
3969 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
3970
3971         * class.c: fix mono_class_from_mono_type () for szarray types.
3972         Remove unused cache check in mono_class_from_type_spec().
3973         * icall.c: *type_from_name () functions handle simple arrays and byref.
3974         * reflection.c: handle byref and szarray types. Handle methods without
3975         body (gets P/Invoke compilation working). Handle types and fields in
3976         get_token ().
3977         * reflection.h: add rank to MonoTypeInfo.
3978
3979 2002-01-10  Dick Porter  <dick@ximian.com>
3980
3981         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
3982         internal calls
3983
3984 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
3985
3986         * icall.c: initialize class in type_from_handle ().
3987         Loop also in parent classes for get_method ().
3988         * reflection.c: properly encode class and valuetype types.
3989         Start on encoding TypeBuilder types. Handle fieldrefs.
3990         Use correct length when registering a user string.
3991         Handle ConstructorBuilder and MonoMethod in get_token ().
3992         Make mono_type_get_object () aware of cached types.
3993         * object.c: back out change to mono_string_new ().
3994
3995 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
3996         * object.c: mono_string_new should return a NULL when the string 
3997         passed in is NULL -- not try to deference it.
3998         
3999 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
4000
4001         * icall.c: hack to make IsSubType work for TypeBuilders.
4002         * reflection.c: emit constructors before methods.
4003         Retrieve param names in mono_param_get_objects().
4004
4005 2002/01/05  Nick Drochak  <ndrochak@gol.com>
4006
4007         * Makefile.am: fix list of headers and sources so automake 1.5
4008         doesn't complain. Removed \# at end of list.
4009
4010 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
4011
4012         * reflection.c: get token for a method ref. Set return type of
4013         constructor to void.
4014         * loader.c: debug message.
4015         * class.c: typo fix.
4016
4017 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
4018
4019         * icall.c: fix array init with rank > 1. FindMembers
4020         loops in parent class as well.
4021         * image.c: do not insert nested types in name cache.
4022         * reflection.c: warning fix.
4023         * reflection.h: add override method (for interface impl).
4024
4025 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
4026
4027         * metadata.c: fix customattr decoding.
4028
4029 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
4030
4031         * rawbuffer.cs: Added native Win32 implementation, avoids using
4032         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
4033
4034 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
4035
4036         * class.c: make the low-level routines handle the cache.
4037
4038 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
4039
4040         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
4041
4042 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
4043
4044         * class.c: fix mono_array_element_size() for objects.
4045         * class.h, class.c: add properties to MonoClass and load them
4046         at init time.
4047         * icall.c: check with isinst() when assigning a value to an array
4048         instead of requiring the classes to match exactly.
4049         Implemented icall for System.Type::GetType().
4050         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
4051         enums. Handle bindingflags when looking for methods and fields.
4052         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
4053         and mono_metadata_methods_from_property().
4054         * reflection.h, reflection.c: added structures for propreties,
4055         parameters and enums. Implemented mono_property_get_object() and
4056         mono_param_get_objects().
4057
4058 2001-12-18  Dick Porter  <dick@ximian.com>
4059
4060         * file-io.c: Use mono_string_to_utf16() instead of
4061         mono_string_chars()
4062
4063         * object.c: Added mono_string_to_utf16(), which copies the non
4064         NULL-terminated MonoString into a new double-null-terminated
4065         buffer.
4066
4067 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
4068
4069         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
4070
4071 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
4072
4073         * file-io.c: raise exceptions if handle is invalid.
4074
4075 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
4076
4077         * assembly.c: yet another check for mscorlib.
4078         * class.c, class.h: load nesting info for classes.
4079         * icall.c: many new functions to support the Reflection classes.
4080         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
4081         * reflection.h, reflection.c: mono_image_create_token(),
4082         mono_assembly_get_object(), mono_type_get_object(),
4083         mono_method_get_object(), mono_field_get_object(): methods to return
4084         objects that parallel the C representation of assemblies, types,
4085         methods, fields.
4086
4087 2001-12-11  Dick Porter  <dick@ximian.com>
4088
4089         * icall.c:
4090         * file-io.c: Internal calls for file IO.
4091
4092 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
4093
4094         * tabledefs.h: missing FileAttributes.
4095         * verify.h, verify.c: use is_valid_string () to simplify and check for
4096         valid strings more correctly. Fix warnings and speeling.
4097         Check more tables: Filed, File, ModuleRef, StandAloneSig.
4098         Check code: branches, maxstack, method calls.
4099
4100 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
4101
4102         * object.c (mono_object_allocate): removed static, so that the jit
4103         can allocate value types.
4104
4105         * icall.c (ves_icall_System_DateTime_GetNow): impl.
4106
4107 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
4108
4109         * class.c: init enum types right away and register the
4110         token->MonoClass map in mono_class_create_from_typedef ().
4111         * verify.h, verify.c: first cut of the verifier.
4112         * pedump.c: add --verify switch to verify metadata tables.
4113         * tabledefs.h: add some missing enums.
4114
4115 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
4116
4117         * class.c (mono_install_runtime_class_init): impl.
4118         (mono_class_init): renamed mono_class_metadata_init to
4119         mono_class_init, also removed the metadata_inited flag
4120
4121         * object.c (mono_object_isinst): use faster algorithm
4122
4123 2001-11-30  Radek Doulik  <rodo@ximian.com>
4124
4125         * mono-endian.h: reverted last change
4126         added function prototypes
4127
4128         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
4129         add mono-endian.c back
4130
4131         * mono-endian.c: returned back, as Paolo pointed out, it's needed
4132         for unaligned access, I've mistaked it with endianess. I am
4133         sorry.
4134         (mono_read16): fix reverted endianess
4135         (mono_read64): ditto
4136         (mono_read32): ditto
4137
4138 2001-11-30  Dick Porter  <dick@ximian.com>
4139
4140         * exception.c: Implement mono_exception_from_name()
4141
4142 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
4143
4144         * metadata.h, metadata.c: remove params_size and locals_size and their
4145         calculation from the metadata code: they are only usefult to the
4146         interp.
4147
4148 2001-11-29  Radek Doulik  <rodo@ximian.com>
4149
4150         * object.c (mono_ldstr): swap bytes here, it's probably not the
4151         best place, but works for me now, I'll redo it once I know mono
4152         better, also note that I add PROT_WRITE and don't reset back, also
4153         note that it's only affects big endians, so x86 should be OK
4154
4155         * mono-endian.h (read16): use just glib macros for both endians
4156
4157         * mono-endian.c: removed as glib macros are used in in
4158         mono-endian.h so we don't need to care about endianess for read
4159         macros as glib does that for us already
4160
4161 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
4162
4163         * class.h, class.h: take minimum alignment into consideration so
4164         that the fields of a class remain aligned also when in an array.
4165
4166 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
4167
4168         * loader.h, loader.c: add mono_method_get_param_names().
4169         * class.c: 0-init class fields.
4170
4171 2001-11-26  Dick Porter  <dick@ximian.com>
4172
4173         * icall.c:
4174         * threads-types.h:
4175         * threads.c: New file that handles System.Threading on all platforms
4176
4177         * object.c: 
4178         * object.h: Remove the synchronisation struct from MonoObject,
4179         replace it with a pointer that gets initialised on demand
4180
4181         * Makefile.am: Replace all the system-specific threading code with
4182         a single file that uses the new wrapper library
4183
4184 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
4185
4186         * class.c, class.h: add mono_install_trampoline() so that the runtime
4187         can register a function to create a trampoline: removes the ugly
4188         requirement that a runtime needed to export arch_create_jit_trampoline.
4189         * object.h, object.c: added mono_install_handler() so that the runtime
4190         can install an handler for exceptions generated in C code (with
4191         mono_raise_exception()). Added C struct for System.Delegate.
4192         * pedump.c: removed arch_create_jit_trampoline.
4193         * reflection.c: some cleanups to allow registering user strings and
4194         later getting a token for methodrefs and fieldrefs before the assembly
4195         is built.
4196         * row-indexes.h: updates and fixes from the new ECMA specs.
4197
4198 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
4199
4200         * class.h, class.c: add enum_basetype field to MonoClass.
4201         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
4202         to get index in the constant table reated to a field, param or
4203         property.
4204         * reflection.h, reflection.c: handle constructors. Set public-key and
4205         version number of the built assembly to 0.
4206         * row-indexes.h: update from new ECMA spec.
4207
4208 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
4209
4210         * class.h, class.c: add a max_interface_id to MonoClass.
4211         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
4212         since it's used to do that. Added mono_type_type_from_obj().
4213         Make GetType() return NULL instead of segfaulting if the type was not
4214         found. Handle simple arrays in assQualifiedName.
4215         * object.h: add a struct to represent an Exception.
4216         * reflection.c: output call convention in method signature.
4217         Add code to support P/Invoke methods and fixed offsets for fields.
4218
4219 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
4220
4221         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
4222         the value.
4223         * icall.c: use mono_array_addr instead of array->vector: fixes the
4224         reflection image writing.
4225         * reflection.c: init call convention byte to 0 in method signature.
4226         Encode the property signature. Don't output property-related methods
4227         twice. Really process the properties for a type (don't cast a field to
4228         a property, my mom always told me that).
4229         Fix 64 bit issues in pointer alignment in a different and more
4230         readable way.
4231
4232 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
4233
4234         * loader.h: Removed type class from MonoDefaults, added monotype
4235
4236         * loader.c: Loaded MonoType, removed loading of Type
4237
4238         * icall.c (my_mono_new_object): Now returns a System.MonoType,
4239         and fills in System.Type._impl with a RuntimeTypeHandle rather
4240         than the actual MonoClass *
4241
4242         (ves_icall_type_from_handle): change from type_class to
4243         monotype_class
4244
4245         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
4246         implemented
4247
4248         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
4249         implemented
4250
4251         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
4252
4253         (ves_icall_System_Reflection_Assembly_GetType): implemented
4254
4255         (ves_icall_System_MonoType_assQualifiedName): implemented
4256
4257         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
4258
4259 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
4260
4261         * assembly.c (mono_assembly_open): Implement a cache for the
4262         assemblies. 
4263
4264         (mono_assembly_close): only destroy the assembly when the last
4265         reference is gone.
4266         
4267 2001-11-09  Dick Porter  <dick@ximian.com>
4268
4269         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
4270
4271 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
4272
4273         * class.c (mono_class_metadata_init): bug fix: compute the right slot
4274
4275 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
4276
4277         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
4278         from Martin Weindel.
4279         * object.h: add mono_string_chars ().
4280
4281 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
4282
4283         * reflection.c (build_compressed_metadata): Eliminates warnings
4284         and uses 64-bit clean code.
4285
4286         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
4287         (mono_type_equal): Change signature to eliminate warnings.
4288
4289 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
4290
4291         * icall.c, loader.c: remove the internalcall array constructors.
4292         Changes to match the new MonoArray structure.
4293         * object.h, object.c: an array object doesn't allocate an extra
4294         vector. Add mono_array_new_full () to create jagged arrays easily.
4295
4296 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
4297
4298         * metadata.h, metadata.c: add mono_metadata_field_info () to
4299         retreive all the info about a field from vairous tables.
4300         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
4301         * class.h, class.c: augment MonoClassField with more info.
4302         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
4303         policy and load a field's RVA if needed.
4304
4305 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
4306
4307         * class.c (mono_class_metadata_init): create a trampoline for all
4308         virtual functions instead of actually compiling them.
4309
4310 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
4311
4312         * class.h, class.c: include name in MonoClassField.
4313         * class.c: fix fundamental type of System.Object and System.String.
4314         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
4315         tokens in ldtoken.
4316         * icall.c: remove internalcalls for the Reflection stuff that is now
4317         done in C# code.
4318         * loader.c: mono_field_from_memberref () implementation.
4319         * mono-endian.c: thinko (s/struct/union/g).
4320         * object.c, object.h: make the mono_string_* prototypes actually use
4321         MonoString instead of MonoObject.
4322         * reflection.c, reflection.h: updates for changes in the reflection
4323         code in corlib: we use C structures that map to the actual C# classes.
4324         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
4325         fat method header if needed and use the info from the ILGenerator for
4326         methods. Handle fields in types. Misc fixes.
4327
4328 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
4329
4330         * class.c (mono_class_metadata_init): bug fix: always allocate
4331         space for static class data
4332
4333 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
4334
4335         * class.c (mono_compute_relative_numbering): use relative
4336         numbering to support fast runtime type checks.
4337
4338 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
4339
4340         * class.c (mono_class_create_from_typeref): added debugging output
4341         to print class name when MonoDummy is returned instead of real class
4342
4343 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
4344
4345         * class.c (mono_class_metadata_init): interface offset table now
4346         contains pointers into the vtable - this is more efficient for the jit
4347
4348 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
4349
4350         * class.c (mono_class_metadata_init): use a temporary vtable (the
4351         old algorithm only worked for the interpreter, but not for the jit)
4352
4353 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
4354
4355         * loader.c (method_from_memberref): use mono_class_get to get the
4356         class of an array instead of using System.Array directly.
4357         (mono_get_method): also add MEMBERREF methods to the method cache
4358         which usefull for arrays.
4359
4360 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
4361
4362         * pedump.c (arch_compile_method): added to compute vtable entry
4363
4364         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
4365         number of interfaces.
4366         
4367         * class.h: merged MonoArrayClass into MonoClass
4368
4369         * class.c (mono_class_create_from_typedef): compute the vtable size and
4370         allocate space to include the vtable inside MonoClass
4371         (mono_class_metadata_init): initialize the vtable
4372
4373 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
4374
4375         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
4376         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
4377         * image.c: endian fixes by Laurent Rioux.
4378         * object.h, object.c: rename MonoStringObject to MonoString and
4379         MonoArrayObject to MonoArray. Change some function names to conform to
4380         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
4381         guint16* as first argument, so don't use char*.
4382         Provide macros to do the interesting things on arrays in a portable way.
4383         * threads-pthread.c: updates for the API changes and #include <sched.h>
4384         (required for sched_yield()).
4385         * icall.c: updates for the API changes above.
4386         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
4387         platforms that need them.
4388
4389 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
4390
4391         * class.c: set the correct type for all the fundamental
4392         type when loading the class.
4393
4394 2001-10-05  Dick Porter  <dick@ximian.com>
4395
4396         * threads-pthread.c (pthread_mutex_timedlock): Simple
4397         compatibility version for C libraries that lack this call.
4398
4399 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
4400
4401         * class.c: MonoTypes stored in MonoClass are stored as
4402         fundamental MonoTypes when the class represents a
4403         fundamental type (System.Int32, ...).
4404         The TypeHandle return by ldtoken is a MonoType*.
4405         * icall.c: ves_icall_get_data_chunk () write out all the
4406         PE/COFF stuff. Implement ves_icall_define_method (),
4407         ves_icall_set_method_body (), ves_icall_type_from_handle ().
4408         * image.c: properly skip unknown streams.
4409         * loader.h, loader.c: add type_class to mono_defaults.
4410         * metadata.c, metadata.h: export compute_size () as
4411         mono_metadata_compute_size () with a better interface.
4412         Typo and C&P fixes.
4413         * pedump.c: don't try to print the entry point RVA if there is no entry point.
4414         * reflection.c, reflection.h: many cleanups, fixes, output method
4415         signatures and headers, typedef and typeref info, compress the metadata
4416         tables, output all the heap streams, cli header etc.
4417         * row-indexes.h: typo fixes.
4418
4419 2001-10-04  Dick Porter  <dick@ximian.com>
4420
4421         * object.h: Add a synchronisation mutex struct to MonoObject
4422
4423         * object.c (mono_new_object): Initialise the object
4424         synchronisation mutexes
4425
4426         * icall.c: System.Threading.Monitor internal calls
4427         
4428         * threads-pthread.h:
4429         * threads-pthread.c: System.Threading.Monitor internal calls
4430
4431         * threads-types.h: New file, includes the system-specific thread
4432         structures
4433         
4434         * threads-pthread-types.h:
4435         * threads-pthread-types.c: New files, handle pthread-specific
4436         synchronisation types
4437
4438         * threads-dummy-types.h: 
4439         * threads-dummy-types.c: New files of dummy support for
4440         thread-specific types
4441
4442         * metadata.c:
4443         * image.c:
4444         * pedump.c: include mono-endian.h not endian.h
4445         
4446         * Makefile.am: More threads files.
4447         Name mono-endian.h not endian.h
4448
4449 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
4450
4451         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
4452         stuff and implement a few more bits.
4453         * icall.c: a field needs to be dereferenced twice. Do not use the same
4454         name for two variables in the same scope.
4455         * image.c, image.h: cleanups.
4456
4457 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
4458
4459         * class.c (mono_class_metadata_init): bug fix: compute the right size
4460
4461 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
4462
4463         * icall.c: implemented some of the Reflection internalcalls.
4464         * image.c, image.h: start writing out the PE/COFF image.
4465         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
4466         that does the reverse than decode_blob_size ().
4467         * object.c: use mono_metadata_encode_value (). Move here
4468         temporary implementation of mono_string_to_utf8 ().
4469         * rawbuffer.c: make malloc_map static.
4470
4471 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
4472
4473         * metadata.c: fix type comparison for arrays.
4474         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
4475         Added a couple of new classes to monodefaults.
4476         * icall.c: added a couple of Reflection-related internalcalls.
4477         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
4478         Added a byval_arg MonoType to MonoClass.
4479
4480 2001-09-28  Dick Porter  <dick@ximian.com>
4481
4482         * icall.c:
4483         * threads-pthread.h: 
4484         * threads-pthread.c: Implemented internal calls for
4485         LocalDataStoreSlot operations.  Applied mutexes around all shared
4486         data.  Reworked the thread creation and Start() operations to
4487         avoid a race condition.
4488         
4489         * threads-dummy.h:
4490         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
4491
4492 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
4493
4494         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
4495
4496 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
4497
4498         * class.c, loader.c: warn and return NULL instead of erroring out.
4499         * icall.c: added System.AppDomain::getCurDomain().
4500         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
4501
4502 2001-09-25  Dick Porter  <dick@ximian.com>
4503
4504         * threads-pthread.h:
4505         * threads-pthread.c: Implemented timed thread joining and added
4506         System.Threading.Thread::Join_internal internal call
4507
4508         * icall.c: Added System.Threading.Thread::Join_internal internal call
4509
4510         * threads-dummy.h:
4511         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
4512
4513 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
4514
4515         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
4516         mono_string_intern () to implement the semantics of the ldstr opcode
4517         and the interning of System.Strings.
4518         * icall.c: provide hooks to make String::IsIntern and String::Intern
4519         internalcalls.
4520
4521 2001-09-23  Dick Porter  <dick@ximian.com>
4522
4523         * threads-dummy.c: 
4524         * threads-dummy.h: New files of dummy threading routines
4525
4526         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
4527         support code based on system specifics
4528
4529         Rename PTHREAD_LIBS to THREAD_LIBS
4530         
4531 2001-09-23  Dick Porter  <dick@ximian.com>
4532
4533         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
4534         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
4535         internal calls.
4536         (mono_thread_init): Set up a Thread object instance to return when
4537         the main thread calls Thread.CurrentThread
4538         (mono_thread_cleanup): Wait for all subthreads to exit
4539
4540         * icall.c: New internal calls for System.Threading.Thread::Sleep
4541         (including Schedule) and CurrentThread
4542
4543         * threads.h: New file, to insulate thread-specific stuff from the
4544         rest of the code
4545
4546 2001-09-21  Dick Porter  <dick@ximian.com>
4547
4548         * threads-pthread.h: 
4549         * threads-pthread.c: New file, for handling pthreads-style
4550         threading support.  Start() now starts a new thread and executes
4551         the ThreadStart delegate instance.
4552
4553         * icall.c: Added the internalcall for
4554         System.Threading.Thread::Start_internal
4555
4556         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
4557
4558 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
4559
4560         * loader.c: work around the different signatures for delegates
4561         constructors csc generates in compiled code vs the ones compiled in mscorlib.
4562
4563 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
4564
4565         * class.h, class.c: add mono_class_get_field_from_name ().
4566         * *: Fix C comments and other ANSI C issues.
4567
4568 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
4569
4570         * endian.h, assembly.c: fix some endianness issues.
4571
4572 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
4573
4574         * loader.h, load.c: add delegate_class to mono_defaults.
4575         Handle runtime provided methods in mono_get_method ().
4576
4577 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
4578
4579         * loader.c (mono_get_method): use pinvoke for internal call
4580
4581         * icall.c: use pinvoke for internal call
4582
4583         * loader.c (method_from_memberref): set the method name
4584
4585 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
4586
4587         * metadata.c: help the compiler generate better code for
4588         mono_class_from_mono_type ().
4589
4590 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
4591
4592         * class.c (mono_class_metadata_init): delayed computing of the
4593         class size to mono_class_metadata_init ()
4594
4595 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
4596
4597         * class.c, class.h: add an interfaces member to MonoClass.
4598         * image.c, image.h: add assembly_name field to MonoImage
4599         from the assembly table.
4600         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
4601
4602 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
4603
4604         * class.c: Handle Array in mono_class_from_mono_type ().
4605         * metadata.c, pedump.c: some endian fixes.
4606
4607 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
4608
4609         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
4610         * metadata.c: fix small problem introduced with the latest commit.
4611
4612 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
4613
4614         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
4615         We don't need a MonoMetadata pointer anymore to compare signatures in
4616         mono_metadata_signature_equal (), update callers.
4617         Reduced memory usage an number of allocations for MonoMethodHeader and
4618         MonoMethodSignature.
4619
4620 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
4621
4622         * metadata.c: added compare for szarray.
4623
4624 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
4625
4626         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
4627         and add a couple more types to it and mono_defaults. Give an hint on
4628         classes that need implementing in our corlib and are referenced
4629         in mscorlib.
4630
4631 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
4632
4633         * class.h, class.c: keep track if a class is also an Enum.
4634         * loader.c: Implement a couple more types for use in libffi
4635         marshalling. Gives better diagnostics when failing to dlopen
4636         a library. Set method->klass for P/Invoke methods, too.
4637
4638 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
4639
4640         * class.c, class.h: add a MonoType this_arg to MonoClass that
4641         represents a pointer to an object of the class' type that
4642         can be used by the interpreter and later the type cache.
4643         Add best guess alignment info for valuetype objects.
4644
4645 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
4646
4647         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
4648         into MonoType: one less level of indirection and allocation and
4649         simplifies quite a bit of code. Added cache for MonoTypes that are
4650         used frequently, so that we don't need to allocate them all the time.
4651
4652 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
4653
4654         * class.c (mono_class_create_from_typedef): System.Enum is also a
4655         value type, although it does not derive from System.ValueType
4656         (maybe a bug in the ms compiler?)
4657
4658         * metadata.c (mono_type_size): return the right size for value types
4659
4660         * loader.c (mono_get_method): only initialize method header if not abstract
4661
4662         * class.c (mono_class_from_mono_type): use mono_default values. 
4663
4664 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
4665
4666         * *: use MonoClass pointers instead of <type_tokens>
4667         
4668         * class.h: new flag: metadata_inited.
4669
4670         * class.c (mono_class_metadata_init): impl.
4671         (mono_class_instance_size): impl.
4672         (mono_class_data_size): impl.
4673
4674 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
4675
4676         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
4677         MonoClass now has the name and name_space fields. 
4678         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
4679         mono_get_method () takes and optional MonoClass as argument.
4680         Removed mono_typedef_from_name() and added mono_class_token_from_name()
4681         instead that takes advantage of a map from class names to typedef
4682         tokens in MonoImage.
4683
4684 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
4685
4686         * metadata.c: zero is not a valid alignment boundary.
4687         Merge MONO_TYPE_VOID in default decoding code.
4688
4689 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
4690
4691         * image.h: merged MonoMetadata into MonoImage
4692
4693         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
4694         identify the type of elements.
4695
4696 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
4697
4698         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
4699         * cil-coff.h: split MonoMSDOSHeader and add size info.
4700         * image.c: add some consistency checks.
4701         * metadata.c: fix row size computation: one programmer
4702         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
4703         add explanation for the locator routine.
4704         Fix decoding of size in method header.
4705         
4706 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
4707
4708         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
4709         (g_concat_dir_and_file): Bring g_concat_dir_and_file
4710         function from gnome-libs.  This uses the right path separator
4711         based on the OS, and also works around a bug in some systems where
4712         a double slash is not allowed. 
4713         (default_assembly_name_resolver): Use g_concat_dir_and_file
4714         (mono_assembly_open): ditto.
4715
4716 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
4717
4718         * metadata.c (mono_metadata_signature_equal): impl.
4719
4720         * *: void is now a realy MonoType (instead of using NULL)
4721         
4722         * metadata.c (do_mono_metadata_parse_type): use
4723         mono_metadata_parse_type to parse void value.
4724
4725 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
4726
4727         * metadata.c, metadata.h: in the signature and method header store
4728         only the space required for holding the loca vars and incoming arguments.
4729
4730 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
4731
4732         * metadata.c (do_mono_metadata_parse_type): treat void like any
4733         other type (instead of assigning NULL);
4734
4735 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
4736
4737         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
4738
4739 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
4740
4741         * image.c (do_mono_image_open): added a cache for arrays.
4742
4743 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
4744
4745         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
4746         decode a single column from a row in a metadata table and changes
4747         to take advantage of it in the typedef locator (gives a nice speed up).
4748         Store offset info for function params.
4749
4750 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
4751
4752         * image.h (MONO_IMAGE_IS_CORLIB): removed 
4753
4754 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
4755
4756         * assembly.c: how could mono_assembly_close () had ever worked?
4757         * metadata.c, metadata.h: provide offset info for local vars.
4758         Implement mono_type_size () to take care of alignment as well
4759         as size (it was mono_field_type_size in cli/class.c before).
4760
4761 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
4762
4763         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
4764
4765         * assembly.h (CORLIB_NAME): set to corlib.dll
4766
4767         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
4768
4769 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
4770
4771         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
4772         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
4773         tokentype.h: massive namespace cleanup.
4774
4775 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
4776
4777         * metadata.h, metadata.c: decode exception clauses when parsing method header.
4778
4779 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
4780
4781         * metadata.c (mono_metadata_free_type): added check for type !=
4782         NULL (void) before calling mono_metadata_free_type()
4783
4784 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
4785
4786         * metadata.h, row_indexes.h: added header with enumerations to use
4787         to index in the columns from tables in metadata and to decode coded
4788         tokens: we should start using this instead of embedding magic numbers
4789         all over the code.
4790
4791 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
4792
4793         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
4794         Move metadata_t info from cli_image_info_t to MonoImage, where
4795         it's easily accessible. Changed all the uses accordingly.
4796         Added the method and class caches to MonoImage.
4797         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
4798         and mono_metadata_decode_value () signature to be more consistent
4799         with the other parse functions (and simplify code). Taken advantage
4800         of zero-length array allocation with GCC. Removed reduntant (and
4801         wrong) MonoFieldType struct and use MonoParam instead. Changed
4802         mono_metadata_parse_field_type () to use common code for parsing.
4803         Added mono_metadata_typedef_from_field () and
4804         mono_metadata_typedef_from_method () to lookup a typedef index from a
4805         field or method token.
4806         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
4807
4808 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
4809
4810         * metadata.c (mono_metadata_parse_field_type): Implement. 
4811         (do_mono_metadata_parse_type): Split engine from
4812         mono_metadata_parse_type, so that we can create smaller structures
4813         for things that just have one pointer to the MonoType (look at
4814         the MonoFieldType)
4815
4816 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
4817
4818         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
4819         as Jan Gray found out, it is incorrect. 
4820
4821 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
4822
4823         * assembly.c: Implement asssembly loading.  This loads an image
4824         and loads all the referenced assemblies.  Come to think of it, we
4825         could always do lazy loading of the assemblies. 
4826
4827         * image.c (mono_image_open): Keep loaded images in a hashtable.
4828
4829         * image.h (MonoImage): Add reference count.
4830
4831 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
4832
4833         * assembly.c (mono_assembly_open): Keep track of the file name in
4834         case the assembly has no ASSEMBLY table.
4835
4836         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
4837         from get.c here.
4838
4839 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
4840
4841         * metadata.c, metadata.h: decode local vars in method header
4842         parse function. Change callers accordingly.
4843
4844 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
4845
4846         * metadata.h, cil-coff.h: protect against multiple inclusion.
4847         Added some new structures to hold information decoded from metadata:
4848         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
4849         and relevant decoding/free functions.
4850         * metadata.c: implement decoding functions. Add warning for out of bounds
4851         index in mono_metadata_locate(). Implement mono_get_method () to retreive
4852         all the info about a method signature and invocation. Remove check on
4853         uninitialized local var in parse_mh() and fix memory leak.
4854
4855 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
4856
4857         * metadata.h: More macros.
4858
4859         * tokentype.h: New file.
4860
4861 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
4862
4863         * assembly.c: added a consistency check and initialize
4864         some structures with g_new0().
4865         * metadata.c: fixed a couple more bugs in table size computation
4866         and add other checks for out-of bound access to metadata.
4867
4868 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
4869
4870         * metatada.c: fix bugs computing table sizes. Spew a
4871         warning when index in string heap is out of bounds.
4872
4873 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
4874
4875         * metadata.h: Add a couple of macros to manipulate tokens. 
4876
4877 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
4878
4879         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
4880         cli_section_tables).
4881
4882 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
4883
4884         * metadata.c (mono_metadata_user_string): New function, provides
4885         access to the UserString heap. 
4886
4887 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
4888
4889         * metadata.c: Add inline documentation.
4890
4891 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
4892
4893         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
4894         files. 
4895
4896 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
4897
4898         * typeattr.h: New file, TypeAttribute flags. 
4899
4900 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
4901
4902         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
4903         mono_assembly_ensure_section): Section loading code.
4904         (load_section_tables): Load the sections.
4905
4906         * mono/metadata/metadata.c (mono_metadata_locate_token,
4907         mono_metadata_locate): Functions to locate the information
4908         definition given a token or a table and an index.
4909         (mono_metadata_compute_table_bases): New.
4910         (compute_size): New function to compute the sizes of the various
4911         tables.
4912
4913         * mono/metadata/metadata.h: Finish listing the different index
4914         types. 
4915
4916         * mono/metadata/pedump.c: Improve to dump new information.
4917
4918 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
4919
4920         * mono/metadata/metadata.c: Entered all the tables matching
4921         Beta2. 
4922
4923         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
4924
4925
4926