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