2001-11-09 Dietmar Maurer <dietmar@ximian.com>
[mono.git] / mono / interpreter / ChangeLog
1 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
2
3         * interp.c: Include stdlib to kill warning.
4         (check_corlib): Adjust format encodings to remove warnings.
5
6 Wed Nov 7 15:47:36 CET 2001 Paolo Molaro <lupus@ximian.com>
7
8         * interp.c: updates for changes in array code.
9
10 Fri Nov 2 19:06:54 CET 2001 Paolo Molaro <lupus@ximian.com>
11
12         * interp.c: hanlde field refs. Throw an exception on NULL references.
13         Check consistency of corlib types with the C struct representation.
14
15 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
16
17         * interp.c (ves_exec_method): use relative numbering for runtime
18         type checks (and make it work with interfaces)
19
20 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
21
22         * interp.c: removed newobj()
23
24 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
25
26         * interp.c (get_virtual_method): use the vtable
27         (arch_compile_method): added to compute vtable entry
28
29 Mon Oct 8 16:14:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
30
31         * interp.c: use the accessors provided in object.h to deal with
32         MonoArrays. Updates for API renames in metadata. Throw exception
33         in ldelema if index is out of bounds.
34
35 Mon Oct 8 10:44:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
36
37         * interp.c: fixes for changes in metadata.
38
39 2001-10-04  Dick Porter  <dick@ximian.com>
40
41         * interp.c (ves_runtime_method): init_class() the
42         mono_defaults.delegate_class
43         Include mono-endian.h not endian.h
44
45 Tue Oct 2 18:51:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
46
47         * interp.c: set frame->ip in the leave opcode. Make db_methods static.
48
49 Sun Sep 30 11:57:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
50
51         * interp.c: compiler and ANSI C portability fixes.
52
53 Fri Sep 28 19:37:46 CEST 2001 Paolo Molaro <lupus@ximian.com>
54
55         * interp.c: Implemented ldtoken, conv.ovf.i. Use MonoClass->byval_arg
56         (and remove related kludges). Don't choke on access to arrays of
57         references. Throw an exception when an internalcall or P/Invoke
58         function don't have an implementation. Throw and EngineException
59         for unimplemented opcodes.
60
61 Tue Sep 25 11:12:35 CEST 2001 Paolo Molaro <lupus@ximian.com>
62
63         * interp.c: fixed get_virtual_method () to deal with interface
64         methods better.
65
66 Mon Sep 24 18:50:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
67
68         * interp.c: catch a few more error conditions with exceptions instead of
69         erroring out.
70         Don't use g_print() in stack traces because it doesn't work with
71         some float values.
72         When we call an instance method of a valuetype class, unbox the 'this'
73         argument if it is an object.
74         Use mono_ldstr () to implement the ldstr opcode: it takes care of
75         interning the string if necessary.
76         Implemented new opcodes: ckfinite, cgt.un, clt.un, ldvirtftn, ldarga.
77         Fixes to handle NaNs when comparing doubles.
78         Make sure the loaded assembly has an entry point defined.
79         Fixed portability bugs in neg and not opcodes.
80
81 2001-09-24  Dietmar Maurer  <dietmar@ximian.com>
82
83         * interp.c (ves_exec_method): LDC_I4: 8bit constants are signed
84         (ves_exec_method): bug fix for NOT/NEG
85         (main): fix bug in parameter parsing
86
87 2001-09-23  Dick Porter  <dick@ximian.com>
88
89         * Makefile.am (mint_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
90
91 2001-09-23  Dick Porter  <dick@ximian.com>
92
93         * interp.c (main): Do some thread setup and cleanup around the
94         call to ves_exec()
95
96 2001-09-21  Dick Porter  <dick@ximian.com>
97
98         * Makefile.am (mint_LDADD): Added PTHREAD_LIBS to the link line
99
100 Thu Sep 20 16:32:42 CEST 2001 Paolo Molaro <lupus@ximian.com>
101
102         * interp.c: implemented some more opcodes: calli, rem.un,
103         shr.un, conv.u, cpobj, stobj, conv.r.un, conv.ovf.i1.un,
104         conv.ovf.i2.un, conv.ovf.i4.un, conv.ovf.i8.un, conv.ovf.i.un,
105         conv.ovf.u1.un, conv.ovf.u2.un, conv.ovf.u4.un, conv.ovf.u8.un,
106         conv.ovf.u.un.
107         Fix some 64 bit issues in the array element access code and a small bug.
108         Throw an exception on index out of range instead of asserting.
109         Throw an exception on a NULL array instead of dying.
110         Stomped a memory corruption bug (.cctor methods were freed after
111         executing them, but they are stores in MonoClass now...).
112         Added a simple facility to invoke the debugger when a named
113         function is entered (use the cmdline option --debug method_name).
114         * interp.h: fix 64 bit issue.
115
116 Tue Sep 18 13:21:33 CEST 2001 Paolo Molaro <lupus@ximian.com>
117
118         * interp.c: fix some 64 bit issues. Safer support for delegates.
119
120 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
121
122         * interp.c (ves_exec_method): implement conv.u8 opcode. 
123
124 Mon Sep 10 20:20:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
125
126         * interp.c: endian fixes, comments.
127
128 Fri Sep 7 18:45:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
129
130         * interp.c, interp.h: make ves_exec_method () and stackval_from_data ()
131         non static. Implement a couple of runtime methods needed to
132         use delegates (ves_runtime_method ()).
133         Implemented ldftn opcode.
134
135 Thu Sep 6 15:41:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
136
137         * Makefile.am: link to libmonoarch.
138         * interp.h, interp.c: use mono_create_trampoline ().
139         Pass the command line arguments to Main (String[]) methods.
140
141 2001-08-30  Dietmar Maurer  <dietmar@ximian.com>
142
143         * interp.c (ves_pinvoke_method): removed the libffi dependency
144
145 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
146
147         * interp.c (ves_array_set): moved from icall.c
148         (ves_array_get): moved from icall.c
149
150         * icall.c: moved to metadata/icall.c
151
152 Wed Aug 29 12:46:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
153
154         * interp.c: some small optimizations. Fixes to do signed
155         compares when needed. Change C++ comments into C.
156         Implemented cgt, clt. Added --opcode-count cmdline switch.
157
158 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
159
160         * interp.c (ves_exec_method): better check for value types (get
161         the class to detect if we have a value type), implemented CEE_CONV_U1,
162         CEE_CONV_U2, CEE_CEQ
163         
164
165 Mon Aug 27 21:30:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
166
167         * interp.c: warn and exit when Main () expects the cmdline arguments
168         instead of creashing.
169
170 Mon Aug 27 20:16:37 CEST 2001 Paolo Molaro <lupus@ximian.com>
171
172         * interp.c: merge isinst/castclass handling. Hopefully implement
173         the right semantics for handling callvirt correctly (changes
174         here and there to support it). Integrate bugfix from Dietmar quickly
175         so he needs to handle the cvs conflict:-)
176
177 Mon Aug 27 12:20:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
178
179         * interp.c: fix compilation and updates for changes in metadata/.
180
181 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
182
183         * interp.c (main): Add option handling for the interpreter,
184         support the `--trace' option.
185
186 Sun Aug 26 23:04:46 CEST 2001 Paolo Molaro <lupus@ximian.com>
187
188         * interp.c: get in a dummy virtual method dispatch.
189         Added support for int64, native int and native uint as arguments.
190         Added debug enter/leave for icall and pinvoke methods, too.
191         Implement opcodes conv.i, conv.i8, ldelema.
192
193 Sun Aug 26 11:37:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
194
195         * interp.h, interp.c: load also a MonoClass pointer when we load
196         an address on the stack. Implemented conv.i1, conv.i2, con.i4,
197         conv.u4, conv.r4, conv.r8. Print the arguments in the stack trace
198         and the name of the exception.
199
200 Sat Aug 25 15:56:03 CEST 2001 Paolo Molaro <lupus@ximian.com>
201
202         * interp.c: Implemented some opcodes: starg.s, ldobj, isinst,
203         ldarg, starg, ldloc, ldloca, stloc, initobj, cpblk, sizeof.
204
205 Sat Aug 25 12:57:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
206
207         * interp.c: handle enumerations specially (not as valuetypes).
208
209 Fri Aug 24 19:34:04 CEST 2001 Paolo Molaro <lupus@ximian.com>
210
211         * interp.h, interp.c: add support for valuetypes.
212
213 Fri Aug 24 16:09:20 CEST 2001 Paolo Molaro <lupus@ximian.com>
214
215         * interp.c: updates for merge of MonoParam in MonoType.
216
217 Thu Aug 23 12:04:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
218
219         * interp.c: removed beforefieldinit check, it's a useless flag.
220         Added a couple more test cases to tests/ dir.
221
222 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
223
224         * interp.c (usage): Add version information
225         (ves_pinvoke_method): Typo fix.
226
227 Wed Aug 22 20:37:51 CEST 2001 Paolo Molaro <lupus@ximian.com>
228
229         * interp.c: simplified init_class (). Make sure a class
230         is fully initialized before executing a method in the class.
231         Search for the class constructor only on beforefieldinit classes.
232         Implement a bunch of opcodes: br, brfalse, brtrue, beq, bge,
233         bgt, blt, ble, bne.un, bge.un, bgt.un, ble.un, blt.un, stind.i,
234         ldflda, ldsflda, ldelem.i8, stelem.i8, leave.
235
236 Wed Aug 22 16:34:03 CEST 2001 Paolo Molaro <lupus@ximian.com>
237
238         * interp.c: Updates for changes in metadata/. Better output in debug mode
239         and in the stack trace. Completed rethrow handling
240
241 Tue Aug 21 18:56:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
242
243         * interp.c: new macro INIT_FRAME() to properly
244         initialize a MonoInvocation. Fixed a couple of buglets in exception code:
245         increase stack pointer when pushing the exception for catch blocks,
246         initialize frame->ex_handler to NULL, correctly try all the
247         catch blocks (don't incorrectly fallback on filter handling).
248         Added a couple more checks where we may need to throw an
249         exception. Added more exception creation functions.
250         Changed stackval_from_data() to take the target stackval as
251         argument. Implemented a couple more opcodes.
252         * interp.h: prepare stackval for value type code.
253
254 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
255
256         * Makefile.am (mint_LDADD): Renamed interpreter to mint.
257
258 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
259
260         * interp.c (get_named_exception): use the right constructor.
261
262 Mon Aug 20 18:58:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
263
264         * interp.c: fix buglet with the leave.s opcode.
265
266 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
267
268         * icall.c: changed everything to support the new calling convention
269
270         * hacks.h: added some macros for FreeBSD 
271
272         * interp.c (get_named_exception): use mono_object_new instead of
273         newobj, initialize the stack before we call the constructor.
274
275 Sat Aug 18 12:43:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
276
277         * interp.c, interp.h: added support code to create exceptions.
278         Changed interncal calling convnetion over to MonoInvocation, to support
279         exceptions, walking the stack back and forward and passing the 'this'
280         pointer separately (remove the cludges required before to pass this on the
281         stack). Use alloca heavily for both local vars and a copy of the incoming 
282         arguments. Init local vars to zero.
283         Simplify stackval_from_data() and stackval_to_data() to only take a pointer
284         instead of pointer + offset.
285         Implement a few exceptions-related opcodes and the code to run finally, fault and
286         catch blocks as well as a stack trace if no handler is found.
287         
288 2001-08-16  Alex Graveley  <alex@ximian.com>
289
290         * Makefile.am (mono_int_LDADD): Link with ../../libffi/libffi.a
291         instead of ../../libffi/.libs/libffi.a.
292
293 2001-08-10  Dietmar Maurer  <dietmar@ximian.com>
294
295         * interp.c (ves_exec_method): impl CASTCLASS
296
297         * icall.c: moved the internal call stuff to this file
298
299         * interp.c (ves_exec_method): impl. BOX/UNBOX
300         (ves_icall_System_Array_GetValue): impl.
301         (ves_icall_System_Array_SetValue): impl.
302         added myself to Authors
303
304 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
305
306         * implemented arrays, but you will need a modified version of 
307         Array.cs to get arrays working (will commit soon)
308         
309         * interp.c (ves_icall_array_Set): impl.
310         (ves_icall_array_Get): impl.
311         (ves_icall_array_ctor): impl.
312         (ves_icall_System_Array_GetRank): impl.
313         (ves_icall_System_Array_GetLength): impl.
314         (ves_icall_System_Array_GetLowerBound): impl.
315         (mono_lookup_internal_call): impl.
316
317 2001-08-06  Dietmar Maurer  <dietmar@ximian.com>
318
319         * interp.c (ves_exec_method): impl. NEWARR
320         (ves_exec_method): impl. most LDELEM/STELEM opcodes, LDLEN
321         (newarr): impl.
322         (mono_get_ansi_string): impl.
323         (mono_lookup_internal_call): impl.
324         (ves_exec_method): implemented internal calls
325
326 2001-08-05  Dietmar Maurer  <dietmar@ximian.com>
327
328         * interp.c (ves_pinvoke_method): removed all static vars.
329
330 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
331
332         * interp.c (ves_exec_method): found a way to do unordered
333         compares, implemented CEE_BNE_UN_S, CEE_BGE_UN_S, CEE_BGT_UN_S, 
334         CEE_BLE_UN_S, CEE_BLT_UN_S
335         
336 Wed Aug 1 22:51:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
337
338         * interp.c: handle also MONO_TYPE_CLASS to/from the stack.
339         Change locals to be a memory blob, instead of the structured
340         (but wrong) stackval. Implement bne.un.s opcode. Make the program
341         exit with the error code from Main().
342
343 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
344
345         * interp.c (ves_exec_method): implemented LDSTR
346
347 2001-07-31  Miguel de Icaza  <miguel@ximian.com>
348
349         * interp.c (GET_NATI): Switched from using nati_t to cli/types.h
350         m_i type.  Maybe we should rename the types to be m_i_t instead of
351         m_i alone.
352         
353         Make the code compile after I broke it.
354
355 Tue Jul 31 23:46:33 CEST 2001 Paolo Molaro <lupus@ximian.com>
356
357         * interp.c: fix cleanup.
358         * Makefile.am: don't link with disassembler library.
359
360 2001-07-31  Miguel de Icaza  <miguel@ximian.com>
361
362         (ves_exec_method): Cleanup of the source code.
363
364 Tue Jul 31 20:13:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
365
366         * interp.c: implement stind.*, ldind.*, ldloca.s opcodes.
367         Provide better tracing with DEBUG_INTERP.
368
369 Tue Jul 31 17:52:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
370
371         * interp.c: massive namespace cleanup.
372
373 Mon Jul 30 20:09:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
374
375         * interp.c: update to use mono_method->name.
376
377 Fri Jul 27 20:54:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
378
379         * interp.c: start implementing callvirt. Classes with
380         class constructors are properly initialized when needed.
381         Fix error introduced in version 1.17.
382
383 Fri Jul 27 14:03:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
384
385         * interp.c: implement static field loading and storing.
386
387 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
388
389         * interp.c (ves_pinvoke_method): impl.
390
391 Fri Jul 27 11:49:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
392
393         * interp.c: Removed some debugging printouts. Made stackval_to_data
394         static. Handle also instance methods in CALL opcode. Fix ret to properly
395         deal with void functions. Fixed constructor to leave the object on
396         the stack.
397
398 Thu Jul 26 13:24:51 CEST 2001 Paolo Molaro <lupus@ximian.com>
399
400         * interp.c: ves_exec_method () doesn't take a MonoImage arg
401         anymore. Use the method cache in MonoImage. Updates to
402         mache recent changes in metadata. 
403         Fix newobj code to use new metadata features. Call the class
404         constructor after allocationg the object. Implemented load field
405         and store field opcodes (the support functions need to be finished).
406         
407 Tue Jul 24 16:51:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
408
409         * interp.c, hacks.h: moved a few ugly macros out of the code.
410         Implemented switch opcode.
411
412 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
413
414         * interp.c (newobj): Added function to handle newobj opcode.
415
416 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
417
418         * interp.c (ves_exec_method): Make the interpreter abort with more
419         information than it currently does.
420
421         Enable the slow processor, as it is easier to debug.
422
423 Sun Jul 15 17:50:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
424
425         * Started changelog.
426         * interp.c: use new mono_get_method () function to get the complete
427         info on a method invocation: we support now method invocation with
428         multiple (or zero) simple arguments and with or without a return value.
429         Implement also a couple more opcodes.