2003-06-02 Dietmar Maurer <dietmar@ximian.com>
[mono.git] / mono / mini / ChangeLog
1 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
2
3         * mini.c (mono_find_block_region): bug fix in region code
4         (mini_method_compile): enable removing unreachable code again, but
5         only in methods without exception clauses.
6
7 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
8
9         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
10         Implemented arglist opcode and handling of TypedReference type.
11         Fixed x86 call convention when a structure is returned.
12         Minimal support for calling static vararg methods.
13
14 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15
16         * mini.c (mini_method_compile):  always remove unreachable code,
17         because the code in them may be inconsistent  (access to dead
18         variables for example).
19
20 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21
22         * driver.c, debug-mini.c: warning fixes.
23
24 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
25
26         * Makefile.am, jit.h, mini.h: install header for embedding mono.
27
28 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
29
30         * mini.c: thread-static fields are registered in mono_class_vtable(),
31         so ensure the function is called before checking for them.
32
33 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
34
35         * mini.c (optimize_branches): fix for bug 43586
36
37         * jit-icalls.c (mono_llmult_ovf): added an additional check for
38         overflow (fixes Bug #43639)
39
40 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
41
42         * mini.c, objects.cs: allow the use of stobj for primitive types.
43
44 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
45
46         * mini.c: be less strict about argument checking until we support
47         running the verifier.
48
49 2003-05-27  Nick Drochak <ndrochak@gol.com>
50
51         * basic-long.cs: tests for (ulong)int * (ulong)int also
52         * mini.c: use the same trick for (ulong)int * (ulong)int
53
54 2003-05-27  Nick Drochak <ndrochak@gol.com>
55
56         * basic-long.cs: add regression test for (long)int * (long)int
57         * cpu-pentium.md: add op_bigmul specification
58         * inssel-long32.brg: add OP_BIGMUL rule
59         * mini-ops.h: add OP_BIGMUL
60         * mini-x86.c: register allocator: handle case where src1 needs to be
61         in EAX.
62         * mini.c: substitute special BIGMUL opcode in the tree for 
63         (long)int * (long)int
64
65 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
66
67         * jit-icalls.c: call the type ctor on field access if needed.
68
69 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
70
71         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
72         to a method (including results of ldelema, bug#43207).
73
74 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
75
76         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
77         colors to show exception handler blocks.
78
79         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
80         (fix for pinvoke7.cs).
81
82 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
83
84         * mini.h, mini.c: ensure correct initialization order for types that
85         require it. Prepare for lazy compilation of jit icall wrappers.
86         Provide a name for opcode emulation to reduce unneeded mallocing.
87
88 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
89
90         * mini-x86.c: better register restoring code and profiling
91         support for tail calls.
92
93 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
94
95         * mini.h, driver.c: prepare for leaf methods optimization.
96
97 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
98
99         * mini.c: get targets of branches before converting a method.
100
101 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
102
103         * mini.c (optimize_branches): added some experimental code (disbaled) 
104
105 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
106
107         * mini.c (optimize_branches): fix branch to branch optimization 
108
109         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
110
111         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
112
113         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
114
115         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
116         if needed.
117
118 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
119
120         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
121         enable use of interface variables again.
122
123         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
124         I1 to registers because there is no simply way to sign extend 8bit
125         quantities in caller saved registers on x86.
126
127         * inssel-float.brg: set costs of some rules to 2 so
128         that monobure always select the arch. specific ones if supplied,
129         regardless of the order we pass the files to monoburg.
130
131 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
132
133         * mini.c, mini-x86.c: since the magic trampoline for jumps
134         can't patch the code directly, we do it as soon as the
135         method gets compiled.
136
137 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
138
139         * mini-x86.c, mini.h: introduce a new patching method
140         to support CEE_JMP and tail calls.
141         * mini.c: obey tail.call. Don't precompile methods target
142         of CEE_JMP.
143         * tramp-x86.c: new trampoline code to handle methods
144         reached through a jump.
145
146 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
147
148         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
149         bit values to registers
150
151 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
152
153         * mini.c (mono_compile_get_interface_var): share interface
154         variables if possible.
155
156 2003-05-16  Martin Baulig  <martin@ximian.com>
157
158         * debug-mini.c (mono_init_debugger): New function to initialize
159         the debugger.  This is not in the debugger since it needs to
160         access some of mini's internals.
161
162 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
163
164         * mini.c (mono_method_to_ir): inlining fixes/cleanups
165
166 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
167
168         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
169         for value type handling.
170
171 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
172
173         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
174         (mono_method_check_inlining): enable inlining of all kinds of wrappers
175
176 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
177
178         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
179           the constructor through a proxy.
180
181 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
182
183         * jit-icalls.c, inssel.brg: fixes to array element address
184         calculations.
185
186 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
187
188         * mini-x86.c (is_regsize_var): allocate pointer to registers
189
190 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
191
192         * driver.c: fixed typo, added intrins to the set of optimizations
193         tested with regressions.
194
195 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
196
197         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
198         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
199         test case.
200
201 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
202
203         * inssel.brg: remove some common pop instructions without side effects
204
205 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
206
207         * inssel-x86.brg: fixed thinko in int to double conversions.
208
209 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
210
211         * mini.c, jit-icalls.c: added runtime thread-static variable support.
212
213 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
214
215         * inssel-long32.brg: two more missing instructions.
216
217 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
218
219         * mini.c (mono_emit_call_args): set the cil_code for all arguments
220         if not already set.
221
222 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
223
224         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
225         correctly.
226
227         * basic-float.cs: Added tests for negative zero.
228
229 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
230
231         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
232         a couple of missing operations for long casts, with test cases.
233
234 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
235
236         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
237
238 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
239
240         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
241         code size estimation.
242
243 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
244
245         * mini.c (mono_jit_create_remoting_trampoline): make it work with
246         abstract methods (fix bug 42542)
247
248         * aot.c: add ability to handle array types
249         
250 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
251
252         * mini.c: Call the _specific versions of the object allocation
253         functions if possible.
254
255 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
256
257         * driver.c: call setlocale ().
258
259 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
260
261         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
262         windows build.
263
264 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
265
266         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
267
268         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
269         wrappers (fix bug 42122)
270
271 2003-05-04  Martin Baulig  <martin@ximian.com>
272
273         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
274
275         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
276         s/mini_set_defaults/mono_set_defaults/g.
277
278 2003-05-04  Martin Baulig  <martin@ximian.com>
279
280         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
281
282 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
283
284         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
285         (reported by Don Roberts).
286
287 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
288
289         * mini.c: temporarily work around two bugs for this release.
290
291 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
292
293         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
294         that contains -export-dynamic and it makes using the ld script
295         useless.
296         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
297
298 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
299
300         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
301         specific cpu.
302
303 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
304
305         * mini.c: make sure leave calls all the needed finally blocks,
306         even when the target jumps out of multiple exception clauses.
307
308 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
309
310         * ldscript, Makefile.am: add linker script to reduce the number of
311         exported symbols (should also fix the issues with libwine defining
312         some of the same symbols in io-layer).
313
314 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
315
316         * driver.c (mini_main): Avoid assertion when no file name is given on 
317         the command line.
318
319 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
320
321         * driver.c: added --version/-V command line option.
322         Added the inline optimization in the regression tests.
323
324 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
325
326         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
327         to the type in the method signature (fixes bug#42134).
328
329 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
330
331         * mini.c: when inlining, check this is not null only when needed (bug #42135).
332
333 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
334
335         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
336
337 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
338
339         * driver.c: fixed bug #42100.
340
341 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
342
343         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
344
345 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
346
347         * mini.c: moved most of the code required to do inlining to its own
348         function so it can be reused. Inline also ctors if appropriate.
349
350 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
351
352         * Makefile.am: Link with -export-dynamic so shared libs loaded by
353         the runtime can call mono API functions.
354
355 2003-04-27  Martin Baulig  <martin@ximian.com>
356
357         * debug-mini.c (mono_debug_init_method): Added
358         `guint32 breakpoint_id' argument; if the method has a breakpoint,
359         send a notification to the debugger.
360
361         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
362         running in the Mono Debugger, just pass the breakpoint number to
363         mono_debug_init_method().
364
365         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
366
367 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
368
369         * mini.c: allow some more unsafe compares.
370
371 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
372
373         * mini-x86.c, Makefile.am: make distcheck works (partially from
374         a patch by Richard Lee <r.h.lee@attbi.com>).
375         * regset.c, regset.h: removed, they are unused.
376
377 2003-04-25  Dick Porter  <dick@ximian.com>
378
379         * driver.c: Usage reports the name as 'mono' not 'mini'
380         * exceptions-x86.c: Build and run on freebsd
381
382 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
383
384         * Makefile.am: install the program with the 'mono' name and
385         the library as libmono instead of mini and libmini.
386
387 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
388
389         * driver.c: provide the APIs for the embedding interface of the old jit.
390
391 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
392
393         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
394
395 2003-04-23  Martin Baulig  <martin@ximian.com>
396
397         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
398
399         * driver.c: Added `--debug' command line argument to enable
400         debugging support.
401
402 2003-04-23  Martin Baulig  <martin@ximian.com>
403
404         * debug.[ch]: Removed.  The code is now in
405         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
406
407         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
408         last six months.
409
410 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
411
412         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
413
414 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
415
416         * mini.c:
417         (mini_cleanup): moved mono_runtime_cleanup call after the call to
418         mono_domain_finalize.
419         (mini_method_compile): use mono_method_profile* if the the option is
420         enabled.
421
422 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
423
424         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
425         methods with their wrapper.
426
427         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
428         methods with their wrapper.
429
430         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
431         their wrapper.
432
433         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
434         wrapper.
435
436         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
437         methods.
438
439 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
440
441         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
442
443 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
444
445         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
446         of the mempool. This is slightly faster and uses less memory
447
448 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
449
450         * mini.c: avoid O(n) allocation for variables.
451
452 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
453
454         * mini.c: handle items on the stack after inlining methods.
455
456 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
457
458         * mini.c: make the method->opcode optimization dependent
459         on MONO_OPT_INSTRINS and do it lazily.
460
461 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
462
463         * driver.c: print overall results at the end of regression run.
464
465 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
466
467         * inssel.brg: don't overwrite symbolic registers.
468
469 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
470
471         * inssel-x86.brg: fix conversion from long to float.
472
473 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
474
475         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
476
477 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
478
479         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
480
481         * driver.c: Added --print-vtable option as in the old JIT.
482
483 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
484
485         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
486
487 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
488
489         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
490
491 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
492
493         * mini.c regalloc.c regalloc.h: Fix memory leak.
494
495 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
496
497         * aot.c (mono_aot_get_method): register all used strings
498
499 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
500
501         * mini.c: always intern strings references with ldstr at compile time.
502
503 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
504
505         * Makefile.am: add BUILT_SOURCES.
506
507 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
508
509         * driver.c: give a better error message when the assembly to execute
510         doesn't have an entry point.
511
512 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
513
514         * Makefile.am: added hack for automake
515
516         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
517         correct sematics.
518
519         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
520
521 22003-04-07  Martin Baulig  <martin@ximian.com>
522
523         * Makefile.am: Added Makefile.am.
524
525         * debugger-main.c: Removed, this is now in the debugger where it
526         belongs.
527
528         * mini.pc.in: Call this package `mini' for the moment.
529
530