Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / mini / ChangeLog
1
2 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
3
4         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
5         initial support for stack walking and unwinding.
6
7 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
8
9         * driver.c (mono_main): Make corlib-out-of-sync message more 
10         descriptive. Also remove verify_corlib call.
11
12 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13
14         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
15         not overlap with other call's arguments, too.
16
17 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
18
19         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
20         move to arch-specific code the choice of arch-specific
21         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
22         * mini.c: ensure emulation calls will not interleave
23         with other calls.
24
25 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
26
27         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
28         the magic trampoline stack frame is dropped before executing
29         the new method.
30
31 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
32
33         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
34         and integer to fp conversions. Added support for overflowing
35         arguments on the stack. Reserve a couple more registers as temps.
36         Added support for aot compilation (as output still needs to be
37         tweaked, though).
38
39 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
40
41         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
42         Don't overwrite return register in some corner cases.
43
44 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
45
46         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
47         static constructors when AOT compiling.
48
49         * driver.c (mono_main): Call mono_check_corlib_version.
50
51 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
52
53         * cpu-g4.md, basic.cs: fixed div target register.
54
55 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
56
57         * mini-ppc.c, basic.cs: shl_imm fix with test.
58
59 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
60
61         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
62         structures by value. Misc fixes.
63         * objects.cs: more tests.
64
65 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
66
67         * mini-ppc.c: lconv.ovf.i implemented.
68
69 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
70
71         * mini.c:
72         (mini_init): don't error out if someone already called g_thread_init.
73
74 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
75
76         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
77         to be any type per the spec. Fix abnormal memory usage when
78         the same object is repeatedly thrown.
79
80 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
81
82         * mini.c: check for overruns in IL code.
83
84 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
85
86         * TODO: Add/remove some todo entries.
87
88 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
89
90         * driver.c (mono_main): Call mono_verify_corlib.
91
92 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
93
94         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
95         This has been moved to mini.c
96         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
97         type being casted is marshalbyref it could be a proxy, so instead of
98         emitting the type check code, emit a call to a runtime method that will
99         perform the check by calling CanCastTo if needed.
100
101 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
102
103         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
104         methods with large stack frames under Win32.
105
106 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
107
108         * Makefile.am: Distribute regression tests.
109
110         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
111         at the end instead of inserting each variable into the sorted list.
112
113         * linear-scan.c (mono_varlist_sort): New helper function.
114         
115 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
116
117         * mini.c: ensure arguments and locals are within bounds.
118
119 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
120
121         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
122         related fixes.
123
124 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
125
126         * mini.c (mono_cprop_copy_values): Fix crash.
127
128         * aot.c: Set verbosity back to 0.
129         
130 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
131
132         * regalloc.c: complete memory leak fix by Laurent Morichetti
133         (l_m@pacbell.net).
134
135 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
136
137         * driver.c (main_thread_handler): Revert the previous patch.
138
139         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
140         under valgrind.
141
142         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
143         memory from the memory pool.
144
145         * driver.c (main_thread_handler): Turn on all optimizations when
146         --aot is used.
147
148         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
149         an array for better performance.
150
151         * regalloc.c (mono_regstate_assign): Fix memory leak.
152
153         * debug-mini.c (mono_debug_serialize_debug_info): New function to
154         serialize the debug info.
155
156         * debug-mini.c (mono_debug_add_aot_method): New function to load the
157         debug info from the serialized representation.
158
159         * aot.c: Save debug info into the generated file and load it when 
160         loading a method.
161
162         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
163
164 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
165
166         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
167         More FP-related fixes.
168
169 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
170
171         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
172         and register allocation buglet. Hello world now runs.
173
174 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
175
176         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
177         * tramp-ppc.c: fixed class init trampoline.
178         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
179
180 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
181
182         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
183         mini.c: more ppc changes/fixes.
184
185 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
186
187         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
188         Also optimize the case when the arguments are the same in the caller 
189         and in the callee.
190
191         * iltests.il: Add tests for tail calls with valuetype arguments.
192
193 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
194
195         * mini-ppc.c: fixes for struct return type.
196
197 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
198
199         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
200         mono_spillvar_offset() to arch-specific code.
201
202 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
203
204         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
205
206 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
207
208         * exceptions-x86.c: Fix stack space leaks.
209         
210         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
211         registers from the lmf if the method has save_lmf set.
212
213 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
214
215         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
216         of icall wrappers into InvokeInDomain, since these are now per-domain.
217
218 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
219
220         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
221         make some opcode emulation and intrinsic ops enabled/disabled 
222         according to the architecture. More fixes.
223
224 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
225
226         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
227
228 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
229
230         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
231         arch-specific handling for 'this' and struct return type to
232         arch-specific code.
233
234 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
235
236         * aot.c: prevent divide by zero error when reporting (it happened with
237         Accessibility.dll).
238
239 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
240
241         * mini.h (inst_switch): Remove unused macro.
242
243 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
244
245         * aot.c:
246         (load_aot_module): free 'info->methods' and 'info' properly. No more
247         "free(): invalid pointer blah" messages when you have an old aot
248         compiled assembly.
249
250 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
251
252         * jit-icalls.c, mini.c: Added support for context static fields.
253
254 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
255
256         * mini.c (mono_method_blittable): Methods which set LastError are not 
257         blittable either. Fixes #51108.
258         
259 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
260
261         * mini.c: flush icache.
262         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
263
264 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
265
266         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
267
268 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
269
270         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
271         safe on IA32.
272
273         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
274         vararg calls.
275
276         * inssel.brg (CEE_MKREFANY): Fix AOT case.
277
278 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
279
280         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
281         instruction when the result is discarded.
282
283         * iltests.il (test_0_div_regalloc): New regression test.
284
285         * arrays.cs: Fix compilation error.
286
287 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
288
289         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
290         float rules to inssel-x86.brg: sane architectures with FP registers
291         don't need to implement these rules.
292
293 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
294
295         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
296
297 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
298
299         * mini.h, inssel-long32.brg: fixed endianess issues in int64
300         implementation of 32 bit systems.
301
302 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
303
304         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
305         (Jeroen Zwartepoorte).
306
307 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
308
309         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
310         the caller and the callee matches.
311         
312         * mini.c (mono_method_to_ir): Add comment.
313
314         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
315         signbit is missing on some platforms.
316
317 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
318
319         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
320
321         * mini.c (setup_jit_tls_data): Call the new function.
322         
323         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
324
325         * mini-x86.c: Add experimental support for fast access to the lmf
326         structure under NPTL/Linux 2.6.x.
327
328 2003-11-06  Martin Baulig  <martin@ximian.com>
329
330         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
331         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
332         the debugger.
333
334 2003-11-02  Martin Baulig  <martin@ximian.com>
335
336         * mini.c (inflate_generic_field): New static method.
337         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
338         generic instance and the field is declared in a generic type, call
339         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
340
341 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
342
343         * mini.h mini.c (mono_method_same_domain): New function to return
344         whenever the caller and the callee are in the same domain.
345
346         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
347
348 2003-10-30  Martin Baulig  <martin@ximian.com>
349
350         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
351         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
352         method parameters.
353         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
354         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
355
356 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
357
358         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
359         propagation.
360
361         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
362         object here, so it is in the correct appdomain etc.
363
364 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
365
366         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
367         already done.
368         (mono_method_to_ir): Avoid freeing the type created returned from
369         mono_type_create_from_typespec, since it is put into an internal cache
370         by the function. Fixes pointer.exe.
371
372         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
373         trampolines for icalls and pinvokes as well. Fixes #33569.
374
375 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
376
377         * mini.c: Update after appdomain changes.
378
379         * mini.c (mono_jit_compile_method_inner): Allways compile native
380         method wrappers in the root domain, since there can only be one
381         instance of them, whose address is stored in method->info.
382
383 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
384
385         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
386         environment variable. Instead detect automatically whenever running
387         under valgrind using the magic macro RUNNING_ON_VALGRIND from
388         valgrind.h.
389
390 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
391
392         * trace.c, trace.h: New files that implement the new trace option
393         parsing. 
394
395         * driver.c: Document new --trace options.
396
397         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
398         mini-x86.c: Apply:
399
400         -       if (mono_jit_trace_calls)
401         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
402
403         * mini.h: prototypes.
404         
405 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
406
407         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
408
409         * mini.c inssel.brg: Implement typedefbyref opcodes.
410
411         * mini.c (mono_jit_compile_method): Remove unused local variable.
412
413         * mini.c (mono_jit_compile_method_inner): Ditto.
414         
415 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
416
417         * tramp-x86.c (x86_class_init_trampoline): Fix build.
418         
419         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
420
421 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
422
423         * mini.c (mono_no_aot): Remove unused global variable.
424
425         * mini.c: Thread safety fixes.
426
427 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
428
429         * mini.c (mono_create_class_init_trampoline): Add a lock around
430         class_init_hash_addr.
431
432         * arrays.cs (test_0_newarr_emulation): Add new regression test for
433         #30073.
434
435         * mini.c: Decompose the NEWARR instruction before decomposing its
436         arguments. Fixes #30073.
437
438 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
439
440         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
441         convention.
442
443 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
444
445         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
446
447         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
448
449         * driver.c: Add support for compiling icall wrappers to --compile.
450
451 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
452
453         * inssel.brg: The empty value in class->interface_offsets is -1, not
454         0. Fixes #49287.
455
456 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
457
458         * objects.cs: New test for 'is' operator on an array of interfaces.
459
460 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
461
462         * tramp-ppc.c: update trampoline code to support jumps
463         and class initialization.
464
465 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
466
467         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
468
469         * inssel.brg (OP_UNBOXCAST): Fix #46027.
470
471         * inssel.brg (OP_UNBOX): Remove unused rule.
472
473         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
474         region instead of one for each method. Fixes #47813.
475
476 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
477
478         * exceptions.cs (test_0_nested_finally): New regression test for
479         nested exception handlers.
480
481         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
482
483         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
484
485         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
486         inlining.
487
488         * mini.c (mono_method_check_inlining): Make the inlining limit 
489         configurable by an environment variable.
490         
491         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
492
493         * mini.h: Bump AOT file version.
494
495         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
496         token, store the image along with the token, since the token might not 
497         refer to the same image as the method containing the relocation, 
498         because of inlining.
499
500 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
501
502         * mini.c (mono_precompile_assemblies): New function to compile
503         all methods in all loaded assemblies.
504
505         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
506
507         * regalloc.h regalloc.c (MonoRegState): Change the type of 
508         iassign and fassign to int*, since they can contain large negative
509         values if the register is spilled. Also added some comments. Fixes
510         #45817.
511
512         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
513         under Win32. Fixes #42964.
514
515 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
516
517         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
518
519         * aot.c: Added support for AOT compiling methods which contain calls
520         to wrappers. Currently, only remoting-invoke-with-check wrappers are
521         handled.
522         
523         * driver.c (compile_all_methods): Run the compilation in a thread
524         managed by mono. Fixes #44023.
525
526         * mini.c (mono_codegen): Print full method name in verbose output.
527
528         * mini-x86.c (mono_arch_patch_code): Fix warning.
529         
530         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
531         jumps, since the method we are jumping to might be domain-specific.
532
533         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
534
535 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
536
537         * inssel.brg: string chars are unsigned.
538
539 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
540
541         * TODO: New todo item.
542
543         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
544         which calls mono_runtime_class_init and patches the call site to
545         avoid further calls.
546         (mono_arch_create_class_init_trampoline): New arch specific function 
547         to create a class init trampoline.
548         (create_trampoline_code): Generalized so it can create
549         class init trampolines as well.
550
551         * mini.c (helper_sig_class_init_trampoline): New helper variable.
552         (mono_create_class_init_trampoline): New function to create and cache
553         class init trampolines.
554         (mono_find_class_init_trampoline_by_addr): New function to lookup the
555         vtable given the address of a class init trampoline. Used by the
556         patching process.
557         (mono_codegen): Generate a call to a trampoline instead of
558         mono_runtime_class_init in LDSFLD[A].
559         (mono_codegen): Add relocations for the new trampoline.
560         
561         * mini.h mini-x86.c aot.c: Added a new relocation type: 
562         MONO_PATCH_INFO_CLASS_INIT.
563
564         * mini.h: Bump AOT version number.
565
566         * aot.c: Create a copy of the loaded code instead of using the original
567         so methods which call each other will be close in memory, improving
568         cache behaviour.
569         
570         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
571         patch since it breaks the regression tests.
572         
573         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
574         for the register saving instruction sequence since the 
575         frame_state_for function in glibc 2.3.2 don't seem to detect it.
576
577 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
578
579         * TODO: Fix todo item && remove another.
580
581 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
582
583         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
584         previous checkin.
585
586         * aot.c: Moved the check for MONO_LASTAOT into the initialization
587         function of the module.
588
589         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
590         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
591         --no-aot command line option.
592
593 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
594
595         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
596         by Bernie Solomon (bernard@ugsolutions.com).
597
598         * inssel.brg: Refactor the interface offset table related code into
599         its separate functions and add support for the AOT case.
600
601 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
602
603         * aot.c (mono_aot_get_method_inner): Fix memory leak.
604         
605         * aot.c: Added mono_aot_verbose variable and made all debugging
606         output depend on the value of this variable.
607
608         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
609         method_label and info_label.
610
611         * mini.h mini-x86.c aot.c: Added a new relocation type 
612         MONO_PATCH_INFO_IID for klass->interface_id.
613
614         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
615         the MonoJitInfo structure.
616
617         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
618         a non-root appdomain in shared mode.
619
620 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
621
622         * aot.c: make aot loader less verbose. Remove free of unused variable.
623
624 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
625
626         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
627
628         * .cvsignore: Added *.dll.
629
630         * mini.c (mono_print_tree_nl): New function callable while debugging.
631
632         * mini.c (mono_print_code): Export this.
633
634         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
635         patched code.
636
637 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
638
639         * mini.h (MonoCompile): Added 'jit_info' field.
640
641         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
642         the cfg structure, since it is needed by the AOT compiler.
643
644         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
645
646         * aot.c: A major rewrite. Changes include:
647         - save exception tables for methods which have them.
648         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
649         to g_module_symbol.
650         - reworked the file format so it is now much smaller and needs
651         fewer relocation entries.
652         
653 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
654
655         * aot.c (load_aot_module): Fix build bustage on platforms without
656         Boehm GC.
657
658 2003-09-04  Martin Baulig  <martin@ximian.com>
659
660         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
661
662 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
663
664         * TODO: Some new optimization ideas.
665
666         * aot.c: Move AOT module loading logic here from mono_assembly_open.
667
668         * aot.c: Save the optimization flags used to compile the code into
669         the AOT module.
670
671         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
672         support emitting domain specific code.
673         
674         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
675         no longer domain neutral. It can be made domain neutral by compiling 
676         with --optimize=shared.
677
678         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
679         between appdomains.
680
681         * driver.c mini.h mini.c: New --no-aot debugging option which disables
682         loading of AOT code.
683
684         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
685         
686         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
687         if there is no domain neutrality information.
688
689 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
690
691         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
692         format version into the generated library.
693
694         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
695         callee method into the caller since one of them could be shared.
696
697         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
698         system exceptions from AOT code now works.
699
700         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
701         method if it is domain neutral and the callee is not.
702
703         * graph.c (cfg_emit_one_loop_level): Fix warning.
704
705 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
706
707         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
708         last checkin.
709
710 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
711
712         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
713         is needed  by code which is executed before mono_runtime_init ().
714         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
715         
716         * mini.c (mono_thread_abort): Fix warning.
717         (mono_jit_compile_method): Call static constructor in the AOT case too.
718
719         * aot.c (mono_compile_assembly): Fix warning.
720
721 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
722
723         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
724
725 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
726
727         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
728
729         * cpu-pentium.md: Fix the length of call opcodes so they include the
730         ESP restoring instruction. Fixes #47968.
731
732 2003-08-28  Martin Baulig  <martin@ximian.com>
733
734         * mini-x86.c (mono_arch_call_opcode): Added support for
735         MONO_TYPE_GENERICINST.
736
737         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
738
739 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
740
741         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
742         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
743
744         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
745         metadata_section.
746
747 2003-08-26  Martin Baulig  <martin@ximian.com>
748
749         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
750         when reporting an error, set this to the actual error location.
751         (mono_method_to_ir): Report the correct error location if
752         get_basic_blocks() returned an error.
753
754 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
755
756         * mini.c (mono_type_blittable): OBJECT is not blittable.
757         (mono_method_blittable): Methods which have marshalling descriptors
758         are not blittable either. Fixes #47842.
759
760 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
761
762         * driver.c mini.c: Use an environment variable instead of a global 
763         variable. Also fix the build.
764
765         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
766         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
767         reporting this. 
768
769         * driver.c mini.c: Added --with-valgrind option to turn off some
770         code which prevents mono from running under valgrind.
771
772         * mini.c (mono_emit_call_args): Fixed warning.
773
774         * mini.c (mono_emulate_opcode): Fixed warning.
775
776 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
777
778         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
779         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
780         regalloc.c, regalloc.h: specify available registers in arch-specific
781         code and support floats in the regallocator (patch by Laurent Morichetti 
782         <l_m@pacbell.net>)
783
784 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
785
786         * mini.c: mono_thread_current() can be called only after
787         mono_runtime_init(): rearrange code to not call it early on.
788
789 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
790
791         * mini.c: allocate jump tables in the code mempools.
792
793 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
794
795         * mini.c, mini.h: make sure per-thread data allocated by the jit is
796         freed.
797
798 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
799
800         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
801         12 to 16.  This fixes bug #47453.
802
803
804 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
805
806         * mini-ppc.c: fixed indexed load and unsigned compares.
807
808 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
809
810         * mini.c: reenabled installation of handler for
811           thread abort signal.
812
813 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
814
815         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
816         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
817         until it's fixed and actually useful.
818
819 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
820
821         * inssel-long32.brg: couple more opcodes implemented.
822
823 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
824         
825         * mini-sparc.c: Even more opcodes implemeted.
826
827 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
828
829         * mini-sparc.c: More opcodes implemented.
830
831 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
832
833         * mini-sparc.c: More opcodes implemented.
834
835 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
836
837         * inssel-sparc.brg: Add some needed rules.  Direct
838         copy from PPC.
839         * Makefile.am: Use inssel-sparc.brg
840         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
841         an assert happy for now.
842
843 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
844
845         * mini-sparc.c: Fixed compile errors.
846         * exceptions-sparc.c: Same.  We now produce a mono binary 
847         on sparc-linux.  Yea.
848
849 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
850
851         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
852         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
853         They compile, but do not work.
854
855 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
856
857         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
858         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
859         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
860         (ct@gentoo.org).
861
862 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
863
864         * mini.c: more opcodes implemented and better support for generics.
865
866 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
867
868         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
869         * mini.c, mini.h: first cut at generics support: some new instructions 
870         added and changed the behaviour of some of the existing ones.
871
872 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
873
874         * mini.c: Removed definition of metadata_shared mutex here.
875
876 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
877
878         * mini-x86.c: make vararg calls work for instance methods.
879
880 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
881
882         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
883         returns the arguments in a separte list, now.
884
885 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
886
887         * aot.c, mini.c: updates for array type representation changes.
888
889 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
890
891         * mini.c: register function to perform jit shutdown.
892
893 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
894
895         * mini.c: use a faster allocator if possible.
896
897 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
898
899         * aot.c: some cleanups and portability changes.
900
901 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
902
903         * mini.c: use faster allocation for CEE_BOX if possible.
904
905 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
906
907         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
908         Moved inlined mempcy code to its own function so that is can be
909         reused. Added an inline memset function as well (optimized initobj).
910         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
911
912 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
913
914         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
915
916 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
917
918         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
919         arch code can setup the cpu for CLR execution, if needed.
920         We use it on x86 to set the precision of FP operations.
921
922 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
923
924         * mini.c: disable some optimizations if we can guess they'll cost too
925         much for a given method.
926
927 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
928
929         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
930         
931 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
932         * mini.h mini.c mini-x86.c: Added instruction level coverage 
933         info collection support.
934
935 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
936
937         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
938         is now implemented in the profiling API. Get rid of a couple of
939         unnecessary global variables.
940
941 2003-06-15  Nick Drochak <ndrochak@gol.com>
942
943         * basic-long.cs: tests for negative values for bigmul, and unsigned.
944         * cpu-g4.md: add op_bigmul and op_bigmul_un
945         * cpu_pentium.md: add op_bigmul_un
946         * inssel-long32.brg: add rule for unsigned bigmul
947         * mini-ops.h: define OP_BIGMUL_UN
948         * mini-x86.c: THE BUG: handle (un)signed properly
949         * mini.c: choose unsigned opcode if needed.
950         This set of patches fixes bug #44291
951
952 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
953
954         * mini.c (optimize_branches): improved to handle all kinds of
955         conditional branches.
956
957 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
958
959         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
960         don't raise exceptions.
961
962 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
963
964         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
965         to arch-specific files.
966
967 2003-06-09  Martin Baulig  <martin@ximian.com>
968
969         * Makefile.am (libs): Added $(LIBGC_LIBS).
970
971 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
972
973         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
974         and OP_ATAN (fixes bug#44293).
975
976 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
977
978         * Makefile.am, mini-x86.c: rename cpu description array to
979         pentium_desc, since some compilers define the 'pentium' preprocessor
980         symbol.
981
982 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
983
984         * mini.c (mini_select_instructions): add explicit branch if the
985         following block is not the false target of a conditional branch -
986         we need this with any optimization that reorder or remove bblocks
987
988         * mini.c (optimize_branches): bug fixes
989
990 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
991
992         * mini.c (mono_method_to_ir): inline static readonly fields
993
994         * ssa.c (fold_tree): start cfold support for long (very simple
995         cases only)
996
997         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
998
999 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
1000
1001         * inssel.brg: fixed memcpy (bug #44219).
1002
1003 2003-06-05  Dick Porter  <dick@ximian.com>
1004
1005         * driver.c: Set the glib log levels to not abort if g_message
1006         recurses.
1007
1008         g_set_prgname() has to happen before mini_init() so that the
1009         process handle gets the info.
1010         
1011 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
1012
1013         * driver.c: add intrins to the default optimizations to get wider
1014         exposure.
1015
1016 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
1017
1018         * mini.h: some large basic blocks will overflow a 16-bit
1019         integers for symbolic registers.
1020
1021 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
1022
1023         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
1024         (mono_arch_output_basic_block): fix bug 43499 
1025
1026 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
1027
1028         * mini.c: kill duplicated definition of mono_debug_format.
1029
1030 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
1031
1032         * mini-x86.c, arrays.cs: fixed register allocation bug.
1033
1034 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
1035
1036         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
1037
1038         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
1039
1040 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1041
1042         * mini.c:
1043         (print_method_from_ip): also print source location information if
1044         available.
1045
1046 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
1047
1048         * mini.c (mono_find_block_region): bug fix in region code
1049         (mini_method_compile): enable removing unreachable code again, but
1050         only in methods without exception clauses.
1051
1052 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
1053
1054         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
1055         Implemented arglist opcode and handling of TypedReference type.
1056         Fixed x86 call convention when a structure is returned.
1057         Minimal support for calling static vararg methods.
1058
1059 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
1060
1061         * mini.c (mini_method_compile):  always remove unreachable code,
1062         because the code in them may be inconsistent  (access to dead
1063         variables for example).
1064
1065 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
1066
1067         * driver.c, debug-mini.c: warning fixes.
1068
1069 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
1070
1071         * Makefile.am, jit.h, mini.h: install header for embedding mono.
1072
1073 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
1074
1075         * mini.c: thread-static fields are registered in mono_class_vtable(),
1076         so ensure the function is called before checking for them.
1077
1078 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
1079
1080         * mini.c (optimize_branches): fix for bug 43586
1081
1082         * jit-icalls.c (mono_llmult_ovf): added an additional check for
1083         overflow (fixes Bug #43639)
1084
1085 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
1086
1087         * mini.c, objects.cs: allow the use of stobj for primitive types.
1088
1089 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
1090
1091         * mini.c: be less strict about argument checking until we support
1092         running the verifier.
1093
1094 2003-05-27  Nick Drochak <ndrochak@gol.com>
1095
1096         * basic-long.cs: tests for (ulong)int * (ulong)int also
1097         * mini.c: use the same trick for (ulong)int * (ulong)int
1098
1099 2003-05-27  Nick Drochak <ndrochak@gol.com>
1100
1101         * basic-long.cs: add regression test for (long)int * (long)int
1102         * cpu-pentium.md: add op_bigmul specification
1103         * inssel-long32.brg: add OP_BIGMUL rule
1104         * mini-ops.h: add OP_BIGMUL
1105         * mini-x86.c: register allocator: handle case where src1 needs to be
1106         in EAX.
1107         * mini.c: substitute special BIGMUL opcode in the tree for 
1108         (long)int * (long)int
1109
1110 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
1111
1112         * jit-icalls.c: call the type ctor on field access if needed.
1113
1114 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
1115
1116         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
1117         to a method (including results of ldelema, bug#43207).
1118
1119 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
1120
1121         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
1122         colors to show exception handler blocks.
1123
1124         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
1125         (fix for pinvoke7.cs).
1126
1127 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
1128
1129         * mini.h, mini.c: ensure correct initialization order for types that
1130         require it. Prepare for lazy compilation of jit icall wrappers.
1131         Provide a name for opcode emulation to reduce unneeded mallocing.
1132
1133 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
1134
1135         * mini-x86.c: better register restoring code and profiling
1136         support for tail calls.
1137
1138 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
1139
1140         * mini.h, driver.c: prepare for leaf methods optimization.
1141
1142 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
1143
1144         * mini.c: get targets of branches before converting a method.
1145
1146 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
1147
1148         * mini.c (optimize_branches): added some experimental code (disbaled) 
1149
1150 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
1151
1152         * mini.c (optimize_branches): fix branch to branch optimization 
1153
1154         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
1155
1156         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
1157
1158         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
1159
1160         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
1161         if needed.
1162
1163 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
1164
1165         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
1166         enable use of interface variables again.
1167
1168         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
1169         I1 to registers because there is no simply way to sign extend 8bit
1170         quantities in caller saved registers on x86.
1171
1172         * inssel-float.brg: set costs of some rules to 2 so
1173         that monobure always select the arch. specific ones if supplied,
1174         regardless of the order we pass the files to monoburg.
1175
1176 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
1177
1178         * mini.c, mini-x86.c: since the magic trampoline for jumps
1179         can't patch the code directly, we do it as soon as the
1180         method gets compiled.
1181
1182 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
1183
1184         * mini-x86.c, mini.h: introduce a new patching method
1185         to support CEE_JMP and tail calls.
1186         * mini.c: obey tail.call. Don't precompile methods target
1187         of CEE_JMP.
1188         * tramp-x86.c: new trampoline code to handle methods
1189         reached through a jump.
1190
1191 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
1192
1193         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
1194         bit values to registers
1195
1196 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
1197
1198         * mini.c (mono_compile_get_interface_var): share interface
1199         variables if possible.
1200
1201 2003-05-16  Martin Baulig  <martin@ximian.com>
1202
1203         * debug-mini.c (mono_init_debugger): New function to initialize
1204         the debugger.  This is not in the debugger since it needs to
1205         access some of mini's internals.
1206
1207 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
1208
1209         * mini.c (mono_method_to_ir): inlining fixes/cleanups
1210
1211 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
1212
1213         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
1214         for value type handling.
1215
1216 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
1217
1218         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
1219         (mono_method_check_inlining): enable inlining of all kinds of wrappers
1220
1221 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
1222
1223         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
1224           the constructor through a proxy.
1225
1226 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
1227
1228         * jit-icalls.c, inssel.brg: fixes to array element address
1229         calculations.
1230
1231 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
1232
1233         * mini-x86.c (is_regsize_var): allocate pointer to registers
1234
1235 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
1236
1237         * driver.c: fixed typo, added intrins to the set of optimizations
1238         tested with regressions.
1239
1240 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
1241
1242         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
1243         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
1244         test case.
1245
1246 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
1247
1248         * inssel.brg: remove some common pop instructions without side effects
1249
1250 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
1251
1252         * inssel-x86.brg: fixed thinko in int to double conversions.
1253
1254 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
1255
1256         * mini.c, jit-icalls.c: added runtime thread-static variable support.
1257
1258 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
1259
1260         * inssel-long32.brg: two more missing instructions.
1261
1262 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
1263
1264         * mini.c (mono_emit_call_args): set the cil_code for all arguments
1265         if not already set.
1266
1267 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
1268
1269         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
1270         correctly.
1271
1272         * basic-float.cs: Added tests for negative zero.
1273
1274 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
1275
1276         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
1277         a couple of missing operations for long casts, with test cases.
1278
1279 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1280
1281         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
1282
1283 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
1284
1285         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
1286         code size estimation.
1287
1288 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
1289
1290         * mini.c (mono_jit_create_remoting_trampoline): make it work with
1291         abstract methods (fix bug 42542)
1292
1293         * aot.c: add ability to handle array types
1294         
1295 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
1296
1297         * mini.c: Call the _specific versions of the object allocation
1298         functions if possible.
1299
1300 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
1301
1302         * driver.c: call setlocale ().
1303
1304 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
1305
1306         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
1307         windows build.
1308
1309 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
1310
1311         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
1312
1313         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
1314         wrappers (fix bug 42122)
1315
1316 2003-05-04  Martin Baulig  <martin@ximian.com>
1317
1318         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
1319
1320         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
1321         s/mini_set_defaults/mono_set_defaults/g.
1322
1323 2003-05-04  Martin Baulig  <martin@ximian.com>
1324
1325         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
1326
1327 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
1328
1329         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
1330         (reported by Don Roberts).
1331
1332 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
1333
1334         * mini.c: temporarily work around two bugs for this release.
1335
1336 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
1337
1338         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
1339         that contains -export-dynamic and it makes using the ld script
1340         useless.
1341         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
1342
1343 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
1344
1345         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
1346         specific cpu.
1347
1348 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
1349
1350         * mini.c: make sure leave calls all the needed finally blocks,
1351         even when the target jumps out of multiple exception clauses.
1352
1353 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
1354
1355         * ldscript, Makefile.am: add linker script to reduce the number of
1356         exported symbols (should also fix the issues with libwine defining
1357         some of the same symbols in io-layer).
1358
1359 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
1360
1361         * driver.c (mini_main): Avoid assertion when no file name is given on 
1362         the command line.
1363
1364 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
1365
1366         * driver.c: added --version/-V command line option.
1367         Added the inline optimization in the regression tests.
1368
1369 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
1370
1371         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
1372         to the type in the method signature (fixes bug#42134).
1373
1374 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
1375
1376         * mini.c: when inlining, check this is not null only when needed (bug #42135).
1377
1378 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
1379
1380         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
1381
1382 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1383
1384         * driver.c: fixed bug #42100.
1385
1386 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
1387
1388         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
1389
1390 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
1391
1392         * mini.c: moved most of the code required to do inlining to its own
1393         function so it can be reused. Inline also ctors if appropriate.
1394
1395 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
1396
1397         * Makefile.am: Link with -export-dynamic so shared libs loaded by
1398         the runtime can call mono API functions.
1399
1400 2003-04-27  Martin Baulig  <martin@ximian.com>
1401
1402         * debug-mini.c (mono_debug_init_method): Added
1403         `guint32 breakpoint_id' argument; if the method has a breakpoint,
1404         send a notification to the debugger.
1405
1406         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
1407         running in the Mono Debugger, just pass the breakpoint number to
1408         mono_debug_init_method().
1409
1410         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
1411
1412 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
1413
1414         * mini.c: allow some more unsafe compares.
1415
1416 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
1417
1418         * mini-x86.c, Makefile.am: make distcheck works (partially from
1419         a patch by Richard Lee <r.h.lee@attbi.com>).
1420         * regset.c, regset.h: removed, they are unused.
1421
1422 2003-04-25  Dick Porter  <dick@ximian.com>
1423
1424         * driver.c: Usage reports the name as 'mono' not 'mini'
1425         * exceptions-x86.c: Build and run on freebsd
1426
1427 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
1428
1429         * Makefile.am: install the program with the 'mono' name and
1430         the library as libmono instead of mini and libmini.
1431
1432 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
1433
1434         * driver.c: provide the APIs for the embedding interface of the old jit.
1435
1436 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
1437
1438         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
1439
1440 2003-04-23  Martin Baulig  <martin@ximian.com>
1441
1442         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
1443
1444         * driver.c: Added `--debug' command line argument to enable
1445         debugging support.
1446
1447 2003-04-23  Martin Baulig  <martin@ximian.com>
1448
1449         * debug.[ch]: Removed.  The code is now in
1450         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
1451
1452         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
1453         last six months.
1454
1455 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
1456
1457         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
1458
1459 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1460
1461         * mini.c:
1462         (mini_cleanup): moved mono_runtime_cleanup call after the call to
1463         mono_domain_finalize.
1464         (mini_method_compile): use mono_method_profile* if the the option is
1465         enabled.
1466
1467 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
1468
1469         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
1470         methods with their wrapper.
1471
1472         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
1473         methods with their wrapper.
1474
1475         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
1476         their wrapper.
1477
1478         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
1479         wrapper.
1480
1481         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
1482         methods.
1483
1484 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
1485
1486         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
1487
1488 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
1489
1490         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
1491         of the mempool. This is slightly faster and uses less memory
1492
1493 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
1494
1495         * mini.c: avoid O(n) allocation for variables.
1496
1497 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
1498
1499         * mini.c: handle items on the stack after inlining methods.
1500
1501 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
1502
1503         * mini.c: make the method->opcode optimization dependent
1504         on MONO_OPT_INSTRINS and do it lazily.
1505
1506 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
1507
1508         * driver.c: print overall results at the end of regression run.
1509
1510 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
1511
1512         * inssel.brg: don't overwrite symbolic registers.
1513
1514 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
1515
1516         * inssel-x86.brg: fix conversion from long to float.
1517
1518 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
1519
1520         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
1521
1522 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
1523
1524         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
1525
1526         * driver.c: Added --print-vtable option as in the old JIT.
1527
1528 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
1529
1530         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
1531
1532 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
1533
1534         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
1535
1536 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
1537
1538         * mini.c regalloc.c regalloc.h: Fix memory leak.
1539
1540 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
1541
1542         * aot.c (mono_aot_get_method): register all used strings
1543
1544 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
1545
1546         * mini.c: always intern strings references with ldstr at compile time.
1547
1548 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
1549
1550         * Makefile.am: add BUILT_SOURCES.
1551
1552 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
1553
1554         * driver.c: give a better error message when the assembly to execute
1555         doesn't have an entry point.
1556
1557 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
1558
1559         * Makefile.am: added hack for automake
1560
1561         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
1562         correct sematics.
1563
1564         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
1565
1566 22003-04-07  Martin Baulig  <martin@ximian.com>
1567
1568         * Makefile.am: Added Makefile.am.
1569
1570         * debugger-main.c: Removed, this is now in the debugger where it
1571         belongs.
1572
1573         * mini.pc.in: Call this package `mini' for the moment.
1574
1575
1576