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