2002-08-02 Dietmar Maurer <dietmar@ximian.com>
[mono.git] / mono / interpreter / ChangeLog
1 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
2
3         * interp.c (get_virtual_method): support proxies
4         (ves_exec_method): impl. LDFLD/STFLD for proxies.
5
6 Fri Aug 2 13:00:41 CEST 2002 Paolo Molaro <lupus@ximian.com>
7
8         * interp.c, interp.h: implemented exception trap for runtime_invoke
9         and handle exceptions across managed/unmanaged boundaries.
10
11 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
12
13         * interp.c (stackval_from_data): add pinvoke argument
14         (stackval_to_data): add pinvoke argument. We need consider the
15         fact that unmanages structures may have different sizes.
16         (ves_pinvoke_method): do not call stackval_from_data if the result
17         is a value type.
18
19 Wed Jul 31 17:47:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
20
21         * interp.c: simplified some more branch code.
22
23 Wed Jul 31 16:50:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
24
25         * interp.c: fixed indentation, simplified some code.
26
27 Wed Jul 31 14:29:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
28
29         * interp.c: fix so that mint can at least get to executing Main().
30
31 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
32
33         * interp.c: use the new marshaling code. better delegate/remoting 
34         support.
35         (ves_exec_method): bug fix - directly jump to handle_exception.
36
37 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
38
39         * interp.c (main): install compile_method handler
40
41 Wed Jul 24 13:02:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
42
43         * interp.c: implemented stack walking function.
44
45 Fri Jul 19 14:21:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
46
47         * interp.c: fix float boxing on LE systems.
48
49 Sat Jul 13 19:54:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
50
51         * interp.c: advance ip in conv.r.un.
52
53 2002-07-01  Dick Porter  <dick@ximian.com>
54
55         * interp.c (ves_exec): Removed unneeded argument to
56         mono_runtime_run_main()
57
58 2002-06-25  Dick Porter  <dick@ximian.com>
59
60         * interp.c (ves_exec): Pass the assembly to mono_runtime_run_main
61
62 Wed Jun 19 17:01:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
63
64         * interp.c: un-broke after stack trace changes.
65
66 Fri May 31 16:17:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
67
68         * interp.c, hacks.h: compiler compatibility fixes.
69
70 Fri May 31 13:25:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
71
72         * interp.c, mint.1: added --config command line option.
73
74 Thu May 30 14:14:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
75
76         * interp.c: lookup P/Invoke method addr only when needed.
77
78 2002-05-29  Dietmar Maurer  <dietmar@ximian.com>
79
80         * interp.c (ves_exec_method): free type in CEE_SIZEOF
81
82 Tue May 28 16:10:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
83
84         * interp.c: fixed SIZEOF to work with typedef/typeref.
85
86 Fri May 24 15:33:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
87
88         * interp.c: added partial async delegate and remoting support.
89
90 Thu May 23 18:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
91
92         * interp.c: special case string ctors in invoke.
93         Handle null object in throw. Misc integer type mismatch fixes.
94
95 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
96
97         * interp.c (ves_runtime_method): share more code with the jit.
98
99 Wed May 22 12:31:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
100
101         * interp.c: fixed finally handling. In trace mode show
102         exception handling operations and the contents of the stack in the same
103         line as the executing instruction.
104
105 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
106
107         * interp.c: Updated help display.
108
109 2002-05-20  Radek Doulik  <rodo@ximian.com>
110
111         * interp.c (dump_stack): print boxed values for --noptr
112         (ves_exec_method): use stackval_to_data as pointed out by lupus
113
114 2002-05-17  Radek Doulik  <rodo@ximian.com>
115
116         * interp.c (dump_stack): if --noptr then print content of strings
117         in form [str:<printed string>]
118
119 2002-05-16  Radek Doulik  <rodo@ximian.com>
120
121         * interp.c (ves_exec_method): use data.i instead of data.l in i32
122         case
123         (ves_exec_method): set type in I64 <--> I32 conversions
124
125 2002-05-15  Radek Doulik  <rodo@ximian.com>
126
127         * interp.c (ves_runtime_method): moved stackval_from_data call
128         inside #else branch, consulted on irc with lupus
129
130 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
131
132         * interp.c (ves_exec_method): use new mono_unhandled_exception()
133
134 2002-05-14  Radek Doulik  <rodo@ximian.com>
135
136         * interp.c: introduced new --noptr option to suppres pointer
137         address printing. I find this useful for comparing trace outputs
138         while porting to ppc
139
140 Tue May 14 16:37:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
141
142         * interp.c: some finally handling fixes and compilation fixes for
143         changes in the runtime lib.
144
145 2002-04-30  Dick Porter  <dick@ximian.com>
146
147         * interp.c: Tell glib to not abort when g_log() etc print
148         recursively
149
150 Mon Apr 22 16:52:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
151
152         * interp.c: handle muslticast delegates. Implement a couple more
153         convert opcodes. Pretend we spend some time jitting...
154
155 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
156
157         * interp.c (ves_exec_method): support internalcall String constructors
158
159 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
160         
161         * interp.c: support for new szarray format.
162
163 Tue Apr 16 20:12:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
164
165         * interp.c: removed profiling code (moved to common library).
166         Implemented inlining for some special methods.
167
168 2002-04-15      Patrik Torstensson <patrik.torstensson@labs2.com>
169
170         * interp.c: Using fullnames when adding icall's (array)
171
172 Wed Apr 10 16:07:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
173
174         * interp.c: quick implementation for opcodes needed by the new parse
175         routines in corlib.
176
177 Tue Apr 9 13:08:26 CEST 2002 Paolo Molaro <lupus@ximian.com>
178
179         * interp.c: make the interp thread-safe wrt the metadata lib.
180
181 Mon Apr 8 17:15:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
182
183         * interp.c: display return value with --trace.
184         Call mono_runtime_init ().
185
186 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
187
188         * interp.c (interp_mono_runtime_invoke): handle more types,
189         removed runtime_exec_main
190
191 Thu Apr 4 11:36:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
192
193         * interp.c: don't try to get an IL opcode for runtime and internal
194         call methods.
195
196 Thu Mar 28 16:54:51 CET 2002 Paolo Molaro <lupus@ximian.com>
197
198         * interp.c: spring warning cleanup.
199
200 Thu Mar 28 12:03:28 CET 2002 Paolo Molaro <lupus@ximian.com>
201
202         * interp.c: check obj address in stfld.
203
204 2002-03-27  Dietmar Maurer  <dietmar@ximian.com>
205
206         * interp.c (ves_exec_method): CASTCLASS: fix for transparent proxy
207
208 Tue Mar 26 20:09:10 CET 2002 Paolo Molaro <lupus@ximian.com>
209
210         * interp.c: set frame->ip before dumping the stack trace.
211
212 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
213
214         * interp.c: remove glib mem vtable code.
215
216 2002-03-26  Dick Porter  <dick@ximian.com>
217
218         * interp.c: Show thread ID's in trace output.
219                 
220         New option "--traceclassinit" to put debug output around
221         runtime_class_init().
222
223         Make sure all options are displayed in usage().
224
225 Tue Mar 26 17:03:14 CET 2002 Paolo Molaro <lupus@ximian.com>
226
227         * interp.c: support fieldrefs when accessing instance fields.
228
229 Mon Mar 25 12:59:52 CET 2002 Paolo Molaro <lupus@ximian.com>
230
231         * interp.c: allow tracing to be done on a per-method basis.
232         Fix interp_mono_runtime_invoke() to deal correcttly with the return
233         value. Disable glib mem vtable setting.
234
235 Thu Mar 21 18:08:37 CET 2002 Paolo Molaro <lupus@ximian.com>
236
237         * interp.c: set stack trace info when throwing an exception.
238
239 Thu Mar 21 17:32:46 CET 2002 Paolo Molaro <lupus@ximian.com>
240
241         * interp.c: intern strings before executing a method (and don't 
242         intern command line arguments anymore). Add sanity checks in alloca
243         use.
244
245 Sat Mar 16 19:15:18 CET 2002 Paolo Molaro <lupus@ximian.com>
246
247         * interp.c: restore frame on return from unmanaged calls.
248         Add support for continuing execution up to x IL insn.
249         Fix exception handling when an exception is raised in the catch
250         handler of the same method that issued the first one.
251
252 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
253
254         * interp.c (ves_runtime_method): set method_info field
255
256 Mon Mar 11 14:48:07 CET 2002 Paolo Molaro <lupus@ximian.com>
257
258         * interp.c: corlib consistency checls moved to libmetadata.
259
260 Mon Mar 11 11:27:27 CET 2002 Paolo Molaro <lupus@ximian.com>
261
262         * interp.c: use the new facilities in debug-helpers to
263         disassemble CIL code and match method names to MonoMethods.
264
265 Thu Mar 7 17:20:59 CET 2002 Paolo Molaro <lupus@ximian.com>
266
267         * interp.c: Boehm-GC enable. Fix some overflow opcodes.
268
269 Tue Mar 5 18:12:40 CET 2002 Paolo Molaro <lupus@ximian.com>
270
271         * interp.c: fix non-debug build and some more opcode work.
272
273 Mon Mar 4 11:21:44 CET 2002 Paolo Molaro <lupus@ximian.com>
274
275         * interp.c: print the address of 'this' in tracing mode.
276
277 Thu Feb 28 19:18:59 CET 2002 Paolo Molaro <lupus@ximian.com>
278
279         * interp.c: add checks for more binary consistency.
280
281 2002-02-27  Dietmar Maurer  <dietmar@ximian.com>
282
283         * interp.c (interp_mono_runtime_invoke): use alloca instead of g_new0
284
285 Tue Feb 26 11:43:34 CET 2002 Paolo Molaro <lupus@ximian.com>
286
287         * interp.c: added profiling for object creation.
288
289 Mon Feb 25 17:37:07 CET 2002 Paolo Molaro <lupus@ximian.com>
290
291         * interp.c: use correct value for guint64 max.
292
293 2002-02-22  Radek Doulik  <rodo@ximian.com>
294
295         * interp.c: s/gulong/guint64 as it differs on ppc
296
297 Wed Feb 20 22:18:40 CET 2002 Paolo Molaro <lupus@ximian.com>
298
299         * interp.c: more complete runtime_invoke () implementation.
300         Fixed castclass/isinst to work correctly with arrays.
301
302 Tue Feb 19 20:21:14 CET 2002 Paolo Molaro <lupus@ximian.com>
303
304         * interp.c: implement the runtime_invoke function.
305
306 Mon Feb 18 15:49:20 CET 2002 Paolo Molaro <lupus@ximian.com>
307
308         * interp.c: fix alignment code. Make sure to init classes
309         in more cases. Command-line arguments are interned.
310
311 2002-02-16  Radek Doulik  <rodo@ximian.com>
312
313         * interp.c (ves_exec_method): test type of sp [-1] instead of sp
314         [0], because sp [-1] is the value going to be shifted, fixed in
315         CEE_SHL, CEE_SHR, CEE_UN opcodes)
316
317 Sat Feb 16 12:00:24 CET 2002 Paolo Molaro <lupus@ximian.com>
318
319         * interp.c: fixed cut&paste error for ldind.r4 and ldind.r8.
320
321 Fri Feb 15 15:07:27 CET 2002 Paolo Molaro <lupus@ximian.com>
322
323         * interp.c: use strrchr instead of rindex. use _isnan and _finite on
324         win32 systems.
325
326 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
327
328         * interp.c (ves_exec_method): replace 
329         'g_assert (sp->type = VAL_VALUETA)' with 
330         'g_assert (sp->type == VAL_VALUETA)' otherwise
331         the assert always passes. FIXME: should the test have been !=?
332
333 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
334
335         * interp.c (stackval_from_data): fix for MONO_TYPE_PTR
336
337 Wed Feb 13 16:17:38 CET 2002 Paolo Molaro <lupus@ximian.com>
338
339         * interp.c: fixed newobj implementation for valuetypes bug found by
340         dietmar. sub.ovf dummy code.
341
342 Tue Feb 12 14:08:47 CET 2002 Paolo Molaro <lupus@ximian.com>
343
344         * hacks.h: check against redefining preprocessor symbol.
345         * interp.c: fix profile info to return more sensible results.
346
347 Mon Feb 11 13:05:29 CET 2002 Paolo Molaro <lupus@ximian.com>
348
349         * interp.c: added "die on exception" command line argument.
350         When we segfault, set the message in the exception to "Segmentation
351         fault" so people can recognise what's going on.
352
353 2002-02-10  Miguel de Icaza  <miguel@ximian.com>
354
355         * interp.c (ves_exec_method): Compare the element_class type token
356         in the class we got as well, instead of the element class vs the
357         toplevel class.
358
359         This fixes the invalid cast exceptions during unboxing
360
361 Fri Feb 8 13:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
362
363         * interp.c: use opcode information from libmetadata.
364
365 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
366
367         * interp.c (ves_exec_method): CEE_UNBOX: use element_class for
368         type check.
369
370 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
371
372         * interp.c (main): impl. __array_Address icall
373
374 Fri Feb 1 16:03:53 CET 2002 Paolo Molaro <lupus@ximian.com>
375
376         * interp.c: exception fixes. Use mono_method_pointer_get ()
377         to easy porting to other archs. Some support for overflow detection.
378
379 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
380
381         * interp.c, jit.c (main): install runtime_exec_main handler
382         (main): bug fix - call TlsAlloc () before we execute code
383
384 2002-01-23  Dick Porter  <dick@ximian.com>
385
386         * interp.c: Added some kludges to cope with CONV_OVF_I2,
387         CONV_OVF_I4 and ADD_OVF so that number formatting works.  Also
388         initialise and cleanup the network support.
389
390 Thu Jan 10 20:59:59 CET 2002 Paolo Molaro <lupus@ximian.com>
391
392         * interp.c, interp.h: add a flag to mono_create_trampoline ()
393         to handle runtime methods.
394
395 Sat Jan 5 15:45:14 CET 2002 Paolo Molaro <lupus@ximian.com>
396
397         * interp.c: allow classname:method name in --debug argument.
398         Fix box opcode for valuetypes. Fix a few opcode to take a 16 bit
399         index instead of 32 (stloc, ldloc, starg, etc.).
400
401 Thu Jan 3 23:19:27 CET 2002 Paolo Molaro <lupus@ximian.com>
402
403         * interp.c: temporary mul.ovf, mul.ovf.un, add.ovf.un implementations
404         to get the compiler going.
405
406 Mon Dec 24 17:23:45 CET 2001 Paolo Molaro <lupus@ximian.com>
407
408         * interp.c: fix ldc.i8.
409
410 Thu Dec 20 20:09:48 CET 2001 Paolo Molaro <lupus@ximian.com>
411
412         * interp.c: fix delegate method invocation to handle both
413         static and instance methods.
414
415 Tue Dec 18 18:48:50 CET 2001 Paolo Molaro <lupus@ximian.com>
416
417         * interp.c: make segv_handler static, handle runtime methods in stack
418         trace.
419
420 Thu Dec 13 20:24:28 CET 2001 Paolo Molaro <lupus@ximian.com>
421
422         * interp.c: correctly handle exceptions generated in C code.
423         Install an handler for SIGSEGV. Bare-bones profiler and hook for the
424         verifier.
425
426 Mon Dec 3 17:15:44 CET 2001 Paolo Molaro <lupus@ximian.com>
427
428         * interp.c: call mono_init() after registering internal calls.
429
430 2001-11-30  Dick Porter  <dick@ximian.com>
431
432         * interp.c: Replace get_named_exception() with
433         mono_exception_from_name()
434
435 Fri Nov 30 12:05:21 CET 2001 Paolo Molaro <lupus@ximian.com>
436
437         * interp.c: calculate locals and args offsets only once
438         per method call. Cache trampoline code as well.
439
440 2001-11-23  Dietmar Maurer  <dietmar@ximian.com>
441
442         * interp.c (ves_exec_method): bug fix for exception5.cs
443
444 Mon Nov 19 11:33:00 CET 2001 Paolo Molaro <lupus@ximian.com>
445
446         * interp.c: start adding support for handling exceptions across
447         managed/unmanaged boundaries. Cleanup Delegate method invocation.
448         Pass the correct target object in Delegate::Invoke and use the correct
449         'this' pointer in ldvirtftn (bugs pointed out by Dietmar).
450
451 Thu Nov 15 17:40:24 CET 2001 Paolo Molaro <lupus@ximian.com>
452
453         * interp.c: handle enums with underlying type different from int32.
454         More checks for C structs <-> C# objects consistency.
455
456 Wed Nov 14 19:23:00 CET 2001 Paolo Molaro <lupus@ximian.com>
457
458         * interp.c: move the stack frame dumping code to a function so it can
459         be called from the debugger. Fix virtual method lookup for interfaces.
460         Throw exceptions instead of aborting in more places.
461         Print also the message in an exception. Updates for field renames in
462         corlib.
463
464 2001-11-09  Dick Porter  <dick@ximian.com>
465
466         * Makefile.am (mint_LDADD): Don't need THREAD_LIBS any more
467
468 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
469
470         * interp.c: Include stdlib to kill warning.
471         (check_corlib): Adjust format encodings to remove warnings.
472
473 Wed Nov 7 15:47:36 CET 2001 Paolo Molaro <lupus@ximian.com>
474
475         * interp.c: updates for changes in array code.
476
477 Fri Nov 2 19:06:54 CET 2001 Paolo Molaro <lupus@ximian.com>
478
479         * interp.c: hanlde field refs. Throw an exception on NULL references.
480         Check consistency of corlib types with the C struct representation.
481
482 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
483
484         * interp.c (ves_exec_method): use relative numbering for runtime
485         type checks (and make it work with interfaces)
486
487 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
488
489         * interp.c: removed newobj()
490
491 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
492
493         * interp.c (get_virtual_method): use the vtable
494         (arch_compile_method): added to compute vtable entry
495
496 Mon Oct 8 16:14:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
497
498         * interp.c: use the accessors provided in object.h to deal with
499         MonoArrays. Updates for API renames in metadata. Throw exception
500         in ldelema if index is out of bounds.
501
502 Mon Oct 8 10:44:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
503
504         * interp.c: fixes for changes in metadata.
505
506 2001-10-04  Dick Porter  <dick@ximian.com>
507
508         * interp.c (ves_runtime_method): init_class() the
509         mono_defaults.delegate_class
510         Include mono-endian.h not endian.h
511
512 Tue Oct 2 18:51:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
513
514         * interp.c: set frame->ip in the leave opcode. Make db_methods static.
515
516 Sun Sep 30 11:57:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
517
518         * interp.c: compiler and ANSI C portability fixes.
519
520 Fri Sep 28 19:37:46 CEST 2001 Paolo Molaro <lupus@ximian.com>
521
522         * interp.c: Implemented ldtoken, conv.ovf.i. Use MonoClass->byval_arg
523         (and remove related kludges). Don't choke on access to arrays of
524         references. Throw an exception when an internalcall or P/Invoke
525         function don't have an implementation. Throw and EngineException
526         for unimplemented opcodes.
527
528 Tue Sep 25 11:12:35 CEST 2001 Paolo Molaro <lupus@ximian.com>
529
530         * interp.c: fixed get_virtual_method () to deal with interface
531         methods better.
532
533 Mon Sep 24 18:50:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
534
535         * interp.c: catch a few more error conditions with exceptions instead of
536         erroring out.
537         Don't use g_print() in stack traces because it doesn't work with
538         some float values.
539         When we call an instance method of a valuetype class, unbox the 'this'
540         argument if it is an object.
541         Use mono_ldstr () to implement the ldstr opcode: it takes care of
542         interning the string if necessary.
543         Implemented new opcodes: ckfinite, cgt.un, clt.un, ldvirtftn, ldarga.
544         Fixes to handle NaNs when comparing doubles.
545         Make sure the loaded assembly has an entry point defined.
546         Fixed portability bugs in neg and not opcodes.
547
548 2001-09-24  Dietmar Maurer  <dietmar@ximian.com>
549
550         * interp.c (ves_exec_method): LDC_I4: 8bit constants are signed
551         (ves_exec_method): bug fix for NOT/NEG
552         (main): fix bug in parameter parsing
553
554 2001-09-23  Dick Porter  <dick@ximian.com>
555
556         * Makefile.am (mint_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
557
558 2001-09-23  Dick Porter  <dick@ximian.com>
559
560         * interp.c (main): Do some thread setup and cleanup around the
561         call to ves_exec()
562
563 2001-09-21  Dick Porter  <dick@ximian.com>
564
565         * Makefile.am (mint_LDADD): Added PTHREAD_LIBS to the link line
566
567 Thu Sep 20 16:32:42 CEST 2001 Paolo Molaro <lupus@ximian.com>
568
569         * interp.c: implemented some more opcodes: calli, rem.un,
570         shr.un, conv.u, cpobj, stobj, conv.r.un, conv.ovf.i1.un,
571         conv.ovf.i2.un, conv.ovf.i4.un, conv.ovf.i8.un, conv.ovf.i.un,
572         conv.ovf.u1.un, conv.ovf.u2.un, conv.ovf.u4.un, conv.ovf.u8.un,
573         conv.ovf.u.un.
574         Fix some 64 bit issues in the array element access code and a small bug.
575         Throw an exception on index out of range instead of asserting.
576         Throw an exception on a NULL array instead of dying.
577         Stomped a memory corruption bug (.cctor methods were freed after
578         executing them, but they are stores in MonoClass now...).
579         Added a simple facility to invoke the debugger when a named
580         function is entered (use the cmdline option --debug method_name).
581         * interp.h: fix 64 bit issue.
582
583 Tue Sep 18 13:21:33 CEST 2001 Paolo Molaro <lupus@ximian.com>
584
585         * interp.c: fix some 64 bit issues. Safer support for delegates.
586
587 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
588
589         * interp.c (ves_exec_method): implement conv.u8 opcode. 
590
591 Mon Sep 10 20:20:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
592
593         * interp.c: endian fixes, comments.
594
595 Fri Sep 7 18:45:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
596
597         * interp.c, interp.h: make ves_exec_method () and stackval_from_data ()
598         non static. Implement a couple of runtime methods needed to
599         use delegates (ves_runtime_method ()).
600         Implemented ldftn opcode.
601
602 Thu Sep 6 15:41:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
603
604         * Makefile.am: link to libmonoarch.
605         * interp.h, interp.c: use mono_create_trampoline ().
606         Pass the command line arguments to Main (String[]) methods.
607
608 2001-08-30  Dietmar Maurer  <dietmar@ximian.com>
609
610         * interp.c (ves_pinvoke_method): removed the libffi dependency
611
612 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
613
614         * interp.c (ves_array_set): moved from icall.c
615         (ves_array_get): moved from icall.c
616
617         * icall.c: moved to metadata/icall.c
618
619 Wed Aug 29 12:46:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
620
621         * interp.c: some small optimizations. Fixes to do signed
622         compares when needed. Change C++ comments into C.
623         Implemented cgt, clt. Added --opcode-count cmdline switch.
624
625 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
626
627         * interp.c (ves_exec_method): better check for value types (get
628         the class to detect if we have a value type), implemented CEE_CONV_U1,
629         CEE_CONV_U2, CEE_CEQ
630         
631
632 Mon Aug 27 21:30:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
633
634         * interp.c: warn and exit when Main () expects the cmdline arguments
635         instead of creashing.
636
637 Mon Aug 27 20:16:37 CEST 2001 Paolo Molaro <lupus@ximian.com>
638
639         * interp.c: merge isinst/castclass handling. Hopefully implement
640         the right semantics for handling callvirt correctly (changes
641         here and there to support it). Integrate bugfix from Dietmar quickly
642         so he needs to handle the cvs conflict:-)
643
644 Mon Aug 27 12:20:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
645
646         * interp.c: fix compilation and updates for changes in metadata/.
647
648 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
649
650         * interp.c (main): Add option handling for the interpreter,
651         support the `--trace' option.
652
653 Sun Aug 26 23:04:46 CEST 2001 Paolo Molaro <lupus@ximian.com>
654
655         * interp.c: get in a dummy virtual method dispatch.
656         Added support for int64, native int and native uint as arguments.
657         Added debug enter/leave for icall and pinvoke methods, too.
658         Implement opcodes conv.i, conv.i8, ldelema.
659
660 Sun Aug 26 11:37:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
661
662         * interp.h, interp.c: load also a MonoClass pointer when we load
663         an address on the stack. Implemented conv.i1, conv.i2, con.i4,
664         conv.u4, conv.r4, conv.r8. Print the arguments in the stack trace
665         and the name of the exception.
666
667 Sat Aug 25 15:56:03 CEST 2001 Paolo Molaro <lupus@ximian.com>
668
669         * interp.c: Implemented some opcodes: starg.s, ldobj, isinst,
670         ldarg, starg, ldloc, ldloca, stloc, initobj, cpblk, sizeof.
671
672 Sat Aug 25 12:57:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
673
674         * interp.c: handle enumerations specially (not as valuetypes).
675
676 Fri Aug 24 19:34:04 CEST 2001 Paolo Molaro <lupus@ximian.com>
677
678         * interp.h, interp.c: add support for valuetypes.
679
680 Fri Aug 24 16:09:20 CEST 2001 Paolo Molaro <lupus@ximian.com>
681
682         * interp.c: updates for merge of MonoParam in MonoType.
683
684 Thu Aug 23 12:04:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
685
686         * interp.c: removed beforefieldinit check, it's a useless flag.
687         Added a couple more test cases to tests/ dir.
688
689 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
690
691         * interp.c (usage): Add version information
692         (ves_pinvoke_method): Typo fix.
693
694 Wed Aug 22 20:37:51 CEST 2001 Paolo Molaro <lupus@ximian.com>
695
696         * interp.c: simplified init_class (). Make sure a class
697         is fully initialized before executing a method in the class.
698         Search for the class constructor only on beforefieldinit classes.
699         Implement a bunch of opcodes: br, brfalse, brtrue, beq, bge,
700         bgt, blt, ble, bne.un, bge.un, bgt.un, ble.un, blt.un, stind.i,
701         ldflda, ldsflda, ldelem.i8, stelem.i8, leave.
702
703 Wed Aug 22 16:34:03 CEST 2001 Paolo Molaro <lupus@ximian.com>
704
705         * interp.c: Updates for changes in metadata/. Better output in debug mode
706         and in the stack trace. Completed rethrow handling
707
708 Tue Aug 21 18:56:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
709
710         * interp.c: new macro INIT_FRAME() to properly
711         initialize a MonoInvocation. Fixed a couple of buglets in exception code:
712         increase stack pointer when pushing the exception for catch blocks,
713         initialize frame->ex_handler to NULL, correctly try all the
714         catch blocks (don't incorrectly fallback on filter handling).
715         Added a couple more checks where we may need to throw an
716         exception. Added more exception creation functions.
717         Changed stackval_from_data() to take the target stackval as
718         argument. Implemented a couple more opcodes.
719         * interp.h: prepare stackval for value type code.
720
721 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
722
723         * Makefile.am (mint_LDADD): Renamed interpreter to mint.
724
725 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
726
727         * interp.c (get_named_exception): use the right constructor.
728
729 Mon Aug 20 18:58:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
730
731         * interp.c: fix buglet with the leave.s opcode.
732
733 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
734
735         * icall.c: changed everything to support the new calling convention
736
737         * hacks.h: added some macros for FreeBSD 
738
739         * interp.c (get_named_exception): use mono_object_new instead of
740         newobj, initialize the stack before we call the constructor.
741
742 Sat Aug 18 12:43:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
743
744         * interp.c, interp.h: added support code to create exceptions.
745         Changed interncal calling convnetion over to MonoInvocation, to support
746         exceptions, walking the stack back and forward and passing the 'this'
747         pointer separately (remove the cludges required before to pass this on the
748         stack). Use alloca heavily for both local vars and a copy of the incoming 
749         arguments. Init local vars to zero.
750         Simplify stackval_from_data() and stackval_to_data() to only take a pointer
751         instead of pointer + offset.
752         Implement a few exceptions-related opcodes and the code to run finally, fault and
753         catch blocks as well as a stack trace if no handler is found.
754         
755 2001-08-16  Alex Graveley  <alex@ximian.com>
756
757         * Makefile.am (mono_int_LDADD): Link with ../../libffi/libffi.a
758         instead of ../../libffi/.libs/libffi.a.
759
760 2001-08-10  Dietmar Maurer  <dietmar@ximian.com>
761
762         * interp.c (ves_exec_method): impl CASTCLASS
763
764         * icall.c: moved the internal call stuff to this file
765
766         * interp.c (ves_exec_method): impl. BOX/UNBOX
767         (ves_icall_System_Array_GetValue): impl.
768         (ves_icall_System_Array_SetValue): impl.
769         added myself to Authors
770
771 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
772
773         * implemented arrays, but you will need a modified version of 
774         Array.cs to get arrays working (will commit soon)
775         
776         * interp.c (ves_icall_array_Set): impl.
777         (ves_icall_array_Get): impl.
778         (ves_icall_array_ctor): impl.
779         (ves_icall_System_Array_GetRank): impl.
780         (ves_icall_System_Array_GetLength): impl.
781         (ves_icall_System_Array_GetLowerBound): impl.
782         (mono_lookup_internal_call): impl.
783
784 2001-08-06  Dietmar Maurer  <dietmar@ximian.com>
785
786         * interp.c (ves_exec_method): impl. NEWARR
787         (ves_exec_method): impl. most LDELEM/STELEM opcodes, LDLEN
788         (newarr): impl.
789         (mono_get_ansi_string): impl.
790         (mono_lookup_internal_call): impl.
791         (ves_exec_method): implemented internal calls
792
793 2001-08-05  Dietmar Maurer  <dietmar@ximian.com>
794
795         * interp.c (ves_pinvoke_method): removed all static vars.
796
797 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
798
799         * interp.c (ves_exec_method): found a way to do unordered
800         compares, implemented CEE_BNE_UN_S, CEE_BGE_UN_S, CEE_BGT_UN_S, 
801         CEE_BLE_UN_S, CEE_BLT_UN_S
802         
803 Wed Aug 1 22:51:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
804
805         * interp.c: handle also MONO_TYPE_CLASS to/from the stack.
806         Change locals to be a memory blob, instead of the structured
807         (but wrong) stackval. Implement bne.un.s opcode. Make the program
808         exit with the error code from Main().
809
810 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
811
812         * interp.c (ves_exec_method): implemented LDSTR
813
814 2001-07-31  Miguel de Icaza  <miguel@ximian.com>
815
816         * interp.c (GET_NATI): Switched from using nati_t to cli/types.h
817         m_i type.  Maybe we should rename the types to be m_i_t instead of
818         m_i alone.
819         
820         Make the code compile after I broke it.
821
822 Tue Jul 31 23:46:33 CEST 2001 Paolo Molaro <lupus@ximian.com>
823
824         * interp.c: fix cleanup.
825         * Makefile.am: don't link with disassembler library.
826
827 2001-07-31  Miguel de Icaza  <miguel@ximian.com>
828
829         (ves_exec_method): Cleanup of the source code.
830
831 Tue Jul 31 20:13:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
832
833         * interp.c: implement stind.*, ldind.*, ldloca.s opcodes.
834         Provide better tracing with DEBUG_INTERP.
835
836 Tue Jul 31 17:52:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
837
838         * interp.c: massive namespace cleanup.
839
840 Mon Jul 30 20:09:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
841
842         * interp.c: update to use mono_method->name.
843
844 Fri Jul 27 20:54:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
845
846         * interp.c: start implementing callvirt. Classes with
847         class constructors are properly initialized when needed.
848         Fix error introduced in version 1.17.
849
850 Fri Jul 27 14:03:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
851
852         * interp.c: implement static field loading and storing.
853
854 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
855
856         * interp.c (ves_pinvoke_method): impl.
857
858 Fri Jul 27 11:49:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
859
860         * interp.c: Removed some debugging printouts. Made stackval_to_data
861         static. Handle also instance methods in CALL opcode. Fix ret to properly
862         deal with void functions. Fixed constructor to leave the object on
863         the stack.
864
865 Thu Jul 26 13:24:51 CEST 2001 Paolo Molaro <lupus@ximian.com>
866
867         * interp.c: ves_exec_method () doesn't take a MonoImage arg
868         anymore. Use the method cache in MonoImage. Updates to
869         mache recent changes in metadata. 
870         Fix newobj code to use new metadata features. Call the class
871         constructor after allocationg the object. Implemented load field
872         and store field opcodes (the support functions need to be finished).
873         
874 Tue Jul 24 16:51:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
875
876         * interp.c, hacks.h: moved a few ugly macros out of the code.
877         Implemented switch opcode.
878
879 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
880
881         * interp.c (newobj): Added function to handle newobj opcode.
882
883 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
884
885         * interp.c (ves_exec_method): Make the interpreter abort with more
886         information than it currently does.
887
888         Enable the slow processor, as it is easier to debug.
889
890 Sun Jul 15 17:50:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
891
892         * Started changelog.
893         * interp.c: use new mono_get_method () function to get the complete
894         info on a method invocation: we support now method invocation with
895         multiple (or zero) simple arguments and with or without a return value.
896         Implement also a couple more opcodes.