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