2 Thu Jan 3 23:19:27 CET 2002 Paolo Molaro <lupus@ximian.com>
4 * interp.c: temporary mul.ovf, mul.ovf.un, add.ovf.un implementations
5 to get the compiler going.
7 Mon Dec 24 17:23:45 CET 2001 Paolo Molaro <lupus@ximian.com>
9 * interp.c: fix ldc.i8.
11 Thu Dec 20 20:09:48 CET 2001 Paolo Molaro <lupus@ximian.com>
13 * interp.c: fix delegate method invocation to handle both
14 static and instance methods.
16 Tue Dec 18 18:48:50 CET 2001 Paolo Molaro <lupus@ximian.com>
18 * interp.c: make segv_handler static, handle runtime methods in stack
21 Thu Dec 13 20:24:28 CET 2001 Paolo Molaro <lupus@ximian.com>
23 * interp.c: correctly handle exceptions generated in C code.
24 Install an handler for SIGSEGV. Bare-bones profiler and hook for the
27 Mon Dec 3 17:15:44 CET 2001 Paolo Molaro <lupus@ximian.com>
29 * interp.c: call mono_init() after registering internal calls.
31 2001-11-30 Dick Porter <dick@ximian.com>
33 * interp.c: Replace get_named_exception() with
34 mono_exception_from_name()
36 Fri Nov 30 12:05:21 CET 2001 Paolo Molaro <lupus@ximian.com>
38 * interp.c: calculate locals and args offsets only once
39 per method call. Cache trampoline code as well.
41 2001-11-23 Dietmar Maurer <dietmar@ximian.com>
43 * interp.c (ves_exec_method): bug fix for exception5.cs
45 Mon Nov 19 11:33:00 CET 2001 Paolo Molaro <lupus@ximian.com>
47 * interp.c: start adding support for handling exceptions across
48 managed/unmanaged boundaries. Cleanup Delegate method invocation.
49 Pass the correct target object in Delegate::Invoke and use the correct
50 'this' pointer in ldvirtftn (bugs pointed out by Dietmar).
52 Thu Nov 15 17:40:24 CET 2001 Paolo Molaro <lupus@ximian.com>
54 * interp.c: handle enums with underlying type different from int32.
55 More checks for C structs <-> C# objects consistency.
57 Wed Nov 14 19:23:00 CET 2001 Paolo Molaro <lupus@ximian.com>
59 * interp.c: move the stack frame dumping code to a function so it can
60 be called from the debugger. Fix virtual method lookup for interfaces.
61 Throw exceptions instead of aborting in more places.
62 Print also the message in an exception. Updates for field renames in
65 2001-11-09 Dick Porter <dick@ximian.com>
67 * Makefile.am (mint_LDADD): Don't need THREAD_LIBS any more
69 2001-11-07 Miguel de Icaza <miguel@ximian.com>
71 * interp.c: Include stdlib to kill warning.
72 (check_corlib): Adjust format encodings to remove warnings.
74 Wed Nov 7 15:47:36 CET 2001 Paolo Molaro <lupus@ximian.com>
76 * interp.c: updates for changes in array code.
78 Fri Nov 2 19:06:54 CET 2001 Paolo Molaro <lupus@ximian.com>
80 * interp.c: hanlde field refs. Throw an exception on NULL references.
81 Check consistency of corlib types with the C struct representation.
83 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
85 * interp.c (ves_exec_method): use relative numbering for runtime
86 type checks (and make it work with interfaces)
88 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
90 * interp.c: removed newobj()
92 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
94 * interp.c (get_virtual_method): use the vtable
95 (arch_compile_method): added to compute vtable entry
97 Mon Oct 8 16:14:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
99 * interp.c: use the accessors provided in object.h to deal with
100 MonoArrays. Updates for API renames in metadata. Throw exception
101 in ldelema if index is out of bounds.
103 Mon Oct 8 10:44:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
105 * interp.c: fixes for changes in metadata.
107 2001-10-04 Dick Porter <dick@ximian.com>
109 * interp.c (ves_runtime_method): init_class() the
110 mono_defaults.delegate_class
111 Include mono-endian.h not endian.h
113 Tue Oct 2 18:51:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
115 * interp.c: set frame->ip in the leave opcode. Make db_methods static.
117 Sun Sep 30 11:57:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
119 * interp.c: compiler and ANSI C portability fixes.
121 Fri Sep 28 19:37:46 CEST 2001 Paolo Molaro <lupus@ximian.com>
123 * interp.c: Implemented ldtoken, conv.ovf.i. Use MonoClass->byval_arg
124 (and remove related kludges). Don't choke on access to arrays of
125 references. Throw an exception when an internalcall or P/Invoke
126 function don't have an implementation. Throw and EngineException
127 for unimplemented opcodes.
129 Tue Sep 25 11:12:35 CEST 2001 Paolo Molaro <lupus@ximian.com>
131 * interp.c: fixed get_virtual_method () to deal with interface
134 Mon Sep 24 18:50:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
136 * interp.c: catch a few more error conditions with exceptions instead of
138 Don't use g_print() in stack traces because it doesn't work with
140 When we call an instance method of a valuetype class, unbox the 'this'
141 argument if it is an object.
142 Use mono_ldstr () to implement the ldstr opcode: it takes care of
143 interning the string if necessary.
144 Implemented new opcodes: ckfinite, cgt.un, clt.un, ldvirtftn, ldarga.
145 Fixes to handle NaNs when comparing doubles.
146 Make sure the loaded assembly has an entry point defined.
147 Fixed portability bugs in neg and not opcodes.
149 2001-09-24 Dietmar Maurer <dietmar@ximian.com>
151 * interp.c (ves_exec_method): LDC_I4: 8bit constants are signed
152 (ves_exec_method): bug fix for NOT/NEG
153 (main): fix bug in parameter parsing
155 2001-09-23 Dick Porter <dick@ximian.com>
157 * Makefile.am (mint_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
159 2001-09-23 Dick Porter <dick@ximian.com>
161 * interp.c (main): Do some thread setup and cleanup around the
164 2001-09-21 Dick Porter <dick@ximian.com>
166 * Makefile.am (mint_LDADD): Added PTHREAD_LIBS to the link line
168 Thu Sep 20 16:32:42 CEST 2001 Paolo Molaro <lupus@ximian.com>
170 * interp.c: implemented some more opcodes: calli, rem.un,
171 shr.un, conv.u, cpobj, stobj, conv.r.un, conv.ovf.i1.un,
172 conv.ovf.i2.un, conv.ovf.i4.un, conv.ovf.i8.un, conv.ovf.i.un,
173 conv.ovf.u1.un, conv.ovf.u2.un, conv.ovf.u4.un, conv.ovf.u8.un,
175 Fix some 64 bit issues in the array element access code and a small bug.
176 Throw an exception on index out of range instead of asserting.
177 Throw an exception on a NULL array instead of dying.
178 Stomped a memory corruption bug (.cctor methods were freed after
179 executing them, but they are stores in MonoClass now...).
180 Added a simple facility to invoke the debugger when a named
181 function is entered (use the cmdline option --debug method_name).
182 * interp.h: fix 64 bit issue.
184 Tue Sep 18 13:21:33 CEST 2001 Paolo Molaro <lupus@ximian.com>
186 * interp.c: fix some 64 bit issues. Safer support for delegates.
188 2001-09-12 Miguel de Icaza <miguel@ximian.com>
190 * interp.c (ves_exec_method): implement conv.u8 opcode.
192 Mon Sep 10 20:20:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
194 * interp.c: endian fixes, comments.
196 Fri Sep 7 18:45:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
198 * interp.c, interp.h: make ves_exec_method () and stackval_from_data ()
199 non static. Implement a couple of runtime methods needed to
200 use delegates (ves_runtime_method ()).
201 Implemented ldftn opcode.
203 Thu Sep 6 15:41:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
205 * Makefile.am: link to libmonoarch.
206 * interp.h, interp.c: use mono_create_trampoline ().
207 Pass the command line arguments to Main (String[]) methods.
209 2001-08-30 Dietmar Maurer <dietmar@ximian.com>
211 * interp.c (ves_pinvoke_method): removed the libffi dependency
213 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
215 * interp.c (ves_array_set): moved from icall.c
216 (ves_array_get): moved from icall.c
218 * icall.c: moved to metadata/icall.c
220 Wed Aug 29 12:46:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
222 * interp.c: some small optimizations. Fixes to do signed
223 compares when needed. Change C++ comments into C.
224 Implemented cgt, clt. Added --opcode-count cmdline switch.
226 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
228 * interp.c (ves_exec_method): better check for value types (get
229 the class to detect if we have a value type), implemented CEE_CONV_U1,
233 Mon Aug 27 21:30:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
235 * interp.c: warn and exit when Main () expects the cmdline arguments
236 instead of creashing.
238 Mon Aug 27 20:16:37 CEST 2001 Paolo Molaro <lupus@ximian.com>
240 * interp.c: merge isinst/castclass handling. Hopefully implement
241 the right semantics for handling callvirt correctly (changes
242 here and there to support it). Integrate bugfix from Dietmar quickly
243 so he needs to handle the cvs conflict:-)
245 Mon Aug 27 12:20:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
247 * interp.c: fix compilation and updates for changes in metadata/.
249 2001-08-26 Miguel de Icaza <miguel@ximian.com>
251 * interp.c (main): Add option handling for the interpreter,
252 support the `--trace' option.
254 Sun Aug 26 23:04:46 CEST 2001 Paolo Molaro <lupus@ximian.com>
256 * interp.c: get in a dummy virtual method dispatch.
257 Added support for int64, native int and native uint as arguments.
258 Added debug enter/leave for icall and pinvoke methods, too.
259 Implement opcodes conv.i, conv.i8, ldelema.
261 Sun Aug 26 11:37:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
263 * interp.h, interp.c: load also a MonoClass pointer when we load
264 an address on the stack. Implemented conv.i1, conv.i2, con.i4,
265 conv.u4, conv.r4, conv.r8. Print the arguments in the stack trace
266 and the name of the exception.
268 Sat Aug 25 15:56:03 CEST 2001 Paolo Molaro <lupus@ximian.com>
270 * interp.c: Implemented some opcodes: starg.s, ldobj, isinst,
271 ldarg, starg, ldloc, ldloca, stloc, initobj, cpblk, sizeof.
273 Sat Aug 25 12:57:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
275 * interp.c: handle enumerations specially (not as valuetypes).
277 Fri Aug 24 19:34:04 CEST 2001 Paolo Molaro <lupus@ximian.com>
279 * interp.h, interp.c: add support for valuetypes.
281 Fri Aug 24 16:09:20 CEST 2001 Paolo Molaro <lupus@ximian.com>
283 * interp.c: updates for merge of MonoParam in MonoType.
285 Thu Aug 23 12:04:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
287 * interp.c: removed beforefieldinit check, it's a useless flag.
288 Added a couple more test cases to tests/ dir.
290 2001-08-22 Miguel de Icaza <miguel@ximian.com>
292 * interp.c (usage): Add version information
293 (ves_pinvoke_method): Typo fix.
295 Wed Aug 22 20:37:51 CEST 2001 Paolo Molaro <lupus@ximian.com>
297 * interp.c: simplified init_class (). Make sure a class
298 is fully initialized before executing a method in the class.
299 Search for the class constructor only on beforefieldinit classes.
300 Implement a bunch of opcodes: br, brfalse, brtrue, beq, bge,
301 bgt, blt, ble, bne.un, bge.un, bgt.un, ble.un, blt.un, stind.i,
302 ldflda, ldsflda, ldelem.i8, stelem.i8, leave.
304 Wed Aug 22 16:34:03 CEST 2001 Paolo Molaro <lupus@ximian.com>
306 * interp.c: Updates for changes in metadata/. Better output in debug mode
307 and in the stack trace. Completed rethrow handling
309 Tue Aug 21 18:56:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
311 * interp.c: new macro INIT_FRAME() to properly
312 initialize a MonoInvocation. Fixed a couple of buglets in exception code:
313 increase stack pointer when pushing the exception for catch blocks,
314 initialize frame->ex_handler to NULL, correctly try all the
315 catch blocks (don't incorrectly fallback on filter handling).
316 Added a couple more checks where we may need to throw an
317 exception. Added more exception creation functions.
318 Changed stackval_from_data() to take the target stackval as
319 argument. Implemented a couple more opcodes.
320 * interp.h: prepare stackval for value type code.
322 2001-08-21 Miguel de Icaza <miguel@ximian.com>
324 * Makefile.am (mint_LDADD): Renamed interpreter to mint.
326 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
328 * interp.c (get_named_exception): use the right constructor.
330 Mon Aug 20 18:58:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
332 * interp.c: fix buglet with the leave.s opcode.
334 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
336 * icall.c: changed everything to support the new calling convention
338 * hacks.h: added some macros for FreeBSD
340 * interp.c (get_named_exception): use mono_object_new instead of
341 newobj, initialize the stack before we call the constructor.
343 Sat Aug 18 12:43:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
345 * interp.c, interp.h: added support code to create exceptions.
346 Changed interncal calling convnetion over to MonoInvocation, to support
347 exceptions, walking the stack back and forward and passing the 'this'
348 pointer separately (remove the cludges required before to pass this on the
349 stack). Use alloca heavily for both local vars and a copy of the incoming
350 arguments. Init local vars to zero.
351 Simplify stackval_from_data() and stackval_to_data() to only take a pointer
352 instead of pointer + offset.
353 Implement a few exceptions-related opcodes and the code to run finally, fault and
354 catch blocks as well as a stack trace if no handler is found.
356 2001-08-16 Alex Graveley <alex@ximian.com>
358 * Makefile.am (mono_int_LDADD): Link with ../../libffi/libffi.a
359 instead of ../../libffi/.libs/libffi.a.
361 2001-08-10 Dietmar Maurer <dietmar@ximian.com>
363 * interp.c (ves_exec_method): impl CASTCLASS
365 * icall.c: moved the internal call stuff to this file
367 * interp.c (ves_exec_method): impl. BOX/UNBOX
368 (ves_icall_System_Array_GetValue): impl.
369 (ves_icall_System_Array_SetValue): impl.
370 added myself to Authors
372 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
374 * implemented arrays, but you will need a modified version of
375 Array.cs to get arrays working (will commit soon)
377 * interp.c (ves_icall_array_Set): impl.
378 (ves_icall_array_Get): impl.
379 (ves_icall_array_ctor): impl.
380 (ves_icall_System_Array_GetRank): impl.
381 (ves_icall_System_Array_GetLength): impl.
382 (ves_icall_System_Array_GetLowerBound): impl.
383 (mono_lookup_internal_call): impl.
385 2001-08-06 Dietmar Maurer <dietmar@ximian.com>
387 * interp.c (ves_exec_method): impl. NEWARR
388 (ves_exec_method): impl. most LDELEM/STELEM opcodes, LDLEN
390 (mono_get_ansi_string): impl.
391 (mono_lookup_internal_call): impl.
392 (ves_exec_method): implemented internal calls
394 2001-08-05 Dietmar Maurer <dietmar@ximian.com>
396 * interp.c (ves_pinvoke_method): removed all static vars.
398 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
400 * interp.c (ves_exec_method): found a way to do unordered
401 compares, implemented CEE_BNE_UN_S, CEE_BGE_UN_S, CEE_BGT_UN_S,
402 CEE_BLE_UN_S, CEE_BLT_UN_S
404 Wed Aug 1 22:51:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
406 * interp.c: handle also MONO_TYPE_CLASS to/from the stack.
407 Change locals to be a memory blob, instead of the structured
408 (but wrong) stackval. Implement bne.un.s opcode. Make the program
409 exit with the error code from Main().
411 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
413 * interp.c (ves_exec_method): implemented LDSTR
415 2001-07-31 Miguel de Icaza <miguel@ximian.com>
417 * interp.c (GET_NATI): Switched from using nati_t to cli/types.h
418 m_i type. Maybe we should rename the types to be m_i_t instead of
421 Make the code compile after I broke it.
423 Tue Jul 31 23:46:33 CEST 2001 Paolo Molaro <lupus@ximian.com>
425 * interp.c: fix cleanup.
426 * Makefile.am: don't link with disassembler library.
428 2001-07-31 Miguel de Icaza <miguel@ximian.com>
430 (ves_exec_method): Cleanup of the source code.
432 Tue Jul 31 20:13:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
434 * interp.c: implement stind.*, ldind.*, ldloca.s opcodes.
435 Provide better tracing with DEBUG_INTERP.
437 Tue Jul 31 17:52:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
439 * interp.c: massive namespace cleanup.
441 Mon Jul 30 20:09:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
443 * interp.c: update to use mono_method->name.
445 Fri Jul 27 20:54:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
447 * interp.c: start implementing callvirt. Classes with
448 class constructors are properly initialized when needed.
449 Fix error introduced in version 1.17.
451 Fri Jul 27 14:03:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
453 * interp.c: implement static field loading and storing.
455 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
457 * interp.c (ves_pinvoke_method): impl.
459 Fri Jul 27 11:49:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
461 * interp.c: Removed some debugging printouts. Made stackval_to_data
462 static. Handle also instance methods in CALL opcode. Fix ret to properly
463 deal with void functions. Fixed constructor to leave the object on
466 Thu Jul 26 13:24:51 CEST 2001 Paolo Molaro <lupus@ximian.com>
468 * interp.c: ves_exec_method () doesn't take a MonoImage arg
469 anymore. Use the method cache in MonoImage. Updates to
470 mache recent changes in metadata.
471 Fix newobj code to use new metadata features. Call the class
472 constructor after allocationg the object. Implemented load field
473 and store field opcodes (the support functions need to be finished).
475 Tue Jul 24 16:51:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
477 * interp.c, hacks.h: moved a few ugly macros out of the code.
478 Implemented switch opcode.
480 2001-07-23 Miguel de Icaza <miguel@ximian.com>
482 * interp.c (newobj): Added function to handle newobj opcode.
484 2001-07-18 Miguel de Icaza <miguel@ximian.com>
486 * interp.c (ves_exec_method): Make the interpreter abort with more
487 information than it currently does.
489 Enable the slow processor, as it is easier to debug.
491 Sun Jul 15 17:50:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
494 * interp.c: use new mono_get_method () function to get the complete
495 info on a method invocation: we support now method invocation with
496 multiple (or zero) simple arguments and with or without a return value.
497 Implement also a couple more opcodes.